if requests.get(
target + '/assets/components/gallery/connector.php',
verify=verify).status_code != 404:
print(Fore.GREEN + '/assets/components/gallery/connector.php - found')
url = target + '/assets/components/gallery/connector.php'
The attack on Gallery Extra was looking precisely for a
very specific URL.
Had a user had theirs changed,
end of story! what was looked for would not have been found, full-stop.
It would have been found if the hacking script went further to search for it (which I doubt this particular script was doing - please someone correct me if I am so utterly and blindly and stupidly wrong ...)
MODX allows one and facilitates and
encourages one to change the assets folder name.
"
assets" might seem intuitive = cool!, but also intuitive to hackers of WP and other CMSes, and any hacker who studies the MODX code on github to see
default folder structures (just saying!)
in core/config/config.php around line 77
if (!defined('MODX_ASSETS_PATH')) {
$modx_assets_path= '/home/m_user/public_html/mined/gems/';
$modx_assets_url= '/mined/gems/';
define('MODX_ASSETS_PATH', $modx_assets_path);
define('MODX_ASSETS_URL', $modx_assets_url);
}
Then, of course, create that folder, or rename the existing assets folder.
Why is this even important? Well, some Extras, till tomorrow,
require certain PHP in their folders to do the wonders that please us.
All responsible Extras/templates should find their Extra's folder via dynamic code.
If the Extra
presumes and hardcodes "yoursite.com/assets/components/bla" ... oh well,
bound to fail!
- MODX_ASSETS_PATH - in PHP
- MODX_ASSETS_URL in PHP
- [[++assets_path]] - MODX tag
- [[++assets_url]] - MODX tag
[ed. note: donshakespeare last edited this post 6 years, 7 months ago.]