Changeset 339

Show
Ignore:
Timestamp:
02/20/06 10:45:09 (3 years ago)
Author:
common
Message:

[x] nepenthes 0.1.5 commit

once again i unpacked the package, copied it to trunk, svn added missing dirs and files ...

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • nepenthes/trunk/CHANGES

    r336 r339  
     1Version 0.1.5 
     2============= 
     3Bugfix release/minor features. 
     4 
     5 
     6Nepenthes 
     7        FIXES and ADDITIONS 
     8        ----- 
     9        * none 
     10         
     11         
     12         
     13 
     14Modules 
     15        FIXES and ADDITIONS 
     16        ----- 
     17        * shellcode-generic 
     18                * sch_generic_cmd added \r\n as lineterminator 
     19                * shellcode-generic.conf.dist langenfeldConnect pcre added 
     20                * sch_generic_xor  
     21                        * deggendorf & langenfeld xor added,  
     22                        * removed possible off by n <=3 byte in the 4 byte xor 
     23 
     24         
     25        * vuln-dcom 
     26                * made it less aggressive, if it does not look like dcom, dont handle it 
     27                 
     28 
     29        * shellemu-winnt 
     30                * VFSCommandSTART added 
     31                * VFSCommandTFTP proper var checks added 
     32                * added handling of the escape var ^ for the shell 
     33                * VFSCommandFTP can download >1 file per batch now  
     34                * VFSCommandFTP can handle "cd" now 
     35                 
     36        * download-http 
     37                * handle downloads with 0 byte bodysize as broken 
     38                 
     39        * download-ftp  
     40                * can send CWD now 
     41                * fixed missing \r on sending RETR 
     42                 
     43        * geolocation-hostip 
     44                * the address to look the address up changed, so we adjusted it 
     45                 
     46 
     47        * geolocation-ip2location 
     48                * tarball lacked config file 
     49 
     50 
     51        NEW 
     52        --- 
     53        * vuln-msdtc 
     54                * emulation for the ms05-051 exploit by swan 
     55                 
     56 
    157Version 0.1.4 
    258============= 
  • nepenthes/trunk/conf/nepenthes.conf.dist

    r332 r339  
    6161    "vulnlsass.so",                 "vuln-lsass.conf",              "" 
    6262    "vulnmsmq.so",                  "vuln-msmq.conf",               "" 
     63    "vulnmsdtc.so",                 "vuln-msdtc.conf",              "" 
    6364    "vulnmssql.so",                 "vuln-mssql.conf",              "" 
    6465    "vulnmydoom.so",                "vuln-mydoom.conf",             "" 
  • nepenthes/trunk/configure

    r336 r339  
    11#! /bin/sh 
    2 # From configure.ac Id: configure.ac 2195 2005-12-01 20:23:46Z common . 
     2# From configure.ac Id: configure.ac 2213 2005-12-18 19:04:59Z common . 
    33# Guess values for system-dependent variables and create Makefiles. 
    4 # Generated by GNU Autoconf 2.59 for nepenthes 0.1.4
     4# Generated by GNU Autoconf 2.59 for nepenthes 0.1.5
    55# 
    66# Report bugs to <dornseif@informatik.rwth-aachen.de>. 
     
    425425PACKAGE_NAME='nepenthes' 
    426426PACKAGE_TARNAME='nepenthes' 
    427 PACKAGE_VERSION='0.1.4
    428 PACKAGE_STRING='nepenthes 0.1.4
     427PACKAGE_VERSION='0.1.5
     428PACKAGE_STRING='nepenthes 0.1.5
    429429PACKAGE_BUGREPORT='dornseif@informatik.rwth-aachen.de' 
    430430 
     
    957957  # This message is too long to be a string in the A/UX 3.1 sh. 
    958958  cat <<_ACEOF 
    959 \`configure' configures nepenthes 0.1.4 to adapt to many kinds of systems. 
     959\`configure' configures nepenthes 0.1.5 to adapt to many kinds of systems. 
    960960 
    961961Usage: $0 [OPTION]... [VAR=VALUE]... 
     
    10231023if test -n "$ac_init_help"; then 
    10241024  case $ac_init_help in 
    1025      short | recursive ) echo "Configuration of nepenthes 0.1.4:";; 
     1025     short | recursive ) echo "Configuration of nepenthes 0.1.5:";; 
    10261026   esac 
    10271027  cat <<\_ACEOF 
     
    11811181if $ac_init_version; then 
    11821182  cat <<\_ACEOF 
    1183 nepenthes configure 0.1.4 
     1183nepenthes configure 0.1.5 
    11841184generated by GNU Autoconf 2.59 
    11851185 
     
    11951195running configure, to aid debugging if configure makes a mistake. 
    11961196 
    1197 It was created by nepenthes $as_me 0.1.4, which was 
     1197It was created by nepenthes $as_me 0.1.5, which was 
    11981198generated by GNU Autoconf 2.59.  Invocation command line was 
    11991199 
     
    18381838# Define the identity of the package. 
    18391839 PACKAGE=nepenthes 
    1840  VERSION=0.1.4 
     1840 VERSION=0.1.5 
    18411841 
    18421842 
     
    2535425354 
    2535525355 
    25356                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 ac_config_files="$ac_config_files Makefile nepenthes-core/Makefile nepenthes-core/include/Makefile nepenthes-core/src/Makefile modules/Makefile modules/download-creceive/Makefile modules/download-csend/Makefile modules/download-curl/Makefile modules/download-ftp/Makefile modules/download-link/Makefile modules/download-nepenthes/Makefile modules/download-tftp/Makefile modules/log-download/Makefile modules/log-irc/Makefile modules/module-portwatch/Makefile modules/submit-file/Makefile modules/submit-nepenthes/Makefile modules/submit-norman/Makefile modules/submit-xmlrpc/Makefile modules/shellcode-generic/Makefile modules/shellemu-winnt/Makefile modules/vuln-asn1/Makefile modules/vuln-bagle/Makefile modules/vuln-dcom/Makefile modules/vuln-iis/Makefile modules/vuln-kuang2/Makefile modules/vuln-lsass/Makefile modules/vuln-msmq/Makefile modules/vuln-mssql/Makefile modules/vuln-mydoom/Makefile modules/vuln-netbiosname/Makefile modules/vuln-netdde/Makefile modules/vuln-optix/Makefile modules/vuln-pnp/Makefile modules/vuln-sasserftpd/Makefile modules/vuln-sub7/Makefile modules/vuln-upnp/Makefile modules/vuln-veritas/Makefile modules/vuln-wins/Makefile modules/vuln-dameware/Makefile modules/vuln-ssh/Makefile modules/x-1/Makefile modules/x-2/Makefile modules/x-3/Makefile modules/x-4/Makefile modules/x-5/Makefile modules/x-6/Makefile modules/x-7/Makefile modules/x-8/Makefile modules/geolocation-hostip/Makefile modules/geolocation-geoip/Makefile modules/download-http/Makefile modules/upload-http/Makefile modules/dnsresolve-adns/Makefile modules/geolocation-ip2location/Makefile modules/log-surfnet/Makefile" 
     25356                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          ac_config_files="$ac_config_files Makefile nepenthes-core/Makefile nepenthes-core/include/Makefile nepenthes-core/src/Makefile modules/Makefile modules/download-creceive/Makefile modules/download-csend/Makefile modules/download-curl/Makefile modules/download-ftp/Makefile modules/download-link/Makefile modules/download-nepenthes/Makefile modules/download-tftp/Makefile modules/log-download/Makefile modules/log-irc/Makefile modules/module-portwatch/Makefile modules/submit-file/Makefile modules/submit-nepenthes/Makefile modules/submit-norman/Makefile modules/submit-xmlrpc/Makefile modules/shellcode-generic/Makefile modules/shellemu-winnt/Makefile modules/vuln-asn1/Makefile modules/vuln-bagle/Makefile modules/vuln-dcom/Makefile modules/vuln-iis/Makefile modules/vuln-kuang2/Makefile modules/vuln-lsass/Makefile modules/vuln-msmq/Makefile modules/vuln-mssql/Makefile modules/vuln-mydoom/Makefile modules/vuln-netbiosname/Makefile modules/vuln-netdde/Makefile modules/vuln-optix/Makefile modules/vuln-pnp/Makefile modules/vuln-sasserftpd/Makefile modules/vuln-sub7/Makefile modules/vuln-upnp/Makefile modules/vuln-veritas/Makefile modules/vuln-wins/Makefile modules/vuln-dameware/Makefile modules/vuln-ssh/Makefile modules/x-1/Makefile modules/x-2/Makefile modules/x-3/Makefile modules/x-4/Makefile modules/x-5/Makefile modules/x-6/Makefile modules/x-7/Makefile modules/x-8/Makefile modules/geolocation-hostip/Makefile modules/geolocation-geoip/Makefile modules/download-http/Makefile modules/upload-http/Makefile modules/dnsresolve-adns/Makefile modules/geolocation-ip2location/Makefile modules/log-surfnet/Makefile modules/vuln-msdtc/Makefile" 
    2535725357 
    2535825358#                modules/module-drone/Makefile 
     
    2576425764cat >&5 <<_CSEOF 
    2576525765 
    25766 This file was extended by nepenthes $as_me 0.1.4, which was 
     25766This file was extended by nepenthes $as_me 0.1.5, which was 
    2576725767generated by GNU Autoconf 2.59.  Invocation command line was 
    2576825768 
     
    2582725827cat >>$CONFIG_STATUS <<_ACEOF 
    2582825828ac_cs_version="\\ 
    25829 nepenthes config.status 0.1.4 
     25829nepenthes config.status 0.1.5 
    2583025830configured by $0, generated by GNU Autoconf 2.59, 
    2583125831  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" 
     
    2599325993  "modules/geolocation-ip2location/Makefile" ) CONFIG_FILES="$CONFIG_FILES modules/geolocation-ip2location/Makefile" ;; 
    2599425994  "modules/log-surfnet/Makefile" ) CONFIG_FILES="$CONFIG_FILES modules/log-surfnet/Makefile" ;; 
     25995  "modules/vuln-msdtc/Makefile" ) CONFIG_FILES="$CONFIG_FILES modules/vuln-msdtc/Makefile" ;; 
    2599525996  "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; 
    2599625997  "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; 
  • nepenthes/trunk/configure.ac

    r336 r339  
    77 
    88AC_PREREQ(2.59) 
    9 AC_INIT([nepenthes], [0.1.4], [dornseif@informatik.rwth-aachen.de]) 
    10 AM_INIT_AUTOMAKE([nepenthes], [0.1.4]) 
     9AC_INIT([nepenthes], [0.1.5], [dornseif@informatik.rwth-aachen.de]) 
     10AM_INIT_AUTOMAKE([nepenthes], [0.1.5]) 
    1111AC_REVISION([$Id$]) 
    1212 
     
    679679                 modules/geolocation-ip2location/Makefile 
    680680                 modules/log-surfnet/Makefile             
     681                 modules/vuln-msdtc/Makefile 
    681682                 ]) 
    682683#                modules/module-drone/Makefile            
  • nepenthes/trunk/modules/Makefile.am

    r332 r339  
    99          shellcode-generic shellemu-winnt \ 
    1010          vuln-asn1 vuln-bagle vuln-dcom vuln-iis vuln-kuang2 vuln-lsass \ 
    11           vuln-msmq vuln-mssql vuln-mydoom \ 
     11          vuln-msdtc vuln-msmq vuln-mssql vuln-mydoom \ 
    1212          vuln-netbiosname vuln-netdde vuln-optix vuln-pnp vuln-sasserftpd \ 
    1313          vuln-sub7 vuln-upnp vuln-veritas vuln-wins vuln-dameware vuln-ssh \ 
  • nepenthes/trunk/modules/Makefile.in

    r336 r339  
    171171          shellcode-generic shellemu-winnt \ 
    172172          vuln-asn1 vuln-bagle vuln-dcom vuln-iis vuln-kuang2 vuln-lsass \ 
    173           vuln-msmq vuln-mssql vuln-mydoom \ 
     173          vuln-msdtc vuln-msmq vuln-mssql vuln-mydoom \ 
    174174          vuln-netbiosname vuln-netdde vuln-optix vuln-pnp vuln-sasserftpd \ 
    175175          vuln-sub7 vuln-upnp vuln-veritas vuln-wins vuln-dameware vuln-ssh \ 
     
    193193          esac; \ 
    194194        done; \ 
    195         echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  modules/Makefile'; \ 
     195        echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  modules/Makefile'; \ 
    196196        cd $(top_srcdir) && \ 
    197           $(AUTOMAKE) --gnu  modules/Makefile 
     197          $(AUTOMAKE) --foreign  modules/Makefile 
    198198.PRECIOUS: Makefile 
    199199Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 
  • nepenthes/trunk/modules/download-ftp/CTRLDialogue.cpp

    r332 r339  
    172172 
    173173                        case FTP_TYPE: 
    174                                 if (parseType((char *)m_Buffer->getData() + iStart)== true) 
     174                                if ( parseType((char *)m_Buffer->getData() + iStart)== true ) 
     175                                { 
     176                                        if ( m_Download->getDownloadUrl()->getDir() != "" ) 
     177                                        { 
     178                                                sendCWD(); 
     179                                                m_State = FTP_CWD; 
     180                                        } else 
     181                                        { 
     182                                                sendPort(); 
     183                                                m_State = FTP_PORT; 
     184                                        } 
     185                                } 
     186                                break; 
     187 
     188                        case FTP_CWD: 
     189                                if (parseCWD((char *)m_Buffer->getData() + iStart)== true) 
    175190                                { 
    176191                                        sendPort(); 
    177192                                        m_State = FTP_PORT; 
    178193                                } 
    179                                 break; 
     194 
    180195 
    181196                        case FTP_PORT: 
     
    430445         
    431446        char *nmsg; 
    432         asprintf(&nmsg,"RETR %s\n",m_Download->getDownloadUrl()->getPath().c_str()); 
     447        asprintf(&nmsg,"RETR %s\r\n",m_Download->getDownloadUrl()->getFile().c_str()); 
    433448        logDebug("FTPSEND: '%s'\n",nmsg); 
    434449        m_Socket->doRespond(nmsg,strlen(nmsg)); 
     
    470485} 
    471486 
     487void CTRLDialogue::sendCWD() 
     488{ 
     489        char *nmsg; 
     490        asprintf(&nmsg,"CWD %s\r\n",m_Download->getDownloadUrl()->getDir().c_str()); 
     491        logDebug("FTPSEND: '%s'\n",nmsg); 
     492        m_Socket->doRespond(nmsg,strlen(nmsg)); 
     493        free(nmsg); 
     494} 
     495 
     496bool CTRLDialogue::parseCWD(char *msg) 
     497{ 
     498        if (strncmp(msg,"250 ",4) == 0) 
     499        { 
     500                logDebug("%s","CWD accepted\n"); 
     501                return true; 
     502        }else 
     503        { 
     504                return false; 
     505        } 
     506} 
     507 
  • nepenthes/trunk/modules/download-ftp/CTRLDialogue.hpp

    r332 r339  
    4848                FTP_PASS, 
    4949                FTP_TYPE, 
     50                FTP_CWD, 
    5051                FTP_PORT, 
    5152//              FTP_EPASV, 
     
    8283                bool parseType(char *msg); 
    8384 
     85                void  sendCWD(); 
     86                bool parseCWD(char *msg); 
     87 
    8488                void  sendPort(); 
    8589                bool parsePort(char *msg); 
  • nepenthes/trunk/modules/download-http/HTTPDialogue.cpp

    r332 r339  
    189189        m_Download->getDownloadBuffer()->cutFront((uint32_t)(end-start)+2); 
    190190 
    191         if (m_Download->getCallback() != NULL) 
    192         { 
    193                 m_Download->getCallback()->downloadSuccess(m_Download); 
    194         }else 
    195         { 
    196                 g_Nepenthes->getSubmitMgr()->addSubmission(m_Download); 
     191         
     192 
     193        if ( m_Download->getDownloadBuffer()->getSize() > 0 ) 
     194        { 
     195 
     196                if ( m_Download->getCallback() != NULL ) 
     197                { 
     198                        m_Download->getCallback()->downloadSuccess(m_Download); 
     199                } else 
     200                { 
     201                        g_Nepenthes->getSubmitMgr()->addSubmission(m_Download); 
     202                } 
     203        } else 
     204        { 
     205                logWarn("Download has size %i\n",m_Download->getDownloadBuffer()->getSize()); 
     206                if ( m_Download->getCallback() != NULL ) 
     207                { 
     208                        m_Download->getCallback()->downloadFailure(m_Download); 
     209                } 
    197210        } 
    198211        return CL_DROP; 
  • nepenthes/trunk/modules/geolocation-hostip/geolocation-hostip.cpp

    r332 r339  
    135135        logSpam("GeoLocationHostIp looking up info for %x %s %x\n",query->getCallback(),inet_ntoa(*(in_addr *)&ip),query->getObject()); 
    136136 
    137         string url = "http://www.hostip.info/api/get.html?ip="; 
    138        url += inet_ntoa(*(in_addr *)&ip); 
     137        string url = "http://api.hostip.info/get_html.php?ip="; 
     138    url += inet_ntoa(*(in_addr *)&ip); 
    139139        url += "&position=true"; 
    140140 
  • nepenthes/trunk/modules/geolocation-ip2location/Makefile.am

    r336 r339  
    1111pkglib_LTLIBRARIES = geolocationip2location.la 
    1212 
    13 geolocationip2location_la_SOURCES = geolocation-ip2location.cpp geolocation-ip2location.hpp 
     13geolocationip2location_la_SOURCES = geolocation-ip2location.cpp geolocation-ip2location.hpp geolocation-ip2location.conf.dist 
    1414 
    1515geolocationip2location_la_LDFLAGS = -module -no-undefined -avoid-version 
  • nepenthes/trunk/modules/geolocation-ip2location/Makefile.in

    r336 r339  
    196196AM_LDFLAGS = $IP2LOCATION_LIBS 
    197197pkglib_LTLIBRARIES = geolocationip2location.la 
    198 geolocationip2location_la_SOURCES = geolocation-ip2location.cpp geolocation-ip2location.hpp 
     198geolocationip2location_la_SOURCES = geolocation-ip2location.cpp geolocation-ip2location.hpp geolocation-ip2location.conf.dist 
    199199geolocationip2location_la_LDFLAGS = -module -no-undefined -avoid-version 
    200200all: all-am 
  • nepenthes/trunk/modules/shellcode-generic/sch_generic_bind.cpp

    r332 r339  
    148148                        pcre_get_substring((char *) shellcode, output, result, 1, &match); 
    149149 
    150                         port = ntohs(*(uint32_t *) match); 
     150                        port = ntohs(*(uint16_t *) match); 
    151151                        logInfo("Detected Generic listenshell shellcode #%s, :%u \n",(*it)->m_Name.c_str(), port); 
    152152                        pcre_free_substring(match); 
  • nepenthes/trunk/modules/shellcode-generic/sch_generic_cmd.cpp

    r336 r339  
    6464bool GenericCMD::Init() 
    6565{ 
    66         const char *createprocesspcre = ".*(cmd.* /.*\\x00).*"; 
     66        const char *createprocesspcre = ".*(cmd.* /.*(\\x00|\\x0D\\x0A)).*"; 
    6767        const char * pcreEerror; 
    6868        int32_t pcreErrorPos; 
  • nepenthes/trunk/modules/shellcode-generic/sch_generic_xor.cpp

    r336 r339  
    8787        int32_t pcreErrorPos; 
    8888 
    89         XORPcreHelper test[7]= 
     89        XORPcreHelper test[9]= 
    9090        { 
    9191                { 
     
    120120                }, 
    121121                { 
     122                        "(.*)(\\xEB\\x10\\x5A\\x4A\\x31\\xC9\\x66\\xB9\(..)\\x80\\x34\\x0A(.)\\xE2\\xFA\\xEB\\x05\\xE8\\xEB\\xFF\\xFF\\xFF)(.*)$", 
     123                        "deggendorf xor", 
     124                        27 
     125                }, 
     126                { 
     127                        "(.*)(\\xEB\\x0F\\x5B\\x33\\xC9\\x66\\xB9(..)\\x80\\x33(.)\\x43\\xE2\\xFA\\xEB\\x05\\xE8\\xEC\\xFF\\xFF\\xFF)(.*)$", 
     128                        "langenfeld xor", 
     129                        21 
     130                }, 
     131                { 
    122132                        "(.*)(\\xEB.\\xEB.\\xE8.*\\xB1(.).*\\x80..(.).*\\xE2.)(.*)$",                                                                                                                                    
    123133                        "generic mwcollect", 
     
    127137        }; 
    128138 
    129         for( uint32_t i = 0; i <= 6; i++ ) 
     139        for( uint32_t i = 0; i <= 8; i++ ) 
    130140        { 
    131141                pcre *mypcre; 
     
    264274//                              LogSpam("codesize %i totalsize %i", codesize, totalsize); 
    265275 
    266                                 for( uint32_t j = 0; j < codesize && j*4 < totalsize; j++ ) 
     276                                for( uint32_t j = 0; j < codesize && (j+1)*4 < totalsize; j++ ) 
    267277                                        *(uint32_t *)(decodedMessage+(j*4) ) ^= longkey; 
    268278//                              g_Nepenthes->getUtilities()->hexdump(l_crit, decodedMessage, totalsize); 
  • nepenthes/trunk/modules/shellcode-generic/shellcode-generic.conf.dist

    r336 r339  
    3030        "theEggHunter", 
    3131                "\\x41\\x42\\x41\\x42\\x41\\x42\\x41\\x42\\x90\\x90\\x90\\x90\\x90\\x90\\x90\\x90\\x90\\xFC\\x6A\\xEB\\x52\\xE8\\xF9\\xFF\\xFF\\xFF\\x60\\x8B\\x6C\\x24\\x24\\x8B\\x45\\x3C\\x8B\\x7C\\x05\\x78\\x01\\xEF\\x83\\xC7\\x01\\x8B\\x4F\\x17\\x8B\\x5F\\x1F\\x01\\xEB\\xE3\\x30\\x49\\x8B\\x34\\x8B\\x01\\xEE\\x31\\xC0\\x99\\xAC\\x84\\xC0\\x74\\x07\\xC1\\xCA\\x0D\\x01\\xC2\\xEB\\xF4\\x3B\\x54\\x24\\x28\\x75\\xE3\\x8B\\x5F\\x23\\x01\\xEB\\x66\\x8B\\x0C\\x4B\\x8B\\x5F\\x1B\\x01\\xEB\\x03\\x2C\\x8B\\x89\\x6C\\x24\\x1C\\x61\\xC3\\x31\\xC0\\x64\\x8B\\x40\\x30\\x8B\\x40\\x0C\\x8B\\x70\\x1C\\xAD\\x8B\\x40\\x08\\x5E\\x68\\x8E\\x4E\\x0E\\xEC\\x50\\xFF\\xD6\\x31\\xDB\\x66\\x53\\x66\\x68\\x33\\x32\\x68\\x77\\x73\\x32\\x5F\\x54\\xFF\\xD0\\x68\\xCB\\xED\\xFC\\x3B\\x50\\xFF\\xD6\\x5F\\x89\\xE5\\x66\\x81\\xED\\x08\\x02\\x55\\x6A\\x02\\xFF\\xD0\\x68\\xD9\\x09\\xF5\\xAD\\x57\\xFF\\xD6\\x53\\x53\\x53\\x53\\x43\\x53\\x43\\x53\\xFF\\xD0\\x68(....)\\x66\\x68(..)\\x66\\x53\\x89\\xE1\\x95\\x68\\xEC\\xF9\\xAA\\x60\\x57\\xFF\\xD6\\x6A\\x10\\x51\\x55\\xFF\\xD0\\x66\\x6A\\x64\\x66\\x68\\x63\\x6D\\x6A\\x50\\x59\\x29\\xCC\\x89\\xE7\\x6A\\x44\\x89\\xE2\\x31\\xC0\\xF3\\xAA\\x95\\x89\\xFD\\xFE\\x42\\x2D\\xFE\\x42\\x2C\\x8D\\x7A\\x38\\xAB\\xAB\\xAB\\x68\\x72\\xFE\\xB3\\x16\\xFF\\x75\\x28\\xFF\\xD6\\x5B\\x57\\x52\\x51\\x51\\x51\\x6A\\x01\\x51\\x51\\x55\\x51\\xFF\\xD0\\x68\\xAD\\xD9\\x05\\xCE\\x53\\xFF\\xD6\\x6A\\xFF\\xFF\\x37\\xFF\\xD0\\x68\\xE7\\x79\\xC6\\x79\\xFF\\x75\\x04\\xFF\\xD6\\xFF\\x77\\xFC\\xFF\\xD0\\x68\\xEF\\xCE\\xE0\\x60\\x53\\xFF\\xD6\\xFF\\xD0" 
     32                 
     33        "langenfeldConnect" 
     34                "\\xE9\\xF4\\x00\\x00\\x00\\x5A\\xB8\\x0C\\xF0\\xFD\\x7F\\x8B\\x00\\x8B\\x70\\x1C\\xAD\\x8B\\x40\\x08\\x8B\\xD8\\x8B\\x73\\x3C\\x03\\xF3\\x8B\\x76\\x78\\x03\\xF3\\x8B\\x7E\\x20\\x03\\xFB\\x8B\\x4E\\x14\\x33\\xED\\x56\\x57\\x51\\x8B\\x3F\\x03\\xFB\\x8B\\xF2\\x6A\\x0E\\x59\\xF3\\xA6\\x74\\x08\\x59\\x5F\\x83\\xC7\\x04\\x45\\xE2\\xE9\\x59\\x5F\\x5E\\x8B\\xCD\\x8B\\x46\\x24\\x03\\xC3\\xD1\\xE1\\x03\\xC1\\x33\\xC9\\x66\\x8B\\x08\\x8B\\x46\\x1C\\x03\\xC3\\xC1\\xE1\\x02\\x03\\xC1\\x8B\\x00\\x03\\xC3\\x8B\\xFA\\x8B\\xF7\\x83\\xC6\\x0E\\x8B\\xD0\\x6A\\x03\\x59\\xE8\\x70\\x00\\x00\\x00\\x83\\xC6\\x0D\\x52\\x56\\xFF\\x57\\xFC\\x5A\\x8B\\xD8\\x6A\\x02\\x59\\xE8\\x5D\\x00\\x00\\x00\\x83\\xEC\\x44\\x8B\\xF4\\x6A\\x10\\x59\\x89\\x04\\x8E\\xE2\\xFB\\x50\\x50\\x50\\x50\\x6A\\x01\\x6A\\x02\\xFF\\x57\\xF8\\x8B\\xD8\\x89\\x5E\\x38\\x89\\x5E\\x3C\\x89\\x5E\\x40\\x66\\xC7\\x46\\x2C\\x01\\x01\\x8D\\x47\\x10\\x50\\x56\\x33\\xC0\\x50\\x50\\x50\\x6A\\x01\\x50\\x50\\x8D\\x57\\x3C\\xC7\\x02\\x63\\x6D\\x64\\x00\\x52\\x50\\xFF\\x57\\xEC\\xC7\\x07\\x02\\x00(..)\\xC7\\x47\\x04(....)\\x6A\\x10\\x57\\x53\\xFF\\x57\\xFC\\x50\\xFF\\x57\\xF0" 
    3235    ); 
    3336     
  • nepenthes/trunk/modules/shellemu-winnt/Makefile.am

    r321 r339  
    1111pkglib_LTLIBRARIES = shellemuwinnt.la 
    1212 
    13 shellemuwinnt_la_SOURCES = VFS.hpp VFSCommand.hpp VFSCommandCMD.hpp VFSCommandDir.hpp VFSCommandECHO.hpp VFSCommandFTP.hpp VFSCommandREDIR.hpp VFSCommandRREDIR.hpp VFSCommandTFTP.hpp VFSDir.hpp VFSFile.hpp VFSNode.hpp WinNTShellDialogue.hpp shellemu-winnt.hpp VFS.cpp VFSCommandCMD.cpp VFSCommandDir.cpp VFSCommandECHO.cpp VFSCommandFTP.cpp VFSCommandREDIR.cpp VFSCommandRREDIR.cpp VFSCommandTFTP.cpp VFSDir.cpp VFSFile.cpp WinNTShellDialogue.cpp shellemu-winnt.cpp 
     13 
     14shellemuwinnt_la_SOURCES =  VFS.cpp VFS.hpp  
     15shellemuwinnt_la_SOURCES += shellemu-winnt.cpp shellemu-winnt.hpp  
     16shellemuwinnt_la_SOURCES += VFSCommand.hpp  
     17shellemuwinnt_la_SOURCES += VFSNode.hpp  
     18shellemuwinnt_la_SOURCES += VFSDir.cpp VFSDir.hpp  
     19shellemuwinnt_la_SOURCES += VFSFile.cpp VFSFile.hpp  
     20shellemuwinnt_la_SOURCES += WinNTShellDialogue.cpp WinNTShellDialogue.hpp  
     21shellemuwinnt_la_SOURCES += VFSCommandCMD.cpp VFSCommandCMD.hpp  
     22shellemuwinnt_la_SOURCES += VFSCommandDir.cpp VFSCommandDir.hpp  
     23shellemuwinnt_la_SOURCES += VFSCommandECHO.cpp VFSCommandECHO.hpp  
     24shellemuwinnt_la_SOURCES += VFSCommandFTP.cpp  VFSCommandFTP.hpp  
     25shellemuwinnt_la_SOURCES += VFSCommandREDIR.cpp VFSCommandREDIR.hpp  
     26shellemuwinnt_la_SOURCES += VFSCommandRREDIR.cpp VFSCommandRREDIR.hpp  
     27shellemuwinnt_la_SOURCES += VFSCommandTFTP.cpp  VFSCommandTFTP.hpp  
     28shellemuwinnt_la_SOURCES += VFSCommandSTART.cpp VFSCommandSTART.hpp  
     29 
    1430 
    1531shellemuwinnt_la_LDFLAGS = -module -no-undefined -avoid-version 
  • nepenthes/trunk/modules/shellemu-winnt/Makefile.in

    r330 r339  
    6060LTLIBRARIES = $(pkglib_LTLIBRARIES) 
    6161shellemuwinnt_la_LIBADD = 
    62 am_shellemuwinnt_la_OBJECTS = VFS.lo VFSCommandCMD.lo VFSCommandDir.lo \ 
    63         VFSCommandECHO.lo VFSCommandFTP.lo VFSCommandREDIR.lo \ 
    64         VFSCommandRREDIR.lo VFSCommandTFTP.lo VFSDir.lo VFSFile.lo \ 
    65         WinNTShellDialogue.lo shellemu-winnt.lo 
     62am_shellemuwinnt_la_OBJECTS = VFS.lo shellemu-winnt.lo VFSDir.lo \ 
     63        VFSFile.lo WinNTShellDialogue.lo VFSCommandCMD.lo \ 
     64        VFSCommandDir.lo VFSCommandECHO.lo VFSCommandFTP.lo \ 
     65        VFSCommandREDIR.lo VFSCommandRREDIR.lo VFSCommandTFTP.lo \ 
     66        VFSCommandSTART.lo 
    6667shellemuwinnt_la_OBJECTS = $(am_shellemuwinnt_la_OBJECTS) 
    6768DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) 
     
    198199AM_LDFLAGS = -lpcre 
    199200pkglib_LTLIBRARIES = shellemuwinnt.la 
    200 shellemuwinnt_la_SOURCES = VFS.hpp VFSCommand.hpp VFSCommandCMD.hpp VFSCommandDir.hpp VFSCommandECHO.hpp VFSCommandFTP.hpp VFSCommandREDIR.hpp VFSCommandRREDIR.hpp VFSCommandTFTP.hpp VFSDir.hpp VFSFile.hpp VFSNode.hpp WinNTShellDialogue.hpp shellemu-winnt.hpp VFS.cpp VFSCommandCMD.cpp VFSCommandDir.cpp VFSCommandECHO.cpp VFSCommandFTP.cpp VFSCommandREDIR.cpp VFSCommandRREDIR.cpp VFSCommandTFTP.cpp VFSDir.cpp VFSFile.cpp WinNTShellDialogue.cpp shellemu-winnt.cpp 
     201shellemuwinnt_la_SOURCES = VFS.cpp VFS.hpp shellemu-winnt.cpp \ 
     202        shellemu-winnt.hpp VFSCommand.hpp VFSNode.hpp VFSDir.cpp \ 
     203        VFSDir.hpp VFSFile.cpp VFSFile.hpp WinNTShellDialogue.cpp \ 
     204        WinNTShellDialogue.hpp VFSCommandCMD.cpp VFSCommandCMD.hpp \ 
     205        VFSCommandDir.cpp VFSCommandDir.hpp VFSCommandECHO.cpp \ 
     206        VFSCommandECHO.hpp VFSCommandFTP.cpp VFSCommandFTP.hpp \ 
     207        VFSCommandREDIR.cpp VFSCommandREDIR.hpp VFSCommandRREDIR.cpp \ 
     208        VFSCommandRREDIR.hpp VFSCommandTFTP.cpp VFSCommandTFTP.hpp \ 
     209        VFSCommandSTART.cpp VFSCommandSTART.hpp 
    201210shellemuwinnt_la_LDFLAGS = -module -no-undefined -avoid-version 
    202211all: all-am 
     
    276285@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VFSCommandREDIR.Plo@am__quote@ 
    277286@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VFSCommandRREDIR.Plo@am__quote@ 
     287@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VFSCommandSTART.Plo@am__quote@ 
    278288@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VFSCommandTFTP.Plo@am__quote@ 
    279289@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VFSDir.Plo@am__quote@ 
  • nepenthes/trunk/modules/shellemu-winnt/VFS.cpp

    r332 r339  
    3636#include "VFSCommandFTP.hpp" 
    3737#include "VFSCommandCMD.hpp" 
     38#include "VFSCommandSTART.hpp" 
    3839 
    3940#include "Nepenthes.hpp" 
     
    105106        VFSCommand *vccmd = new VFSCommandCMD(sdir, this); 
    106107        sdir->createCommand(vccmd); 
     108 
     109        VFSCommand *vcstart = new VFSCommandSTART(sdir, this); 
     110        sdir->createCommand(vcstart); 
    107111 
    108112 
     
    148152                        if ( m_StdIn[i] == '>'  ) 
    149153                        { 
    150                                 if ( haschar == true ) 
    151                                 { 
    152                                         break; 
    153                                 } else 
    154                                 { 
    155                                         hasredir = true; 
     154                                if (escaped == false) 
     155                                { 
     156                                        if ( haschar == true ) 
     157                                        { 
     158                                                logDebug("breaking here %i line %i \n",i,__LINE__); 
     159                                                break; 
     160                                        } else 
     161                                        { 
     162                                                hasredir = true; 
     163                                        } 
     164                                }else 
     165                                { 
     166                                        escaped = false; 
    156167                                } 
    157168 
     
    161172                                 
    162173                                i++; 
    163                                 logDebug("breaking here %i \n",i); 
     174                                logDebug("breaking here %i line %i \n",i,__LINE__); 
    164175                                break; 
    165176                        } 
     
    167178                        if ( ( m_StdIn[i] == ';' && hasredir == true ) || m_StdIn[i] == '&') 
    168179                        { 
    169                                 i++; 
    170                                 break; 
     180                                if (escaped == false) 
     181                                { 
     182                    i++; 
     183                                        logDebug("breaking here %i line %i \n",i,__LINE__); 
     184                                        break; 
     185                                }else 
     186                                { 
     187                                        escaped = false; 
     188                                } 
    171189                        }  
    172190                        else 
    173191                        if (m_StdIn[i] == '^') 
    174192                        { 
    175                 escaped = true; 
     193                                if (escaped == false) 
     194                                { 
     195                        escaped = true; 
     196                                }else 
     197                                { 
     198                                        escaped = false; 
     199                                } 
    176200                        } 
    177201                        else 
     
    193217                        line[line.size()-1] = '\0'; 
    194218 
     219                string newline; 
     220                escaped = false; 
     221 
     222                i=0; 
     223                int j=0; 
     224                while (i<line.size()) 
     225                { 
     226                        if ( escaped == true) 
     227                        { 
     228                                escaped = false; 
     229                newline += line[i]; 
     230                                j++; 
     231                        }else 
     232                        { 
     233                                if (line[i] == '^') 
     234                                { 
     235                                        escaped = true; 
     236                                }else 
     237                                { 
     238                                        newline += line[i]; 
     239                                        escaped = false; 
     240                                } 
     241                        } 
     242                        i++; 
     243                } 
    195244                         
     245                logSpam("LINE %s\n",line.c_str()); 
     246                logSpam("ESCL %s\n",newline.c_str()); 
     247 
     248                line = newline; 
    196249 
    197250                /* beispiel fuer den block 'befehl suchen'  
     
    320373 
    321374                                string altercommand = command + ".exe"; 
    322                                 if ((*cfile)->getType() == VFS_EXE && ((*cfile)->getName() == command || (*cfile)->getName() == altercommand ) ) 
     375                                if ((*cfile)->getType() == VFS_EXE &&  
     376                                        ( strcasecmp((*cfile)->getName().c_str(),command.c_str()) == 0 ||  
     377                                          strcasecmp((*cfile)->getName().c_str(),altercommand.c_str()) == 0 ) 
     378                                        ) 
    323379                                { 
    324380                                        logSpam("found command '%s' <-> '%s' \n",(*cfile)->getName().c_str(), command.c_str()); 
     
    337393                        for ( cfile = dirlist.begin(); cfile != dirlist.end() && foundcommand == false; cfile++ ) 
    338394                        { 
    339 //                      printf("FILE '%s' '%s' \n",command.c_str(), (*cfile)->getName().c_str()); 
     395//                             printf("FILE '%s' '%s' \n",command.c_str(), (*cfile)->getName().c_str()); 
    340396                                string altercommand = command + ".bat"; 
    341                                 if ( (*cfile)->getType() == VFS_FILE && ((*cfile)->getName() == command || (*cfile)->getName() == altercommand ) ) 
     397                                if  (  
     398                                           (*cfile)->getType() == VFS_FILE &&  
     399                                           ( strcasecmp((*cfile)->getName().c_str(),command.c_str()) == 0 ||  
     400                                                 strcasecmp((*cfile)->getName().c_str(),altercommand.c_str()) == 0 ) 
     401                                         ) 
    342402                                { 
    343403                                        logSpam("found command '%s' <-> '%s' \n",(*cfile)->getName().c_str(), command.c_str()); 
  • nepenthes/trunk/modules/shellemu-winnt/VFSCommandFTP.cpp

    r332 r339  
    114114        string pass = "guest"; 
    115115        string getfile = "nofileyet"; 
     116        string path = ""; 
    116117        uint8_t downloadflags=0; 
    117118 
     
    278279                                                default: 
    279280                            getfile = paramlist[1]; 
    280                                                         logDebug("ftp://%s:%s@%s:%s/%s\n",user.c_str(),pass.c_str(),host.c_str(),port.c_str(),getfile.c_str()); 
     281//                                                      logDebug("ftp://%s:%s@%s:%s/%s\n",user.c_str(),pass.c_str(),host.c_str(),port.c_str(),getfile.c_str()); 
     282                                                        startDownload(host,port,user,pass,path,getfile,downloadflags); 
    281283                                                } 
    282284                                        }else 
    283                                         if ( strncasecmp((char *)&*jt->c_str(),"binary",6) == 0 ) 
     285                                        if ( strncasecmp((char *)&*jt->c_str(),"binary",6) == 0 ||  
     286                                                 strncasecmp((char *)&*jt->c_str(),"bin",3) == 0) 
    284287                                        { 
    285288                                                downloadflags |= DF_TYPE_BINARY; 
     289                                        }else 
     290                                        if ( strncasecmp((char *)&*jt->c_str(),"cd",2) == 0 ) 
     291                                        { 
     292                                                switch ( paramlist.size() ) 
     293                                                { 
     294                                                case 1: 
     295                                                        state = NEXT_IS_PATH; 
     296                                                        break; 
     297 
     298              &nb