<![CDATA[ HACK, check your site: /assets/snippets/ditto/snippet.ditto2.php - My Forums]]> https://forums.modx.com/thread/?thread=91891 <![CDATA[Re: HACK, check your site: /assets/snippets/ditto/snippet.ditto2.php]]> https://forums.modx.com/thread/91891/is-it-a-hack?page=8#dis-post-562164 https://forums.modx.com/thread/104072/security-issue-with-gallery-extra-below-1-7-1#dis-post-562056]]> mrhaw Oct 17, 2018, 06:59 PM https://forums.modx.com/thread/91891/is-it-a-hack?page=8#dis-post-562164 <![CDATA[Re: HACK, check your site: /assets/snippets/ditto/snippet.ditto2.php]]> https://forums.modx.com/thread/91891/is-it-a-hack?page=7#dis-post-562102 Quote from: mrhaw at Jul 03, 2014, 08:50 AM
Most security holes reside in Extras being uploaded to assets folder.

There are 3 things you can do to secure old sites:

2. Restrict access to .tpl and .php files in assets folder:
<filesmatch "\.(php|tpl)$"="">
   Order allow,deny
   Deny from all
</filesmatch>


Disappearing Articles:

For others reading this thread, this kills Articles. No Articles show up when you go to "Manage Articles."]]>
BobRay Oct 16, 2018, 06:18 AM https://forums.modx.com/thread/91891/is-it-a-hack?page=7#dis-post-562102
<![CDATA[Re: HACK, check your site: /assets/snippets/ditto/snippet.ditto2.php]]> https://forums.modx.com/thread/91891/is-it-a-hack?page=7#dis-post-506411
If I take the .htaccess out of assets manager works and the site looks ok on mobiles?]]>
gavinbaylis Aug 13, 2014, 09:00 AM https://forums.modx.com/thread/91891/is-it-a-hack?page=7#dis-post-506411
<![CDATA[Re: HACK, check your site: /assets/snippets/ditto/snippet.ditto2.php]]> https://forums.modx.com/thread/91891/is-it-a-hack?page=7#dis-post-506403
<filesmatch connector.php>
Order deny,allow
allow from all
</filesmatch> 


Then all works fine.]]>
mediengaarage Aug 13, 2014, 06:46 AM https://forums.modx.com/thread/91891/is-it-a-hack?page=7#dis-post-506403
<![CDATA[Re: HACK, check your site: /assets/snippets/ditto/snippet.ditto2.php]]> https://forums.modx.com/thread/91891/is-it-a-hack?page=7#dis-post-506402
You should do clean updates to 1.0.14 as JaKo described in a post:
http://forums.modx.com/thread/92609/modx-evo-spamming#dis-post-506096

I have also changed passwords etc and deleted numerous snippet.ditto.2.php in both cache and assets/snippets/ditto dirs
]]>
hgw7m Aug 13, 2014, 06:19 AM https://forums.modx.com/thread/91891/is-it-a-hack?page=7#dis-post-506402
<![CDATA[Re: HACK, check your site: /assets/snippets/ditto/snippet.ditto2.php]]> https://forums.modx.com/thread/91891/is-it-a-hack?page=7#dis-post-506397
Für die Funktion „Lightbox“ (oder anderer Viewer) im Frontend eine .htaccess in assets/modules/easy2 mit folgendem Inhalt:

<filesmatch show.easy2gallery.php>
Order deny,allow
allow from all
</filesmatch>

Für die Thumbnailanzeige im Backend eine .htaccess in
assets/modules/easy2/includes/controllers

<filesmatch module.gallery.default.thumb.php>
Order deny,allow
allow from all
</filesmatch>

]]>
hgw7m Aug 13, 2014, 05:23 AM https://forums.modx.com/thread/91891/is-it-a-hack?page=7#dis-post-506397
<![CDATA[Re: HACK, check your site: /assets/snippets/ditto/snippet.ditto2.php]]> https://forums.modx.com/thread/91891/is-it-a-hack?page=7#dis-post-506396
I have also disabled the forgot manager plugin

I would just like to confirm that the htaccess in the root should be configured like this now

SetEnvIfNoCase User-Agent "Jakarta Commons" keep_out
SetEnvIfNoCase User-Agent "Y!OASIS/TEST"    keep_out
SetEnvIfNoCase User-Agent "libwww-perl"     keep_out
SetEnvIfNoCase User-Agent "MOT-MPx220"      keep_out
SetEnvIfNoCase User-Agent "MJ12bot"         keep_out
SetEnvIfNoCase User-Agent "Nutch"           keep_out
SetEnvIfNoCase User-Agent "cr4nk"           keep_out


# For full documentation and other suggested options, please see
# http://svn.modxcms.com/docs/display/MODx096/Friendly+URL+Solutions
# including for unexpected logouts in multi-server/cloud environments
# and especially for the first three commented out rules

