Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Finding Php Shell Scripts In Your Website

Here is a simple bash shell script that will search your public_html directories for common file names as well as search all files for common methods used for shell scripts using the fastest possible method with a large number of files. It will dump the results to a file called "php_backdoors" which you can examine to determine what is and what is not a false positive.

To use this shell script just paste this into a file called checker.sh in the directory before your public_html folder, then run it with the following command:
sh checker.sh

Here it's code.
Code
#!/bin/bash


cd public_html/


find . -type f \( -iname "1.*" -o -iname "sh.php" \) -print0 >> ../php_backdoors

find . -type f \( -iname "*.php" -o -iname "*.inc" \) -print0 | xargs -0 -r grep -REn \
'(c99|r57|exif_read_data|extract|passthru|shell_ex  ec|base64_decode|fopen|fclose|eval|Refresh|refresh  |justrulz)' >> ../php_backdoors

find . -type f \( -iname "*.gif" -o -iname "*.jpg" -o -iname "*.jpeg" \) -print0 | xargs -0 -r grep -REn \
'(eval|base64_decode)' >> ../image_backdoors
lol that's shittiest php shell detector i've ever seen
(Aug 9, 2015 10:15 AM)xorl Wrote:  lol that's shittiest php shell detector i've ever seen

can't agree with you more 😏😏
(Aug 9, 2015 10:15 AM)xorl Wrote:  lol that's shittiest php shell detector i've ever seen
This is scratching the top when you're scanning your site from outside the PHP system. This is not the correct way to approach this.
This will pick up the most common web shells.. nothing wrong with this
Let me just rename mt file to TO0R.php ok fixed now its undetectable (rofl)
[Image: DE7Frrn.gif]

This will only find skid shells, who doesnt know how to hide a shell.
Quote:justrulz

I don't get this one, halp
(Aug 9, 2015 04:34 AM)DarkMethods Wrote:  Here is a simple bash shell script that will search your public_html directories for common file names as well as search all files for common methods used for shell scripts using the fastest possible method with a large number of files.

It's fast because it has nothing to it.


Possibly Related Threads...
Thread / Author Replies Views Last Post
by mObiIeMay 14, 2024 01:39 PM 1,476 68,005 May 14, 2024 01:39 PM
Last Post: SilentNuke
by BYTEXFeb 16, 2024 05:05 PM 1 188 Feb 16, 2024 05:05 PM
Last Post: linkinpork
by th3darklyNov 20, 2020 11:02 AM 1 147 Nov 20, 2020 11:02 AM
Last Post: lucif3r666