diff --git a/Fuzzing/XXE-Fuzzing.txt b/Fuzzing/XXE-Fuzzing.txt index fb601df..c94683f 100644 --- a/Fuzzing/XXE-Fuzzing.txt +++ b/Fuzzing/XXE-Fuzzing.txt @@ -45,5 +45,7 @@ x' or name()='username' or 'x'='y ]> ]>   "> %int; +"> %dtd;%trick;]> %dtd;%trick;]> + %dtd;]>]]> diff --git a/Pattern-Matching/grepstrings-auditing-php.md b/Pattern-Matching/grepstrings-auditing-php.md new file mode 100644 index 0000000..075e8e2 --- /dev/null +++ b/Pattern-Matching/grepstrings-auditing-php.md @@ -0,0 +1,46 @@ +# Auditing php source code with grep + +## XSS +`grep -Ri "echo" *` + +`grep -Ri "\$_" * | grep "echo"` + +`grep -Ri "\$_GET" * | grep "echo"` + +`grep -Ri "\$_POST" * | grep "echo"` + +`grep -Ri "\$_REQUEST" * | grep "echo"` + + +- - - + + +## SQL Injection +`grep -Ri "$sql" *` + +`grep -RI "mysqli(" *` + +`grep -Ri "pdo(" * ` + + +- - - + + + +## File inclusion +`grep -Ri "file_include(" * ` + +`grep -Ri "file_get_contents(" * ` + +`grep -Ri "include(" *` + + +- - - + + +## Command execution +`grep -Ri "shell_exec(" *` + +`grep -RIt "system(" *` + +`grep -Ri "exec(" * ` diff --git a/Pattern-Matching/malicious.txt b/Pattern-Matching/malicious.txt index f5e258f..e7ccdb2 100644 --- a/Pattern-Matching/malicious.txt +++ b/Pattern-Matching/malicious.txt @@ -92,3 +92,6 @@ str_repeat unserialize register_tick_function register_shutdown_function +getuid +uname +gethostname