MyBB Community Forums

Full Version: online plugin install, like smf (very admin friendly)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
(to be clear, i mean "install plugins online by browsing web repository", not "auto update forum version")

hi .... i would like if you develop some standardized way to allow plugins install "online" like smf does ... i think is a terrific feature that mybb should support because you dont always have access to ssh/ftp/file manager/cpanel/etc, and is way more comfortabe doing by web ... currently the trend is to do everything online

currently, plugin installation is a bit complicated in the sense you need various different technologies... i.e. i need at least sftp/extplorer, ssh console, and web access to admin panel .. upload files with sftp/extplorer, uncompress with ssh/extplorer, sometimes adjust permissions with ssh, and activate and configure plugin with admin cp ... sometimes files overwrite or mess permissions or copy in wrong place

moreover often you have to read some installation readme since many plugins have particular ways to install/enable ... sometimes even due this "by hand" installation method you mess up core files. and that if you couldnt revert changes or didnt backup before you lose files/data, render your forum unusable and have to rollback everything, losing users, etc

i think all these facts make plugin installation complicated, and therefore insecure .... when installing a plugin is more probable you do something wrong than plugin itself were bugged or malicious ... i messed up my forum a ton times just because plugin install docs were unclear or wrong, or by own neglection, when in addition i didnt make backups Sad

so maybe it should be (if not) a document with best procedures and practices to install plugins, what (would) make even more uncomfortable and error tied since you should read extense and detailed documents, adding more variables to equation

i think doing it by hand does not add more "security" to the process but the opossite due complications... hand installed plugins could actually be more malicious sonce generally forum admins are little more skilled than standard user,  have no extense knowledge, and rely in what plugin developer says...  however in a self installed plugin, core software will take control of all installation aspects reducing risks and time



in the other hand, installing plugins directly from admin panel is delicious  .... sweet easy, fast, and cheap ... i would test dozens of plugins in my forum before select the best, just for pleasure Big Grin .... like install an APKs in your phone

you need no external tools, can do it in less steps, all plugins install same way, core software cares about installation details, security, standardization, permissions, prevents file overwtiting, conflicts, take care of self integrity, statistics, etc

you mybb devs could issue some documentation for plugin developers with standards on how to implement installation packages, in order plugins could install and work compatible with mybb packaged plugins

for example each plugin could be jailed or some "chrooted" in its own directory ... or could provide a file indicating the path for each file (or examine directory tree inside zip before move files), allowing resolving file conflicts with other plugins or core files before installing.. or could make use of some "mybb plugin installation api" or whatever

i dont know... you could take some concepts from smf or apks/market .. but for sure would be very nice if this feature were implemented Big Grin
Quote:currently, plugin installation is a bit complicated in the sense you need various different technologies... i.e. i need at least sftp/extplorer, ssh console, and web access to admin panel .. upload files with sftp/extplorer, uncompress with ssh/extplorer, sometimes adjust permissions with ssh, and activate and configure plugin with admin cp ... sometimes files overwrite or mess permissions or copy in wrong place

In MyBB 2.0 plugins should follow a standard layout, making it harder to mess things up. Installing plugins isn't something you should be doing very often anyway.

Quote:moreover often you have to read some installation readme since many plugins have particular ways to install/enable ... sometimes even due this "by hand" installation method you mess up core files. and that if you couldnt revert changes or didnt backup before you lose files/data, render your forum unusable and have to rollback everything, losing users, etc

The whole point of the plugin system is so you don't need to touch the core installation. If you're installing a plugin which replaces core files then that plugin is terribly designed.

Scenario:

You install a plugin using the Admin CP. Your forum is now unusable. Blank pages, you can't access anything. It messed up big time. You didn't take a backup. You don't know which files were placed where. Your users can't access your forum and you don't know what to do.

That is why human oversight is required. You can't automate everything. If you know what went wrong, you can fix it.

Needless to say, if you're not making backups and you somehow screw up so badly that you're losing data, that's your fault. Making it easier for administrators to screw up for the sake of convenience is a bad idea.

Quote:i think all these facts make plugin installation complicated, and therefore insecure .... when installing a plugin is more probable you do something wrong than plugin itself were bugged or malicious ... i messed up my forum a ton times just because plugin install docs were unclear or wrong, or by own neglection, when in addition i didnt make backups