#php_flag register_globals Off
#AddDefaultCharset utf-8
#php_value date.timezone Europe/Moscow

Options +FollowSymlinks
RewriteEngine On
RewriteBase /

# Fix Apache internal dummy connections from breaking [(site_url)] cache
RewriteCond %{HTTP_USER_AGENT} ^.*internal\ dummy\ connection.*$ [NC]
RewriteRule .* - [F,L]

# Rewrite domain.com -> www.domain.com -- used with SEO Strict URLs plugin
#RewriteCond %{HTTP_HOST} .
#RewriteCond %{HTTP_HOST} !^www\.example\.com [NC]
#RewriteRule (.*) http://www.example.com/$1 [R=301,L]

# Exclude /assets and /manager directories and images from rewrite rules
RewriteRule ^(manager|assets)/*$ - [L]
RewriteRule \.(jpg|jpeg|png|gif|ico)$ - [L]

# For Friendly URLs
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
RewriteCond %{QUERY_STRING} (.*)(http|https|ftp):\/\/(.*) [NC,OR]
RewriteCond %{QUERY_STRING} (.*)(reflect\.php|contact\.php)(.*) [NC,OR]
RewriteCond %{QUERY_STRING} proc/self/environ [OR]
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
RewriteCond %{QUERY_STRING} base64_encode.*(.*) [OR]
RewriteCond %{QUERY_STRING} (<|%3C).*script.*(>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|[|\%[0-9A-Z]{0,2}) [OR]
RewriteCond %{QUERY_STRING} _REQUEST(=|[|\%[0-9A-Z]{0,2})
RewriteRule ^(.*)$ /blackhole/index.php? [R,L]

# Reduce server overhead by enabling output compression if supported.
#php_flag zlib.output_compression On
#php_value zlib.output_compression_level 5


As well as creating a new .htaccess in the assets folder dir

<filesmatch "\.(php|tpl)$"="">
   Order allow,deny
   Deny from all
</filesmatch>


I have also changed passwords etc and deleted numerous snippet.ditto.2.php in both cache and assets/snippets/ditto dirs]]>
gavinbaylis Aug 13, 2014, 05:17 AM https://forums.modx.com/thread/91891/is-it-a-hack?page=7#dis-post-506396
<![CDATA[Re: HACK, check your site: /assets/snippets/ditto/snippet.ditto2.php]]> https://forums.modx.com/thread/91891/is-it-a-hack?page=7#dis-post-506388
<files multitv.connector.php>
   Order deny,allow
   allow from all
</filesmatch>


Same approach should work in easy2gallery (allowing only the thumbnail controller file to be executed).]]>
Jako Aug 13, 2014, 02:58 AM https://forums.modx.com/thread/91891/is-it-a-hack?page=7#dis-post-506388
<![CDATA[Re: HACK, check your site: /assets/snippets/ditto/snippet.ditto2.php]]> https://forums.modx.com/thread/91891/is-it-a-hack?page=7#dis-post-506363 Quote from: hgw7m at Aug 12, 2014, 11:05 AM

...
Is there a way to specify folders or certain php files to allow to be executed? Or specify a user (MODX System ...?) who is not denied? I'm aware that this may reduce the security effect of the rule...

Thanks for your hints again!


I need to make research on allowing a subfolder breaking free. As of now I can only think of placing individual .htaccess in all assets folders except modules. Then you could add some security by renaming the module folders + update the change in the include() / or header() paths.

This security measure also effects multiTV! It sounded like Jako had an idea how to workaround this...
http://forums.modx.com/thread/91265/modx-evolution-1-0-14-out-now#dis-post-499625
]]>
mrhaw Aug 12, 2014, 05:39 PM https://forums.modx.com/thread/91891/is-it-a-hack?page=7#dis-post-506363
<![CDATA[Re: HACK, check your site: /assets/snippets/ditto/snippet.ditto2.php]]> https://forums.modx.com/thread/91891/is-it-a-hack?page=7#dis-post-506320
we now ran into a problem with mrhaw's great security todo recommendations and easy2gallery:

2. Restrict access to .tpl and .php files in assets folder:

<filesmatch "\.(php|tpl)$">
   Order allow,deny
   Deny from all
</filesmatch>


Unfortunately this seems to prevent easy2gallery snippet to show thumbnails in manager (easy2-> Menu/Files) and to load big images i frontend

The timeline says that /assets/modules/easy2/includes/controllers is 403/Forbidden,

and

show.easy2gallery.php?fid=99
/assets/modules/easy2 is 403/Forbidden

Removing the htaccess rule makes the thumbnails and big images visible again.

Is there a way to specify folders or certain php files to allow to be executed? Or specify a user (MODX System ...?) who is not denied? I'm aware that this may reduce the security effect of the rule...

Thanks for your hints again!

]]>
hgw7m Aug 12, 2014, 06:05 AM https://forums.modx.com/thread/91891/is-it-a-hack?page=7#dis-post-506320