Changeset 520

Show
Ignore:
Timestamp:
04/19/06 01:18:17 (3 years ago)
Author:
common
Message:

nepenthes
- shellcode-signatures

  • namespace alphanumericxor added
    • alphanumericxor::msfpexalphanum added
    • alphanumericxor::skylined added
  • bindshell::augsburg added ( http://nepenthes.mwcollect.org/csni:shellcodes:augsburg ) as it uses alphanumericxor
  • payload added as mapping value for namespace alphanumericxor::
  • added namespace alphanumericxor::
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • nepenthes/trunk/modules/shellcode-signatures/Makefile.am

    r519 r520  
    2828shellcodesignatures_la_SOURCES += sch_engine_unicode.cpp sch_engine_unicode.hpp 
    2929shellcodesignatures_la_SOURCES += sch_namespace_konstanzxor.cpp sch_namespace_konstanzxor.hpp 
     30shellcodesignatures_la_SOURCES += sch_namespace_alphanumericxor.cpp sch_namespace_alphanumericxor.hpp 
    3031shellcodesignatures_la_LDFLAGS = -module -no-undefined -avoid-version 
    3132 
  • nepenthes/trunk/modules/shellcode-signatures/parser.h

    r471 r520  
    1616        sc_url, 
    1717        sc_bindfiletransfer, 
    18         sc_base64 
     18        sc_base64, 
     19        sc_alphanumericxor 
    1920 
    2021}; 
     
    3536        sc_none, 
    3637        sc_hostkey, 
    37         sc_portkey 
     38        sc_portkey, 
     39        sc_payload 
    3840 
    3941}; 
  • nepenthes/trunk/modules/shellcode-signatures/parser.l

    r471 r520  
    5454"bindfiletransfer"                              { return SC_BIND_FILETRANSFER; } 
    5555"base64"                      { return SC_BASE64; } 
     56"alphanumericxor"                                       { return SC_ALPHANUMERICXOR; } 
    5657 
    5758"hostkey"                     { return SC_HOSTKEY; } 
     
    6970"pre"                         { return SC_PRELOAD; } 
    7071"post"                        { return SC_POSTLOAD; } 
     72"payload"                     { return SC_PAYLOAD; } 
    7173 
    7274 
  • nepenthes/trunk/modules/shellcode-signatures/parser.y

    r471 r520  
    3434 
    3535%token SC_ID SC_LPAR SC_RPAR SC_LBR SC_RBR SC_COMMA SC_SEMI SC_COLON SC_NONE SC_FLAGS SC_PATTERN SC_TYPE SC_MAPPING SC_STRING  
    36 SC_XOR SC_LINKXOR SC_KONSTANZXOR SC_LEIMBACHXOR  
     36SC_XOR SC_LINKXOR SC_KONSTANZXOR SC_LEIMBACHXOR SC_ALPHANUMERICXOR 
    3737SC_BIND_SHELL  
    3838SC_CONNECTBACK_SHELL  
     
    4646SC_DECODER SC_PRELOAD SC_POSTLOAD 
    4747SC_HOSTKEY SC_PORTKEY 
     48SC_PAYLOAD 
    4849 
    4950%start body 
     
    151152                $$ = sc_base64; 
    152153        } 
    153         ; 
     154        | 
     155        SC_ALPHANUMERICXOR 
     156        { 
     157                $$ = sc_alphanumericxor; 
     158        } 
     159   ; 
    154160 
    155161statements 
     
    251257        { 
    252258                $$ = sc_portkey; 
     259        } 
     260   | SC_PAYLOAD 
     261        { 
     262                $$ = sc_payload; 
    253263        } 
    254264        ; 
     
    335345                "url", 
    336346                "bindfiletransfer", 
    337                 "base64" 
     347                "base64", 
     348      "alphanumericxor" 
    338349        }; 
    339350 
     
    361372                "none", 
    362373                "hostkey", 
    363                 "portkey" 
     374                "portkey", 
     375      "payload" 
    364376        }; 
    365377        if ( num >= sizeof(mapmapping)/sizeof(char *) ) 
  • nepenthes/trunk/modules/shellcode-signatures/shellcode-signatures.cpp

    r498 r520  
    4242#include "sch_engine_unicode.hpp" 
    4343#include "sch_namespace_konstanzxor.hpp" 
     44#include "sch_namespace_alphanumericxor.hpp" 
    4445 
    4546#include "ShellcodeManager.hpp" 
     
    174175                case sc_base64: 
    175176                        sch = new NamespaceBase64(sc); 
     177                        break; 
     178 
     179                case sc_alphanumericxor: 
     180                        sch = new NamespaceAlphaNumericXOR(sc); 
    176181                        break; 
    177182                } 
  • nepenthes/trunk/modules/shellcode-signatures/shellcode-signatures.sc

    r494 r520  
    197197        mapping (none,pre,decoder,size,key,post); 
    198198}; 
    199          
     199 
     200/* skylined alphanumeric decoder */ 
     201alphanumericxor::skylined 
     202
     203    pattern 
     204        "(.*)(VTX630VX4A0B5HH0B20BBVX2BCBH4A2AC0ACTBCQB0ACAVX4Z8BCJOM(.*)Z)(.*$)"; 
     205        mapping(none,pre,decoder,payload,post); 
     206}; 
     207 
     208 
     209 
     210/* metasploit alphanumeric decoder */ 
     211alphanumericxor::msfPexAlphaNum 
     212
     213    pattern 
     214        "(.*)(VTX630VX4A0B6HH0B30BCVX2BDBH4A2AD0ADTBDQB0ADAVX4Z8BDJOM(.*)Z)(.*$)"; 
     215        mapping(none,pre,decoder,payload,post); 
     216}; 
    200217 
    201218/* 
     
    261278        mapping (key,key); 
    262279}; 
     280 
    263281 
    264282 
     
    559577}; 
    560578 
     579 
     580 
     581bindshell::augsburg 
     582{ 
     583        pattern 
     584        "\\x6A\\xEB\\x4D\\xE8\\xF9\\xFF\\xFF\\xFF\\x60\\x8B\\x6C\\x24\\x24\\x8B\\x45\\x3C\\x8B\\x7C\\x05\\x78\\x01\\xEF\\x8B\\x4F\\x18\\x8B\\x5F\\x20\\x01\\xEB\\x49\\x8B" 
     585        "\\x34\\x8B\\x01\\xEE\\x31\\xC0\\x99\\xAC\\x84\\xC0\\x74\\x07\\xC1\\xCA\\x0D\\x01\\xC2\\xEB\\xF4\\x3B\\x54\\x24\\x28\\x75\\xE5\\x8B\\x5F\\x24\\x01\\xEB\\x66\\x8B" 
     586        "\\x0C\\x4B\\x8B\\x5F\\x1C\\x01\\xEB\\x03\\x2C\\x8B\\x89\\x6C\\x24\\x1C\\x61\\xC3\\x31\\xDB\\x64\\x8B\\x43\\x30\\x8B\\x40\\x0C\\x8B\\x70\\x1C\\xAD\\x8B\\x40\\x08" 
     587        "\\x5E\\x68\\x8E\\x4E\\x0E\\xEC\\x50\\xFF\\xD6\\x66\\x53\\x66\\x68\\x33\\x32\\x68\\x77\\x73\\x32\\x5F\\x54\\xFF\\xD0\\x68\\xCB\\xED\\xFC\\x3B\\x50\\xFF\\xD6\\x5F" 
     588        "\\x89\\xE5\\x66\\x81\\xED\\x08\\x02\\x55\\x6A\\x02\\xFF\\xD0\\x68\\xD9\\x09\\xF5\\xAD\\x57\\xFF\\xD6\\x53\\x53\\x53\\x53\\x53\\x43\\x53\\x43\\x53\\xFF\\xD0\\x66" 
     589        "\\x68(..)\\x66\\x53\\x89\\xE1\\x95\\x68\\xA4\\x1A\\x70\\xC7\\x57\\xFF\\xD6\\x6A\\x10\\x51\\x55\\xFF\\xD0\\x68\\xA4\\xAD\\x2E\\xE9\\x57\\xFF\\xD6\\x53\\x55" 
     590        "\\xFF\\xD0\\x68\\xE5\\x49\\x86\\x49\\x57\\xFF\\xD6\\x50\\x54\\x54\\x55\\xFF\\xD0\\x93\\x68\\xE7\\x79\\xC6\\x79\\x57\\xFF\\xD6\\x55\\xFF\\xD0\\x66\\x6A\\x64\\x66" 
     591        "\\x68\\x63\\x6D\\x89\\xE5\\x6A\\x50\\x59\\x29\\xCC\\x89\\xE7\\x6A\\x44\\x89\\xE2\\x31\\xC0\\xF3\\xAA\\xFE\\x42\\x2D\\xFE\\x42\\x2C\\x93\\x8D\\x7A\\x38\\xAB\\xAB" 
     592        "\\xAB\\x68\\x72\\xFE\\xB3\\x16\\xFF\\x75\\x44\\xFF\\xD6\\x5B\\x57\\x52\\x51\\x51\\x51\\x6A\\x01\\x51\\x51\\x55\\x51\\xFF\\xD0\\x68\\xAD\\xD9\\x05\\xCE\\x53\\xFF" 
     593        "\\xD6\\x6A\\xFF\\xFF\\x37\\xFF\\xD0\\x8B\\x57\\xFC\\x83\\xC4\\x64\\xFF\\xD6\\x52\\xFF\\xD0\\x68\\xF0\\x8A\\x04\\x5F\\x53\\xFF\\xD6\\xFF\\xD0"; 
     594        mapping (none,port); 
     595}; 
     596 
     597 
    561598connectbackshell::mandragore 
    562599{