Absolutely not. In fact, your suggestion would make it incredibly easy for someone with access to an admin account (authorized or otherwise) to install a backdoor and execute arbitrary code. It makes it less secure.

Again, if you're not making backups, that's your fault.

Quote:i think doing it by hand does not add more "security" to the process but the opossite due complications... hand installed plugins could actually be more malicious sonce generally forum admins are little more skilled than standard user, have no extense knowledge, and rely in what plugin developer says... however in a self installed plugin, core software will take control of all installation aspects reducing risks and time

I hide a backdoor in a plugin, you install it, it pings my server and I have full access. It's the same whether you manually install the plugin or click a button in the ACP. If anything, it would make it more likely my plugin would be installed because it's only a click away.

Quote:in the other hand, installing plugins directly from admin panel is delicious .... sweet easy, fast, and cheap ... i would test dozens of plugins in my forum before select the best, just for pleasure .... like install an APKs in your phone

you need no external tools, can do it in less steps, all plugins install same way, core software cares about installation details, security, standardization, permissions, prevents file overwtiting, conflicts, take care of self integrity, statistics, etc

It's convenient. It's not secure.

FYI, an Android app can root and backdoor your phone, persisting across factory resets. A MyBB plugin can drop a backdoor into your MyBB installation which isn't removed after uninstallation. These are real risks. I cannot advocate for a feature which has one single positive and many destructive negatives.

Quote:for example each plugin could be jailed or some "chrooted" in its own directory ... or could provide a file indicating the path for each file (or examine directory tree inside zip before move files), allowing resolving file conflicts with other plugins or core files before installing.. or could make use of some "mybb plugin installation api" or whatever

Not possible. You can force plugins to go where they need to go during installation. You can't control what they do once they've been installed.
ok ... it seems installing plugins by clicking a button in online repo wont happen, until i think is a good idea in all aspects

will plugin instalation at least could be done by uploading a zip trought admin cp? ... that way core software could make a log while installing so changes could be undone and plugin uninstalled ..

i just have ssh access to my core files, so it would be a great help to install plugins just by web with no other tools ... anyway i dont see smf is more insecure because this feature

consider if you install a plugin and it has commands like "if (!file_exists('../core/dir/malicious.php')) { copy ('plugin/dir/innocent.php', ../core/dir/malicious.php');}" .... that way some plugin could inject core files make them difficult to track whatever installation method, so installation method is irrelevant
I think this was discussed before and it was determined by many that the benefits don't outweigh the negatives, which Nathan pointed out.
(2017-07-03, 08:28 PM)atesin Wrote: [ -> ]will plugin instalation at least could be done by uploading a zip trought admin cp? ... that way core software could make a log while installing so changes could be undone and plugin uninstalled ..

No. Same problem, just easier for the attacker to upload a shell. That's why it's a terrible idea -- It would allow people to execute arbitrary code.

(2017-07-03, 08:28 PM)atesin Wrote: [ -> ]i just have ssh access to my core files, so it would be a great help to install plugins just by web with no other tools ... anyway i dont see smf is more insecure because this feature

Assuming you're using public key auth and have disabled root access over SSH, you're already using the most secure method. That's something which you should see a positive towards your forum's security.

(2017-07-03, 08:28 PM)atesin Wrote: [ -> ]consider if you install a plugin and it has commands like "if (!file_exists('../core/dir/malicious.php')) { copy ('plugin/dir/innocent.php', ../core/dir/malicious.php');}" .... that way some plugin could inject core files make them difficult to track whatever installation method, so installation method is irrelevant

You're missing the point completely.

I gain access to your admin account. I upload a malicious plugin. Game over. It's arbitrary code. You don't have control over it.
(2017-07-03, 10:35 AM)atesin Wrote: [ -> ]currently, plugin installation is a bit complicated in the sense you need various different technologies... i.e. i need at least sftp/extplorer, ssh console, and web access to admin panel .. upload files with sftp/extplorer, uncompress with ssh/extplorer, sometimes adjust permissions with ssh, and activate and configure plugin with admin cp ...

This is the right way to do things.
In my VPS, there is only one folder that my ftp can access.
No control panel or something.

After uploading the zip folder, I need access using ssh.
This is indeed the safest method there is.
The control panel or something of the kind only helps to create more security hole.