diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 02de7d3..0000000 --- a/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -yara_brg_rules.yar -scanners.yar - -yara-brg-portscanner.yar - -yara-brg-webshells.yar - -webshells.yar diff --git a/3rdparty/strings.xml b/3rdparty/strings.xml new file mode 100755 index 0000000..8e0a18e --- /dev/null +++ b/3rdparty/strings.xml @@ -0,0 +1,3193 @@ + + + + + + + 4 + 0 + 0 + 0 + 0 + + + + + not enough space for lowio initialization + not enough space for stdio initialization + pure virtual function call + not enough space for _onexit/atexit table + unable to open console device + unexpected heap error + unexpected multithread lock error + not enough space for thread data + This application has requested the Runtime to terminate it in an unusual way. + Please contact the application's support team for more information. + not enough space for environment + not enough space for arguments + program name unknown + Runtime Error! + Program: + Complete Object Locator' + Class Hierarchy Descriptor' + Base Class Array' + Base Class Descriptor at ( + Type Descriptor' + `local static thread guard' + `managed vector copy constructor iterator' + `vector vbase copy constructor iterator' + `vector copy constructor iterator' + `dynamic atexit destructor for ' + `dynamic initializer for ' + `eh vector vbase copy constructor iterator' + `eh vector copy constructor iterator' + `managed vector destructor iterator' + `managed vector constructor iterator' + `placement delete[] closure' + `placement delete closure' + `omni callsig' + delete[] + new[] + `local vftable constructor closure' + `local vftable' + `RTTI + `udt returning' + `copy constructor closure' + `eh vector vbase constructor iterator' + `eh vector destructor iterator' + `eh vector constructor iterator' + `virtual displacement map' + `vector vbase constructor iterator' + `vector destructor iterator' + `vector constructor iterator' + `scalar deleting destructor' + `default constructor closure' + `vector deleting destructor' + `vbase destructor' + `string' + `local static guard' + `typeof' + `vcall' + `vbtable' + `vftable' + operator + delete + new + __unaligned + __restrict + __ptr64 + __clrcall + __fastcall + __thiscall + __stdcall + __pascal + __cdecl + __based( + December + November + October + September + August + July + June + April + March + February + January + Saturday + Friday + Thursday + Wednesday + Tuesday + Monday + Sunday + SunMonTueWedThuFriSat + JanFebMarAprMayJunJulAugSepOctNovDec + R6002 + R6008 + R6009 + R6016 + R6017 + R6018 + R6019 + R6024 + R6025 + R6026 + winm + + + + + threatexpert + emsisoft + rising + pctools + norman + k7computing + ikarus + hacksoft + gdata + fortinet + ewido + clamav + comodo + quickheal + avira + avast + esafe + ahnlab + centralcommand + drweb + grisoft + nod32 + f-prot + jotti + computerassociates + networkassociates + etrust + panda + sophos + trendmicro + defender + rootkit + spyware + Kaspersky + BitDefender + Dr.Web + Kaspersky Antivirus + Nod32 Antivirus 2.x + Ewido Security Suite + McAfee VirusScan + Panda Antivirus/Firewall + Symantec/Norton + PC-cillin Antivirus + F-Secure + Kingsoft ShaDu + NOD32 Antivirus + Rising Antivirus + Jiangmin Antivirus + 360 ShaDu + 360 Safe + McAfee AV + Bitdefender AV + Norton Symantec AV + F-Secure AV + AhnLab V3 Internet Security 8 + Avast AntiVirus + Avira Antivirus + Eset Nod32 Scanner + F-Secure Gatekeeper Handler Starter + F-Secure Recognizer + F-Secure HIPS + F-Secure Gatekeeper + F-Secure Filter + WinDefend + OutpostFirewall + McAfee Framework Service + Panda Antivirus + ZoneAlarm Client + Zone Labs Client + windefender + Software\Microsoft\Windows\CurrentVersion\Uninstall\Kingsoft Antivirus + Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Kingsoft Antivirus + Software\Microsoft\Windows\CurrentVersion\Uninstall\360SD + Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\360SD + Software\Microsoft\Windows\CurrentVersion\Uninstall\Kingsoft PC Doctor + Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Kingsoft PC Doctor + Software\Microsoft\Windows\CurrentVersion\Uninstall\360 Internet Security + Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\360 Internet Security + Software\Microsoft\Windows\CurrentVersion\Uninstall\Kingsoft Internet Security 9 + Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Kingsoft Internet Security 9 + Software\Microsoft\Windows\CurrentVersion\Uninstall\Kingsoft Internet Security U SP1 + Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Kingsoft Internet Security U SP1 + Software\Microsoft\Windows\CurrentVersion\Uninstall\{D1ABBC6D-4C7B-4D6B-9B50-F79399DD3652} + Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{D1ABBC6D-4C7B-4D6B-9B50-F79399DD3652} + Software\Microsoft\Windows\CurrentVersion\Uninstall\{AC54C7CC-3868-4942-BD2E-1BCA2519C881} + Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{AC54C7CC-3868-4942-BD2E-1BCA2519C881} + + + + {[!22!]}{[!18!]}{[!33!]}{[!4!]}{[!34!]}= %d, {[!35!]}= 0x%x.{[!36!]} + {[!23!]}{[!22!]}, {[!24!]}{[!4!]}%d{[!25!]} + {[!28!]}%d.%d, {[!29!]}%d.%d.{[!1!]} + {[!37!]}{[!35!]}{[!4!]}{[!38!]}0x%x,{[!39!]}0x%x. + {[!37!]}{[!35!]}{[!4!]}{[!38!]}0x%x,{[!39!]}0x%x.{[!36!]} + {[!41!]}{[!4!]}{[!42!]}= 0x%x, {[!34!]}= 0x%x.{[!36!]} + [3-9]{1}[0-9]{1219}[D=\u0061][0-9]{1030} + ((b|B)[0-9]{1319}\^[A-Za-z\s]{030}\/[A-Za-z\s]{030}\^(0[7-9]|1[0-5])((0[1-9])|(1[0-2]))[0-9\s]{350}[0-9]{1}) + ([0-9]{1516}[D=](0[7-9]|1[0-5])((0[1-9])|(1[0-2]))[0-9]{830}) + [0-9]{1516}\^[a-zA-Z0-9=*> + [0-9]{1516}=[0-9]{532}.{120} + ([0-9]{1319}[=D][0-9]{550})\? + ([0-9]{1319}[\^][A-Za-z\s]{030}[\/][[A-Za-z\s]{030}[\^]([0-9\s]{170})\?) + ("^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$") + ^http[s]?://([^\/:\s]+)(:[^\/\s]+)?(\/?[^\s]*)$ + {[!11!]}{[!4!]} + {[!12!]}{[!10!]}http://%s:%d{[!4!]} + {[!13!]}{[!4!]} + {[!14!]}{[!4!]} + {[!15!]}{[!4!]} + {[!16!]}{[!20!]}{[!26!]}%s + {[!16!]}{[!46!]}%s (%d) + {[!17!]}{[!18!]} + {[!17!]}{[!19!]} + {[!2!]}{[!20!]}{[!21!]}%s + {[!22!]}%s{[!5!]} + {[!22!]}{[!18!]}{[!33!]}{[!4!]}{[!34!]}= %d {[!35!]}= 0x%x.{[!36!]} + {[!22!]}{[!5!]}%s -> %s [%d]{[!35!]}= 0x%x (== 0x%x) + {[!23!]}{[!22!]} {[!24!]}{[!4!]}%d{[!25!]} + {[!27!]}{[!30!]}{[!4!]}%s.{[!2!]} + {[!28!]}%d.%d {[!29!]}%d.%d.{[!1!]} + {[!29!]}{[!1!]} + {[!29!]}{[!32!]}%s + {[!3!]}%s{[!4!]} + {[!30!]}{[!31!]}{[!4!]} + {[!37!]}{[!35!]}{[!4!]}{[!38!]}0x%x{[!39!]}0x%x. + {[!37!]}{[!35!]}{[!4!]}{[!38!]}0x%x{[!39!]}0x%x.{[!36!]} + {[!4!]}{[!10!]}{[!44!]}{[!43!]}{[!21!]} + {[!4!]}{[!45!]}{[!21!]} + {[!40!]}{[!4!]}{[!36!]} + {[!41!]}{[!4!]}{[!42!]}= 0x%x {[!34!]}= 0x%x.{[!36!]} + {[!43!]}{[!4!]} + {[!46!]}%d{[!1!]} + ((b|B)[0-9]{13,19}\^[A-Za-z\s]{0,30}\/[A-Za-z\s]{0,30}\^(1[1-9])((0[1-9])|(1[0-2]))[0-9\s]{3,50}[0-9]{1}) + ([3-9]{1}[0-9]{14,15}[D=](1[1-9])((0[1-9])|(1[0-2]))[0-9]{8,30}) + ((b|B)[0-9]{13,19}\^[A-Za-z\s]{0,30}\/[A-Za-z\s]{0,30}\^(0[7-9]|1[0-5])((0[1-9])|(1[0-2]))[0-9\s]{3,50}[0-9]{1}) + ([0-9]{15,16}[D=](0[7-9]|1[0-5])((0[1-9])|(1[0-2]))[0-9]{8,30}) + + + + SeAssignPrimaryTokenPrivilege + SeAuditPrivilege + SeBackupPrivilege + SeChangeNotifyPrivilege + SeCreateGlobalPrivilege + SeCreatePagefilePrivilege + SeCreatePermanentPrivilege + SeCreateSymbolicLinkPrivilege + SeCreateTokenPrivilege + SeDebugPrivilege + SeEnableDelegationPrivilege + SeImpersonatePrivilege + SeIncreaseBasePriorityPrivilege + SeIncreaseQuotaPrivilege + SeIncreaseWorkingSetPrivilege + SeLoadDriverPrivilege + SeLockMemoryPrivilege + SeMachineAccountPrivilege + SeManageVolumePrivilege + SeProfileSingleProcessPrivilege + SeRelabelPrivilege + SeRemoteShutdownPrivilege + SeRestorePrivilege + SeSecurityPrivilege + SeShutdownPrivilege + SeSyncAgentPrivilege + SeSystemEnvironmentPrivilege + SeSystemProfilePrivilege + SeSystemtimePrivilege + SeTakeOwnershipPrivilege + SeTcbPrivilege + SeTimeZonePrivilege + SeTrustedCredManAccessPrivilege + SeUndockPrivilege + SeUnsolicitedInputPrivilege + + + + 2.16.840.1.113730.4.1 + 1.3.6.1.4.1.311.10.3.3 + 1.3.6.1.5.5.7.3.2 + 1.3.6.1.5.5.7.3.1 + 1.2.840.113549.1.1.11 + 1.2.840.113549.1.1.2 + 1.2.840.113549.1.1.4 + 1.2.840.113549.1.1.5 + 1.2.840.113549.1.9.6 + 1.2.840.113549.2.5 + 1.2.840.113549.1.9.5 + 1.2.840.113556.1.4.1221 + 1.2.840.113556.1.4.1222 + 1.2.840.113556.1.4.1362 + 1.2.840.113556.1.4.1413 + 1.2.840.113556.1.4.521 + 1.2.840.113556.1.4.616 + 1.2.840.113556.1.4.801 + 1.2.840.113556.1.4.805 + 1.2.840.113556.1.4.903 + 1.2.840.113556.1.4.904 + 1.2.840.113556.1.4.905 + 1.2.840.113556.1.4.906 + 1.2.840.113556.1.4.907 + 1.3.14.3.2.26 + 1.3.14.3.2.29 + 1.3.14.3.2.3 + 1.3.6.1.4.1.311.2.1.12 + 1.3.6.1.4.1.1466.115.121.1.10 + 1.3.6.1.4.1.1466.115.121.1.11 + 1.3.6.1.4.1.1466.115.121.1.12 + 1.3.6.1.4.1.1466.115.121.1.13 + 1.3.6.1.4.1.1466.115.121.1.14 + 1.3.6.1.4.1.1466.115.121.1.15 + 1.3.6.1.4.1.1466.115.121.1.19 + 1.3.6.1.4.1.1466.115.121.1.2 + 1.3.6.1.4.1.1466.115.121.1.21 + 1.3.6.1.4.1.1466.115.121.1.22 + 1.3.6.1.4.1.1466.115.121.1.23 + 1.3.6.1.4.1.1466.115.121.1.24 + 1.3.6.1.4.1.1466.115.121.1.25 + 1.3.6.1.4.1.1466.115.121.1.26 + 1.3.6.1.4.1.1466.115.121.1.27 + 1.3.6.1.4.1.1466.115.121.1.28 + 1.3.6.1.4.1.1466.115.121.1.3 + 1.3.6.1.4.1.1466.115.121.1.32 + 1.3.6.1.4.1.1466.115.121.1.33 + 1.3.6.1.4.1.1466.115.121.1.34 + 1.3.6.1.4.1.1466.115.121.1.36 + 1.3.6.1.4.1.1466.115.121.1.37 + 1.3.6.1.4.1.1466.115.121.1.38 + 1.3.6.1.4.1.1466.115.121.1.39 + 1.3.6.1.4.1.1466.115.121.1.4 + 1.3.6.1.4.1.1466.115.121.1.40 + 1.3.6.1.4.1.1466.115.121.1.41 + 1.3.6.1.4.1.1466.115.121.1.43 + 1.3.6.1.4.1.1466.115.121.1.44 + 1.3.6.1.4.1.1466.115.121.1.5 + 1.3.6.1.4.1.1466.115.121.1.50 + 1.3.6.1.4.1.1466.115.121.1.51 + 1.3.6.1.4.1.1466.115.121.1.52 + 1.3.6.1.4.1.1466.115.121.1.53 + 1.3.6.1.4.1.1466.115.121.1.6 + 1.3.6.1.4.1.1466.115.121.1.7 + 1.3.6.1.4.1.1466.115.121.1.8 + 1.3.6.1.4.1.1466.115.121.1.9 + 1.3.6.1.4.1.311.10.3.6 + 1.3.6.1.4.1.311.88.2.1 + 1.3.6.1.4.1.311.88.2.2 + 1.3.6.1.5.5.7.3.3 + + + + Mozilla/1.22 + Mozilla/3.0 + Mozilla/3.1 + Mozilla/3.6 + Mozilla/4.0 + Mozilla/4.08 + Mozilla/5.0 + + Opera/8.90 + Opera/9.00 + Opera/9.25 + Opera/9.33 + Opera 9.4 + Opera/9.80 + + + + 3fr + 386 + 3dm + 3ds + + Application + accdb + acf + ade + adn + adp + ani + arc + amr + arcs + apk + arch00 + arw + asset + arj + asf + asp + asm + asx + avi + atf + app + aspx + admin + + b64 + bc7 + bc6 + bay + big + bik + bkf + bkp + blob + bsa + bat + bak + bhx + bin + bmp + binPK + bar + bas + bsd + backup + + cdw + csr + cx + cc + cas + cdr + cer + cfr + cr2 + crt + crw + css + csv + c + cab + cpio + cap + cbl + cbm + cert + cbo + css + cache + cfg + cfm + cpp + cxx + cer + ceo + ce0 + chm + cgi + classPK + cmd + cnt + com + com0 + cs + cpl + crl + ctl + cur + class + cbtl + + dat + dbg + dsm + dun + dk + dll + de + docx + dotm + docm + drv + doc + docc + docpk + dot + d3dbsp + das + dazip + db0 + dbfv + dcr + dif + der + dex + desc + dmp + dng + dwg + dxg + dba + dbf + dsp + dsw + dtd + detour + + ecc + edt + epk + eps + erf + esm + en + exd + exe + ex_ + _exe + email + emf + eot + eddx + edoc + emlx + epub + exePK + + fini + flv + forge + fos + fpk + fsh + fpl + flg + far + fav + ftp + fla + + go + gdb + gho + gzip + gz + gif + gadget + gcode + + hlp + hpj + hta + hhp + hkdb + hkx + hplg + hvpl + h + hpp + hxx + htm + html + htt + http + hqx + ht + htapk + href + + ibank + icxs + indd + itdb + itl + itm + iwd + iwi + ini + inl + iniPK + inc + ico + idc + info + inf + ins + iso + isp + it + its + idml + indd + identifier + + jar + jav + java + jcr + jpeg + jpegPK + js + jsp + jpe + jpg + jse + jfif + jspa + jspx + kdb + kdc + key + jps + + locky + layout + lbf + ldf + litemod + lrf + ltx + lvl + lzh + lnk + lsf + lsx + log + lzma + locked + + max + md + mad + maf + maq + mar + mas + mat + mav + maw + mam + mag + m3u + m4a + map + mcr + mcgame + mcmeta + msi + msp + mst + msc + mda + mde + mdz + mht + mdb + mdn + mdt + mdbackup + manifest + mddata + mdf + mef + mp4 + mid + mov + msg + msh + midi + mim + mmf + menu + mlx + mpqge + mrwref + mp3 + mpg + mpeg + mp3PK + mbox + mdbackup + mddata + mdinfo + m4v + mkv + mui + memdump + m4u + + nak + net + nch + nrg + nls + ncb + ncf + nrw + ntl + nws + note + nt + + ogg + oca + ocx + oft + oss + olb + org + osd + odb + odc + odm + odp + ods + odt + orf + ovl + opt + oxps + odx + + pas + pct + pdc + pkxm + pcap + pack + pyz + pps + pdb + php + phtml + p12 + p7b + pict + p7c + pak + pdd + pdf + pic + pyd + pef + pem + pfx + pkpass + png + pol + pot + plg + ppa + ppt + prf + pptm + pptx + psd + psk + pf + py + pypk + pst + pwl + ptx + pif + pl + pls + pax + pad + plist + phtm + php3 + php4 + php5 + phps + phpx + phpxx + ppdf + ppsm + ppsx + plist_bak + Permissions + + qc + qdf + qic + qtl + qtif + + ro + rodata + rar + rat + rsrc + reg + rels + rtf + r3d + raf + rar + ru + raw + re4 + rgss3a + rim + rofl + rsrc + rtf + rw2 + rwl + rdp + rdf + reg + rjs + rm + rpt + relspk + rsapk + rtfpk + + sch + stc + std + sti + stw + sxc + sxd + sxi + sxm + sxw + sdb + scf + scp + sfx + sfpk + sql + scr + sct + shb + so + sqlite + sqlitedb + sqlite3 + shs + sit + slk + smi + smil + stl + stm + spl + sys + swf + sav + sc2save + sid + sidd + sidn + sie + sis + slm + snx + sr2 + srfv + srw + sum + svg + syncdb + srf + sys + ssh + sldm + sldx + sdf + + t13 + tet + tar + tz + taz + tgz + tif + tiff + tga + tmp + temp + txt + tlb + txt3 + text + t12 + t13v + tax + tor + txt + + unity3d + upk + url + ult + + vb + vbe + vbs + vbp + vdf + vfs0 + vpk + vaf + vpp_pcv + vtf + vcf + vbspk + vxd + vhdx + vhdx + vmdk + vfs4 + vpp_pc + vhd + vdi + vbox + vob + + wav + wab + wap + wbk + wiz + wjf + ws + w3x + wb2 + wma + wmf + wmo + wmv + wotreplay + wpd + wps + wsc + wsf + wsh + webm + wks + wk1 + wallet + + x3f + xaml + xla + xsd + xls + xsl + xlb + xlsm + xlsm + xlsx + xlt + xlv + xml + xmlPK + xmp + xll + xlsm + xlsx + xlc + xld + xlk + xor + xlw + xltx + xltm + xlsb + xlm + xxx + xfp + xsd + xbtl + x509crl + x509cert + + z + zip + zipx + ztmp + + + + + + + + (A;;0xb;;;AC) + (A;;0x3;;;AC) + D:(D;OICI;GA;;;BG)(D;OICI;GA;;;AN)(A;OICI;GA;;;AU)(A;OICI;GA;;;BA) + D:(A;OICI;GA;;;WD)S:(ML;CIOI;NRNWNX;;;LW) + D:(A;OICI;GA;;;WD) + D:(A;;GA;;;WD)S:(ML;;NRNWNX;;;LW) + D:(A;;GA;;;WD) + D:(A;OICI;GA;;;CO)(A;OICI;GA;;;SY)(A;OICI;GA;;;BA)(A;OICI;GA;;;%s) + D:AI(A;;GAFA;;;WD) + D:AI(A;;RPWPCCDCLCSWRCWDWOGA;;;WD) + D:P(D;CIOI;GA;;;BG)(D;CIOI;GA;;;LG)(A;;GA;;;WD) + D:P(D;CIOI;GA;;;DG)(D;CIOI;GA;;;BG)(D;CIOI;GA;;;LG)(A;;GA;;;WD) + D:P(D;CIOI;GA;;;BG)(D;CIOI;GA;;;LG)(D;;SD;;;WD)(A;;0x1e01ff;;;WD)(A;OICIIO;GA;;;WD) + D:P(D;CIOI;GA;;;DG)(D;CIOI;GA;;;BG)(D;CIOI;GA;;;LG)(D;;SD;;;WD)(A;;0x1e01ff;;;WD)(A;OICIIO;GA;;;WD) + D:(A;;LC;;;WD)(A;;CCDCLCSWRPSDRCWDWO;;;SY)(A;;LCSWRPRCGW;;;BA)(A;;LC;;;AC);AC);AC) + D:(A;;0x100001;;;WD)(A;;0x1f0001;;;SY)(A;;0x1f0001;;;%s)(A;;0x100001;;;AC);AC);AC) + D:(A;;0x00120001;;;WD)(A;;0x001C0002;;;PS) + D:(A;;0x00120003;;;WD) + D:(A;;0x00120001;;;WD)(A;;0x001C0002;;;PS) + D:(A;;0x00120003;;;WD) + D:(A;;0x100001;;;WD)(A;;0x1f0001;;;SY)(A;;0x1f0001;;;%s)(A;;0x100001;;;AC);AC);AC) + D:(A;;GR;;;RC)(A;;GR;;;%s) + D:(A;;GR;;;RC)(A;;GR;;;%s)(A;;GR;;;%s) + D:(A;;GRGWGX;;;WD)(A;;GRGWGX;;;RC)(A;;GA;;;BA)(A;;GA;;;OW)(A;;GR;;;AC)(A;;LC;;;AC) + D:(A;;LC;;;WD)(A;;CCDCLCSWRPSDRCWDWO;;;SY)(A;;CCDCLCSWRPSDRCWDWO;;;%s)(A;;LC;;;AC) + D:(A;;LC;;;WD)(A;;CCDCLCSWRPSDRCWDWO;;;SY)(A;;LCSWRPRCGW;;;BA)(A;;LC;;;AC);AC);AC) + D:(A;;0x1f0003;;;BA)(A;;0x100000;;;WD) + D:(A;;GA;;;WD)(A;;GA;;;AN) + D:(A;;GA;;;WD)(A;;GA;;;AN)S:(ML;;NW;;;LW) + D:(A;;GA;;;AU)(A;;GA;;;BA)(A;;GA;;;AN)(A;;GA;;;BG)(A;;GA;;;AC)S:(ML;;NW;;;LW) + D:(A;;FA;;;SY)(A;;FA;;;LS)(A;;FRFW;;;BA)(A;;FRFW;;;BU)(A;;FRFW;;;AN)S:(ML;;;;;LW) + D:(D;OICI;FA;;;AN)(A;OICI;FA;;;BG)(A;OICI;FA;;;SY)(A;OICI;FA;;;LS)(A;OICI;FA;;;AU)(A;OICI;FA;;;BA)) + D:(D;OICI;FA;;;AN)(A;OICI;FA;;;BG)(A;OICI;FA;;;SY)(A;OICI;FA;;;LS)(A;OICI;FA;;;AU)(A;OICI;FA;;;BA) + D:P(A;;GA;;;SY) + D:P(A;;GA;;;SY)(A;;GA;;;BA) + D:P(A;;GA;;;SY)(A;;GRGX;;;BA) + D:P(A;;GA;;;SY)(A;;GRGWGX;;;BA)(A;;GR;;;WD) + D:P(A;;GA;;;SY)(A;;GRGWGX;;;BA)(A;;GR;;;WD)(A;;GR;;;RC) + D:P(A;;GA;;;SY)(A;;GRGWGX;;;BA)(A;;GRGW;;;WD)(A;;GR;;;RC) + D:P(A;;GA;;;SY)(A;;GRGWGX;;;BA)(A;;GRGWGX;;;WD)(A;;GRGWGX;;;RC) + S:(ML;;NRNWNX;;;LW) + S:(ML;CIOI;NRNWNX;;;LW) + S:(ML;CIOI;NRNWNX;;;LW) + S:(ML;;NW;;;LW) + S:(ML;;NW;;;S-1-16-0) + S:(ML;;NW;;;LW)D:(A;;0x12019b;;;WD) + O:BAG:BAD:(A;;0x7;;;WD)(A;;0x7;;;AN)(A;;0x7;;;%s)(A;;0x7;;;%s)(A;;0x3;;;AC) + O:SYG:SYD:(A;;RC;;;SY) + O:BAG:BAD:(A;;0x7;;;WD)(A;;0x3;;;AN)(A;;0x7;;;%s)(A;;0x7;;;%s)(A;;0x3;;;AC)C;;;AC) + O:BAG:BAD:(A;;0x1f;;;BA)(A;;0xb;;;WD)(A;;0x1f;;;%s)(A;;0x1f;;;%s)(A;;0xb;;;AC);AC) + O:BAG:BAD:(A;;0x1f;;;BA)(A;;0xb;;;IU)(A;;0xb;;;SY) + O:BAG:BAD:(A;;0x7;;;PS)(A;;0x3;;;SY)(A;;0x7;;;BA) + + + + + {008ca0b1-55b4-4c56-b8a8-4de4b299d3be} + {de61d971-5ebc-4f02-a3a9-6c82895e5c04} + {724EF170-A42D-4FEF-9F26-B60E846FBA4F} + {A3918781-E5F2-4890-B3D9-A7E54332328C} + {1e87508d-89c2-42f0-8a7e-645a0f50ca58} + {a305ce99-f527-492b-8b1a-7e76fa98d6e4} + {AB5FB87B-7CE2-4F83-915D-550846C9537B} + {9E52AB10-F80D-49DF-ACB8-4330F5687855} + {df7266ac-9274-4867-8d55-3bd661de872d} + {D0384E7D-BAC3-4797-8F14-CBA229B392B5} + {C1BAE2D0-10DF-4334-BEDD-7AA20B227A9D} + {0139D44E-6AFE-49F2-8690-3DAFCAE6FFB8} + {A4115719-D62E-491D-AA7C-E74B8BE3B067} + {82A5EA35-D9CD-47C5-9629-E15D2F714E6E} + {B94237E7-57AC-4347-9151-B08C6C32D1F7} + {0AC0837C-BBF8-452A-850D-79D08E667CA7} + {4bfefb45-347d-4006-a5be-ac0cb0567192} + {6F0CD92B-2E97-45D1-88FF-B0D186B8DEDD} + {56784854-C6CB-462b-8169-88E350ACB882} + {82A74AEB-AEB4-465C-A014-D097EE346D63} + {2B0F765D-C0E9-4171-908E-08A611B84FF6} + {B4BFCC3A-DB2C-424C-B029-7FE99A87C641} + {5CE4A5E9-E4EB-479D-B89F-130C02886155} + {FDD39AD0-238F-46AF-ADB4-6C85480369C7} + {7B0DB17D-9CD2-4A93-9733-46CC89022E7C} + {374DE290-123F-4565-9164-39C4925E467B} + {1777F761-68AD-4D8A-87BD-30B759FA33DD} + {FD228CB7-AE11-4AE3-864C-16F3910AB8FE} + {CAC52C1A-B53D-4edc-92D7-6B2E8AC19434} + {054FAE61-4DD8-4787-80B6-090220C4B700} + {D9DC8A3B-B784-432E-A781-5A1130A75963} + {52528A6B-B9E3-4ADD-B60D-588C2DBA842D} + {9B74B6A3-0DFD-4f11-9E78-5F7800F2E772} + {BCB5256F-79F6-4CEE-B725-DC34E402FD46} + {352481E8-33BE-4251-BA85-6007CAEDCF9D} + {4D9F7874-4E0C-4904-967B-40B0D20C3E4B} + {1B3EA5DC-B587-4786-B4EF-BD1DC332AEAE} + {bfb9d5e0-c6a9-404c-b2b2-ae6db6af4968} + {F1B32785-6FBA-4FCF-9D55-7B8E7F157091} + {A520A1A4-1780-4FF6-BD18-167343C5AF16} + {2A00375E-224C-49DE-B8D1-440DF7EF3DDC} + {4BD8D571-6D19-48D3-BE97-422220080E43} + {2112AB0A-C86A-4FFE-A368-0DE96E47012E} + {C5ABBF53-E17F-4121-8900-86626FC2C973} + {D20BEEC4-5CA8-4905-AE3B-BF251EA09B53} + {2C36C0AA-5812-4b87-BFD0-4CD0DFB19B39} + {69D2CF90-FC33-4FB7-9A0C-EBB0F0FCB43C} + {A990AE9F-A03B-4E80-94BC-9912D7504104} + {33E28130-4E1E-4676-835A-98395C3BC3BB} + {DE92C1C7-837F-4F69-A3BB-86E631204A23} + {76FC4E2D-D6AD-4519-A663-37BD56068185} + {9274BD8D-CFD1-41C3-B35E-B13F55A758F4} + {5E6C858F-0E22-4760-9AFE-EA3317B67173} + {62AB5D82-FDC1-4DC3-A9DD-070D1D495D97} + {905e63b6-c1bf-494e-b29c-65b732d3d21a} + {6D809377-6AF0-444b-8957-A3773F02200E} + {7C5A40EF-A0FB-4BFC-874A-C0F2E0B9FA8E} + {F7F1ED05-9F6D-47A2-AAAE-29D317C6F066} + {6365D5A7-0F0D-45E5-87F6-0DA56B6A4F7D} + {DE974D24-D9C6-4D3E-BF91-F4455120B917} + {A77F5D77-2E2B-44C3-A6A2-ABA601054A51} + {DFDF76A2-C82A-4D63-906A-5644AC457385} + {C4AA340D-F20F-4863-AFEF-F87EF2E6BA25} + {ED4824AF-DCE4-45A8-81E2-FC7965083634} + {3D644C9B-1FB8-4f30-9B45-F670235F79C0} + {DEBF2536-E1A8-4c59-B6A2-414586476AEA} + {48DAF80B-E6CF-4F4E-B800-0E69D84EE384} + {3214FAB5-9757-4298-BB61-92A9DEAA44FF} + {B6EBFB86-6907-413C-9AF7-4FC2ABF07CC5} + {E555AB60-153B-4D17-9F04-A5FE99FC15EC} + {0482af6c-08f1-4c34-8c90-e17ec98b1e17} + {2400183A-6185-49FB-A2D8-4A392A602BA3} + {52a4f021-7b75-48a9-9f6b-4b87a210bc8f} + {AE50C081-EBD2-438A-8655-8A092E34987A} + {1A6FDBA2-F42D-4358-A798-B74D745926C5} + {B7534046-3ECB-4C18-BE4E-64CD4CB7D6AC} + {8AD10C31-2ADB-4296-A8F7-E4701232C972} + {C870044B-F49E-4126-A9C3-B52A1FF411E8} + {3EB685DB-65F9-4CF6-A03A-E3EF65729F3D} + {AAA8D5A5-F1D6-4259-BAA8-78E7EF60835E} + {00BCFC5A-ED94-4e48-96A1-3F6217F21990} + {B250C668-F57D-4EE1-A63C-290EE7D1AA1F} + {C4900540-2379-4C75-844B-64E6FAF8716B} + {15CA69B3-30EE-49C1-ACE1-6B5EC372AFB5} + {859EAD94-2E85-48AD-A71A-0969CB56A6CD} + {4C5C32FF-BB9D-43b0-B5B4-2D72E54EAAA4} + {7d1d3a04-debb-4115-95cf-2f29da2920da} + {b7bede81-df94-4682-a7d8-57a52620b86f} + {ee32e446-31ca-4aba-814f-a5ebd2fd6d5e} + {0D4C3DB6-03A3-462F-A0E6-08924C41B5D4} + {190337d1-b8ca-4121-a639-6d472d16972a} + {98ec0e18-2098-4d44-8644-66979315a281} + {7E636BFE-DFA9-4D5E-B456-D7B39851D8A9} + {8983036C-27C0-404B-8F08-102D10DCFD74} + {7B396E54-9EC5-4300-BE0A-2482EBAE1A26} + {A75D362E-50FC-4fb7-AC2C-A8BEAA314493} + {A52BBA46-E9E1-435f-B3D9-28DAA648C0F6} + {767E6811-49CB-4273-87C2-20F355E1085B} + {24D89E24-2F19-4534-9DDE-6A6671FBB8FE} + {339719B5-8C47-4894-94C2-D8F77ADD44A6} + {625B53C3-AB48-4EC1-BA1F-A1EF4146FC19} + {B97D20BB-F46A-4C97-BA10-5E3608430854} + {43668BF8-C14E-49B2-97C9-747784D784B7} + {289a9a43-be44-4057-a41b-587a76d7e7f9 + {0F214138-B1D3-4a90-BBA9-27CBC0C5389A} + {1AC14E77-02E7-4E5D-B744-2EB1AE5198B7} + {D65231B0-B2F1-4857-A4CE-A8E7C6EA7D27} + {A63293E8-664E-48DB-A079-DF759E0509F7} + {9E3995AB-1F9C-4F13-B827-48B24B6C7174} + {0762D272-C50A-4BB0-A382-697DCD729B80} + {5CD7AEE2-2219-4A67-B85D-6C9CE15660CB} + {BCBD3057-CA5C-4622-B42D-BC56DB0AE516} + {f3ce0f7c-4901-4acc-8648-d5d44b04ef8f} + {A302545D-DEFF-464b-ABE8-61C8648D939B} + {18989B1D-99B5-455B-841C-AB7C74E4DDFC} + {491E922F-5643-4AF4-A7EB-4E7A138D8174} + {F38BF404-1D43-42F2-9305-67DE0B28FC23} + + + + + 27C3B8ED-0790-42BD-9AD7-18465E7F7696 + 27C3B8ED-0790-42BD-9AD7-18465E7F7696 + 27C3B8ED-0790-42BD-9AD7-18465E7F7696 + 97808F6C-4769-49D5-9553-18AE9C62ACD7 + B196B286-BAB4-101A-B69C-00AA00341D07 + D27CDB6E-AE6D-11CF-96B8-444553540000 + abe2869f-9b47-4cd9-a358-c22904dba7f7 + 00000000-0000-0000-C000-000000000046 + ADB880A6-D8FF-11CF-9377-00AA003B7A11 + 5e7e8100-9138-11d1-945a-00c04fc308ff + 82bd0e67-9fea-4748-8672-d5efe5b779b0 + 5e7e8100-9138-11d1-945a-00c04fc308ff + 82BD0E67-9FEA-4748-8672-D5EFE5B779B0 + 8856F961-340A-11D0-A96B-00C04FD705A2 + + + + + \Device\KeyboardClass0 + Software\Skype\Phone + \registry\machine\system\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\ + SYSTEM\CurrentControlSet + Software\Microsoft + System\WPA\ + HARDWARE\DEVICEMAP\SERIALCOMM + HARDWARE\DEVICEMAP\PARALLEL PORTS + Software\Microsoft\Windows\CurrentVersion\Run + .DEFAULT\Software\Microsoft\Windows\CurrentVersion\RunServices + .DEFAULT\Software\Microsoft\Windows\CurrentVersion\Runonce + .DEFAULT\Software\Microsoft\Windows\CurrentVersion\Run + HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\UserReset + HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run\ + HKEY_CURRENT_USER\Software\Microsoft + HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\UserInit + HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Shell + HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run\wdfmgr + HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\UserRestart + Software\Policies\Microsoft\Cryptography\AutoEnrollment + Software\KasperskyLab\protected\AVP9\settings + Software\KasperskyLab\protected\AVP8\settings + Software\kingsoft\AntiVirus + Software\JiangMin + Software\Norton\SecurityStatusSDK + Software\ESET\ESET Security\CurrentVersion\Info + Software\Cisco Systems\VPN Client\AllAccess + Software\AVAST Software + Software\ESET + Software\Classes\TypeLib\{F9043C88-F6F2-101A-A3C9-08002B2F49FB}\1.2\0\win32 + CurrentVersion\Run + HKEY_CLASSES_ROOT + HKEY_CURRENT_USER + HKEY_LOCAL_MACHINE + HKEY_USERS + HKEY_PERFORMANCE_DATA + HKEY_CURRENT_CONFIG + HKEY_DYN_DATA + HKCR + HKCU + HKLM + HKPD + HKDD + HKCC + HKCU + Hardware\Description\System\CentralProcessor + Hardware\ACPI\DSDT + HARDWARE\DEVICEMAP + hklm\SYSTEM\ControlSet001\Control\SafeBoot\Network\{4D36E967-E325-11CE-BFC1-08002BE10318} + hklm\SYSTEM\ControlSet001\Control\SafeBoot\Minimal\{4D36E967-E325-11CE-BFC1-08002BE10318} + HARDWARE\DESCRIPTION\System\CentralProcessor\0 + DEFAULT\Software\Microsoft\Windows\CurrentVersion\Run + DisableTaskManager + HKCU\Control Panel\Desktop + LoadAppInit_DLLs + AppInit_DLLs + WarnOnIntranet + NoProtectedModeBanner + CLSID\{6C736DB0-BD94-11D0-8A23-00AA00B58E10}\EnableEvents + ROOT\SecurityCenter + ROOT\SecurityCenter2 + \shell\open\command + \Device\KeyboardClassC + \DosDevices\KeyboardClassC + + + + + %ALLUSERPROFILE% + %APPDATA% + commonappdata + %CommonProgramFiles% + %HOMEPATH% + %LOCALAPPDATA% + %ProgramData% + %ProgramFiles% + %PUBLIC% + %SystemDrive% + %SystemRoot% + %TEMP% + %USERPROFILE% + %windows% + %windir% + %system% + %temp% + %user% + %programfiles% + C:\Program Files\Common Files\System\wab32 + + + + Microsoft Windows ME + Microsoft Windows 98 + Microsoft Windows 95 + Microsoft Windows 2000 + Microsoft Windows XP + Home-Basic-Edition + Home-Premium-Edition + Home_Edition + Home_Server + WinNT + WIN32_NT + WIN_2008R2 + WIN_7 + WIN_2008 + WIN_VISTA + WIN_2003 + WIN_XPe + WIN_XP + WIN_2000 + Web_Server_Edition + Standard_Edition_core_installation + Standard_Edition + Small_Business_Server_Premium_Edition + Small_Business_Server + Enterprise_Edition_for_ItaniumBased_System + Enterprise_Edition_core_installation + Datacenter_Edition_core_installation + Datacenter_Edition + Cluster_Server_Edition + Starter_Edition + Business_Edition + Enterprise_Edition + Home_Basic_Edition + Home_Premium_Edition + Ultimate_Edition + Server2008R2 + Seven + Server2008 + Win8 + WinServer2012 + Win7 + WinServer2008R2 + WinServer2008 + Vista + WinHomeServer + WinServer2003R2 + WinServer2003 + WinXP64 + WinXP + Win2K + Windows Me + Windows 98 + Windows 95 + Windows NT + Windows Vista + Windows 7 + Windows 8 + Windows 8.1 + Windows NT 3.51 + Windows NT 4.0 + Windows Server + Windows Server 2012 R2 + Windows 10 + Windows Server 2016 Technical Preview + Ultimate Edition + Home Premium Edition + Home Basic Edition + Enterprise Edition + Business Edition + Starter Edition + Cluster Server Edition + Datacenter Edition + Datacenter Edition (core installation) + Enterprise Edition (core installation) + Enterprise Edition for Itanium-based Systems + Small Business Server + Small Business Server Premium Edition + Standard Edition + Standard Edition (core installation) + Web Server Edition + Professional Edition + Windows Server 2003 + Windows Server 2003 R2 + Windows Storage Server 2003 + Windows XP + Windows XP Professional x64 Edition + Windows XP Professional x64 + Datacenter Edition for Itanium-based Systems + Datacenter x64 Edition + Enterprise x64 Edition + Standard x64 Edition + Compute Cluster Edition + Web Edition + Home Edition + Professional + Windows 2000 + Datacenter Server + Advanced Server + Windows Home Server + Windows Server 2008 + Windows Server 2008 R2 + Windows Server R2 + Media Center Edition + Tablet PC Edition + Embedded Edition + Professional x64 Edition + Storage Server 2003 R2 + Storage Server 2003 + Server 2003 R2 + Server 2003 + Server 2008 + Business + Business N + Datacenter Edition(Core) + Enterprise N + Enterprise Edition(Core) + Home Basic + Home Basic N + Home Premium + Home Premium N + Ultimate + Ultimate N + Standard Edition(Core) + NT3.1 + NT3.5 + NT3.51 + 2000 + 2003 Server + 2008 Server + Win Vista + Win Srv 2008 + Win 7 + Win 8 + Windows+8.1 + Win Srv 2003 + Win Srv + Win XP + Windows+XP + Windows XP (5.1) + Win 2000 + Windows Server 2012 + 32-bit Edition + 64-bit Edition + Windows Server 2000 + 2003 + 2008 + Windows Server 2000 + Windows+8 + Windows+7 + Windows+Vista + Windows+Server+2003 + Windows+2000 + Windows 2000 (5.0) + Windows 7 (6.1) + Windows Server 2003 (5.2) + Windows Server 2003 R2 (5.2) + Windows Server 2008 (6.0) + Windows Server 2008 R2 (6.1) + Windows Vista (6.0) + + + + + 76487-640-1457236-23837 + 76487-337-8429955-22614 + 76487-644-3177037-23510 + 76487-640-8834005-23195 + 76487-640-0716662-23535 + 76487-644-8648466-23106 + 76487-341-5883812-22420 + 76487-OEM-0027453-63796 + 76497-640-6308873-23835 + 55274-640-2673064-23950 + 00426-293-8170032-85146 + + + + + S-1-0 + S-1-0-0 + S-1-1 + S-1-1-0 + S-1-2 + S-1-2-0 + S-1-2-1 + S-1-3 + S-1-3-0 + S-1-3-1 + S-1-3-2 + S-1-3-3 + S-1-3-4 + S-1-5-80-0 + S-1-4 + S-1-5 + S-1-5-1 + S-1-5-2 + S-1-5-3 + S-1-5-4 + S-1-5-6 + S-1-5-7 + S-1-5-8 + S-1-5-9 + S-1-5-10 + S-1-5-11 + S-1-5-12 + S-1-5-13 + S-1-5-14 + S-1-5-15 + S-1-5-17 + S-1-5-18 + S-1-5-19 + S-1-5-20 + S-1-5-32-544 + S-1-5-32-545 + S-1-5-32-546 + S-1-5-32-547 + S-1-5-32-548 + S-1-5-32-549 + S-1-5-32-550 + S-1-5-32-551 + S-1-5-32-552 + S-1-5-64-10 + S-1-5-64-14 + S-1-5-64-21 + S-1-5-80 + S-1-5-83-0 + S-1-16-0 + S-1-16-4096 + S-1-16-8192 + S-1-16-8448 + S-1-16-12288 + S-1-16-16384 + S-1-16-20480 + S-1-16-28672 + S-1-5-32-554 + S-1-5-32-555 + S-1-5-32-556 + S-1-5-32-557 + S-1-5-32-558 + S-1-5-32-559 + S-1-5-32-560 + S-1-5-32-561 + S-1-5-32-562 + S-1-5-32-569 + S-1-5-32-573 + S-1-5-32-574 + S-1-5-32-575 + S-1-5-32-576 + S-1-5-32-577 + S-1-5-32-578 + S-1-5-32-579 + S-1-5-32-580 + S-1-5-80-2006800713-1441093265-249754844-3404434343-1444102779 + S-1-5-80-3864065939-1897331054-469427076-3133256761-1570309435 + + + + http + https + httpmail + nntp + imap + pop3 + file + smtp + ftp + icmp + + + + [LArrow] + [UArrow] + [RArrow] + [DArrow] + [Ctrl+%c] + [%s] + [ESCAPE] + [TAB] + [DELETE] + [CAPS LOCK] + [BACKCPACE] + [Backspace] + [ENTER] + [Enter] + [Tab] + [Arrow Left] + [Arrow Up] + [Arrow Right] + [Arrow Down] + [Home] + [Page Up] + [Page Down] + [End] + [Break] + [Delete] + [Insert] + [Ent] + [Print Screen] + [Scroll Lock] + [Caps Lock] + [Alt] + [Esc] + [Back Space] + [CONTROL] + [PUSE] + [LEFT] + [RIGHT] + [UP] + [DOWN] + [NUM LOCK] + [RMOUSE] + [LMOUSE] + [AltRight] + [AltLeft] + [CtrlRight] + [CtrlLeft] + [ShiftRight] + [ShiftLeft] + [Scroll] + [NumLock] + [Sleep] + [Menu] + [WindowsRight] + [WindowsLeft] + [Suppr] + [PrintScreen] + [PageDown] + [PageUp] + [Caps] + [Pause] + [Ctrl] + [Shift] + [SHIFT] + [Clear] + [DownArrow] + [RightArrow] + [UpArrow] + [LeftArrow] + [Space] + [CapsLock] + [ALT-DOWN] + [ALT-UP] + [APPS] + [BACK] + [CLR] + [CTRL-DOWN] + [CTRL-UP] + [Ctrl+A] + [Ctrl+C] + [Ctrl+D] + [Ctrl+V] + [Ctrl+X] + [Ctrl+Z] + [DEL] + [EXECUTE] + [F1] + [F2] + [F3] + [F4] + [F5] + [F6] + [F7] + [F8] + [F9] + [F10] + [F11] + [F12] + [BK] + [INS] + [LF] + [SCROLLLOCK] + [HELP] + [BACK_SPACE] + [RETURN] + [Esc] + [TAB] + [CAPS LOCK] + [SPACE] + [LEFT_SHIFT] + [RIGHT_SHIFT] + [LEFT_CONTROL] + [RIGHT_CONTROL] + [LCONTROL-DOWN] + [LCONTROL-UP] + [LMENU-DOWN] + [LMENU-UP] + [LWIN-DOWN] + [LWIN-UP] + [PGDOWN] + [PGUP] + [PRINT] + [RCONTROL-DOWN] + [RCONTROL-UP] + [RMENU-DOWN] + [RMENU-UP] + [RWIN-DOWN] + [RWIN-UP] + [SELECT] + [SEPARATOR] + [SNAPSHOT] + [PRSC] + [PrtSc] + [WIN] + + + + OnClick + OnCreate + OnData + OnDataFind + OnDataHint + OnDeletion + OnDestroy + OnDragDrop + OnKeyDown + OnKeyPress + OnKeyUp + OnMouseDown + OnMouseEnter + OnMouseLeave + OnMouseMove + OnMouseUp + OnProgress + OnTimer + + + + fuck + fukoff + Fuck You!!! + sandboxfuck + Fuck You By QQ:123**321 + Shit!! + asshole + FUCK OFF!!! + + + + ThisprogrammustberununderWin32 + !This is a PE executable + + unzip + inflate + \\.\SICE + \\.\REGSYS + \\.\REGVXG + \\.\FILEVXG + \\.\FILEM + + MSXML2.ServerXMLHTTP$ + Word.Document.8 + PROJECT.THISDOCUMENT.AUTOOPEN + Microsoft Office + Root Entry + WordDocument + SummaryInformation + DocumentSummaryInformation + Macros + _VBA_PROJECT + PROJECTwm + + webcam + Please Enable Content* to see this document. + Enable Content + Program Files (x86) + PROCEXPLORER + MSScriptControl.ScriptControl.1 + Embedded Control + Microsoft Word 10.0 + OCXNAME + money + Accept-Language: + Accept-Encoding: + Mr.Black + + WinZip Self-Extractor - Password + This self-extracting Zip file is password protected. + Windows Installer XML (3.0.5419.0) + ResponseText + Your personal files are encrypted! + !!!Rescue your files!!! + Now you have the last chance to decrypt your files. + Any attempt to remove or corrupt this software will result + in immediate elimination of the private key by the server. + You must install this browser + Your decryption price will + Everything is fine now decrypting all files. + All files Decrypted + Enter Decrypt Key + WScript.Shell + System Volume Information + Boot + wevtutil clear-log Security + wevtutil clear-log Setup + wevtutil clear-log System + wevtutil clear-log Application + SECG curve over a 256 bit prime field + SmartAssembly.Attributes + Copyright (c) 1998-2009 by Joergen Ibsen All Rights Reserved. + "Powered by SmartAssembly 6.8.0.121 + !Powered by SmartAssembly 6.6.1.44 + Microsoft Enhanced RSA and AES Cryptographic Provider + !Require Windows + ENIGMA + $Info: This file is packed with the UPX executable packer http://upx.sf.net $ + $Id: UPX 3.91 Copyright (C) 1996-2013 the UPX Team. All Rights Reserved. $ + Microsoft Application Compatibility Toolkit 5.6 + Management + File manager + System Manager + Screen Capture + Webcam Capture + Packet Sniffer + Listen + Kill + Background + \\.\mailslot\%s + Macromedia Flash Player 7.0 r14 + Macromedia Flash Player 7.0 + dbgeng + Network Performance and Security Manager + ProxyEnable + ProxyServer + ProxyOverride + ProxyUserName + ProxyPassword + SkpWnd + SkypeControlAPIAttach + SkypeControlAPIDiscover + Skype:API + GET SKYPEVERSION + SkypePath + AdministratorsGroup + NtAuthority + masterkey + IEHistory + BUILTIN + NT AUTHORITY + + + PR_Bind + PR_Accept + PR_AcceptRead + PR_Connect + PR_Listen + PR_Read + PR_Write + PR_Writev + PR_Close + PR_Send + PR_TransmitFile + PR_OpenTCPSocket + PR_GetSocketOption + PR_SetSocketOption + PR_Shutdown + PR_GetError + PR_SetError + PR_GetNameForIdentity + + + cards + card + speex-1.1.11.1 + Time expiried. + PClock + Start scanner + Scanner completed + Start crypter + Files encrypted + SoftDownloaderWnd + MemoryScanner + ActiveX Control + \\.\PhysicalDrive%d + Microsoft Windows Auto Update + PB_DropAccept + PB_WindowID + IsAdmin + CryptKeyType + CryptKeyId + NetAdapter + Gateway + PriWinsServer + SecWinsServer + DHCPServer + DnsServer + Microsoft Enhanced Cryptographic Provider v1.0 + Microsoft Base Cryptographic Provider v1.0 + stub_helper + vm_protect + + FtpServer + FtpUserName + FtpPassword + FtpDirectory + RootDirectory + Port + ServerType + onEnterFrame + attachMovie + error to get HDD firmware serial + aPLib v1.01 - the smaller the better :) + TrojanEngine + Clinic + NetMon + FileSmash + SafeBox + IERepair + KillVirus + SoftMove + SysClean + Trojan + CrashStackLen + CrashDumpLen + CrashStackBase64Len + CrashDumpBase64Len + CrashStack + MinDump + Google Update Service + googleupdate + VIRUS + QEMU + + PaySafeCard + MoneyPak + moneypak + MSFT + EnumProcess + InjectByPid + Send to Server failed. + HandShake with the server failed. Error: + Microsoft Unified Security Protocol Provider + ddos.bot + passwords + httpserver + makedir + sendkeys + opencmd + ProcessorNameString + Identifier + VendorIdentifier + SystemBiosVersion + SystemBiosDate + VideoBiosVersion + VideoBiosDate + Windows File Protection + LogonFailure + killthread + startkeylogger + stopkeylogger + listprocesses + killprocess + stopspy + redirectspy + stopredirectspy + kazaabackupfiles + SC_MONITORPOWER + HWND_BROADCAST + IsConnectedToInternet + get_MachineName + MacAddress + EmailAddress + PopServer + PopPort + PopAccount + PopPassword + SmtpServer + SmtpPort + SmtpAccount + SmtpPassword + WininetCacheCredentials + PasswordType + OutpostMonitor + + DisableAllPrivileges + SetPrivilege + telnet + Download.Complete + Download.Cancelled + Download.Failed + onLoadInit + onLoadProgress + onLoadError + onLoadComplete + onLoadStart + onPress + onInitialize + onUnload + onEnterFrame + SMTP Password + HTTPMail Password + NNTP Password + IMAP Password + POP3 Password + NNTP Password + IMAP Password + POP3 Password + IMAP Port + SMTP Port + POP3 Port + SMTP User + HTTPMail Server + IMAP User + POP3 User + HTTP Server URL + HTTP User + Email + IMAP User Name + IMAP Server + NNTP Server + NNTP User Name + NNTP Email Address + SMTP User Name + SMTP Server + SMTP Email Address + + Adobe ImageReadyq + ClearBrowsingHistoryOnExit + GetMACAddress + GetProcessesByName + WebRequest + WebResponse + GetResponse + GetVolumeSerial + ENCRYPtSTRING + ENCRYPTBYTe + VBRUN + Blowfish + CreateDecryptor + MD5CryptoServiceProvider + TripleDESCryptoServiceProvider + PaddingMode + iexplorer + Shell_TrayWnd + ExecuteCommand + RunPE + CCleaner + Binder + SpyTheSpy + TCPEye + SpeedGear + taskmgr + IPBlocker + procexp + Windows Update + Payment ok + Payment Received. Proceed to decryption. + Waiting Payment + Waiting TOR Connection + TorLocker + TorLocker_v0.9.3 + Wallpaper + kippohome + huffman + DecodeHuffman + Inflate + Unzip + ZipAndEncrypt + ZipAndAES + LoadFile + SafenSoft + SysWatch + McAfee + Security Center + Symantec + Protection + Norton + + PONG! + ReadPort + WritePort + cookie_module + CompressAndSend + EncryptFile + RunAsShellUser + SVNCStartServer + Terminal Server + Enterprise + LanmanNT + CONNECTED + SENDME + RESOLVE + RESOLVED + ESTABLISH_INTRO + ESTABLISH_RENDEZVOUS + RENDEZVOUS1 + RENDEZVOUS2 + INTRO_ESTABLISHED + RENDEZVOUS_ESTABLISHED + INTRODUCE_ACK + ChewBacca/ + chewbacca + TMemoryScanner + Symantec Shared + CWSandbox + AVAST Software + Registry optimiser + Optimizing the registry... + Virtual HD + db2admin + nopassword + password12 + secret + superman + iloveyou + helpme + hockey + home123 + changeme + HotTracking + OpenProcessToken fail + AdjustTokenPrivileges fail + replacement + formgrabber + redirects + httpinjects + Transfer-Encoding + modify + conditions + actions + process + NtShutdownSystem + coin-miner + regwrite + urlmon + Internet Explorer + inhibitPolicyMapping + infinite + openssl + relativename + Polynomial + AES + RSA + RID + LanmanWorkstation + LanmanServer + DNS + Salt Length + Seed + Prime + protocol testing + experience Destroy + winsock + connection failed + open internet failed + payload + Wscript.Shell + Shell.Application + createobject + Extracting + UltraVnc + UltraVncSC + RunProgram + Signature + Fast decoding + Gina + Macromedia + FlashPlayer + NetworkService\Cookies\ + unrarw32 + server + verifyinginstaller + Mozilla + CONNECT + AppData + admin + Microsoft.VisualBasic + Dictionary + Protocol not supported + referer + partner_online_url + partner_new_url + exe.agent.mail + password + Launcher + setup + remote + random + inject + hook + crack + script + browse + Clipboard + Privilege + Reboot + CABINET + CabinetFile + cabfile + extract + VB Runtime Installation + Command.com + Resume + Pause + Socket + GetCode + Console + LZStart + shell + 666 + alert + reverse + swap + logon + logoff + HookProc + attempt + query + scan + module + drop + loop + wait + Download + Upload + CONNECT + pipe + Transaction + Created by + WinDir + exec error + LordPE + Silvana + petite + PROGRAM + deflate + Keep-Alive + Referer + WinSta0 + Gh0st + Update + Forbidden + Accepted + sessionid + + sharedaccess + localgroup + administrators + Administrator + guest + RDP-Tcp + UnknownProcess + %d Day %d Hour %d Min + termsrv_t + Winlogon + nsocket + repeat + compression + dictionary + userprofile + webkit + command + tracing + sandbox + keystroke + scanning + Callback + torrent + Outsanding + proxy + downspeed + webseeds + 666 + POST + fingerprint + DNA_Proxy + min_http_connections + Unauthorized + pairing + TOKEN + subscribe + announce + multicast + payload + UPnP + channel + tracker + watchdog + shared + HHA Version 4.74.8702 + PrepareOurShit + Exefiles + Scanning + ProgramFilesDir + Install + \Temp + SHFOLDER + NullsoftInst + WinRAR SFX + 287333.dat + \\cryptme\\ + run.vbs + {0000054f-0000-0010-8000-00aa006d2ea4} + username + Password + Username + Expires + User-Agent + Cookie + Windows Update Service + serialNumber + userPassword + public_key + serial + Private-Key + Seed: + encryption + PECompact2 + logFile + application/pdf + Run as a daemon + 127.0.0.1 + serverTimeout + Server closed connection + nameserver + COMSPEC + OLLYDBG + WinDbgFrameClass + BankID + Mscomctl32.ocx + WebBrowser + Logout + 9368265E-85FE-11d1-8BE3-0000F8754DA1 + Scripting.FileSystemObject + LoVein1 + downloader + browser + NETSCAPE2.0 + opera + AuthenticationMode + Downloader + chromepref + ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/ + pipedatacontinue + Shell + start + whoami + pidrun + geturl + Sometimes + Destroy + likubes + SysUtils + ActiveX + Sitikat + ping + pkxm + Reply from + PROXY_TYPE_DIRECT + PROXY_TYPE_AUTO_DETECT + downfile + upfile + quitz + debugmessage + debugclient + debugfile + delfile + delmessage + delclient + listfiles + listmessages + listclients + POST + CONNECT + NetSubKey + FileDescrsiption + Accepted: + sha256 + sinzy + AckPacket + Connection + autoRunKeyPath + SIGNATURE + messageId + HeartBeat + Request + Unload + RequestLoop + HeartBeatLoop + TcpClient + Connect + Login + CurrentUser + CreateDomain + ComputeHash + cookies.* + PROCMON_WINDOW_CLASS + PROCEXPL + WdcWindow + ProcessHacker + Dumper + Dumper64 + APISpy32Class + runas + sysprep + TokenPrivilege + Shutdown + WebKit2WebProcess + Sleeping + Ivan Medvedev + Rijndael + SystemBiosVersion + VideoBiosVersion + VirtualBox + Identifier + deflate 1.2.3 Copyright 1995-2005 Jean-loup Gailly + deflate 1.1.4 Copyright 1995-2002 Jean-loup Gailly + inflate 1.2.3 Copyright 1995-2005 Mark Adler + inflate 1.1.4 Copyright 1995-2002 Mark Adler + History + ProductType + RegisterRawInputDevices + GetRawInputData + protocol> + sqlite3_open + sqlite3_close + sqlite3_prepare_v2 + sqlite3_step + sqlite3_column_text + plugins + Hibernating + Valid + Running + downtime-started + uptime-started + Intel Hardware Cryptographic Service Provider + lpAddress + BeginInvoke + EndInvoke + StatusChecker + Encoding + semaphore + stand by + startime + status + throttle + Mandatory Level + _invoke_watson + remove + debug + hostname + clientkey + reqfilepath + reqfile + postvalue + postfile + postdata + mkdir + rmdir + chdir + rpcsrv + svchost + Deleting Service... + Service uninstall success. + CompareString + Engine started + Running in background + Stale thread + Locking doors + Rotors engaged + Im going to start it + \DosDevices\DKOM_Driver + \Device\DKOM_Driver + Process successfully hidden. + Process ID: %d + EPROCESS address: %#x + ActiveProcessLinks offset: %#x + Extracting %s + Your message has been sended + Couponserver + xmlUrl + yahoo + LoadXml + LocalMachine + DownloadAll + DownloadComplete + DownloadFile + DownloadFileAsync + DownloadServer + DownloadThreads + DownloadUrl + Downloaded + DownloadedBrowser + Downloading... + CorruptedMachine + HtmlGenerator + MachineInfo + MachineRestriction + RegSAM + Security + MemoryManagement + Trackingurls + TypeChekDomain + DownloadUrl + QueueDownloader + ZipManager + ZipStorer + Firefox + Chrome + InternetExplorer + GetIEVersion + GetWBVersion + webBrowser1 + changeHtmlCode + retries + completed + addextension + DownloadComplete + add_DownloadComplete + remove_DownloadComplete + DownloadThreads + Monetizer + yahoo + internetTurbo + strongvault + amonetize + Couponserver + ShoppingChip + UsedBrowser + AndroidAPK + IexplorerMinVersion + checkMachineInfo + checkYahooBug + checkCouponserver + checkInternet + checkAOLbug + hideWhenInstalling + idPromo + WebmasterId + firewalls + IsControlled + Microsoft Network Monitoring Service + Host Process for Windows Services + MsNetMonitor + HideWindow + Windows Filter Driver + firewall + IsUserAdministrator + EVERYONE + CreateSubKey + NotifyDownloading + isvirtualMachine + isdebugging + HasDebugger + debugging + checkurls + ListSoftwares + CheckAdminPrivileges + TrackOnDefaultBrowser + GetDomain + checkdomain + bytesDownloaded + God Mode + logger + This plugin is already loaded. + The plugin you are trying to load does not exist + Hook cleaning on + PiD obfuscation on + Code injection successful! + Code injection failed! + Injecting code ... + Code Injection + Creating a remote thread ... + Keylogging disabled. + Windows Registry Editor Version 5.00 + start + stop + DisallowRun + NoDriveTypeAutoRun + HideFileExt + Hidden + SuperHidden + Logon User Name + NoFolderOptions + Happy BirthDay mys Boss + Merry Christmas + + Starting Hide myself ... + Starting Killing myself ... + LZO real-time data compression library. + + Access denied! + Total entries: %d + Entries enumerated: %d + Upload file ok! + create remote file error! + Download file ok! + Reading remote file error! + create pipe error! + start cmd error! + Logon user err! + execute error! + bind cmd frist! + get user name error! + cant get ver info! + Windows? + Remote + Ramdisk + Client process-%d-stoped! + Create localfile error! + DownloadEnd + List domain server ok!# + fileupload + cruisenet + chunked + bankman + javascript: + + All the important files on your computer were encrypted. + All the important files on your disks were encrypted. + Schedule service command line interface + already running + Botnet has been shutdown - restart bot? + Botnet shutdown + QUIT :Botnet shutdown + PRIVMSG %s :bingo - botnet shutting down + Resistance is futile + No malware here honest guv! + Anti-debug + misery mystery + Detoured + Client hook allocation failure. + silentpostback + AlreadyRunning + StubInfo + wrapper + keeplog + pingdialog + runonce + noreq + verifycookies + account + accountid + selftest + silenterr + preload + PostbackSent + StubRun + StubExtract + WaitablePort + Waiting + Waiting Connections + ServiceMain + ServTestDos + VBoxGuest + Betabot + Hashtable + GetResourceString + Monitor + RegServer + Send ack is successful. + Get the right data. + Receiving acknowledgment is successful. + Receiving packet failed. + Sending packet success... + Cant get the right data + Initialization is successful. + Initialization is failed. + tempPass.txt + POP3 Password2 + POP3 Server + POP3 User Name + HTTPMail Password2 + Hotmail + HTTPMail User Name + 2004 2005 Pierre le Riche / Professional Software Development + Broadcast adress : + Broadcasts : NO + Broadcasts : YES + SHELLEXECUTE + SHELLEXECUTEWAIT + #BOT#CloseServer + #BOT#OpenUrl + #BOT#RunPrompt + #BOT#SvrUninstall + #BOT#URLDownload + #BOT#URLUpdate + ActiveOfflineKeylogger + ActiveOnlineKeyStrokes + ActiveOnlineKeylogger + AntiVirusDisableNotify + BTMemoryLoadLibary: Cant attach library + Be Right Back + DownloadFail + DownloadSuccess + Progman + Sender + UPLOADEXEC + UPLOADFILE + UnActiveOfflineKeylogger + UnActiveOnlineKeyStrokes + UnBlockContact + Video Capture + WEBCAMLIVE + WEBCAMSTOP + drivers\etc\hosts + unknown compression method + wscsvc + httpstop + logstop + ftfpstop + procsstop + securestop + reconnect + disconnect + botid + aliases + flusharp + flushdns + crash + killthreads + killproc + killid + .download + .update + Kennwort + Object dump complete. + Ping flood + ROOTED + Rebooting system + Reconnecting + Referer: %s + Remote Command Prompt + Removing Bot + [DDoS] + [KEYLOG]: %s + [PSNIFF] + [PING] + [TFTP] + [UPD] + administrador + administrat + administrateur + Download complete + ALIEN-Z + \Google\Chrome\User Data + VncSrvWndProc + VncStopServer + VncStartServer + VNCCreateServer + VNCServerThread + VNCStartServer + FPUMaskValue + PhysicalDrive0 + Protection Error + LOADER ERROR + Host is down. + No route to host. + debugger + emulat + GetProcesses + MemoryStream + GZipStream + 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+/ + putfile: + getfile: + outlook + iexplore + source + Connecting + Downloading + Cancelled + Connecting + Reconnect Pause + Terminated + Transfer Error + Connection Error + OpenRequest Error + SendRequest Error + URL Parts Error + CreateThread Error + Request Error + Server Error + Redirection + TypeLib + Hardware + Interface + FileType + Delete + NoRemove + ForceRemove + Keylogger + crypter + dump + vbox + NetKeyLogger + TARGET + pipeline + miner + Execute ERROR + Download ERROR + Executed As + Execute ERROR + Update ERROR + Updating To + Update ERROR + ASPNET + IUSR_ + IWAM_ + ASPNET + POP3 + Admins + Browsers + Guests + Users + webBrowser2 + IEFrame + \\.\pipe\ + permission denied + permission_denied + connection_already_in_progress + connection_aborted + connection_refused + host_unreachable + already_connected + network_down + network_reset + network_unreachable + not_connected + wrong_protocol_type + broken pipe + connection aborted + connection already in progress + connection refused + host unreachable + network down + network reset + network unreachable + owner dead + protocol error + wrong protocol type + master + mysql + daemon + backup + marta + oracle + redhat + exploitable + passwd + proxypasswd + proxyuser + Login denied + Remote file not found + RenameFile + RunPrompt + RunSelectedAsAdmin + RunSelectedHidden + RunSelectedShow + RemoteMachineName + AheadLib + PlusDLL + PLUSUNIT + web-browser + SetHook + TMemoryScanner + Protect + TokenUser + TokenGroups + TokenPrivileges + TokenOwner + TokenPrimaryGroup + TokenDefaultDacl + TokenSource + TokenType + TokenImpersonationLevel + TokenStatistics + TokenRestrictedSids + TokenSessionId + TokenGroupsAndPrivileges + TokenSessionReference + TokenSandBoxInert + TokenAuditPolicy + TokenOrigin + TokenElevationType + TokenLinkedToken + TokenElevation + TokenHasRestrictions + TokenAccessInformation + TokenVirtualizationAllowed + TokenVirtualizationEnabled + TokenIntegrityLevel + TokenUIAccess + TokenMandatoryPolicy + TokenLogonSid + TokenPrimary + TokenImpersonation + SecurityAnonymous + SecurityIdentification + SecurityImpersonation + SecurityDelegation + + \\.\PhysicalDrive0 + + + windowsupdate + wilderssecurity + castlecops + spamhaus + cpsecure + arcabit + emsisoft + sunbelt + securecomputing + rising + prevx + computerassociates + networkassociates + etrust + rootkit + spyware + + vmdebug + VMware Replay Debugging Helper + VMware VMCI Bus Driver + vmci + VMware Pointing Device + vmmouse + Virtual Machine Additions Mouse Integration Filter Driver + msvmmouf + MS Virtual SCSI Disk Device + VMware Workstation v10 + VMwareDragDetWndClass + VMwareSwitchUserControlClass + VMware + VMware Pointing + VMware server memory + VMware Replay + AntiVirtualBox + AntiVmWare + AntiVirtualPC + AntiMalwarebytes + AntiOllydbg + AntiWireshark + antiSpyware + Anti-Virus + avast! + AntiVir + Inspection + Malware + Norton Personal Firewall + ZoneAlarm + Comodo Firewall + eTrust EZ Firewall + F-Secure Internet Security + McAfee Personal Firewall + Outpost Personal Firewall + Panda Internet Seciruty Suite + Panda Anti-Virus/Firewall + BitDefnder/Bull Guard Antivirus + Rising Firewall + 360Safe AntiArp + Kingsoft Safe + Fiddler + wireshark + Chromium + NEWGRAB + SCREENSHOT + AddressBook + TrustedPeople + TrustedPublisher + RunProgram + GUIMode + protocol_not_supported + network down + network reset + network unreachable + network_down + network_reset + network_unreachable + host unreachable + host_unreachable + PendingFileRenameOperations + MyApplication.app + Microsoft.Windows.MyCoolApp + Application description here + InstallHOOK + InstallLocalHOOK + UninstallHOOK + ZLibEx + PsAPI + Xenocode Virtual Desktop + start.spoon.net + Spoon Virtual Machine + Xenocode Virtual Appliance Runtime + CPlApplet + Java Security Plugin + javaplugin + Java Security Plugin + Sun Java Security Plugin + VMProtect begin + VMProtect end + [BeginChat] + friend + KernelUtil + NETWORK SERVICE + Cookies + Administrative Tools + WinFTP + PortNumber + CREATE_SUSPENDED + VBScript.Encode + JScript.Encode + WScript + ExeScriptPAD + ExeScript + silent + ExeScript Host + onbeforeunload + onunload + Godmode + anonymous + DECOMPRESSOR + antivirus + AntivirusProduct + DefaultBrowser + MemoryProtection + Manager + BaseScript + Updater + CreateProcessInternal + IDetourHook + DetourHook + + + ScriptText + ScriptingEngine + ProbeScriptFint + ActiveScriptEventConsumer + root/cimv2 + WbemScripting.SWbemLocator + ROOT\CIMV2 + SELECT * from Win32_BaseBoard + Manufacturer + Model + SerialNumber + ChassisTypes + SMBIOSAssetTag + + + CREATE %s %.*s + CREATE TABLE + CREATE TABLE %Q.%s(%s) + CREATE TABLE sqlite_master( + CREATE VIRTUAL TABLE %T + CREATE%s INDEX %.*s + + WM_HTML_GETOBJECT + WM_COPYDATA + + SE_PRIVILEGE_ENABLED_BY_DEFAULT + SE_PRIVILEGE_ENABLED + SE_PRIVILEGE_REMOVED + SE_PRIVILEGE_USED_FOR_ACCESS + SE_PRIVILEGE_VALID_ATTRIBUTES + + SE_CREATE_TOKEN_NAME + SE_ASSIGNPRIMARYTOKEN_NAME + SE_LOCK_MEMORY_NAME + SE_INCREASE_QUOTA_NAME + SE_UNSOLICITED_INPUT_NAME + SE_MACHINE_ACCOUNT_NAME + SE_TCB_NAME + SE_SECURITY_NAME + SE_TAKE_OWNERSHIP_NAME + SE_LOAD_DRIVER_NAME + SE_SYSTEM_PROFILE_NAME + SE_SYSTEMTIME_NAME + SE_PROF_SINGLE_PROCESS_NAME + SE_INC_BASE_PRIORITY_NAME + SE_CREATE_PAGEFILE_NAME + SE_CREATE_PERMANENT_NAME + SE_BACKUP_NAME + SE_RESTORE_NAME + SE_SHUTDOWN_NAME + SE_DEBUG_NAME + SE_AUDIT_NAME + SE_SYSTEM_ENVIRONMENT_NAME + SE_CHANGE_NOTIFY_NAME + SE_REMOTE_SHUTDOWN_NAME + SE_UNDOCK_NAME + SE_SYNC_AGENT_NAME + SE_ENABLE_DELEGATION_NAME + SE_MANAGE_VOLUME_NAME + SE_IMPERSONATE_NAME + SE_CREATE_GLOBAL_NAME + SE_TRUSTED_CREDMAN_ACCESS_NAME + SE_RELABEL_NAME + SE_INC_WORKING_SET_NAME + SE_TIME_ZONE_NAME + SE_CREATE_SYMBOLIC_LINK_NAME + + SE_GROUP_ENABLED_BY_DEFAULT + SE_GROUP_ENABLED + SE_GROUP_OWNER + SE_GROUP_USE_FOR_DENY_ONLY + SE_GROUP_INTEGRITY + SE_GROUP_INTEGRITY_ENABLED + SE_GROUP_LOGON_ID + SE_GROUP_RESOURCE + SE_GROUP_VALID_ATTRIBUTES + + + System.Security + System.Runtime.CompilerServices + System.Security.Cryptography + System.Reflection + System.Security.Principal + System.IO.Compression + System.Net.Sockets + Internet Explorer_Server + vbscript + javascript + JavaScript + execScript + AutoRun + CipherMode + Twofish + Wrong password + Proxy-authenticate: + Connection: + Transfer-Encoding: + Referer: + + + + AppData\Local + AppData\Local\Microsoft\Windows\History + AppData\Local\Microsoft\Windows\Temporary Internet Files + AppData\Roaming + AppData\Roaming\Microsoft\Windows\Cookies + AppData\Roaming\Microsoft\Windows\Network Shortcuts + AppData\Roaming\Microsoft\Windows\Printer Shortcuts + AppData\Roaming\Microsoft\Windows\Recent + AppData\Roaming\Microsoft\Windows\SendTo + AppData\Roaming\Microsoft\Windows\Start Menu + AppData\Roaming\Microsoft\Windows\Start Menu\Programs + AppData\Roaming\Microsoft\Windows\Templates + Default + Documents + Microsoft\Windows\Start Menu + Microsoft\Windows\Start Menu\Programs + Microsoft\Windows\Templates + Pictures + Public\Desktop + Public\Documents + Public\Favorites + Public\Music + Public\Pictures + Public\Videos + System + Videos + Windows NT\Accessories + Explorer\Shell Folders + + + TCoreThread + TFiler + TWriter4 + TPersistent + TFileStream + + + /AutoIt3ExecuteLine + /AutoIt3ExecuteScript + /AutoIt3OutputDebug + AutoIt3GUI + AutoIt v3 + AutoIt script files (*.au3 *.a3x) + AutoIt + AUTOIT SCRIPT + AUTOIT NO CMDEXECUTE + AutoIt3ExecuteScript + AutoIt3ExecuteLine + Software\AutoIt v3\AutoIt + *.au3;*.a3x + AutoIt Error + AutoIt has detected the stack has become corrupt. + CompiledScript + AutoIt v3 Script: 3 3 8 1 + AutoIt v3 Script: 3 3 8 0 + AutoIt3 + AUTOITEXE + + ConfuserEx + ConfuserEx v0.1.1 + ConfuserEx v0.1.2 + ConfuserEx v0.2.0 + ConfuserEx v0.2.1 + ConfuserEx v0.2.2 + ConfuserEx v0.2.3 + ConfuserEx v0.3.0 + ConfuserEx v0.4.0 + ConfuserEx v0.5.0 + ConfuserEx v0.6.0 + Safengine Shielden v2.3.0.0 + + + + diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..a38687c --- /dev/null +++ b/LICENSE @@ -0,0 +1,24 @@ +yarGen - Yara Rule Generator, Copyright (c) 2015, Florian Roth +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the copyright owner nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL Florian Roth BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..7ca4584 --- /dev/null +++ b/README.md @@ -0,0 +1,265 @@ +# yarGen + + ______ + __ ______ ______/ ____/__ ____ + / / / / __ `/ ___/ / __/ _ \/ __ \ + / /_/ / /_/ / / / /_/ / __/ / / / + \__, /\__,_/_/ \____/\___/_/ /_/ + /____/ + + Yara Rule Generator + by Florian Roth + April 2018 + Version 0.20.0 + +### What does yarGen do? + +yarGen is a generator for [YARA](https://github.com/plusvic/yara/) rules + +The main principle is the creation of yara rules from strings found in malware files while removing all strings that also appear in goodware files. Therefore yarGen includes a big goodware strings and opcode database as ZIP archives that have to be extracted before the first use. + +Since version 0.12.0 yarGen does not completely remove the goodware strings from the analysis process but includes them with a very low score depending on the number of occurrences in goodware samples. The rules will be included if no +better strings can be found and marked with a comment /* Goodware rule */. +Force yarGen to remove all goodware strings with --excludegood. Also since version 0.12.0 yarGen allows to place the "strings.xml" from [PEstudio](https://winitor.com/) in the program directory in order to apply the blacklist definition during the string analysis process. You'll get better results. + +Since version 0.14.0 it uses naive-bayes-classifier by Mustafa Atik and Nejdet Yucesoy in order to classify the string and detect useful words instead of compression/encryption garbage. + +Since version 0.15.0 yarGen supports opcode elements extracted from the `.text` sections of PE files. During database creation it splits the `.text` sections with the regex [\x00]{3,} and takes the first 16 bytes of each part +to build an opcode database from goodware PE files. During rule creation on sample files it compares the goodware opcodes with the opcodes extracted from the malware samples and removes all opcodes that also appear in the goodware +database. (there is no further magic in it yet - no XOR loop detection etc.) The option to activate opcode integration is '--opcodes'. + +Since version 0.17.0 yarGen allows creating multiple databases for opcodes and strings. You can now easily create a new database by using "-c" and an identifier "-i identifier" e.g. "office". It will then create two new +database files named "good-strings-office.db" and "good-opcodes-office.db" that will be initialized during startup with the built-in databases. + +Since version 0.18.0 yarGen supports extra conditions that make use of the `pe` module. This includes [imphash](https://www.fireeye.com/blog/threat-research/2014/01/tracking-malware-import-hashing.html) values and the PE file's exports. We provide pre-generated imphash and export databases. + +Since version 0.19.0 yarGen support a 'dropzone' mode in which it initializes all strings/opcodes/imphashes/exports only once and queries a given folder for new samples. If it finds new samples dropped to the folder, it creates rules for these samples, writes the YARA rules to the defined output file (default: yargen_rules.yar) and removes the dropped samples. You can specify a text file (`-b`) from which the identifier is read. The reference parameter (`-r`) has also been extended so that it can be a text file on disk from which the reference is read. E.g. drop two files named 'identifier.txt' and 'reference.txt' together with the samples to the folder and use the parameters `-b ./dropzone/identifier.txt` and `-r ./dropzone/reference.txt` to read the respective strings from the files each time an analysis starts. + +Since version 0.20.0 yarGen supports the extraction and use of hex encoded strings that often appear in weaponized RTF files. + +The rule generation process also tries to identify similarities between the files that get analyzed and then combines the strings to so called **super rules**. The super rule generation does not remove the simple rule for the files that have been combined in a single super rule. This means that there is some redundancy when super rules are created. You can supress a simple rule for a file that was already covered by super rule by using --nosimple. + +### Installation + +1. Make sure you have at least 4GB of RAM on the machine you plan to use yarGen (8GB if opcodes are included in rule generation, use with --opcodes) +2. Download the latest release from the "release" section +3. Install all dependencies with `sudo pip install scandir lxml naiveBayesClassifier pefile` (@twpDone reported that in case of errors try `sudo pip install pefile` and `sudo pip install scandir lxml naiveBayesClassifier`) +4. Run `python yarGen.py --update` to automatically download the built-in databases. The are saved into the './dbs' sub folder. (Download: 913 MB) +5. See help with `python yarGen.py --help` for more information on the command line parameters + +### Memory Requirements + +Warning: yarGen pulls the whole goodstring database to memory and uses at least 3 GB of memory for a few seconds - 6 GB if opcodes evaluation is activated (--opcodes). + +I've already tried to migrate the database to sqlite but the numerous string comparisons and lookups made the analysis painfully slow. + +# Post-Processing Video Tutorial + +[![YARA rule post-processing video tutorial](https://img.youtube.com/vi/y8oAjIjZMIg/0.jpg)](https://medium.com/@cyb3rops/how-to-post-process-yara-rules-generated-by-yargen-121d29322282) + +# Multiple Database Support + +yarGen allows creating multiple databases for opcodes or strings. You can easily create a new database by using "-c" for new database creation and "-i identifier" to give the new database a unique identifier as e.g. "office". It will the create two new database files named "good-strings-office.db" and "good-opcodes-office.db" that will from then on be initialized during startup with the built-in databases. + +### Database Creation / Update Example + +Create a new strings and opcodes database from an Office 2013 program directory: +``` +yarGen.py -c --opcodes -i office -g /opt/packs/office2013 +``` +The analysis and string extraction process will create the following new databases in the "./dbs" sub folder. +``` +good-strings-office.db +good-opcodes-office.db +``` +The values from these new databases will be automatically applied during the rule creation process because all *.db files in the sub folder "./dbs" will be initialized during startup. + +You can update the once created databases with the "-u" parameter +``` +yarGen.py -u --opcodes -i office -g /opt/packs/office365 +``` +This would update the "office" databases with new strings extracted from files in the given directory. + +## Command Line Parameters + +``` +usage: yarGen.py [-h] [-m M] [-y min-size] [-z min-score] [-x high-scoring] + [-s max-size] [-rc maxstrings] [--excludegood] + [-o output_rule_file] [-a author] [-r ref] [-l lic] + [-p prefix] [-b identifier] [--score] [--nosimple] + [--nomagic] [--nofilesize] [-fm FM] [--globalrule] + [--nosuper] [--update] [-g G] [-u] [-c] [-i I] [--dropzone] + [--nr] [--oe] [-fs size-in-MB] [--noextras] [--debug] + [--opcodes] [-n opcode-num] + +yarGen + +optional arguments: + -h, --help show this help message and exit + +Rule Creation: + -m M Path to scan for malware + -y min-size Minimum string length to consider (default=8) + -z min-score Minimum score to consider (default=5) + -x high-scoring Score required to set string as 'highly specific + string' (default: 30) + -s max-size Maximum length to consider (default=128) + -rc maxstrings Maximum number of strings per rule (default=20, + intelligent filtering will be applied) + --excludegood Force the exclude all goodware strings + +Rule Output: + -o output_rule_file Output rule file + -a author Author Name + -r ref Reference (can be string or text file) + -l lic License + -p prefix Prefix for the rule description + -b identifier Text file from which the identifier is read (default: + last folder name in the full path, e.g. "myRAT" if -m + points to /mnt/mal/myRAT) + --score Show the string scores as comments in the rules + --nosimple Skip simple rule creation for files included in super + rules + --nomagic Don't include the magic header condition statement + --nofilesize Don't include the filesize condition statement + -fm FM Multiplier for the maximum 'filesize' condition value + (default: 3) + --globalrule Create global rules (improved rule set speed) + --nosuper Don't try to create super rules that match against + various files + +Database Operations: + --update Update the local strings and opcodes dbs from the + online repository + -g G Path to scan for goodware (dont use the database + shipped with yaraGen) + -u Update local standard goodware database with a new + analysis result (used with -g) + -c Create new local goodware database (use with -g and + optionally -i "identifier") + -i I Specify an identifier for the newly created databases + (good-strings-identifier.db, good-opcodes- + identifier.db) + +General Options: + --dropzone Dropzone mode - monitors a directory [-m] for new + samples to processWARNING: Processed files will be + deleted! + --nr Do not recursively scan directories + --oe Only scan executable extensions EXE, DLL, ASP, JSP, + PHP, BIN, INFECTED + -fs size-in-MB Max file size in MB to analyze (default=10) + --noextras Don't use extras like Imphash or PE header specifics + --debug Debug output + +Other Features: + --opcodes Do use the OpCode feature (use this if not enough high + scoring strings can be found) + -n opcode-num Number of opcodes to add if not enough high scoring + string could be found (default=3) +``` + +## Best Practice + +See the following blog posts for a more detailed description on how to use yarGen for YARA rule creation: + +[How to Write Simple but Sound Yara Rules - Part 1](https://www.bsk-consulting.de/2015/02/16/write-simple-sound-yara-rules/) + +[How to Write Simple but Sound Yara Rules - Part 2](https://www.bsk-consulting.de/2015/10/17/how-to-write-simple-but-sound-yara-rules-part-2/) + +[How to Write Simple but Sound Yara Rules - Part 3](https://www.bsk-consulting.de/2016/04/15/how-to-write-simple-but-sound-yara-rules-part-3/) + +## Screenshots + +![Generator Run](./screens/yargen-running.png) + +![Output Rule](./screens/output-rule-0.14.1.png) + +As you can see in the screenshot above you'll get a rule that contains strings, which are not found in the goodware strings database. + +You should clean up the rules afterwards. In the example above, remove the strings $s14, $s17, $s19, $s20 that look like random code to get a cleaner rule that is more likely to match on other samples of the same family. + +To get a more generic rule, remove string $s5, which is very specific for this compiled executable. + +## Examples + +### Use the shipped database (FAST) to create some rules + +```python yarGen.py -m X:\MAL\Case1401``` + +Use the shipped database of goodware strings and scan the malware directory +"X:\MAL" recursively. Create rules for all files included in this directory and +below. A file named 'yargen_rules.yar' will be generated in the current +directory. + +### Show the score of the strings as comment + +yarGen will by default use the top 20 strings based on their score. To see how a +certain string in the rule scored, use the "--score" parameter. + +```python yarGen.py --score -m X:\MAL\Case1401``` + +### Use only strings with a certain minimum score + +In order to use only strings for your rules that match a certain minimum score use the "-z" parameter. It is a good pratice to first create rules with "--score" and than perform a second run with a minimum score set for you sample set via "-z". + +```python yarGen.py --score -z 5 -m X:\MAL\Case1401``` + +### Preset author and reference + +```python yarGen.py -a "Florian Roth" -r "http://goo.gl/c2qgFx" -m /opt/mal/case_441 -o case441.yar``` + +### Add opcodes to the rules + +```python yarGen.py --opcodes -a "Florian Roth" -r "http://goo.gl/c2qgFx" -m /opt/mal/case33 -o rules33.yar``` + +### Show debugging output + +```python yarGen.py --debug -m /opt/mal/case_441``` + +### Create a new goodware strings database + +```python yarGen.py -c --opcodes -g /home/user/Downloads/office2013 -i office``` + +This will generate two new databases for strings and opcodes named: +- good-strings-office.db +- good-opcodes-office.db + +The new databases will automatically be initialized during startup and are from then on used for rule generation. + +### Update a goodware strings database (append new strings, opcodes, imphashes, exports to the old ones) + +```python yarGen.py -u -g /home/user/Downloads/office365 -i office``` + +### My Best Pratice Command Line + +```python yarGen.py -a "Florian Roth" -r "Internal Research" -m /opt/mal/apt_case_32``` + +### Dropzone Mode + +Monitors a given folder (-m) for new samples, processes the samples, writes YARA rules to the set output file (default: yargen_rules.yar) and deletes the folder contents afterwards. + +```python yarGen.py -a "yarGen Dropzone" --dropzone -m /opt/mal/dropzone``` + +WARNING: All files dropped to the set dropzone will be removed! + +In the following example two files named `identifier.txt` and `reference.txt` are read and used for the `reference` and as identifier in the YARA rule sets. The files are read at each iteration and not only during initialization. This way you can pass specific strings to each dropzone rule generation. + +```python yarGen.py --dropzone -m /opt/mal/dropzone -b /opt/mal/dropzone/identifier.txt -r /opt/mal/dropzone/reference.txt``` + +# db-lookup.py + +A tool named `db-lookup.py`, which was introduced with version 0.18.0 allows you to query the local databases in a simple command line interface. The interface takes an input value, which can be `string`, `export` or `imphash` value, detects the query type and then performs a lookup in the loaded databases. This allows you to query the yarGen databases with `string`, `export` and `imphash` values in order to check if this value appears in goodware that has been processed to generate the databases. + +This is a nice feature that helps you ta answer the following questions: + +* Does this string appear in goodware samples of my database? +* Does this export name appear in goodware samples of my database? +* Does a sample in my goodware database has this imphash? + +However, there are several drawbacks: + +* It does only match on the full string (no contains, no startswith, no endswith) +* Opcode lookup is not supported (yet) + +I plan to release a new project named `Valknut` which extracts overlapping byte sequences from samples and creates searchable databases. This project will be the new backend API for yarGen allowing all kinds of queries, opcodes and string values, ascii and wide formatted. diff --git a/README.txt b/README.txt deleted file mode 100644 index 632f6cb..0000000 --- a/README.txt +++ /dev/null @@ -1,56 +0,0 @@ -# -# Yara BRG -# A Bulk Rule Generator for Yara Rules -# -# Florian Roth -# January 2014 - -Yara BRG is a generator for Yara rules. The reason why I developed another Yara -rule generator was a special use case in which I had a directory full of -hackware samples for which I had to write Yara rules. - -=== What does Yara BRG do? -It takes two directories (optionally recursive) and extracts usable strings from -both of them. -One directory contains the hackware/malware samples. The other one -is a directory of trusted files that gets analyzed as well to minimize the -chance to trigger false positives with the newly generated rules. -It is called "goodware directory" in the help text. - -With 0.5 I introduced a "Super Rule" generation in which he tries to map string -appearances over various files in order to combine signatures to more powerful -ones that match on different malware types of the same family. -The output still may be a bit redudant and it is your task to review the rules -anyway. The super rules can be identified by "super_rule" meta variable. - -=== Command Line Parameters - -usage: yara-brg.py [-h] -m M -g G [-o output] [-l dir] [-rm] [-rg] [-fs dir] - [-rc maxstrings] [--nosuper] [--debug] - -Yara BRG - -required arguments: - -m M Path to scan for malware - -g G Path to scan for goodware - -optional arguments: - -h, --help show this help message and exit - -o output Output rule file - -l size Minimal string length to consider - -rm Recursive scan of malware directories - -rg Recursive scan of goodware directories - -fs dir Max file size to analyze (default: 2000000) - -rc maxstrings Maximum number of strings per rule (intelligent filtering - will be applied) (default: 20) - --nosuper Don't try to create super rules that match against - various files - --debug Debug output - -=== Examples - -python yara-brg.py --debug -rm -g C:\Windows\System32 -m "X:\PortScanners" - -Scan the System32 directory for goodware samples (-g). Scan the PortScanners -directory for hackware samples (-m) and be recursive in this case (-rm). -Show debug output. \ No newline at end of file diff --git a/db-lookup.py b/db-lookup.py new file mode 100644 index 0000000..0564c99 --- /dev/null +++ b/db-lookup.py @@ -0,0 +1,224 @@ +#!/usr/bin/env python +# -*- coding: iso-8859-1 -*- +# -*- coding: utf-8 -*- +# +# Imphash Lookup in yarGens database +# +# Florian Roth + +import os +import gzip +import pickle +import traceback +import argparse +import sys +import re +import signal as signal_module +import readline +from colorama import init, Fore, Back, Style +from collections import Counter + +readline.parse_and_bind('tab: complete') +readline.parse_and_bind('set editing-mode vi') + +__AUTHOR__ = "Florian Roth" +__VERSION__ = "0.1" + +VALID_LOOKUPS = ["strings", "exports", "opcodes", "imphash"] + +def get_abs_path(filename): + return os.path.join(os.path.dirname(os.path.abspath(__file__)), filename) + +def load(filename): + file = gzip.GzipFile(filename, 'rb') + buffer = "" + while 1: + data = file.read() + if data == "": + break + buffer += data + object = pickle.loads(buffer) + del (buffer) + file.close() + return object + +def init_database(lookups): + """ + Initialize the database for the lookups + :return: + """ + + opcodes_num = 0 + strings_num = 0 + imphash_num = 0 + exports_num = 0 + + # Initialize all databases + for file in os.listdir(get_abs_path("./dbs/")): + if not file.endswith(".db"): + continue + filePath = os.path.join("./dbs/", file) + + # String databases + if file.startswith("good-strings") and "strings" in lookups: + try: + print "[+] Loading %s ..." % filePath + good_pickle = load(get_abs_path(filePath)) + good_strings_db.update(good_pickle) + print "[+] Total: %s / Added %d entries" % ( + len(good_strings_db), len(good_strings_db) - strings_num) + strings_num = len(good_strings_db) + except Exception, e: + traceback.print_exc() + # Opcode databases + if file.startswith("good-opcodes") and "opcodes" in lookups: + try: + if use_opcodes: + print "[+] Loading %s ..." % filePath + good_op_pickle = load(get_abs_path(filePath)) + good_opcodes_db.update(good_op_pickle) + print "[+] Total: %s (removed duplicates) / Added %d entries" % ( + len(good_opcodes_db), len(good_opcodes_db) - opcodes_num) + opcodes_num = len(good_opcodes_db) + except Exception, e: + use_opcodes = False + traceback.print_exc() + # Imphash databases + if file.startswith("good-imphash") and "imphash" in lookups: + try: + print "[+] Loading %s ..." % filePath + good_imphashes_pickle = load(get_abs_path(filePath)) + good_imphashes_db.update(good_imphashes_pickle) + print "[+] Total: %s / Added %d entries" % ( + len(good_imphashes_db), len(good_imphashes_db) - imphash_num) + imphash_num = len(good_imphashes_db) + except Exception, e: + traceback.print_exc() + # Export databases + if file.startswith("good-exports") and "exports" in lookups: + try: + print "[+] Loading %s ..." % filePath + good_exports_pickle = load(get_abs_path(filePath)) + good_exports_db.update(good_exports_pickle) + print "[+] Total: %s / Added %d entries" % ( + len(good_exports_db), len(good_exports_db) - exports_num) + exports_num = len(good_exports_db) + except Exception, e: + traceback.print_exc() + +def print_welcome(): + print Style.RESET_ALL + print Fore.WHITE + Back.BLUE + print " ".ljust(80) + print " ______ __ __ ".ljust(80) + print " __ ______ ______/ ____/__ ____ / / ____ ____ / /____ ______ ".ljust(80) + print " / / / / __ `/ ___/ / __/ _ \\/ __ \\ / / / __ \\/ __ \\/ //_/ / / / __ \\".ljust(80) + print " / /_/ / /_/ / / / /_/ / __/ / / / / /___/ /_/ / /_/ / ,< / /_/ / /_/ /".ljust(80) + print " \\__, /\\__,_/_/ \\____/\\___/_/ /_/ /_____/\\____/\\____/_/|_|\\__,_/ .___/ ".ljust(80) + print " /____/ /_/ ".ljust(80) + print " ".ljust(80) + print (" " + __AUTHOR__ + " - " + __VERSION__ + "").ljust(80) + print " ".ljust(80) + Style.RESET_ALL + print Style.RESET_ALL + " " + + +# CTRL+C Handler -------------------------------------------------------------- +def signal_handler(signal_name, frame): + print "------------------------------------------------------------------------------\n" + print 'INTERRUPTED' + sys.exit(0) + + +# MAIN ################################################################ +if __name__ == '__main__': + # Parse Arguments + parser = argparse.ArgumentParser(description='yarGen') + + parser.add_argument('-f', help='File that contains imphashes/strings/exports') + parser.add_argument('-l', action='append', nargs='+', help='Activate the following lookups only (seperated by ' + 'space; valid values are: strings, opcodes, imphash, ' + 'exports)', metavar='activelookups') + + args = parser.parse_args() + + # Print Welcome + print_welcome() + + # Signal handler for CTRL+C --------------------------------------- + signal_module.signal(signal_module.SIGINT, signal_handler) + + # Error checks + if not args.l: + print "[E] You must define at least on lookup module -l [%s]" % " ".join(VALID_LOOKUPS) + sys.exit(1) + for l in args.l[0]: + if l not in VALID_LOOKUPS: + print "[E] '%s' is an unknown lookup - valid lookups are: %s" % (l, ", ".join(VALID_LOOKUPS)) + sys.exit(1) + + # Active lookups + active_lookpups = args.l[0] + + # Initialize the lookup databases + good_strings_db = Counter() + good_opcodes_db = Counter() + good_imphashes_db = Counter() + good_exports_db = Counter() + + init_database(active_lookpups) + + # File input or command line input + if args.f: + print "not yet implemented" + else: + # Input loop + print "Provide a value (%s) as input" % ", ".join(active_lookpups) + while True: + input_value = raw_input("> ") + + types = [] + + # Determine input values format + # MD5 > Imphash + res_md5 = re.search(r'^[\s]*([A-Fa-f0-9]{32})[\s]*$', input_value) + if res_md5: + types.append("imphash") + # Cleanup value + input_value = res_md5.group(0) + # Could also be opcode or string + types.append("opcode") + types.append("string") + # Opcode + res_op = re.search(r'^[\s]*([A-Fa-f0-9\s]+)[\s]*$', input_value) + if res_op: + types.append("opcode") + # Cleanup value + input_value = res_op.group(0) + input_value = re.sub(r' ', '', input_value, count=0) + # Could also be a string + types.append("string") + # String + if not res_md5 and not res_op: + types.append("string") + + # Type lookups + if "imphash" in types: + if "imphash" in active_lookpups: + if input_value in good_imphashes_db: + print Fore.BLACK, Back.GREEN, "IMPHASH KNOWN GOOD FROM %d FILES" \ + % good_imphashes_db[input_value], Style.RESET_ALL + else: + print Fore.BLACK, Back.WHITE, "IMPHASH UNKNOWN", Style.RESET_ALL + if "string" in types: + if "strings" in active_lookpups: + if input_value in good_strings_db: + print Fore.BLACK, Back.GREEN, "STRING KNOWN GOOD IN %d FILES" \ + % good_strings_db[input_value], Style.RESET_ALL + else: + print Fore.BLACK, Back.WHITE, "STRING UNKNOWN", Style.RESET_ALL + if "exports" in active_lookpups: + if input_value in good_exports_db: + print Fore.BLACK, Back.GREEN, "EXPORT KNOWN GOOD IN %d FILES" \ + % good_exports_db[input_value], Style.RESET_ALL + else: + print Fore.BLACK, Back.WHITE, "EXPORT UNKNOWN", Style.RESET_ALL \ No newline at end of file diff --git a/lib/good.txt b/lib/good.txt new file mode 100644 index 0000000..da946dc --- /dev/null +++ b/lib/good.txt @@ -0,0 +1,3238 @@ +Symantec Corporation1 +Symantec Trust Network1=0; +Symantec Class 3 Extended Validation Code Signing CA +Symantec Corporation100. +MSVCP60.dll +[Cilpboard:%d] +[%s Login : %s] +c:\windows\temp\msresult.tmp +Fatal Error: MFC initialization failed +[NumLock] +[Execute] +[Print] +[Select] +[Clear] +[Cancel] +[PgDown] +[PgUp] +[End] +[Home] +[Delete] +[Insert] +[WIN] +[Win] +[ALT] +[Alt] +[CTRL] +[Ctrl] +[Tab] +[Enter] +[Backspace] +[Caps Lock] +[Pause] +[Scroll Lock] +[F13] +[F12] +[F11] +[F10] +[F9] +[F8] +[F7] +[F6] +[F5] +[F4] +[F3] +[F2] +[F1] +[Esc] +Sleep +GetModuleHandleA +GetCommandLineA +GlobalUnlock +GlobalLock +KERNEL32.dll +GetWindowTextA +GetParent +GetForegroundWindow +GetAsyncKeyState +GetKeyState +CloseClipboard +GetClipboardData +IsClipboardFormatAvailable +OpenClipboard +USER32.dll +GetUserNameA +ADVAPI32.dll +MFC42.DLL +fwrite +sprintf +ctime +time +fclose +fopen +__dllonexit +_onexit +MSVCRT.dll +_exit +_XcptFilter +exit +__p___initenv +__getmainargs +_initterm +__setusermatherr +_adjust_fdiv +__p__commode +__p__fmode +__set_app_type +_except_handler3 +_controlfp +CorExitProcess +(null) +EncodePointer +DecodePointer +FlsFree +FlsSetValue +FlsGetValue +FlsAlloc +runtime error +TLOSS error +SING error +DOMAIN error +R6034 +An application has made an attempt to load the C runtime library incorrectly. +Please contact the application's support team for more information. +R6033 +- Attempt to use MSIL code from this assembly during native code initialization +This indicates a bug in your application. It is most likely the result of calling an MSIL-compiled (/clr) function from a native constructor or from DllMain. +R6032 +- not enough space for locale information +R6031 +- Attempt to initialize the CRT more than once. +This indicates a bug in your application. +R6030 +- CRT not initialized +R6028 +- unable to initialize heap +R6027 +- not enough space for lowio initialization +R6026 +- not enough space for stdio initialization +R6025 +- pure virtual function call +R6024 +- not enough space for _onexit/atexit table +R6019 +- unable to open console device +R6018 +- unexpected heap error +R6017 +- unexpected multithread lock error +R6016 +- not enough space for thread data +This application has requested the Runtime to terminate it in an unusual way. +Please contact the application's support team for more information. +R6009 +- not enough space for environment +R6008 +- not enough space for arguments +R6002 +- floating point support not loaded +Microsoft Visual C++ Runtime Library + +Runtime Error! +Program: +UTF-8 +UTF-16LE +UNICODE +SunMonTueWedThuFriSat +JanFebMarAprMayJunJulAugSepOctNovDec +HH:mm:ss +dddd, MMMM dd, yyyy +MM/dd/yy +GetProcessWindowStation +GetUserObjectInformationA +GetLastActivePopup +GetActiveWindow +MessageBoxA +USER32.DLL +CONOUT$ +POSIXLY_CORRECT +%s: illegal option -- %c +%s: option requires an argument -- %c +UserCache +ERROR! Cannot create UserCache directory. +Reports +ERROR! Cannot create Reports directory. +abcdefgpklijmnostqurxwyzSWv123 ++++++++++++++++++++++++++++++++++++++++++++++++++++ ++ + ++ WinScanX v1.0 | http://www.windowsaudit.com/ + +Running WinScanX v1.0 with the following arguments: +[+] Host Input: "%s" +[+] Username: "%s" +[+] Password: "%s" +[+] # of Threads: "64" +SeBackupPrivilege +AdjustTokenPrivileges (EnableBackupPrivilege) +localhost +LookupPrivilegeValue (EnableBackupPrivilege) +OpenProcessToken (EnableBackupPrivilege) +Unknown error occurred. +ERROR! %s - %s +Reports\ErrorLog.txt +NOTE: This file is tab separated. Open with Excel to view and sort information. +Hostname +Function Name +Error Number +Error Message +WinScanX v1.0 | http://www.windowsaudit.com/ +Usage: WinScanX [-abcdefgpklijmnostqurxwyzSWv123] +[-abcdefgpklijmnostqurxwyzSWv123] -- required argument + -- required argument + -- optional argument + -- optional argument +If the and arguments are omitted, this utility +will attempt to establish a NetBIOS null session and gather information +via the null session. +If the and arguments are both plus signs (+), the +existing credentials of the user running this utility will be used. +Examples: +WinScanX -1 10.10.10.10 +WinScanX -2 10.10.10.10 + + +WinScanX -3 10.10.10.10 administrator password +WinScanX -3 10.10.10.10 domain\admin password +WinScanX -1 WINSERVER01 +WinScanX -2 WINSERVER01 + + +WinScanX -3 WINSERVER01 administrator password +WinScanX -3 WINSERVER01 domain\admin password +==== WinScanX Advanced Features ==== +-a -- Get Account Policy Information +-b -- Get Audit Policy Information +-c -- Get Display Information +-d -- Get Domain Information +-e -- Get LDAP Information +-f -- Get Administrative Local & Global Group Information +-g -- Get Local & Global Group Information +-p -- Get Installed Programs +-k -- Get Interactively Logged On Users +-l -- Get Logged On Users +-i -- Get Patch Information +-j -- Get Registry Information +-m -- Get Scheduled Task Information +-n -- Get Server Information +-o -- Get Service Information +-s -- Get Share Information +-t -- Get Share Permissions +-q -- Get SNMP Community Information +-u -- Get User Information +-r -- Get User Information via RA Bypass +-x -- Get User Rights Information +-w -- Get WinVNC3 & WinVNC4 Passwords +-y -- Save Remote Registry Hives +-z -- Ping Remote Host Before Scanning +-S -- Guess SNMP Community Strings +-W -- Guess Windows Passwords +-v -- Verbose Output +-1 -- Group 1 (includes -adglnsur) +-2 -- Group 2 (includes -adgpljnsquw) +-3 -- Group 3 (includes -abdgplijmnostquxw) +==== Retrieving Patch Information ==== +The information that is queried for each host to determine the existance +of a patch is included in the PatchInfo.input file. +==== Retrieving Registry Information ==== +The registry key/value pairs that are queried for each host are included +in the RegistryInfo.input file. +==== SNMP Community String Guessing ==== +The SNMP community strings that are attempted for each host are included +in the CommunityStrings.input file. +==== Windows Password Guessing ==== +For Windows password guessing to occur, there must be a matching +.users file in the UserCache directory for each host on which +you attempt to guess passwords. WinScanX options -c, -r, -u, and -S can be +used to generate .users cache files. +The passwords that are attempted for each user account are included in the +Dictionary.input file. +The following can also be used in the Dictionary.input file: + -- The name of the current user + -- The name of the current user in lower case + -- The name of the current user in upper case + -- A blank or null password +(Written by Reed Arvin | reed@windowsaudit.com) +Verbose mode ON. +Verbose mode OFF. +HostsNotScanned.bak +HostsNotScanned.txt +DeleteFile (KeyboardEventMonitor) +Stopping... Saving unscanned hosts to file HostsNotScanned.txt. +%d threads currently running. +GetStdHandle (KeyboardEventMonitor) +Spawning thread for host %s... +iphlpapi.dll +IcmpCreateFile +IcmpSendEcho +IcmpCloseHandle +icmp.dll +ABCDEFGHIJKLMNOPQRSTUVWXYZ +Host %s is alive! (%d.%d.%d.%d, Time %dms, TTL %d) +%s -> Host is alive! (%d.%d.%d.%d, Time %dms, TTL %d) +Reports\PingableHosts.txt +Hostname +IP Address +Ping Stats +(%d.%d.%d.%d, Time %dms, TTL %d) +IcmpSendEcho (PingRemoteHost) +Unable to allocate memory. +malloc (PingRemoteHost) +IcmpCreateFile (PingRemoteHost) +LoadLibrary (PingRemoteHost) +gethostbyname (PingRemoteHost) +WSAStartup (PingRemoteHost) +\\%s +%s\IPC$ +NetUseAdd (Connect) +Reports\ConnectErrorLog.txt +Hostname +Remote Location +Account Name +Password +Error Number +Error Message +(Null) +(Null) +(Null) +%s\%s + +%s\%s +NetUseDel (Disconnect) +Passwords never expire +%d days +Users are not forced to logoff +%d seconds +Forever +%d minutes +Accounts do not lockout +%d attempts ++++++ ACCOUNT POLICY INFORMATION +++++ +Lockout Duration: %s +Counter Reset After: %s +Lockout Threshold: %s +Minimum Password Length: %d characters +Maximum Password Age: %s +Minimum Password Age: %s +Force Logoff After: %s +Password History Length: %d passwords +Primary Domain Controller: %s +Domain Name: %s +%s -> Logging account policy information. +Reports\AccountPolicyInfo.txt +Hostname +Lockout Duration +Counter Reset After +Lockout Threshold +Minimum Password Length +Maximum Password Age +Minimum Password Age +Force Logoff After +Password History Length +Primary Domain Controller +Domain Name +%d characters +%d passwords +NetUserModalsGet (GetAccountPolicyInfo) +Success Only +Failure Only +Success/Failure +None ++++++ AUDIT POLICY INFORMATION +++++ +Auditing Enabled: %s +System Events: %s +Logon Events: %s +Object Access: %s +Privilege Use: %s +Process Tracking: %s +Policy Change: %s +Account Management: %s +Directory Service Access: %s +Account Logon Events %s +%s -> Logging audit policy information. +Reports\AuditPolicyInfo.txt +Hostname +Auditing Enabled +System Events +Logon Events +Object Access +Privilege Use +Process Tracking +Policy Change +Account Management +Directory Service Access +Account Logon Events +Success +Failure +LsaQueryInformationPolicy (GetAuditPolicyInfo) +LsaOpenPolicy (GetAuditPolicyInfo) +UserCache\%s.users +%s(Locked out) +%s(Disabled) +%s(Password never expires) ++++++ DISPLAY INFORMATION +++++ +Username: %s +Comment: %s +Flags: %s +User ID: %d +%s -> Logging display information. +Reports\DisplayInfoUsers.txt +Hostname +Username +Comment +Flags +User ID +NetQueryDisplayInformation (GetDisplayInfoUsers) +Machine Name: %s +Comment: %s +Reports\DisplayInfoMachines.txt +Hostname +Machine Name +Comment +NetQueryDisplayInformation (GetDisplayInfoMachines) +%.*S +%s%s(%s) ++++++ DOMAIN INFORMATION +++++ +Domain Name: %s +Trusted Domains: %s +%s -> Logging domain information. +Reports\DomainInfo.txt +Hostname +Domain Name +Trusted Domains +LsaQueryInformationPolicy (GetDomainInfo) +LsaOpenPolicy (GetDomainInfo) ++++++ LDAP INFORMATION +++++ +%s -> Logging LDAP information. +(objectClass=*) +The user does not have access to the requested information. +ldap_connect (GetLDAPInfo) +Cannot contact the LDAP server. +The search was aborted due to exceeding the limit of the client side timeout. +Unable to connect to the LDAP service. +Base DN: %s +Attribute: %s +Value: %s +Reports\LDAPInfo.txt +Hostname +Base DN +LDAP Attribute +Value +defaultNamingContext +Administrators ++++++ LOCAL GROUP INFORMATION +++++ +Group Name: %s +Group Type: Local +Username: %s +%s -> Logging local group information. +Reports\AdminGroupInfo.txt +Hostname +Group Name +Group Type +Username +Local +NetLocalGroupGetMembers (GetAdminLocalGroupInfo) +Enterprise Admins +Domain Admins ++++++ GLOBAL GROUP INFORMATION +++++ +Group Type: Global +%s -> Logging global group information. +Global +NetGroupGetUsers (GetAdminGlobalGroupInfo) +Reports\GroupInfo.txt +NetLocalGroupGetMembers (GetLocalGroupInfo) +NetLocalGroupEnum (GetLocalGroupInfo) +NetGroupGetUsers (GetGlobalGroupInfo) +NetGroupEnum (GetGlobalGroupInfo) +SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall +SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\%s +DisplayName +InstallDate ++++++ INSTALLED PROGRAMS +++++ +Display Name: %s +Install Date: %s +%s -> Logging installed programs. +Reports\InstalledPrograms.txt +Hostname +Display Name +Install Date +RegOpenKeyEx (GetInstalledPrograms) +RegConnectRegistry (GetInstalledPrograms) +_Classes ++++++ INTERACTIVELY LOGGED ON USERS +++++ +Username: %s\%s +%s -> Logging interactively logged on users. +Reports\InteractivelyLoggedOnUsers.txt +Hostname +Username +%s\%s +RegConnectRegistry (GetInteractivelyLoggedOnUsers) +ConvertStringSidToSid (GetAccountNameFromSID) ++++++ LOGGED ON USERS +++++ +Username: %s +Logon Domain: %s +Other Domains: %s +Logon Server: %s +%s -> Logging logged on users. +Reports\LoggedOnUsers.txt +Hostname +Username +Logon Domain +Other Domains +Logon Server +NetWkstaUserEnum (GetLoggedOnUsers) +SOFTWARE\Microsoft\Windows NT\CurrentVersion +CurrentVersion +CSDVersion +%s:%s: +PatchInfo.input +%s%s ++++++ PATCH INFORMATION +++++ +MS Advisory: %s +OS Version: %s +Service Pack: %s +File Path: %s +File Version: %d.%d.%d.%d +Patched File Version: %d.%d.%d.%d +Is Patched?: %s +%s -> Logging patch information. +Reports\PatchInfo.txt +Hostname +MS Advisory +OS Version +Service Pack +File Path +File Version +Patched File Version +Is Patched? +%d.%d.%d.%d +%d.%d.%d.%d +Split problem with file PatchInfo.input. +SplitPatchInfo (GetPatchInfo) +Cannot open file PatchInfo.input. +fopen (GetPatchInfo) +RegQueryValueEx (GetPatchInfo) +RegOpenKeyEx (GetPatchInfo) +RegConnectRegistry (GetPatchInfo) +GetFileVersionInfo (GetFileVersion) +malloc (GetFileVersion) +GetFileVersionInfoSize (GetFileVersion) +RegistryInfo.input ++++++ REGISTRY INFORMATION +++++ +Registry Key: HKLM\%s\\%s +Registry Value: %s +%s -> Logging registry information. +Reports\RegistryInfo.txt +Hostname +Registry Key +Value +HKLM\%s\\%s +RegQueryValueEx (GetRegistryInfo) +RegOpenKeyEx (GetRegistryInfo) +RegConnectRegistry (GetRegistryInfo) +Split problem with file RegQueryKeys.input. +SplitRegistryInfo (GetRegistryInfo) +Cannot open file RegistryInfo.input. +fopen (GetRegistryInfo) +\\%s\ADMIN$\Tasks\* +.JOB ++++++ SCHEDULED TASK INFORMATION +++++ +Task Name: %s +Target File: %s +Arguments: %s +Working Directory: %s +Created By: %s +Description: %s +%s -> Logging scheduled task information. +Reports\ScheduledTaskInfo.txt +Hostname +Task Name +Target File +Arguments +Working Directory +Created By +Description +FindFirstFile (GetScheduledTaskInfo) +\\%s\ADMIN$\Tasks\%s +Domain Controller +Server +Workstation +Windows NT 4.0 +Windows 2000 +Windows XP +Windows 2003 +Other (%d.%d) +%s(MS SQL Server) +%s(Novell Server) +%s(Print Server) +%s(RAS Server) ++++++ SERVER INFORMATION +++++ +Server Type: %s +Operating System: %s +Server Comment: %s +Other Flags: %s +%s -> Logging server information. +Reports\ServerInfo.txt +Hostname +Server Type +Operating System +Server Comment +Other Flags +NetServerGetInfo (GetServerInfo) +Device Driver (Boot Start) +Device Driver (System Start) +Auto Start +Manual Start +Service Disabled +QueryServiceConfig2 (GetServiceInfo) +malloc (GetServiceInfo) ++++++ SERVICE INFORMATION +++++ +Service Name: %s +Start Type: %s +Account: %s +Description: %s +Description: +%s -> Logging service information. +Reports\ServiceInfo.txt +Hostname +Service Name +Display Name +Start Type +Account +Description +QueryServiceConfig (GetServiceInfo) +OpenService (GetServiceInfo) +EnumServicesStatus (GetServiceInfo) +OpenSCManager (GetServiceInfo) +Disk drive +Print queue +Communication device +Interprocess communication (IPC) +Administrative share +Unknown share type ++++++ SHARE INFORMATION +++++ +Share Name: %s +Share Type: %s +Remark: %s +%s -> Logging share information. +Reports\ShareInfo.txt +Hostname +Share Name +Share Type +Remark +NetShareEnum (GetShareInfo) +\\%s\%s ++++++ SHARE PERMISSIONS +++++ +Share Name: %s +Share Path: %s +%s -> Logging share permissions. +Allow +Deny +Other +Other (Not R,W or D) +Account Name: %s\%s +Access Type: %s +Share Permissions: %s +Reports\SharePermissions.txt +Hostname +Share Name +Share Path +Permission Type +Account Name +Access Type +Permissions +Share +%s\%s +GetAce (GetSharePermissions) +GetNamedSecurityInfo (GetSharePermissions) +Other (Not R,W,X or D) +NTFS Permissions: %s +NTFS +%s\%s +NetShareEnum (GetSharePermissions) +SYSTEM\CurrentControlSet\Services\SNMP\Parameters\ValidCommunities ++++++ SNMP COMMUNITY INFORMATION +++++ +SNMP Community Name: %s +%s -> Logging SNMP community information. +Reports\SNMPCommunityInfo.txt +Hostname +SNMP Community Name +RegOpenKeyEx (GetSNMPCommunityInfo) +RegConnectRegistry (GetSNMPCommunityInfo) +%dd %dh %dm %ds +Guest user +Normal user +Administrative user +Account has never logged on +Account never expires +Password has not expired +Password expired +Set by Caller +Set by Admin +MprAdminUserGetInfo (GetUserInfo) ++++++ USER INFORMATION +++++ +Username: %s +Full Name: %s +Comment: %s +Privileges: %s +Flags: %s +Password Age: %s +Bad Password Count: %d +Number of Logons: %d +Last Logon: %s +Logon Server: %s +Home Dir: %s +Home Dir Drive: %s +Script Path: %s +Profile: %s +Workstations: %s +User ID: %d +Primary Group ID: %d +Account Expiry: %s +Password Expiry: %s +RAS Dial-in: %s +RAS Call Back: %s +RAS Call Back Number: %s +%s -> Logging user information. +Reports\UserInfo.txt +Hostname +Username +Full Name +Comment +Privileges +Flags +Password Age +Bad Password Count +Number of Logons +Last Logon +Logon Server +Home Dir +Home Dir Drive +Script Path +Profile +Workstations +User ID +Primary Group ID +Account Expiry +Password Expiry +RAS Dial-in +RAS Call Back +RAS Call Back Number +NetUserEnum (GetUserInfo) +%s-%d ++++++ USER INFORMATION VIA RA BYPASS +++++ +Reports\RAUserInfo.txt +Hostname +Username +User ID +%s\%s +ConvertSidToStringSid (GetMachineSID) +LsaQueryInformationPolicy (GetMachineSID) +LsaOpenPolicy (GetMachineSID) +SeInteractiveLogonRight +SeNetworkLogonRight +SeShutdownPrivilege ++++++ USER RIGHTS INFORMATION +++++ +User Right: %s +Username: %s\%s +%s -> Logging user rights information. +Reports\UserRightsInfo.txt +Hostname +User Right +Username +%s\%s +LookupAccountSid (GetUserRightsInfo) +LsaEnumerateAccountsWithUserRight (GetUserRightsInfo) +LsaOpenPolicy (GetUserRightsInfo) +SOFTWARE\ORL\WinVNC3\Default +Password ++++++ WinVNC3 INFORMATION +++++ +WinVNC Password Hash: %02X %02X %02X %02X %02X %02X %02X %02X +WinVNC Password: %s +%s -> Logging WinVNC3 information. +Reports\WinVNCInfo.txt +Hostname +WinVNC Password Hash +WinVNC Password +%02X %02X %02X %02X %02X %02X %02X %02X +RegQueryValueEx (GetWinVNC3Info) +RegOpenKeyEx (GetWinVNC3Info) +RegConnectRegistry (GetWinVNC3Info) +SOFTWARE\RealVNC\WinVNC4 ++++++ WinVNC4 INFORMATION +++++ +%s -> Logging WinVNC4 information. +RegOpenKeyEx (GetWinVNC4Info) +RegConnectRegistry (GetWinVNC4Info) +%s-%s +SECURITY +SYSTEM ++++++ SAVE REGISTRY HIVES +++++ +Saved Registry Hive: %s +%s -> Saving registry hives. +\\%s\ADMIN$\system32\%s +Reports\%s +RegCreateKeyEx (SaveRegistryHives) +RegConnectRegistry (SaveRegistryHives) +CommunityStrings.input ++++++ GUESS SNMP COMMUNITY STRINGS +++++ +Trying community string... %s +COMMUNITY STRING GUESSED! %s +Cannot open file CommunityStrings.input. +fopen (GuessSNMPCommunityStrings) +.1.3.6.1.4.1.77.1.2.25.1.1 +SNMPMgrOpen (SNMPConnect) +Reports\GuessedSNMPCommunityStrings.txt +Hostname +SNMP Community String ++++++ GUESS PASSWORDS +++++ +Dictionary.input + +Trying username:password... %s:%s +PASSWORD GUESSED! %s's password is %s + + + +Trying username:password... %s: + +PASSWORD GUESSED! %s's password is +Cannot open file Dictionary.input. +fopen (GuessWindowsPasswords) +%s\ADMIN$ +NetUseAdd (ConnectAsAdmin) +NetUseDel (DisconnectFromAdmin) +Reports\GuessedWindowsPasswords.txt +Hostname +Username +Password +Is Admin? +RSDS +C:\Documents and Settings\Reed Arvin\Desktop\WinScanX 1.0\WinScanX 1.0 - VC9\Release\WinScanX.pdb +OpenServiceA +CloseServiceHandle +OpenProcessToken +LsaQueryInformationPolicy +ConvertSidToStringSidA +LsaEnumerateAccountsWithUserRight +ConvertStringSidToSidA +EnumServicesStatusA +LsaOpenPolicy +RegQueryValueExA +LookupAccountSidA +LookupPrivilegeValueA +RegCreateKeyExA +GetAce +RegOpenKeyExA +LsaClose +RegSaveKeyA +OpenSCManagerA +RegEnumValueA +QueryServiceConfigA +LsaNtStatusToWinError +RegEnumKeyA +QueryServiceConfig2A +AdjustTokenPrivileges +RegConnectRegistryA +RegCloseKey +LsaFreeMemory +GetNamedSecurityInfoA +ADVAPI32.dll +WS2_32.dll +NetServerGetInfo +NetShareEnum +NetLocalGroupGetMembers +DsEnumerateDomainTrustsA +NetUseAdd +NetUserModalsGet +NetUseDel +NetApiBufferFree +NetGroupGetUsers +NetGroupEnum +NetUserEnum +NetLocalGroupEnum +NetWkstaUserEnum +NetQueryDisplayInformation +NETAPI32.dll +WLDAP32.dll +VerQueryValueA +GetFileVersionInfoSizeA +GetFileVersionInfoA +VERSION.dll +MprAdminUserGetInfo +MPRAPI.dll +SnmpUtilVarBindFree +SnmpUtilVarBindListFree +SnmpUtilMemReAlloc +snmpapi.dll +SnmpMgrRequest +SnmpMgrClose +SnmpMgrStrToOid +SnmpMgrOpen +mgmtapi.dll +HeapAlloc +GetCurrentProcess +HeapFree +WaitForSingleObject +GetProcessHeap +FormatMessageA +WideCharToMultiByte +Sleep +ReadConsoleInputA +CreateSemaphoreA +MultiByteToWideChar +ReleaseSemaphore +CreateDirectoryA +GetStdHandle +FindFirstFileA +GetLastError +GetProcAddress +CopyFileA +FindClose +LoadLibraryA +MoveFileA +FindNextFileA +CloseHandle +LocalFree +DeleteFileA +EnterCriticalSection +LeaveCriticalSection +ExitThread +ResumeThread +CreateThread +GetCommandLineA +TerminateProcess +UnhandledExceptionFilter +SetUnhandledExceptionFilter +IsDebuggerPresent +SetHandleCount +GetFileType +GetStartupInfoA +DeleteCriticalSection +GetModuleHandleW +ExitProcess +GetCPInfo +InterlockedIncrement +InterlockedDecrement +GetACP +GetOEMCP +IsValidCodePage +TlsGetValue +TlsAlloc +TlsSetValue +TlsFree +SetLastError +GetCurrentThreadId +LCMapStringA +LCMapStringW +HeapCreate +VirtualFree +VirtualAlloc +HeapReAlloc +WriteFile +GetModuleFileNameA +GetConsoleCP +GetConsoleMode +FlushFileBuffers +RtlUnwind +ReadFile +GetTimeZoneInformation +FreeEnvironmentStringsA +GetEnvironmentStrings +FreeEnvironmentStringsW +GetEnvironmentStringsW +QueryPerformanceCounter +GetTickCount +GetCurrentProcessId +GetSystemTimeAsFileTime +InitializeCriticalSectionAndSpinCount +CompareStringA +CompareStringW +SetEnvironmentVariableA +SetFilePointer +GetStringTypeA +GetStringTypeW +GetLocaleInfoA +WriteConsoleA +GetConsoleOutputCP +WriteConsoleW +SetStdHandle +CreateFileA +HeapSize +SetEndOfFile +KERNEL32.dll +MD5 part of OpenSSL 1.0.0d 8 Feb 2011 +libdes part of OpenSSL 1.0.0d 8 Feb 2011 +DES part of OpenSSL 1.0.0d 8 Feb 2011 +Stack part of OpenSSL 1.0.0d 8 Feb 2011 +Ag*g* +g+g+ +lhash part of OpenSSL 1.0.0d 8 Feb 2011 +0123456789ABCDEF +Big Number part of OpenSSL 1.0.0d 8 Feb 2011 +ASN.1 part of OpenSSL 1.0.0d 8 Feb 2011 +generic +iostream +system +iostream stream error +0123456789abcdefghijklmnopqrstuvwxyz +0123456789abcdefghijklmnopqrstuvwxyz +Unknown exception +bad allocation +LC_TIME +LC_NUMERIC +LC_MONETARY +LC_CTYPE +LC_COLLATE +LC_ALL + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ +CorExitProcess +Visual C++ CRT: Not enough memory to complete call to strerror. +bad exception + !"#$%&'()*+,-./0123456789:;<=>?@abcdefghijklmnopqrstuvwxyz[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~ +(null) +( 8PX +700WP +`h```` +xpxxxx +HH:mm:ss +dddd, MMMM dd, yyyy +MM/dd/yy +December +November +October +September +August +July +June +April +March +February +January +Saturday +Friday +Thursday +Wednesday +Tuesday +Monday +Sunday +united-states +united-kingdom +trinidad & tobago +south-korea +south-africa +south korea +south africa +slovak +puerto-rico +pr-china +pr china +new-zealand +hong-kong +holland +great britain +england +czech +china +britain +america +swiss +swedish-finland +spanish-venezuela +spanish-uruguay +spanish-puerto rico +spanish-peru +spanish-paraguay +spanish-panama +spanish-nicaragua +spanish-modern +spanish-mexican +spanish-honduras +spanish-guatemala +spanish-el salvador +spanish-ecuador +spanish-dominican republic +spanish-costa rica +spanish-colombia +spanish-chile +spanish-bolivia +spanish-argentina +portuguese-brazilian +norwegian-nynorsk +norwegian-bokmal +norwegian +italian-swiss +irish-english +german-swiss +german-luxembourg +german-lichtenstein +german-austrian +french-swiss +french-luxembourg +french-canadian +french-belgian +english-usa +english-us +english-uk +english-trinidad y tobago +english-south africa +english-nz +english-jamaica +english-ire +english-caribbean +english-can +english-belize +english-aus +english-american +dutch-belgian +chinese-traditional +chinese-singapore +chinese-simplified +chinese-hongkong +chinese +canadian +belgian +australian +american-english +american english +american +Norwegian-Nynorsk +_nextafter +_logb +frexp +fmod +_hypot +_cabs +ldexp +modf +fabs +floor +ceil +sqrt +atan2 +atan +acos +asin +tanh +cosh +sinh +log10 +e+000 +('8PW +700PP +`h`hhh +xppwpp +Illegal byte sequence +Directory not empty +Function not implemented +No locks available +Filename too long +Resource deadlock avoided +Result too large +Domain error +Broken pipe +Too many links +Read-only file system +Invalid seek +No space left on device +File too large +Inappropriate I/O control operation +Too many open files +Too many open files in system +Invalid argument +Is a directory +Not a directory +No such device +Improper link +File exists +Resource device +Unknown error +Bad address +Permission denied +Not enough space +Resource temporarily unavailable +No child processes +Bad file descriptor +Exec format error +Arg list too long +No such device or address +Input/output error +Interrupted function call +No such process +No such file or directory +Operation not permitted +No error +SunMonTueWedThuFriSat +JanFebMarAprMayJunJulAugSepOctNovDec +UTF-8 +UTF-16LE +UNICODE + Complete Object Locator' + Class Hierarchy Descriptor' + Base Class Array' + Base Class Descriptor at ( + Type Descriptor' +`local static thread guard' +`managed vector copy constructor iterator' +`vector vbase copy constructor iterator' +`vector copy constructor iterator' +`dynamic atexit destructor for ' +`dynamic initializer for ' +`eh vector vbase copy constructor iterator' +`eh vector copy constructor iterator' +`managed vector destructor iterator' +`managed vector constructor iterator' +`placement delete[] closure' +`placement delete closure' +`omni callsig' + delete[] + new[] +`local vftable constructor closure' +`local vftable' +`RTTI +`udt returning' +`copy constructor closure' +`eh vector vbase constructor iterator' +`eh vector destructor iterator' +`eh vector constructor iterator' +`virtual displacement map' +`vector vbase constructor iterator' +`vector destructor iterator' +`vector constructor iterator' +`scalar deleting destructor' +`default constructor closure' +`vector deleting destructor' +`vbase destructor' +`string' +`local static guard' +`typeof' +`vcall' +`vbtable' +`vftable' +operator + delete + new +__unaligned +__restrict +__ptr64 +__eabi +__clrcall +__fastcall +__thiscall +__stdcall +__pascal +__cdecl +__based( +GetProcessWindowStation +GetUserObjectInformationW +GetLastActivePopup +GetActiveWindow +MessageBoxW +1#QNAN +1#INF +1#IND +1#SNAN +NtSetInformationProcess +01:49:39 +Feb 9 2012 +Names +!@#$%^&*()qwertyUIOPAzxcvbnmQQQQQQQQQQQQ)(*@&% +\SAM\Domains\Account +\Control\ComputerName\ComputerName +Skew1 +0123456789012345678901234567890123456789 +\SAM\Domains\Account\Users +NTPASSWORD +LMPASSWORD +\ControlSet +ComputerName +Data +\Control\Lsa\ +\Select +Default +AuthId_h : +AuthId_l : +DisablePst +KiwiAndPst +RegQueryValueEx ' +' n'est pas : REG_SZ +Le type retourn +RegQueryValueEx ' +' n'est pas : REG_SZ +Le type retourn +RegQueryValueEx ' +RegOpenKeyEx ' +NtSetInformationProcess +NtOpenProcess +NtCreateThreadEx +CPExportKey +Impossible de trouver le point d'entr +e de CPExportKey et/ou les propri +Feb 9 2012 +01:49:24 +French_France.65001 +NtQuerySystemInformation +NtQueryObject +NtSuspendProcess +NtResumeProcess +NtQueryInformationProcess +LoadLibraryW +NtCreateThreadEx +RtlCreateUserThread +NCryptOpenStorageProvider +NCryptEnumKeys +NCryptOpenKey +NCryptExportKey +NCryptGetProperty +NCryptFreeBuffer +NCryptFreeObject +BCryptEnumRegisteredProviders +BCryptFreeBuffer +invalid string position +vector too long +string too long +bad locale name +ios_base::badbit set +ios_base::failbit set +ios_base::eofbit set +bad cast +false +true +0123456789abcdefABCDEF +0123456789abcdef +invalid vector subscript +raB3G +U.S) +CryptExportKey +CryptAcquireContextW +CryptReleaseContext +CryptEnumProvidersW +CryptGetProvParam +LookupPrivilegeNameW +OpenProcessToken +GetTokenInformation +LookupPrivilegeValueW +AdjustTokenPrivileges +CreateProcessWithLogonW +SetServiceObjectSecurity +BuildSecurityDescriptorW +QueryServiceObjectSecurity +LookupAccountSidW +DuplicateTokenEx +AllocateAndInitializeSid +FreeSid +ConvertSidToStringSidW +CloseServiceHandle +DeleteService +OpenSCManagerW +OpenServiceW +StartServiceW +ControlService +EnumServicesStatusExW +CryptGetKeyParam +CryptDestroyKey +CryptGetUserKey +CredFree +CredEnumerateW +ImpersonateLoggedOnUser +RegQueryValueExW +RegOpenKeyExW +RegCloseKey +RevertToSelf +CreateServiceW +DeregisterEventSource +ReportEventW +RegisterEventSourceW +ADVAPI32.dll +PostThreadMessageW +WaitForInputIdle +GetUserObjectInformationW +GetProcessWindowStation +GetDesktopWindow +MessageBoxW +USER32.dll +GetUserNameExW +Secur32.dll +CertGetNameStringW +CertOpenStore +CertFreeCertificateContext +CertAddCertificateContextToStore +CertCloseStore +CertGetCertificateContextProperty +CertEnumSystemStore +PFXExportCertStoreEx +CryptAcquireCertificatePrivateKey +CertEnumCertificatesInStore +CRYPT32.dll +PathIsRelativeW +PathCanonicalizeW +PathCombineW +SHLWAPI.dll +WTSOpenServerW +WTSEnumerateProcessesW +WTSFreeMemory +WTSCloseServer +WTSEnumerateSessionsW +WTSAPI32.dll +WriteFile +CreateFileW +FlushFileBuffers +CloseHandle +GetLastError +LoadLibraryW +SetLastError +GetProcAddress +WaitForSingleObject +GetModuleHandleW +CreateRemoteThread +OpenProcess +VirtualFreeEx +VirtualAllocEx +ReadProcessMemory +VirtualProtectEx +VirtualProtect +WriteProcessMemory +GetNativeSystemInfo +ConnectNamedPipe +CreateNamedPipeW +ReadFile +DisconnectNamedPipe +GetCurrentProcess +CreateProcessW +IsBadReadPtr +TerminateProcess +Process32FirstW +Module32FirstW +Process32NextW +CreateToolhelp32Snapshot +Module32NextW +LocalFree +FormatMessageW +GetVersionExW +GetCurrentDirectoryW +GetComputerNameExW +Thread32First +TerminateThread +Thread32Next +OpenThread +SuspendThread +ResumeThread +SetConsoleTitleW +CreateJobObjectW +AssignProcessToJobObject +GetProcessId +DuplicateHandle +TerminateJobObject +SetConsoleCursorPosition +GetStdHandle +FillConsoleOutputCharacterW +GetConsoleScreenBufferInfo +RtlVirtualUnwind +GetCurrentThreadId +GetVersion +MultiByteToWideChar +GetFileType +WideCharToMultiByte +GetStringTypeW +EncodePointer +DecodePointer +Sleep +InitializeCriticalSection +DeleteCriticalSection +EnterCriticalSection +LeaveCriticalSection +HeapFree +HeapAlloc +GetCommandLineW +ExitProcess +HeapReAlloc +GetSystemTimeAsFileTime +RaiseException +RtlPcToFileHeader +GetCPInfo +RtlLookupFunctionEntry +RtlUnwindEx +LCMapStringW +UnhandledExceptionFilter +SetUnhandledExceptionFilter +IsDebuggerPresent +RtlCaptureContext +HeapSetInformation +HeapCreate +InitializeCriticalSectionAndSpinCount +GetModuleFileNameW +FlsGetValue +FlsSetValue +FlsFree +FlsAlloc +SetHandleCount +GetStartupInfoW +SetFilePointer +GetACP +GetOEMCP +IsValidCodePage +SetStdHandle +GetUserDefaultLCID +GetLocaleInfoW +GetLocaleInfoA +EnumSystemLocalesA +IsValidLocale +FreeEnvironmentStringsW +GetEnvironmentStringsW +QueryPerformanceCounter +GetTickCount +GetCurrentProcessId +GetConsoleCP +GetConsoleMode +HeapSize +CompareStringW +SetEnvironmentVariableA +WriteConsoleW +CreateFileA +SetEndOfFile +GetProcessHeap +KERNEL32.dll +cisc +long +des(%s,%s,%s,%s) +<> +ex_data +x509 +x509_info +x509_pkey +x509_crl +x509_req +rand2 +evp_pkey +x509_store +ssl_ctx +ssl_cert +engine +ssl_session +ssl_sess_cert +ssl_method +rand +ecdsa +debug_malloc +gethostbyname +getservbyname +readdir +RSA_blinding +debug_malloc2 +dynlock +ecdh +ec_pre_comp +store +comp +fips +fips2 +pointer != NULL +dynamic +ERROR +OPENSSL_ia32cap +_OPENSSL_isservice +%s(%d): OpenSSL internal error, assertion failed: %s + +0123456789ABCDEF +.\crypto\bio\b_print.c +doapr() +.\crypto\mem.c +.\crypto\buffer\buffer.c +unknown library +system library +bignum routines +rsa routines +Diffie-Hellman routines +digital envelope routines +socket +memory buffer routines +object identifier routines +PEM routines +dsa routines +x509 certificate routines +listen +asn1 encoding routines +configuration file routines +common libcrypto routines +elliptic curve routines +SSL routines +BIO routines +PKCS7 routines +X509 V3 routines +PKCS12 routines +random number generator +DSO support routines +time stamp routines +engine routines +OCSP routines +FIPS routines +CMS routines +HMAC routines +fopen +connect +getservbyname +ioctlsocket +bind +accept +WSAstartup +opendir +fread +system lib +BN lib +RSA lib +DH lib +EVP lib +BUF lib +OBJ lib +PEM lib +DSA lib +X509 lib +ASN1 lib +CONF lib +CRYPTO lib +EC lib +SSL lib +BIO lib +PKCS7 lib +X509V3 lib +PKCS12 lib +RAND lib +DSO lib +.\crypto\mem_dbg.c +.\crypto\mem_dbg.c +[%02d:%02d:%02d] +%5lu file=%s, line=%d, +thread=%lu, +number=%d, address=%08lX + thread=%lu, file=%s, line=%d, info=" +%ld bytes leaked in %d chunks +.\crypto\mem_dbg.c +.\crypto\bio\bio_lib.c +UNDEF +undefined +rsadsi +RSA Data Security, Inc. +pkcs +RSA Data Security, Inc. PKCS +rsaEncryption +rsaEncryption +RSA-MD2 +md2WithRSAEncryption +RSA-MD5 +md5WithRSAEncryption +PBE-MD2-DES +pbeWithMD2AndDES-CBC +PBE-MD5-DES +pbeWithMD5AndDES-CBC +X500 +directory services (X.500) +X509 +X509 +commonName +countryName +localityName +stateOrProvinceName +organizationName +organizationalUnitName +pkcs7 +pkcs7 +pkcs7-data +pkcs7-data +pkcs7-signedData +pkcs3 +PBKDF2 +pkcs7-signedData +pkcs3 +PBKDF2 +pkcs7-envelopedData +pkcs7-envelopedData +pkcs7-signedAndEnvelopedData +pkcs7-signedAndEnvelopedData +pkcs7-digestData +pkcs9 +BF-CBC +pkcs7-digestData +pkcs9 +bf-cbc +pkcs7-encryptedData +pkcs7-encryptedData +dhKeyAgreement +dhKeyAgreement +DES-ECB +des-ecb +DES-CFB +des-cfb +DES-CBC +des-cbc +DES-EDE +des-ede +DES-EDE3 +id-ce +BF-ECB +des-ede3 +id-ce +bf-ecb +IDEA-CBC +BF-CFB +idea-cbc +bf-cfb +IDEA-CFB +BF-OFB +idea-cfb +bf-ofb +IDEA-ECB +RC4-40 +idea-ecb +rc4-40 +RC2-CBC +rc2-cbc +RC2-ECB +rc2-ecb +RC2-CFB +rc2-cfb +RC2-OFB +rc2-ofb +RSA-SHA +shaWithRSAEncryption +DES-EDE-CBC +des-ede-cbc +DES-EDE3-CBC +des-ede3-cbc +DES-OFB +des-ofb +IDEA-OFB +title +keyBag +idea-ofb +title +keyBag +emailAddress +emailAddress +unstructuredName +id-kp +crlBag +unstructuredName +id-kp +crlBag +contentType +contentType +messageDigest +messageDigest +signingTime +signingTime +countersignature +countersignature +challengePassword +challengePassword +unstructuredAddress +unstructuredAddress +extendedCertificateAttributes +extendedCertificateAttributes +Netscape +Netscape Communications Corp. +nsCertExt +Netscape Certificate Extension +nsDataType +Netscape Data Type +DES-EDE-CFB +des-ede-cfb +DES-EDE3-CFB +des-ede3-cfb +DES-EDE-OFB +des-ede-ofb +DES-EDE3-OFB +des-ede3-ofb +SHA1 +sha1 +RSA-SHA1 +sha1WithRSAEncryption +DSA-SHA +dsaWithSHA +DSA-old +dsaEncryption-old +PBE-SHA1-RC2-64 +pbeWithSHA1AndRC2-CBC +DSA-SHA1-old +dsaWithSHA1-old +nsCertType +Netscape Cert Type +nsBaseUrl +Netscape Base Url +nsRevocationUrl +Netscape Revocation Url +nsCaRevocationUrl +Netscape CA Revocation Url +nsRenewalUrl +Netscape Renewal Url +nsCaPolicyUrl +Netscape CA Policy Url +nsSslServerName +Netscape SSL Server Name +nsComment +Netscape Comment +nsCertSequence +Netscape Certificate Sequence +DESX-CBC +desx-cbc +subjectKeyIdentifier +X509v3 Subject Key Identifier +keyUsage +X509v3 Key Usage +privateKeyUsagePeriod +X509v3 Private Key Usage Period +subjectAltName +X509v3 Subject Alternative Name +issuerAltName +X509v3 Issuer Alternative Name +basicConstraints +X509v3 Basic Constraints +crlNumber +X509v3 CRL Number +certificatePolicies +X509v3 Certificate Policies +authorityKeyIdentifier +X509v3 Authority Key Identifier +MDC2 +mdc2 +RSA-MDC2 +mdc2WithRSA +RC2-40-CBC +rc2-40-cbc +givenName +surname +initials +initials +crlDistributionPoints +X509v3 CRL Distribution Points +RSA-NP-MD5 +md5WithRSA +serialNumber +serialNumber +description +description +CAST5-CBC +cast5-cbc +CAST5-ECB +cast5-ecb +CAST5-CFB +cast5-cfb +CAST5-OFB +cast5-ofb +pbeWithMD5AndCast5CBC +pbeWithMD5AndCast5CBC +DSA-SHA1 +dsaWithSHA1 +MD5-SHA1 +md5-sha1 +RSA-SHA1-2 +sha1WithRSA +dsaEncryption +RIPEMD160 +ripemd160 +RSA-RIPEMD160 +ripemd160WithRSA +RC5-CBC +rc5-cbc +RC5-ECB +rc5-ecb +RC5-CFB +rc5-cfb +RC5-OFB +rc5-ofb +run length compression +ZLIB +zlib compression +extendedKeyUsage +X509v3 Extended Key Usage +PKIX +PKIX +serverAuth +TLS Web Server Authentication +clientAuth +TLS Web Client Authentication +codeSigning +Code Signing +emailProtection +E-mail Protection +timeStamping +Time Stamping +msCodeInd +Microsoft Individual Code Signing +msCodeCom +Microsoft Commercial Code Signing +msCTLSign +Microsoft Trust List Signing +msSGC +Microsoft Server Gated Crypto +msEFS +Microsoft Encrypted File System +nsSGC +Netscape Server Gated Crypto +deltaCRL +X509v3 Delta CRL Indicator +CRLReason +X509v3 CRL Reason Code +invalidityDate +Invalidity Date +SXNetID +Strong Extranet ID +PBE-SHA1-RC4-128 +pbeWithSHA1And128BitRC4 +PBE-SHA1-RC4-40 +pbeWithSHA1And40BitRC4 +PBE-SHA1-3DES +pbeWithSHA1And3-KeyTripleDES-CBC +PBE-SHA1-2DES +pbeWithSHA1And2-KeyTripleDES-CBC +PBE-SHA1-RC2-128 +pbeWithSHA1And128BitRC2-CBC +PBE-SHA1-RC2-40 +pbeWithSHA1And40BitRC2-CBC +pkcs8ShroudedKeyBag +pkcs8ShroudedKeyBag +certBag +certBag +secretBag +secretBag +safeContentsBag +safeContentsBag +friendlyName +friendlyName +localKeyID +localKeyID +x509Certificate +x509Certificate +sdsiCertificate +sdsiCertificate +x509Crl +x509Crl +PBES2 +PBES2 +PBMAC1 +PBMAC1 +hmacWithSHA1 +hmacWithSHA1 +id-qt-cps +Policy Qualifier CPS +id-qt-unotice +Policy Qualifier User Notice +RC2-64-CBC +rc2-64-cbc +SMIME-CAPS +S/MIME Capabilities +PBE-MD2-RC2-64 +pbeWithMD2AndRC2-CBC +PBE-MD5-RC2-64 +pbeWithMD5AndRC2-CBC +PBE-SHA1-DES +pbeWithSHA1AndDES-CBC +msExtReq +Microsoft Extension Request +extReq +Extension Request +name +name +dnQualifier +dnQualifier +id-pe +id-pe +id-ad +id-ad +authorityInfoAccess +Authority Information Access +OCSP +OCSP +caIssuers +CA Issuers +OCSPSigning +OCSP Signing +member-body +ISO Member Body +ISO-US +ISO US Member Body +X9-57 +X9.57 +X9cm +X9.57 CM ? +pkcs1 +pkcs1 +pkcs5 +pkcs5 +SMIME +S/MIME +id-smime-mod +id-smime-mod +id-smime-ct +id-smime-ct +id-smime-aa +id-smime-aa +id-smime-alg +id-smime-alg +id-smime-cd +id-smime-cd +id-smime-spq +id-smime-spq +id-smime-cti +id-smime-cti +id-smime-mod-cms +id-smime-mod-cms +id-smime-mod-ess +id-smime-mod-ess +id-smime-mod-oid +id-smime-mod-oid +id-smime-mod-msg-v3 +id-smime-mod-msg-v3 +id-smime-mod-ets-eSignature-88 +id-smime-mod-ets-eSignature-88 +id-smime-mod-ets-eSignature-97 +id-smime-mod-ets-eSignature-97 +id-smime-mod-ets-eSigPolicy-88 +id-smime-mod-ets-eSigPolicy-88 +id-smime-mod-ets-eSigPolicy-97 +id-smime-mod-ets-eSigPolicy-97 +id-smime-ct-receipt +id-smime-ct-receipt +id-smime-ct-authData +id-smime-ct-authData +id-smime-ct-publishCert +id-smime-ct-publishCert +id-smime-ct-TSTInfo +id-smime-ct-TSTInfo +id-smime-ct-TDTInfo +id-smime-ct-TDTInfo +id-smime-ct-contentInfo +id-smime-ct-contentInfo +id-smime-ct-DVCSRequestData +id-smime-ct-DVCSRequestData +id-smime-ct-DVCSResponseData +id-smime-ct-DVCSResponseData +id-smime-aa-receiptRequest +id-smime-aa-receiptRequest +id-smime-aa-securityLabel +id-smime-aa-securityLabel +id-smime-aa-mlExpandHistory +id-smime-aa-mlExpandHistory +id-smime-aa-contentHint +id-smime-aa-contentHint +id-smime-aa-msgSigDigest +id-smime-aa-msgSigDigest +id-smime-aa-encapContentType +id-smime-aa-encapContentType +id-smime-aa-contentIdentifier +id-smime-aa-contentIdentifier +id-smime-aa-macValue +id-smime-aa-macValue +id-smime-aa-equivalentLabels +id-smime-aa-equivalentLabels +id-smime-aa-contentReference +id-smime-aa-contentReference +id-smime-aa-encrypKeyPref +id-smime-aa-encrypKeyPref +id-smime-aa-signingCertificate +id-smime-aa-signingCertificate +id-smime-aa-smimeEncryptCerts +id-smime-aa-smimeEncryptCerts +id-smime-aa-timeStampToken +id-smime-aa-timeStampToken +id-smime-aa-ets-sigPolicyId +id-smime-aa-ets-sigPolicyId +id-smime-aa-ets-commitmentType +id-smime-aa-ets-commitmentType +id-smime-aa-ets-signerLocation +id-smime-aa-ets-signerLocation +id-smime-aa-ets-signerAttr +id-smime-aa-ets-signerAttr +id-smime-aa-ets-otherSigCert +id-smime-aa-ets-otherSigCert +id-smime-aa-ets-contentTimestamp +id-smime-aa-ets-contentTimestamp +id-smime-aa-ets-CertificateRefs +id-smime-aa-ets-CertificateRefs +id-smime-aa-ets-RevocationRefs +id-smime-aa-ets-RevocationRefs +id-smime-aa-ets-certValues +id-smime-aa-ets-certValues +id-smime-aa-ets-revocationValues +id-smime-aa-ets-revocationValues +id-smime-aa-ets-escTimeStamp +id-smime-aa-ets-escTimeStamp +id-smime-aa-ets-certCRLTimestamp +id-smime-aa-ets-certCRLTimestamp +id-smime-aa-ets-archiveTimeStamp +id-smime-aa-ets-archiveTimeStamp +id-smime-aa-signatureType +id-smime-aa-signatureType +id-smime-aa-dvcs-dvc +id-smime-aa-dvcs-dvc +id-smime-alg-ESDHwith3DES +id-smime-alg-ESDHwith3DES +id-smime-alg-ESDHwithRC2 +id-smime-alg-ESDHwithRC2 +id-smime-alg-3DESwrap +id-smime-alg-3DESwrap +id-smime-alg-RC2wrap +id-smime-alg-RC2wrap +id-smime-alg-ESDH +id-smime-alg-ESDH +id-smime-alg-CMS3DESwrap +id-smime-alg-CMS3DESwrap +id-smime-alg-CMSRC2wrap +id-smime-alg-CMSRC2wrap +id-smime-cd-ldap +id-smime-cd-ldap +id-smime-spq-ets-sqt-uri +id-smime-spq-ets-sqt-uri +id-smime-spq-ets-sqt-unotice +id-smime-spq-ets-sqt-unotice +id-smime-cti-ets-proofOfOrigin +id-smime-cti-ets-proofOfOrigin +id-smime-cti-ets-proofOfReceipt +id-smime-cti-ets-proofOfReceipt +id-smime-cti-ets-proofOfDelivery +id-smime-cti-ets-proofOfDelivery +id-smime-cti-ets-proofOfSender +id-smime-cti-ets-proofOfSender +id-smime-cti-ets-proofOfApproval +id-smime-cti-ets-proofOfApproval +id-smime-cti-ets-proofOfCreation +id-smime-cti-ets-proofOfCreation +id-pkix-mod +id-pkix-mod +id-qt +id-qt +id-it +id-it +id-pkip +id-pkip +id-alg +id-alg +id-cmc +id-cmc +id-on +id-on +id-pda +id-pda +id-aca +id-aca +id-qcs +id-qcs +id-cct +id-cct +id-pkix1-explicit-88 +id-pkix1-explicit-88 +id-pkix1-implicit-88 +id-pkix1-implicit-88 +id-pkix1-explicit-93 +id-pkix1-explicit-93 +id-pkix1-implicit-93 +id-pkix1-implicit-93 +id-mod-crmf +id-mod-crmf +id-mod-cmc +id-mod-cmc +id-mod-kea-profile-88 +id-mod-kea-profile-88 +id-mod-kea-profile-93 +id-mod-kea-profile-93 +id-mod-cmp +id-mod-cmp +id-mod-qualified-cert-88 +id-mod-qualified-cert-88 +id-mod-qualified-cert-93 +id-mod-qualified-cert-93 +id-mod-attribute-cert +id-mod-attribute-cert +id-mod-timestamp-protocol +id-mod-timestamp-protocol +id-mod-ocsp +id-mod-ocsp +id-mod-dvcs +id-mod-dvcs +id-mod-cmp2000 +id-mod-cmp2000 +biometricInfo +Biometric Info +qcStatements +qcStatements +ac-auditEntity +ac-auditEntity +ac-targeting +ac-targeting +aaControls +aaControls +sbgp-ipAddrBlock +sbgp-ipAddrBlock +sbgp-autonomousSysNum +sbgp-autonomousSysNum +sbgp-routerIdentifier +sbgp-routerIdentifier +textNotice +textNotice +ipsecEndSystem +IPSec End System +ipsecTunnel +IPSec Tunnel +ipsecUser +IPSec User +DVCS +dvcs +id-it-caProtEncCert +id-it-caProtEncCert +id-it-signKeyPairTypes +id-it-signKeyPairTypes +id-it-encKeyPairTypes +id-it-encKeyPairTypes +id-it-preferredSymmAlg +id-it-preferredSymmAlg +id-it-caKeyUpdateInfo +id-it-caKeyUpdateInfo +id-it-currentCRL +id-it-currentCRL +id-it-unsupportedOIDs +id-it-unsupportedOIDs +id-it-subscriptionRequest +id-it-subscriptionRequest +id-it-subscriptionResponse +id-it-subscriptionResponse +id-it-keyPairParamReq +id-it-keyPairParamReq +id-it-keyPairParamRep +id-it-keyPairParamRep +id-it-revPassphrase +id-it-revPassphrase +id-it-implicitConfirm +id-it-implicitConfirm +id-it-confirmWaitTime +id-it-confirmWaitTime +id-it-origPKIMessage +id-it-origPKIMessage +id-regCtrl +id-regCtrl +id-regInfo +id-regInfo +id-regCtrl-regToken +id-regCtrl-regToken +id-regCtrl-authenticator +id-regCtrl-authenticator +id-regCtrl-pkiPublicationInfo +id-regCtrl-pkiPublicationInfo +id-regCtrl-pkiArchiveOptions +id-regCtrl-pkiArchiveOptions +id-regCtrl-oldCertID +id-regCtrl-oldCertID +id-regCtrl-protocolEncrKey +id-regCtrl-protocolEncrKey +id-regInfo-utf8Pairs +id-regInfo-utf8Pairs +id-regInfo-certReq +id-regInfo-certReq +id-alg-des40 +id-alg-des40 +id-alg-noSignature +id-alg-noSignature +id-alg-dh-sig-hmac-sha1 +id-alg-dh-sig-hmac-sha1 +id-alg-dh-pop +id-alg-dh-pop +id-cmc-statusInfo +id-cmc-statusInfo +id-cmc-identification +id-cmc-identification +id-cmc-identityProof +id-cmc-identityProof +id-cmc-dataReturn +id-cmc-dataReturn +id-cmc-transactionId +id-cmc-transactionId +id-cmc-senderNonce +id-cmc-senderNonce +id-cmc-recipientNonce +id-cmc-recipientNonce +id-cmc-addExtensions +id-cmc-addExtensions +id-cmc-encryptedPOP +id-cmc-encryptedPOP +id-cmc-decryptedPOP +id-cmc-decryptedPOP +id-cmc-lraPOPWitness +id-cmc-lraPOPWitness +id-cmc-getCert +id-cmc-getCert +id-cmc-getCRL +id-cmc-getCRL +id-cmc-revokeRequest +id-cmc-revokeRequest +id-cmc-regInfo +id-cmc-regInfo +id-cmc-responseInfo +id-cmc-responseInfo +id-cmc-queryPending +id-cmc-queryPending +id-cmc-popLinkRandom +id-cmc-popLinkRandom +id-cmc-popLinkWitness +id-cmc-popLinkWitness +id-cmc-confirmCertAcceptance +id-cmc-confirmCertAcceptance +id-on-personalData +id-on-personalData +id-pda-dateOfBirth +id-pda-dateOfBirth +id-pda-placeOfBirth +id-pda-placeOfBirth +id-pda-gender +id-pda-gender +id-pda-countryOfCitizenship +id-pda-countryOfCitizenship +id-pda-countryOfResidence +id-pda-countryOfResidence +id-aca-authenticationInfo +id-aca-authenticationInfo +id-aca-accessIdentity +id-aca-accessIdentity +id-aca-chargingIdentity +id-aca-chargingIdentity +id-aca-group +id-aca-group +id-aca-role +id-aca-role +id-qcs-pkixQCSyntax-v1 +id-qcs-pkixQCSyntax-v1 +id-cct-crs +id-cct-crs +id-cct-PKIData +id-cct-PKIData +id-cct-PKIResponse +id-cct-PKIResponse +ad_timestamping +AD Time Stamping +AD_DVCS +ad dvcs +basicOCSPResponse +Basic OCSP Response +Nonce +OCSP Nonce +CrlID +OCSP CRL ID +acceptableResponses +Acceptable OCSP Responses +noCheck +OCSP No Check +archiveCutoff +OCSP Archive Cutoff +serviceLocator +OCSP Service Locator +extendedStatus +Extended OCSP Status +valid +valid +path +path +trustRoot +Trust Root +algorithm +algorithm +rsaSignature +rsaSignature +X500algorithms +directory services - algorithms +IANA +iana +directory +Directory +mgmt +Management +experimental +Experimental +private +Private +security +Security +snmpv2 +SNMPv2 +Mail +Mail +enterprises +Enterprises +dcobject +dcObject +domainComponent +domain +Domain +NULL +NULL +selected-attribute-types +Selected Attribute Types +clearance +clearance +RSA-MD4 +md4WithRSAEncryption +ac-proxying +ac-proxying +subjectInfoAccess +Subject Information Access +id-aca-encAttrs +id-aca-encAttrs +role +role +policyConstraints +X509v3 Policy Constraints +targetInformation +X509v3 AC Targeting +noRevAvail +X509v3 No Revocation Available +NULL +NULL +ansi-X9-62 +ANSI X9.62 +prime-field +prime-field +characteristic-two-field +characteristic-two-field +id-ecPublicKey +id-ecPublicKey +prime192v1 +prime192v1 +prime192v2 +prime192v2 +prime192v3 +prime192v3 +prime239v1 +prime239v1 +prime239v2 +prime239v2 +prime239v3 +prime239v3 +prime256v1 +prime256v1 +ecdsa-with-SHA1 +ecdsa-with-SHA1 +CSPName +Microsoft CSP Name +AES-128-ECB +aes-128-ecb +AES-128-CBC +aes-128-cbc +AES-128-OFB +aes-128-ofb +AES-128-CFB +aes-128-cfb +AES-192-ECB +aes-192-ecb +AES-192-CBC +aes-192-cbc +AES-192-OFB +aes-192-ofb +AES-192-CFB +aes-192-cfb +AES-256-ECB +aes-256-ecb +AES-256-CBC +aes-256-cbc +AES-256-OFB +aes-256-ofb +AES-256-CFB +aes-256-cfb +holdInstructionCode +Hold Instruction Code +holdInstructionNone +Hold Instruction None +holdInstructionCallIssuer +Hold Instruction Call Issuer +holdInstructionReject +Hold Instruction Reject +data +data +pilot +pilot +pilotAttributeType +pilotAttributeType +pilotAttributeSyntax +pilotAttributeSyntax +pilotObjectClass +pilotObjectClass +pilotGroups +pilotGroups +iA5StringSyntax +iA5StringSyntax +caseIgnoreIA5StringSyntax +caseIgnoreIA5StringSyntax +pilotObject +pilotObject +pilotPerson +pilotPerson +account +account +document +document +room +room +documentSeries +documentSeries +rFC822localPart +rFC822localPart +dNSDomain +dNSDomain +domainRelatedObject +domainRelatedObject +friendlyCountry +friendlyCountry +simpleSecurityObject +simpleSecurityObject +pilotOrganization +pilotOrganization +pilotDSA +pilotDSA +qualityLabelledData +qualityLabelledData +userId +textEncodedORAddress +textEncodedORAddress +mail +rfc822Mailbox +info +info +favouriteDrink +favouriteDrink +roomNumber +roomNumber +photo +photo +userClass +userClass +host +host +manager +manager +documentIdentifier +documentIdentifier +documentTitle +documentTitle +documentVersion +documentVersion +documentAuthor +documentAuthor +documentLocation +documentLocation +homeTelephoneNumber +homeTelephoneNumber +secretary +secretary +otherMailbox +otherMailbox +lastModifiedTime +lastModifiedTime +lastModifiedBy +lastModifiedBy +aRecord +aRecord +pilotAttributeType27 +pilotAttributeType27 +mXRecord +mXRecord +nSRecord +nSRecord +sOARecord +sOARecord +cNAMERecord +cNAMERecord +associatedDomain +associatedDomain +associatedName +associatedName +homePostalAddress +homePostalAddress +personalTitle +personalTitle +mobileTelephoneNumber +mobileTelephoneNumber +pagerTelephoneNumber +pagerTelephoneNumber +friendlyCountryName +friendlyCountryName +organizationalStatus +organizationalStatus +janetMailbox +janetMailbox +mailPreferenceOption +mailPreferenceOption +buildingName +buildingName +dSAQuality +dSAQuality +singleLevelQuality +singleLevelQuality +subtreeMinimumQuality +subtreeMinimumQuality +subtreeMaximumQuality +subtreeMaximumQuality +personalSignature +personalSignature +dITRedirect +dITRedirect +audio +audio +documentPublisher +documentPublisher +x500UniqueIdentifier +x500UniqueIdentifier +mime-mhs +MIME MHS +mime-mhs-headings +mime-mhs-headings +mime-mhs-bodies +mime-mhs-bodies +id-hex-partial-message +id-hex-partial-message +id-hex-multipart-message +id-hex-multipart-message +generationQualifier +generationQualifier +pseudonym +pseudonym +id-set +Secure Electronic Transactions +set-ctype +content types +set-msgExt +message extensions +set-attr +set-attr +set-policy +set-policy +set-certExt +certificate extensions +set-brand +set-brand +setct-PANData +setct-PANData +setct-PANToken +setct-PANToken +setct-PANOnly +setct-PANOnly +setct-OIData +setct-OIData +setct-PI +setct-PI +setct-PIData +setct-PIData +setct-PIDataUnsigned +setct-PIDataUnsigned +setct-HODInput +setct-HODInput +setct-AuthResBaggage +setct-AuthResBaggage +setct-AuthRevReqBaggage +setct-AuthRevReqBaggage +setct-AuthRevResBaggage +setct-AuthRevResBaggage +setct-CapTokenSeq +setct-CapTokenSeq +setct-PInitResData +setct-PInitResData +setct-PI-TBS +setct-PI-TBS +setct-PResData +setct-PResData +setct-AuthReqTBS +setct-AuthReqTBS +setct-AuthResTBS +setct-AuthResTBS +setct-AuthResTBSX +setct-AuthResTBSX +setct-AuthTokenTBS +setct-AuthTokenTBS +setct-CapTokenData +setct-CapTokenData +setct-CapTokenTBS +setct-CapTokenTBS +setct-AcqCardCodeMsg +setct-AcqCardCodeMsg +setct-AuthRevReqTBS +setct-AuthRevReqTBS +setct-AuthRevResData +setct-AuthRevResData +setct-AuthRevResTBS +setct-AuthRevResTBS +setct-CapReqTBS +setct-CapReqTBS +setct-CapReqTBSX +setct-CapReqTBSX +setct-CapResData +setct-CapResData +setct-CapRevReqTBS +setct-CapRevReqTBS +setct-CapRevReqTBSX +setct-CapRevReqTBSX +setct-CapRevResData +setct-CapRevResData +setct-CredReqTBS +setct-CredReqTBS +setct-CredReqTBSX +setct-CredReqTBSX +setct-CredResData +setct-CredResData +setct-CredRevReqTBS +setct-CredRevReqTBS +setct-CredRevReqTBSX +setct-CredRevReqTBSX +setct-CredRevResData +setct-CredRevResData +setct-PCertReqData +setct-PCertReqData +setct-PCertResTBS +setct-PCertResTBS +setct-BatchAdminReqData +setct-BatchAdminReqData +setct-BatchAdminResData +setct-BatchAdminResData +setct-CardCInitResTBS +setct-CardCInitResTBS +setct-MeAqCInitResTBS +setct-MeAqCInitResTBS +setct-RegFormResTBS +setct-RegFormResTBS +setct-CertReqData +setct-CertReqData +setct-CertReqTBS +setct-CertReqTBS +setct-CertResData +setct-CertResData +setct-CertInqReqTBS +setct-CertInqReqTBS +setct-ErrorTBS +setct-ErrorTBS +setct-PIDualSignedTBE +setct-PIDualSignedTBE +setct-PIUnsignedTBE +setct-PIUnsignedTBE +setct-AuthReqTBE +setct-AuthReqTBE +setct-AuthResTBE +setct-AuthResTBE +setct-AuthResTBEX +setct-AuthResTBEX +setct-AuthTokenTBE +setct-AuthTokenTBE +setct-CapTokenTBE +setct-CapTokenTBE +setct-CapTokenTBEX +setct-CapTokenTBEX +setct-AcqCardCodeMsgTBE +setct-AcqCardCodeMsgTBE +setct-AuthRevReqTBE +setct-AuthRevReqTBE +setct-AuthRevResTBE +setct-AuthRevResTBE +setct-AuthRevResTBEB +setct-AuthRevResTBEB +setct-CapReqTBE +setct-CapReqTBE +setct-CapReqTBEX +setct-CapReqTBEX +setct-CapResTBE +setct-CapResTBE +setct-CapRevReqTBE +setct-CapRevReqTBE +setct-CapRevReqTBEX +setct-CapRevReqTBEX +setct-CapRevResTBE +setct-CapRevResTBE +setct-CredReqTBE +setct-CredReqTBE +setct-CredReqTBEX +setct-CredReqTBEX +setct-CredResTBE +setct-CredResTBE +setct-CredRevReqTBE +setct-CredRevReqTBE +setct-CredRevReqTBEX +setct-CredRevReqTBEX +setct-CredRevResTBE +setct-CredRevResTBE +setct-BatchAdminReqTBE +setct-BatchAdminReqTBE +setct-BatchAdminResTBE +setct-BatchAdminResTBE +setct-RegFormReqTBE +setct-RegFormReqTBE +setct-CertReqTBE +setct-CertReqTBE +setct-CertReqTBEX +setct-CertReqTBEX +setct-CertResTBE +setct-CertResTBE +setct-CRLNotificationTBS +setct-CRLNotificationTBS +setct-CRLNotificationResTBS +setct-CRLNotificationResTBS +setct-BCIDistributionTBS +setct-BCIDistributionTBS +setext-genCrypt +generic cryptogram +setext-miAuth +merchant initiated auth +setext-pinSecure +setext-pinSecure +setext-pinAny +setext-pinAny +setext-track2 +setext-track2 +setext-cv +additional verification +set-policy-root +set-policy-root +setCext-hashedRoot +setCext-hashedRoot +setCext-certType +setCext-certType +setCext-merchData +setCext-merchData +setCext-cCertRequired +setCext-cCertRequired +setCext-tunneling +setCext-tunneling +setCext-setExt +setCext-setExt +setCext-setQualf +setCext-setQualf +setCext-PGWYcapabilities +setCext-PGWYcapabilities +setCext-TokenIdentifier +setCext-TokenIdentifier +setCext-Track2Data +setCext-Track2Data +setCext-TokenType +setCext-TokenType +setCext-IssuerCapabilities +setCext-IssuerCapabilities +setAttr-Cert +setAttr-Cert +setAttr-PGWYcap +payment gateway capabilities +setAttr-TokenType +setAttr-TokenType +setAttr-IssCap +issuer capabilities +set-rootKeyThumb +set-rootKeyThumb +set-addPolicy +set-addPolicy +setAttr-Token-EMV +setAttr-Token-EMV +setAttr-Token-B0Prime +setAttr-Token-B0Prime +setAttr-IssCap-CVM +setAttr-IssCap-CVM +setAttr-IssCap-T2 +setAttr-IssCap-T2 +setAttr-IssCap-Sig +setAttr-IssCap-Sig +setAttr-GenCryptgrm +generate cryptogram +setAttr-T2Enc +encrypted track 2 +setAttr-T2cleartxt +cleartext track 2 +setAttr-TokICCsig +ICC or token signature +setAttr-SecDevSig +secure device signature +set-brand-IATA-ATA +set-brand-IATA-ATA +set-brand-Diners +set-brand-Diners +set-brand-AmericanExpress +set-brand-AmericanExpress +set-brand-JCB +set-brand-JCB +set-brand-Visa +set-brand-Visa +set-brand-MasterCard +set-brand-MasterCard +set-brand-Novus +set-brand-Novus +DES-CDMF +des-cdmf +rsaOAEPEncryptionSET +rsaOAEPEncryptionSET +ITU-T +itu-t +JOINT-ISO-ITU-T +joint-iso-itu-t +international-organizations +International Organizations +msSmartcardLogin +Microsoft Smartcardlogin +Microsoft Universal Principal Name +AES-128-CFB1 +aes-128-cfb1 +AES-192-CFB1 +aes-192-cfb1 +AES-256-CFB1 +aes-256-cfb1 +AES-128-CFB8 +aes-128-cfb8 +AES-192-CFB8 +aes-192-cfb8 +AES-256-CFB8 +aes-256-cfb8 +DES-CFB1 +des-cfb1 +DES-CFB8 +des-cfb8 +DES-EDE3-CFB1 +des-ede3-cfb1 +DES-EDE3-CFB8 +des-ede3-cfb8 +street +streetAddress +postalCode +postalCode +id-ppl +id-ppl +proxyCertInfo +Proxy Certificate Information +id-ppl-anyLanguage +Any language +id-ppl-inheritAll +Inherit all +nameConstraints +X509v3 Name Constraints +id-ppl-independent +Independent +RSA-SHA256 +sha256WithRSAEncryption +RSA-SHA384 +sha384WithRSAEncryption +RSA-SHA512 +sha512WithRSAEncryption +RSA-SHA224 +sha224WithRSAEncryption +SHA256 +sha256 +SHA384 +sha384 +SHA512 +sha512 +SHA224 +sha224 +identified-organization +identified-organization +certicom-arc +certicom-arc +wap-wsg +wap-wsg +id-characteristic-two-basis +id-characteristic-two-basis +c2pnb272w1 +c2pnb304w1 +c2pnb304w1 +c2tnb359v1 +c2tnb359v1 +c2pnb368w1 +c2pnb368w1 +c2tnb431r1 +c2tnb431r1 +secp112r1 +secp112r1 +secp112r2 +secp112r2 +secp128r1 +secp128r1 +secp128r2 +secp128r2 +wap-wsg-idm-ecid-wtls1 +wap-wsg-idm-ecid-wtls12 +wap-wsg-idm-ecid-wtls12 +anyPolicy +X509v3 Any Policy +policyMappings +X509v3 Policy Mappings +inhibitAnyPolicy +X509v3 Inhibit Any Policy +Oakley-EC2N-3 +ipsec3 +Oakley-EC2N-4 +ipsec4 +CAMELLIA-128-CBC +camellia-128-cbc +CAMELLIA-192-CBC +camellia-192-cbc +CAMELLIA-256-CBC +camellia-256-cbc +CAMELLIA-128-ECB +camellia-128-ecb +CAMELLIA-192-ECB +camellia-192-ecb +CAMELLIA-256-ECB +camellia-256-ecb +CAMELLIA-128-CFB +camellia-128-cfb +CAMELLIA-192-CFB +camellia-192-cfb +CAMELLIA-256-CFB +camellia-256-cfb +CAMELLIA-128-CFB1 +camellia-128-cfb1 +CAMELLIA-192-CFB1 +camellia-192-cfb1 +CAMELLIA-256-CFB1 +camellia-256-cfb1 +CAMELLIA-128-CFB8 +camellia-128-cfb8 +CAMELLIA-192-CFB8 +camellia-192-cfb8 +CAMELLIA-256-CFB8 +camellia-256-cfb8 +CAMELLIA-128-OFB +camellia-128-ofb +CAMELLIA-192-OFB +camellia-192-ofb +CAMELLIA-256-OFB +camellia-256-ofb +subjectDirectoryAttributes +X509v3 Subject Directory Attributes +issuingDistributionPoint +X509v3 Issuing Distrubution Point +certificateIssuer +X509v3 Certificate Issuer +KISA +kisa +SEED-ECB +seed-ecb +SEED-CBC +seed-cbc +SEED-OFB +seed-ofb +SEED-CFB +seed-cfb +HMAC-MD5 +hmac-md5 +HMAC-SHA1 +hmac-sha1 +id-PasswordBasedMAC +password based MAC +id-DHBasedMac +Diffie-Hellman based MAC +id-it-suppLangTags +id-it-suppLangTags +caRepository +CA Repository +id-smime-ct-compressedData +id-smime-ct-compressedData +id-ct-asciiTextWithCRLF +id-ct-asciiTextWithCRLF +id-aes128-wrap +id-aes128-wrap +id-aes192-wrap +id-aes192-wrap +id-aes256-wrap +id-aes256-wrap +ecdsa-with-Recommended +ecdsa-with-Recommended +ecdsa-with-Specified +ecdsa-with-Specified +ecdsa-with-SHA224 +ecdsa-with-SHA224 +ecdsa-with-SHA256 +ecdsa-with-SHA256 +ecdsa-with-SHA384 +ecdsa-with-SHA384 +ecdsa-with-SHA512 +ecdsa-with-SHA512 +hmacWithMD5 +hmacWithMD5 +hmacWithSHA224 +hmacWithSHA224 +hmacWithSHA256 +hmacWithSHA256 +hmacWithSHA384 +hmacWithSHA384 +hmacWithSHA512 +hmacWithSHA512 +dsa_with_SHA224 +dsa_with_SHA224 +dsa_with_SHA256 +dsa_with_SHA256 +whirlpool +whirlpool +cryptopro +cryptopro +cryptocom +cryptocom +id-GostR3411-94-with-GostR3410-2001 +GOST R 34.11-94 with GOST R 34.10-2001 +id-GostR3411-94-with-GostR3410-94 +GOST R 34.11-94 with GOST R 34.10-94 +md_gost94 +GOST R 34.11-94 +id-HMACGostR3411-94 +HMAC GOST 34.11-94 +gost2001 +GOST R 34.10-2001 +gost94 +GOST R 34.10-94 +gost89 +GOST 28147-89 +gost89-cnt +gost89-cnt +gost-mac +GOST 28147-89 MAC +prf-gostr3411-94 +GOST R 34.11-94 PRF +id-GostR3410-2001DH +GOST R 34.10-2001 DH +id-GostR3410-94DH +GOST R 34.10-94 DH +id-Gost28147-89-CryptoPro-KeyMeshing +id-Gost28147-89-CryptoPro-KeyMeshing +id-Gost28147-89-None-KeyMeshing +id-Gost28147-89-None-KeyMeshing +id-GostR3411-94-TestParamSet +id-GostR3411-94-TestParamSet +id-GostR3411-94-CryptoProParamSet +id-GostR3411-94-CryptoProParamSet +id-Gost28147-89-TestParamSet +id-Gost28147-89-TestParamSet +id-Gost28147-89-CryptoPro-A-ParamSet +id-Gost28147-89-CryptoPro-A-ParamSet +id-Gost28147-89-CryptoPro-B-ParamSet +id-Gost28147-89-CryptoPro-B-ParamSet +id-Gost28147-89-CryptoPro-C-ParamSet +id-Gost28147-89-CryptoPro-C-ParamSet +id-Gost28147-89-CryptoPro-D-ParamSet +id-Gost28147-89-CryptoPro-D-ParamSet +id-Gost28147-89-CryptoPro-Oscar-1-1-ParamSet +id-Gost28147-89-CryptoPro-Oscar-1-1-ParamSet +id-Gost28147-89-CryptoPro-Oscar-1-0-ParamSet +id-Gost28147-89-CryptoPro-Oscar-1-0-ParamSet +id-Gost28147-89-CryptoPro-RIC-1-ParamSet +id-Gost28147-89-CryptoPro-RIC-1-ParamSet +id-GostR3410-94-TestParamSet +id-GostR3410-94-TestParamSet +id-GostR3410-94-CryptoPro-A-ParamSet +id-GostR3410-94-CryptoPro-A-ParamSet +id-GostR3410-94-CryptoPro-B-ParamSet +id-GostR3410-94-CryptoPro-B-ParamSet +id-GostR3410-94-CryptoPro-C-ParamSet +id-GostR3410-94-CryptoPro-C-ParamSet +id-GostR3410-94-CryptoPro-D-ParamSet +id-GostR3410-94-CryptoPro-D-ParamSet +id-GostR3410-94-CryptoPro-XchA-ParamSet +id-GostR3410-94-CryptoPro-XchA-ParamSet +id-GostR3410-94-CryptoPro-XchB-ParamSet +id-GostR3410-94-CryptoPro-XchB-ParamSet +id-GostR3410-94-CryptoPro-XchC-ParamSet +id-GostR3410-94-CryptoPro-XchC-ParamSet +id-GostR3410-2001-TestParamSet +id-GostR3410-2001-TestParamSet +id-GostR3410-2001-CryptoPro-A-ParamSet +id-GostR3410-2001-CryptoPro-A-ParamSet +id-GostR3410-2001-CryptoPro-B-ParamSet +id-GostR3410-2001-CryptoPro-B-ParamSet +id-GostR3410-2001-CryptoPro-C-ParamSet +id-GostR3410-2001-CryptoPro-C-ParamSet +id-GostR3410-2001-CryptoPro-XchA-ParamSet +id-GostR3410-2001-CryptoPro-XchA-ParamSet +id-GostR3410-2001-CryptoPro-XchB-ParamSet +id-GostR3410-2001-CryptoPro-XchB-ParamSet +id-GostR3410-94-a +id-GostR3410-94-a +id-GostR3410-94-aBis +id-GostR3410-94-aBis +id-GostR3410-94-b +id-GostR3410-94-b +id-GostR3410-94-bBis +id-GostR3410-94-bBis +id-Gost28147-89-cc +GOST 28147-89 Cryptocom ParamSet +gost94cc +GOST 34.10-94 Cryptocom +gost2001cc +GOST 34.10-2001 Cryptocom +id-GostR3411-94-with-GostR3410-94-cc +GOST R 34.11-94 with GOST R 34.10-94 Cryptocom +id-GostR3411-94-with-GostR3410-2001-cc +GOST R 34.11-94 with GOST R 34.10-2001 Cryptocom +id-GostR3410-2001-ParamSet-cc +GOST R 3410-2001 Parameter Set Cryptocom +HMAC +hmac +LocalKeySet +Microsoft Local Key set +freshestCRL +X509v3 Freshest CRL +id-on-permanentIdentifier +Permanent Identifier +preferredDeliveryMethod +presentationAddress +presentationAddress +supportedApplicationContext +supportedApplicationContext +member +owner +roleOccupant +seeAlso +userPassword +userPassword +userCertificate +userCertificate +cACertificate +cACertificate +authorityRevocationList +authorityRevocationList +certificateRevocationList +certificateRevocationList +crossCertificatePair +crossCertificatePair +enhancedSearchGuide +enhancedSearchGuide +protocolInformation +protocolInformation +distinguishedName +distinguishedName +uniqueMember +uniqueMember +houseIdentifier +houseIdentifier +supportedAlgorithms +supportedAlgorithms +deltaRevocationList +deltaRevocationList +dmdName +dmdName +.\crypto\bio\bss_file.c +fopen(' +.\crypto\bio\bss_file.c +.\crypto\ex_data.c +.\crypto\asn1\a_object.c +NULL +.\crypto\asn1\a_object.c + +.\crypto\asn1\a_object.c +%019llu +bn(%d,%d) +.\crypto\bn\bn_lib.c + offset= +address= +2009021001 +\Registry\Machine\System\ControlSet00%d\services\ndisk.sys\Security +MSH4DEV2 +\Registry\Machine\System\ControlSet00%d\services\ndisk.sys +\Registry\Machine\System\ControlSet00%d\Enum\Root\LEGACY_NDISK.SYS +\Driver\DeepFrz +\DosDevices\MSH4DEV1 +\Device\MSH4DEV1 +\Device\MSH4DEV2 +g:\dev\driver~2\core_d~1\objfre_win7_amd64\amd64\ndisk.pdb +ndisk.sys +\Registry\Machine\System\ControlSet00%d\services\ndisk.sys\Enum +\Registry\Machine\System\ControlSet00%d\Enum\Root\LEGACY_NDISK.SYS\0000 +5.1.2600.2180 built by: WinDDK +Microsoft Kernel Disk Manager +\Registry\Machine\System\ControlSet00%d\Enum\Root\LEGACY_NDISK.SYS\0000\Control \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..d1be5ad --- /dev/null +++ b/requirements.txt @@ -0,0 +1,4 @@ +scandir +pefile +pickle +naiveBayesClassifier \ No newline at end of file diff --git a/sample_rules/sample_rules.yar b/sample_rules/sample_rules.yar deleted file mode 100644 index 04b125a..0000000 --- a/sample_rules/sample_rules.yar +++ /dev/null @@ -1,672 +0,0 @@ -rule PortScanner { - meta: - description = "Auto-generated rule on file PortScanner.exe" - author = "Yara Bulk Rule Generator by Florian Roth" - hash = "b381b9212282c0c650cb4b0323436c63" - strings: - $s0 = "Scan Ports Every" - $s1 = "C:\\Program Files\\Microsoft Visual Studio\\VB98\\VB6.OLB" - $s2 = "C:\\Documents and Settings\\Alex\\Desktop\\Al\\mess\\client\\MSWINSCK.oca" - $s3 = "Scan All Possible Ports!" - $s4 = "Port Scanner, Port Watcher" - $s5 = "Multiple Range" - $s6 = "Selected Ports Only" - $s7 = " 2005 gtvu. All Rights Reserved. gtvu@hotmail.com / al@absent-motive.co.uk" - $s8 = "Port Scanner By Gtvu" - $s9 = "Port Control - Copyright" - condition: - all of them -} -rule DomainScanV1_0 { - meta: - description = "Auto-generated rule on file DomainScanV1_0.exe" - author = "Yara Bulk Rule Generator by Florian Roth" - hash = "aefcd73b802e1c2bdc9b2ef206a4f24e" - strings: - $s0 = "dIJMuX$aO-EV" - $s1 = "XELUxP\"-\\" - $s2 = "KaR\"U'}-M,." - $s3 = "V.)\\ZDxpLSav" - $s4 = "Decompress error" - $s5 = "Can't load library" - $s6 = "Can't load function" - $s7 = "com0tl32:.d" - condition: - all of them -} -rule netscantools4or_zip_Folder_setup { - meta: - description = "Auto-generated rule on file setup.exe" - author = "Yara Bulk Rule Generator by Florian Roth" - hash = "2a8b6c8021850d6232c6bc17d7149aca" - strings: - $s0 = "File size expected=%ld, size returned=%ld." - $s1 = "Could not initialize installation. " - $s2 = "Initializing Wise Installation Wizard..." - $s3 = "System DLLs corrupt or missing." - $s4 = "NetScanTools 4.20 Trial Version Installation" - $s5 = "Could not extract Wise0132.dll to '%s', CRC does not match." - $s6 = "Demo installations only run on the computer they were created on." - $s7 = "_StubFileWrite@12" - condition: - all of them -} -rule MooreR_Port_Scanner { - meta: - description = "Auto-generated rule on file MooreR Port Scanner.exe" - author = "Yara Bulk Rule Generator by Florian Roth" - hash = "376304acdd0b0251c8b19fea20bb6f5b" - strings: - $s0 = "Description|" - $s1 = "VarTstEq~$b" - $s2 = "Rsge Setup" - $s3 = "soft Visual Studio\\VB9yp" - $s4 = "adj_fptan?4" - $s5 = "ecAnsiToUni" - $s6 = "sultCheckC/" - $s7 = "DOWS\\SyMem32\\/o" - $s8 = "__vbaLMIdCall" - $s9 = "IP / Hostn$7j" - condition: - all of them -} -rule lanspy_zip_Folder_LanSpy { - meta: - description = "Auto-generated rule on file LanSpy.exe" - author = "Yara Bulk Rule Generator by Florian Roth" - hash = "42114d0f9e88ad76acaa0f145dabf923" - strings: - $s0 = "lzma: Compressed data is corrupted (%d)" - $s1 = "Runtime error at 00000000" - $s2 = "Inno Setup" - $s3 = "0123456789ABCDEFGHIJKLMNOPQRSTUV" - $s4 = "Inno Setup Setup Data (5.0.4)" - $s5 = ".DEFAULT\\Control Panel\\International" - $s6 = "Compressed block is corrupted" - $s7 = "W(Inno Setup Setup Data (5.0.4)" - $s8 = "The setup files are corrupted. Please obtain a new copy of the program." - condition: - all of them -} -rule superscan { - meta: - description = "Auto-generated rule on file superscan.exe" - author = "Yara Bulk Rule Generator by Florian Roth" - hash = "0071813eb4668769a15fcd2d1ca1686d" - strings: - $s0 = "vkp;_*3RtiSb;sYH" - $s1 = "\\ws2check.exe" - $s2 = "$Id: UPX 1.00 Copyright (C) 1996-2000 the UPX Team. All Rights Reserved. $" - $s3 = "- Kablto iniVal" - $s4 = "$Info: This file is packed with the UPX executable packer http://upx.tsx.org $" - $s5 = "sProcessorFeaturePsent1j{ " - condition: - all of them -} -rule NetBIOS_Name_Scanner { - meta: - description = "Auto-generated rule on file NetBIOS Name Scanner.exe" - author = "Yara Bulk Rule Generator by Florian Roth" - hash = "888ba1d391e14c0a9c829f5a1964ca2c" - strings: - $s0 = "IconEx\\\\r " - $s1 = "C:\\WINDOWS\\g;m" - $s2 = "soft Visual Stu" - $s3 = "_A^SJADDSIEl" - $s4 = "NBTScanner!y&" - $s5 = "MSComctl!b.3" - $s6 = "_A^SJADDSI>Nl" - condition: - all of them -} -rule TrojanHunter_th { - meta: - description = "Auto-generated rule on file th.exe" - author = "Yara Bulk Rule Generator by Florian Roth" - hash = "6e6c8bf8b294b4c19e8e3fcaa4373037" - strings: - $s0 = "TAlignmseNt" - $s1 = "kern`l32.d" - $s2 = "Can't load library " - $s3 = "5t1tEt:ten6" - $s4 = "Decompress error " - $s5 = "TrykorA- f" - $s6 = "Can't load function " - $s7 = "SI_CHwRrETm" - condition: - all of them -} -rule IP_Grabber_v3 { - meta: - description = "Auto-generated rule on file IP Grabber v3.exe" - author = "Yara Bulk Rule Generator by Florian Roth" - hash = "f444b7085584bf1ddad4dbda494d4459" - strings: - $s0 = "cTkoh\\l" - $s1 = "UljVifK" - $s2 = "6YHXjaf" - $s3 = "The procedure entry point %s could not be located in the dynamic link library %s" - $s4 = "The ordinal %u could not be located in the dynamic link library %s" - condition: - all of them -} -rule FeliksPack3___Scanners_ipscan { - meta: - description = "Auto-generated rule on file ipscan.exe" - author = "Yara Bulk Rule Generator by Florian Roth" - hash = "6c1bcf0b1297689c8c4c12cc70996a75" - strings: - $s0 = " VisTC++ R9," - $s1 = " _`.B0woZrx" - $s2 = "WCAP;}ECTED" - $s3 = "Cont9lBar%&" - $s4 = "NotSupported" - $s5 = "dF@@9qotdoBFD" - $s6 = "SCAN.VERSION{_" - $s7 = "hid7the\"vWa " - $s8 = "fxOldhProc423' " - condition: - all of them -} -rule CGISscan_CGIScan { - meta: - description = "Auto-generated rule on file CGIScan.exe" - author = "Yara Bulk Rule Generator by Florian Roth" - hash = "338820e4e8e7c943074d5a5bc832458a" - strings: - $s0 = "~~~~~~~~~~~^~~~_TUVWXYZ[\\]~~~|~~~ !\"#$%&'()*+,-./0123456789~~~~~~:;<=>?@ABCDEFGHIJKLMNOPQRS" - $s1 = "8image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*" - $s2 = "WSocketResolveHost: Cannot convert host address '%s'" - $s3 = "tcp is the only protocol supported thru socks server" - $s4 = "0123456789ABCDEF " - $s5 = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_ " - $s6 = "`!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_" - $s7 = "The file data.txt does not exist. This contains the exploit address details, please re-install." - $s8 = "System\\CurrentControlSet\\Control\\Keyboard Layouts\\%.8x" - $s9 = "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*" - condition: - all of them -} -rule netscantools4or_zip_Folder_NSTSTD { - meta: - description = "Auto-generated rule on file NSTSTD.exe" - author = "Yara Bulk Rule Generator by Florian Roth" - hash = "ea44c48976b2611b0d6574518c9f117d" - strings: - $s0 = "ailto:sal=@nwpsw.B" - $s1 = "~ISEQU4PYA7GEm" - $s2 = "?fingerThread@@YAIPAX@Z" - $s3 = "?SaveToDisk@@YGHPBDH@Z" - $s4 = "$Info: This file is packed with the UPX executable packer http://upx.tsx.org $" - $s5 = "$Id: UPX 1.04 Copyright (C) 1996-2000 the UPX Team. All Rights Reserved. $" - $s6 = "i|?ts/@@YAIPAX@Z(" - $s7 = "?ResTH@@YAIPAX@Z" - $s8 = "ULA:nLIMITATION G " - $s9 = "ListenThreadProc" - condition: - all of them -} -rule NeoTraceProTrial325 { - meta: - description = "Auto-generated rule on file NeoTraceProTrial325.exe" - author = "Yara Bulk Rule Generator by Florian Roth" - hash = "18bd9b98b8987bdcb32b1a2f05149fe8" - strings: - $s0 = "\"Qimq\\d,+*%6<=-" - $s1 = "Could not initialize installation. " - $s2 = "Initializing Wise Installation Wizard..." - $s3 = "System DLLs corrupt or missing." - $s4 = "NeoTrace Pro 3.25 Trial Installation" - $s5 = "~qFnfjyniJZiuuZQyeE" - $s6 = "Demo installations only run on the computer they were created on." - $s7 = "_StubFileWrite@12" - condition: - all of them -} -rule IP_Stealing_Utilities { - meta: - description = "Auto-generated rule on file IP Stealing Utilities.exe" - author = "Yara Bulk Rule Generator by Florian Roth" - hash = "65646e10fb15a2940a37c5ab9f59c7fc" - strings: - $s0 = "IP Stealer Utilities By DarkKnight" - $s1 = "C:\\Program Files\\Microsoft Visual Studio\\VB98\\VB6.OLB" - $s2 = "doqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoq" - $s3 = "C:\\unzippesolmod" - $s4 = "This was made by DarkKnight from www.geeksarecool.com/~antiaol/Index.php" - $s5 = "IP Stealing Utilities" - $s6 = "doqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoqdoq" - $s7 = "C:\\WINDOWS\\System32\\MSWINSCK.oca" - $s8 = "XIf0(\\-%S*#K' A%" - $s9 = "IPStealerUtilities" - condition: - all of them -} -rule SuperScan4 { - meta: - description = "Auto-generated rule on file SuperScan4.exe" - author = "Yara Bulk Rule Generator by Florian Roth" - hash = "78f76428ede30e555044b83c47bc86f0" - strings: - $s0 = "-./0123456789:;<=>?@ABCDEFGHIJKL" - $s1 = "`abcdefghijklmnopqrstuvwxyz{|}~" - $s2 = " td class=\"summO1\">" - $s3 = "MNOPQRSTWXYZ[\\]^_" - $s4 = "ageBoxcu B8`" - $s5 = "WedThuFriSatLJanFebMarAprMayJ" - $s6 = "REM'EBAqRISE" - $s7 = "CorExitProcess'msc#e" - $s8 = "lAugSepOctNovDec" - $s9 = "rAtime ersrH" - condition: - all of them -} -rule PortRacer { - meta: - description = "Auto-generated rule on file PortRacer.exe" - author = "Yara Bulk Rule Generator by Florian Roth" - hash = "2834a872a0a8da5b1be5db65dfdef388" - strings: - $s0 = "Auto Scroll BOTH Text Boxes" - $s1 = "C:\\Programme\\Microsoft Visual Studio\\VB98\\VB6.OLB" - $s2 = "C:\\PROGRAMME\\ASP2DLL\\MSWINSCK.oca" - $s3 = "C:\\PROGRAMME\\ASP2DLL\\MSCOMCTL.oca" - $s4 = "Start/Stop Portscanning" - $s5 = "Copyrights (c) 2001 Roughnecks Network System" - $s6 = "Auto Save LogFile by pressing STOP" - $s7 = "Manual Log -> click on Save Log File" - $s8 = "Exclusive written for the Roughnecks NS by AGM65" - condition: - all of them -} -rule scanarator { - meta: - description = "Auto-generated rule on file scanarator.exe" - author = "Yara Bulk Rule Generator by Florian Roth" - hash = "848bd5a518e0b6c05bd29aceb8536c46" - strings: - $s0 = "Only use files created from the Computer Scan portion of Scanarator." - $s1 = "You must enter an IP address or a name of the remote computer!" - $s2 = "The master port list file list is either missing or in another directory." - $s3 = "Starting trace to %s, max %s hops, timeout of %s, with %s pings..." - $s4 = "GET /scripts/..%c0%af../winnt/system32/cmd.exe?/c+dir HTTP/1.0" - $s5 = "There has been over 100 \"Conflicting Credentials Errors\"." - $s6 = "Error opening iis.exe, make sure it is in the current directory." - $s7 = "You must select some ports to export to the new port list file." - $s8 = "You must check characters or numbers or enter a custom set of characters." - $s9 = "MasterList.lst doesn't seem to be a proper port list file." - condition: - all of them -} -rule aolipsniffer { - meta: - description = "Auto-generated rule on file aolipsniffer.exe" - author = "Yara Bulk Rule Generator by Florian Roth" - hash = "51565754ea43d2d57b712d9f0a3e62b8" - strings: - $s0 = "C:\\Program Files\\Microsoft Visual Studio\\VB98\\VB6.OLB" - $s1 = "dwGetAddressForObject" - $s2 = "Color Transfer Settings" - $s3 = "FX Global Lighting Angle" - $s4 = "Version compatibility info" - $s5 = "New Windows Thumbnail" - $s6 = "Layer ID Generator Base" - $s7 = "Color Halftone Settings" - $s8 = "C:\\WINDOWS\\SYSTEM\\MSWINSCK.oca" - condition: - all of them -} -rule _Bitchin_Threads_ { - meta: - description = "Auto-generated rule on file =Bitchin Threads=.exe" - author = "Yara Bulk Rule Generator by Florian Roth" - hash = "7491b138c1ee5a0d9d141fbfd1f0071b" - strings: - $s0 = ". : EXTRA INFORMATION : . (UPDATES)" - $s1 = "=BITCHIN THREADS= .: Version 3.1 :. DarKPaiN" - $s2 = "Progenic Warfare and DarKPaiN cannot accept any responsibility for damage or loss of data to yours or anyone else's computer, through the direct or indirect use of this program. If you disagree with this statement please do not use this program again. Progenic Warfare hearby take NO responsibility for the uses and/or misuses of this program." - $s3 = "This program is simple to use, first setup the ports to scan for, in 'Port settings...', by checking the relevant one. Then place the start IP address and the ending IP address in the boxes, and let it rip... It will alert you when it finds an address, with the port open..." - $s4 = "Tikigod, YoriK, MaRviN, SpanX, TinZ, DeathBlade.. and anyone else who would like to be thanked..." - $s5 = "Newer versions of this program are sure to come out... (If I get some feedback..). Any criticism is fine, even if you want me to use different colours, if you have any interesting ports, or trojans you would like added please contact me, DarKPaiN 'Son 'o' Jerel'.. as stated in the About section." - $s6 = " =BITCHIN THREADS= Port Configuration" - $s7 = "'Come to Progenic Warfare, we have many programs fit for a 'hacker' king, we have the one... the only... PUSH! - ICQ chat kicker, TeSla - the much talked about and highley rated ICQ addon system... So come one come all and click on the link above...'" - $s8 = " =BITCHIN THREADS= General Configuration" - condition: - all of them -} -rule cgis4_cgis4 { - meta: - description = "Auto-generated rule on file cgis4.exe" - author = "Yara Bulk Rule Generator by Florian Roth" - hash = "d658dad1cd759d7f7d67da010e47ca23" - strings: - $s0 = ")PuMB_syJ" - $s1 = "&,fARW>yR" - $s2 = "m3hm3t_rullaz" - $s3 = "7Projectc1" - $s4 = "Ten-GGl\"" - $s5 = "/Moziqlxa" - condition: - all of them -} -rule _Bitchin_Threads__2 { - meta: - description = "Auto-generated rule on file =Bitchin Threads=.exe" - author = "Yara Bulk Rule Generator by Florian Roth" - hash = "7491b138c1ee5a0d9d141fbfd1f0071b" - strings: - $s0 = ". : EXTRA INFORMATION : . (UPDATES)" - $s1 = "=BITCHIN THREADS= .: Version 3.1 :. DarKPaiN" - $s2 = "Progenic Warfare and DarKPaiN cannot accept any responsibility for damage or loss of data to yours or anyone else's computer, through the direct or indirect use of this program. If you disagree with this statement please do not use this program again. Progenic Warfare hearby take NO responsibility for the uses and/or misuses of this program." - $s3 = "This program is simple to use, first setup the ports to scan for, in 'Port settings...', by checking the relevant one. Then place the start IP address and the ending IP address in the boxes, and let it rip... It will alert you when it finds an address, with the port open..." - $s4 = "Tikigod, YoriK, MaRviN, SpanX, TinZ, DeathBlade.. and anyone else who would like to be thanked..." - $s5 = "Newer versions of this program are sure to come out... (If I get some feedback..). Any criticism is fine, even if you want me to use different colours, if you have any interesting ports, or trojans you would like added please contact me, DarKPaiN 'Son 'o' Jerel'.. as stated in the About section." - $s6 = " =BITCHIN THREADS= Port Configuration" - $s7 = "'Come to Progenic Warfare, we have many programs fit for a 'hacker' king, we have the one... the only... PUSH! - ICQ chat kicker, TeSla - the much talked about and highley rated ICQ addon system... So come one come all and click on the link above...'" - $s8 = " =BITCHIN THREADS= General Configuration" - condition: - all of them -} -rule SuperScan4_2 { - meta: - description = "Auto-generated rule on file SuperScan4.exe" - author = "Yara Bulk Rule Generator by Florian Roth" - hash = "78f76428ede30e555044b83c47bc86f0" - strings: - $s0 = "-./0123456789:;<=>?@ABCDEFGHIJKL" - $s1 = "`abcdefghijklmnopqrstuvwxyz{|}~" - $s2 = " td class=\"summO1\">" - $s3 = "MNOPQRSTWXYZ[\\]^_" - $s4 = "ageBoxcu B8`" - $s5 = "WedThuFriSatLJanFebMarAprMayJ" - $s6 = "REM'EBAqRISE" - $s7 = "CorExitProcess'msc#e" - $s8 = "lAugSepOctNovDec" - $s9 = "rAtime ersrH" - condition: - all of them -} -rule ITrace32 { - meta: - description = "Auto-generated rule on file ITrace32.exe" - author = "Yara Bulk Rule Generator by Florian Roth" - hash = "b5e51291ec9e61cb2a4ff5c96d4caf32" - strings: - $s0 = "socket marked as non-blocking and SO_LINGER set not 0" - $s1 = "round-trip (ms) min/avg/max = %ld/%ld/%ld" - $s2 = "socket type not supported for address family" - $s3 = "%d packets transmitted, %d packets received, %d%% packet loss" - $s4 = "%d bytes from %s: icmp_seq=%d time=%ld ms" - $s5 = "%d packets transmitted, %d packets received, 100%% packet loss" - $s6 = "Non-authoritive: host not found or server failure" - $s7 = "%d bytes %s %s: icmp_type=%d (%s) icmp_code=%d" - $s8 = "ws_ping - copyright (c) 1995 Ipswitch, Inc. 01234567890123" - $s9 = "Non-recoverable: refused or not implemented" - condition: - all of them -} -rule portscan { - meta: - description = "Auto-generated rule on file portscan.exe" - author = "Yara Bulk Rule Generator by Florian Roth" - hash = "a8bfdb2a925e89a281956b1e3bb32348" - strings: - $s0 = "0 :UNABLE TO RESOLVE HOSTNAME." - $s1 = "0 :MAX PORTS. Socket not opened." - $s2 = "C:\\SPHERE\\DOCS\\SCANLOG.TXT" - $s3 = "0 :SCANNING HOST:" - $s4 = "0 :RESET - ALL SOCKETS CLOSED" - $s5 = "0 :SCAN BEGUN ON PORT:" - $s6 = "0 :PORTSCAN READY." - $s7 = "0 :SCAN HALTED ON PORT:" - $s8 = "-----RESULTS OF SCAN FOLLOW-----" - condition: - all of them -} -rule SuperScan4_3 { - meta: - description = "Auto-generated rule on file SuperScan4.exe" - author = "Yara Bulk Rule Generator by Florian Roth" - hash = "78f76428ede30e555044b83c47bc86f0" - strings: - $s0 = "-./0123456789:;<=>?@ABCDEFGHIJKL" - $s1 = "`abcdefghijklmnopqrstuvwxyz{|}~" - $s2 = " td class=\"summO1\">" - $s3 = "MNOPQRSTWXYZ[\\]^_" - $s4 = "ageBoxcu B8`" - $s5 = "WedThuFriSatLJanFebMarAprMayJ" - $s6 = "REM'EBAqRISE" - $s7 = "CorExitProcess'msc#e" - $s8 = "lAugSepOctNovDec" - $s9 = "rAtime ersrH" - condition: - all of them -} -rule ProPort_zip_Folder_ProPort { - meta: - description = "Auto-generated rule on file ProPort.exe" - author = "Yara Bulk Rule Generator by Florian Roth" - hash = "c1937a86939d4d12d10fc44b7ab9ab27" - strings: - $s0 = "Corrupt Data!" - $s1 = "K4p~omkIz" - $s2 = "DllTrojanScan" - $s3 = "GetDllInfo" - $s4 = "Compressed by Petite (c)1999 Ian Luck." - $s5 = "GetFileCRC32" - $s6 = "GetTrojanNumber" - $s7 = "TFAKAbout" - condition: - all of them -} -rule awsps4_61_setup { - meta: - description = "Auto-generated rule on file setup.exe" - author = "Yara Bulk Rule Generator by Florian Roth" - hash = "c7efe48f2748e28e96af329b26471fc3" - strings: - $s0 = "Inno Setup Messages (2.0.8)" - $s1 = "zlib: Internal error. Code %d" - $s2 = "Messages file \"%s\" is missing. Please correct the problem or obtain a new copy of the program." - $s3 = "zlib: Compressed data is corrupted" - $s4 = "Runtime error at 00000000" - $s5 = "Inno Setup Setup Data (2.0.8)" - $s6 = " inflate 1.1.3 Copyright 1995-1998 Mark Adler " - $s7 = "The setup files are corrupted. Please obtain a new copy of the program." - condition: - all of them -} -rule StealthWasp_s_Basic_PortScanner_v1_2 { - meta: - description = "Auto-generated rule on file StealthWasp's Basic PortScanner v1.2.exe" - author = "Yara Bulk Rule Generator by Florian Roth" - hash = "7c0f2cab134534cd35964fe4c6a1ff00" - strings: - $s0 = "StealthWasp's Basic PortScanner v1.2" - $s1 = "Basic PortScanner" - $s2 = "C:\\Programfiler\\Microsoft Visual Studio\\VB98\\VB6.OLB" - $s3 = "StealthWasp's Basic PortScanner" - $s4 = "MS Sans Serif0" - $s5 = "MS Sans Serif'" - $s6 = "Now scanning port:" - $s7 = "C:\\WINDOWS\\System32\\Mswinsck.oca" - condition: - all of them -} -rule BluesPortScan { - meta: - description = "Auto-generated rule on file BluesPortScan.exe" - author = "Yara Bulk Rule Generator by Florian Roth" - hash = "6292f5fc737511f91af5e35643fc9eef" - strings: - $s0 = "This program was made by Volker Voss" - $s1 = "JiBOo~SSB" - $s2 = "The procedure entry point %s could not be located in the dynamic link library %s" - $s3 = "FDb[viql|" - $s4 = "The ordinal %u could not be located in the dynamic link library %s" - condition: - all of them -} -rule scanarator_iis { - meta: - description = "Auto-generated rule on file iis.exe" - author = "Yara Bulk Rule Generator by Florian Roth" - hash = "3a8fc02c62c8dd65e038cc03e5451b6e" - strings: - $s0 = "example: iis 10.10.10.10" - $s1 = "send error" - $s2 = "Error in connect command" - $s3 = "Error in socket command" - $s4 = "wsastartupo error" - $s5 = "Useage: iis [ip address of server]" - $s6 = "Enter DOS command (quit to quit): " - $s7 = "recv error" - $s8 = "Press any key" - $s9 = "GET /scripts/..%c0%af../winnt/system32/cmd.exe?/c+" - condition: - all of them -} -rule BluesPortScan_2 { - meta: - description = "Auto-generated rule on file BluesPortScan.exe" - author = "Yara Bulk Rule Generator by Florian Roth" - hash = "6292f5fc737511f91af5e35643fc9eef" - strings: - $s0 = "This program was made by Volker Voss" - $s1 = "JiBOo~SSB" - $s2 = "The procedure entry point %s could not be located in the dynamic link library %s" - $s3 = "FDb[viql|" - $s4 = "The ordinal %u could not be located in the dynamic link library %s" - condition: - all of them -} -rule NeoTraceProTrial325_2 { - meta: - description = "Auto-generated rule on file NeoTraceProTrial325.exe" - author = "Yara Bulk Rule Generator by Florian Roth" - hash = "18bd9b98b8987bdcb32b1a2f05149fe8" - strings: - $s0 = "\"Qimq\\d,+*%6<=-" - $s1 = "Could not initialize installation. " - $s2 = "Initializing Wise Installation Wizard..." - $s3 = "System DLLs corrupt or missing." - $s4 = "NeoTrace Pro 3.25 Trial Installation" - $s5 = "~qFnfjyniJZiuuZQyeE" - $s6 = "Demo installations only run on the computer they were created on." - $s7 = "_StubFileWrite@12" - condition: - all of them -} -rule stealth_Stealth { - meta: - description = "Auto-generated rule on file Stealth.exe" - author = "Yara Bulk Rule Generator by Florian Roth" - hash = "8ce3a386ce0eae10fc2ce0177bbc8ffa" - strings: - $s0 = "\" cellspacing=\"0\" cellpadding=\"2\" border=\"1\" bordercolor=\"white\">" - $s1 = "This tool may be used only by system administrators. I am not responsible for any damages, direct or indirect, caused by usage of this tool." - $s2 = "~~~~~~~~~~~^~~~_TUVWXYZ[\\]~~~|~~~ !\"#$%&'()*+,-./0123456789~~~~~~:;<=>?@ABCDEFGHIJKLMNOPQRS" - $s3 = "
" - $s4 = "Greetings to Andre Freitas, David Alexandre, Fabricio Leite, Marcelo Caffaro and Paulo Lopes." - $s5 = "
" - $s6 = "NThis tool may be used only by system administrators. I am not responsible for " - $s7 = " Freitas, David Alexandre, Fabricio Leite, Marcelo Caffaro e Paulo Lopes." - $s8 = "o me responsabilizo por danos, diretos ou indiretos, causados pelo uso desta ferramenta." - $s9 = "MGreetings to Andre Freitas, David Alexandre, Fabricio Leite, Marcelo Caffaro " - condition: - all of them -} -rule BluesPortScan_3 { - meta: - description = "Auto-generated rule on file BluesPortScan.exe" - author = "Yara Bulk Rule Generator by Florian Roth" - hash = "a0026e03b498153d9dbfdd73a5ac748e" - strings: - $s0 = "V+nR95*Rat" - $s1 = "This program was made by Volker Voss" - $s2 = "q81bxuC&?8" - $s3 = "mxEh\"O,U" - $s4 = "The procedure entry point %s could not be located in the dynamic link library %s" - $s5 = "7iicaN(>(L" - $s6 = "The ordinal %u could not be located in the dynamic link library %s" - condition: - all of them -} -rule DomainScanV1_0_2 { - meta: - description = "Auto-generated rule on file DomainScanV1_0.exe" - author = "Yara Bulk Rule Generator by Florian Roth" - hash = "aefcd73b802e1c2bdc9b2ef206a4f24e" - strings: - $s0 = "dIJMuX$aO-EV" - $s1 = "XELUxP\"-\\" - $s2 = "KaR\"U'}-M,." - $s3 = "V.)\\ZDxpLSav" - $s4 = "Decompress error" - $s5 = "Can't load library" - $s6 = "Can't load function" - $s7 = "com0tl32:.d" - condition: - all of them -} -rule superscan_2 { - meta: - description = "Auto-generated rule on file superscan.exe" - author = "Yara Bulk Rule Generator by Florian Roth" - hash = "0071813eb4668769a15fcd2d1ca1686d" - strings: - $s0 = "vkp;_*3RtiSb;sYH" - $s1 = "\\ws2check.exe" - $s2 = "$Id: UPX 1.00 Copyright (C) 1996-2000 the UPX Team. All Rights Reserved. $" - $s3 = "- Kablto iniVal" - $s4 = "$Info: This file is packed with the UPX executable packer http://upx.tsx.org $" - $s5 = "sProcessorFeaturePsent1j{ " - condition: - all of them -} -rule Angry_IP_Scanner_v2_08_ipscan { - meta: - description = "Auto-generated rule on file ipscan.exe" - author = "Yara Bulk Rule Generator by Florian Roth" - hash = "70cf2c09776a29c3e837cb79d291514a" - strings: - $s0 = "_H/EnumDisplay/" - $s1 = "Wad^wkkAjukA\"" - $s2 = "AfxOldhProc423" - $s3 = "ar%&MDIFrame\"" - $s4 = "EOhl'CDialogK" - $s5 = "uECTED.MSVCRT0x" - $s6 = " VisTC++ R9Li" - $s7 = "akoverwriPh" - $s8 = "NotSupported7" - condition: - all of them -} -rule crack_Loader { - meta: - description = "Auto-generated rule on file Loader.exe" - author = "Yara Bulk Rule Generator by Florian Roth" - hash = "f4f79358a6c600c1f0ba1f7e4879a16d" - strings: - $s0 = "NeoWait.exe" - $s1 = "RRRRRRRW" - condition: - all of them -} -rule TrojanHunter15_zip_Folder_th { - meta: - description = "Auto-generated rule on file th.exe" - author = "Yara Bulk Rule Generator by Florian Roth" - hash = "6e6c8bf8b294b4c19e8e3fcaa4373037" - strings: - $s0 = "TAlignmseNt" - $s1 = "kern`l32.d" - $s2 = "Can't load library " - $s3 = "5t1tEt:ten6" - $s4 = "Decompress error " - $s5 = "TrykorA- f" - $s6 = "Can't load function " - $s7 = "SI_CHwRrETm" - condition: - all of them -} diff --git a/screens/output-rule-0.14.1.png b/screens/output-rule-0.14.1.png new file mode 100644 index 0000000..8eb9d43 Binary files /dev/null and b/screens/output-rule-0.14.1.png differ diff --git a/screens/yargen-running.png b/screens/yargen-running.png new file mode 100644 index 0000000..230b20f Binary files /dev/null and b/screens/yargen-running.png differ diff --git a/tools/byte-mapper.py b/tools/byte-mapper.py new file mode 100644 index 0000000..61602c7 --- /dev/null +++ b/tools/byte-mapper.py @@ -0,0 +1,169 @@ +#!/usr/bin/env python +# -*- coding: iso-8859-1 -*- +# -*- coding: utf-8 -*- +# +# Byte Mapper +# Binary Signature Generator +# +# Florian Roth +# June 2014 +# v0.1a + +import os +import sys +import argparse +import re +import traceback +from colorama import Fore, Back, Style +from colorama import init +from hashlib import md5 + +def getFiles(dir, recursive): + # Recursive + if recursive: + for root, directories, files in os.walk (dir, followlinks=False): + for filename in files: + filePath = os.path.join(root,filename) + yield filePath + # Non recursive + else: + for filename in os.listdir(dir): + filePath = os.path.join(dir,filename) + yield filePath + +def parseDir(dir, recursive, numBytes): + + # Prepare dictionary + byte_stats = {} + + fileCount = 0 + for filePath in getFiles(dir, recursive): + + if os.path.isdir(filePath): + if recursive: + parseDir(dir, recursive, numBytes) + continue + + with open(filePath, 'r') as file: + fileCount += 1 + header = file.read(int(numBytes)) + + pos = 0 + for byte in header: + pos += 1 + if pos in byte_stats: + if byte in byte_stats[pos]: + byte_stats[pos][byte] += 1 + else: + byte_stats[pos][byte] = 1 + else: + #byte_stats.append(pos) + byte_stats[pos] = { byte: 1 } + + return byte_stats, fileCount + +def visiualizeStats(byteStats, fileCount, heatMapMode, byteFiller, bytesPerLine): + # Settings + # print fileCount + + bytesPrinted = 0 + for byteStat in byteStats: + + if args.d: + print "------------------------" + print byteStats[byteStat] + + byteToPrint = ".." + countOfByte = 0 + highestValue = 0 + + # Evaluate the most often occured byte value at this position + for ( key, val ) in byteStats[byteStat].iteritems(): + if val > highestValue: + highestValue = val + byteToPrint = key + countOfByte = val + + # Heat Map Mode + if heatMapMode: + printHeatMapValue(byteToPrint, countOfByte, fileCount, byteFiller) + + # Standard Mode + else: + if countOfByte >= fileCount: + sys.stdout.write("%s%s" % ( byteToPrint.encode('hex'), byteFiller )) + else: + sys.stdout.write("..%s" % byteFiller) + + # Line break + bytesPrinted += 1 + if bytesPrinted >= bytesPerLine: + sys.stdout.write("\n") + bytesPrinted = 0 + + # Print Heat Map Legend + printHeatLegend(int(fileCount)) + +def printHeatMapValue(byteToPrint, countOfByte, fileCount, byteFiller): + if args.d: + print "Count of byte: %s" % countOfByte + print "File Count: %s" % fileCount + if countOfByte == fileCount: + sys.stdout.write(Fore.GREEN + '%s' % byteToPrint.encode('hex') + Fore.WHITE + '%s' % byteFiller) + elif countOfByte == fileCount - 1: + sys.stdout.write(Fore.CYAN + '%s' % byteToPrint.encode('hex') + Fore.WHITE + '%s' % byteFiller) + elif countOfByte == fileCount - 2: + sys.stdout.write(Fore.YELLOW + '%s' % byteToPrint.encode('hex') + Fore.WHITE + '%s' % byteFiller) + elif countOfByte == fileCount - 3: + sys.stdout.write(Fore.RED + '%s' % byteToPrint.encode('hex') + Fore.WHITE + '%s' % byteFiller) + elif countOfByte == fileCount - 4: + sys.stdout.write(Fore.MAGENTA + '%s' % byteToPrint.encode('hex') + Fore.WHITE + '%s' % byteFiller) + elif countOfByte == fileCount - 5: + sys.stdout.write(Fore.WHITE + '%s' % byteToPrint.encode('hex') + Fore.WHITE + '%s' % byteFiller) + else: + sys.stdout.write(Fore.WHITE + Style.DIM + '..' + Fore.WHITE + Style.RESET_ALL + '%s' % byteFiller) + +def printHeatLegend(fileCount): + print "" + print Fore.GREEN + 'GREEN\tContent of all %s files' % str(fileCount) + Fore.WHITE + if fileCount > 1: + print Fore.CYAN + 'CYAN\tContent of %s files' % str(fileCount-1) + Fore.WHITE + if fileCount > 2: + print Fore.YELLOW + 'YELLOW\tContent of %s files' % str(fileCount-2) + Fore.WHITE + if fileCount > 3: + print Fore.RED + 'RED\tContent of %s files' % str(fileCount-3) + Fore.WHITE + if fileCount > 4: + print Fore.MAGENTA + 'MAGENTA\tContent of %s files' % str(fileCount-4) + Fore.WHITE + if fileCount > 5: + print Fore.WHITE + 'WHITE\tContent of %s files' % str(fileCount-5) + Fore.WHITE + if fileCount > 6: + print Fore.WHITE + Style.DIM +'..\tNo identical bytes in more than %s files' % str(fileCount-6) + Fore.WHITE + Style.RESET_ALL + +# MAIN ################################################################ +if __name__ == '__main__': + + # Parse Arguments + parser = argparse.ArgumentParser(description='Yara BSG') + parser.add_argument('-p', metavar="malware-dir", help='Path to scan for malware') + parser.add_argument('-r', action='store_true', default=False, help='Be recursive') + parser.add_argument('-m', action='store_true', default=False, help='Heat map on byte values') + parser.add_argument('-f', default=" ", metavar="byte-filler", help='character to fill the gap between the bytes (default: \' \')') + parser.add_argument('-c', default=None, metavar="num-occurances", help='Print only bytes that occur in at least X of the samples (default: all files; incompatible with heat map mode) ') + parser.add_argument('-b', default=1024, metavar="bytes", help='Number of bytes to print (default: 1024)') + parser.add_argument('-l', default=16, metavar="bytes-per-line", help='Number of bytes to print per line (default: 16)') + parser.add_argument('-d', action='store_true', default=False, help='Debug Info') + + args = parser.parse_args() + + # Colorization + init() + + # Parse the Files + ( byteStats, fileCount) = parseDir(args.p, args.r, args.b) + + # print byteStats + if args.c != None and not args.m: + fileCount = int(args.c) + + # Vizualize Byte Stats + visiualizeStats(byteStats, fileCount, args.m, args.f, args.l) \ No newline at end of file diff --git a/yarGen.py b/yarGen.py new file mode 100644 index 0000000..585a8b6 --- /dev/null +++ b/yarGen.py @@ -0,0 +1,2435 @@ +#!/usr/bin/env python +# -*- coding: iso-8859-1 -*- +# -*- coding: utf-8 -*- +# +# yarGen +# A Rule Generator for YARA Rules +# +# Florian Roth + +import os +import sys +import argparse +import re +import traceback +import operator +import datetime +import time +import scandir +import pefile +import pickle +import gzip +import urllib +from collections import Counter +from hashlib import sha256 +from naiveBayesClassifier import tokenizer +from naiveBayesClassifier.trainer import Trainer +from naiveBayesClassifier.classifier import Classifier +import signal as signal_module + +try: + from lxml import etree + + lxml_available = True +except Exception as e: + print("[E] lxml not found - disabling PeStudio string check functionality") + lxml_available = False + +RELEVANT_EXTENSIONS = [".asp", ".vbs", ".ps", ".ps1", ".tmp", ".bas", ".bat", ".cmd", ".com", ".cpl", + ".crt", ".dll", ".exe", ".msc", ".scr", ".sys", ".vb", ".vbe", ".vbs", ".wsc", + ".wsf", ".wsh", ".input", ".war", ".jsp", ".php", ".asp", ".aspx", ".psd1", ".psm1", ".py"] + +REPO_URLS = { + 'good-opcodes-part1.db': 'https://www.bsk-consulting.de/yargen/good-opcodes-part1.db', + 'good-opcodes-part2.db': 'https://www.bsk-consulting.de/yargen/good-opcodes-part2.db', + 'good-opcodes-part3.db': 'https://www.bsk-consulting.de/yargen/good-opcodes-part3.db', + 'good-opcodes-part4.db': 'https://www.bsk-consulting.de/yargen/good-opcodes-part4.db', + 'good-opcodes-part5.db': 'https://www.bsk-consulting.de/yargen/good-opcodes-part5.db', + 'good-opcodes-part6.db': 'https://www.bsk-consulting.de/yargen/good-opcodes-part6.db', + 'good-opcodes-part7.db': 'https://www.bsk-consulting.de/yargen/good-opcodes-part7.db', + 'good-opcodes-part8.db': 'https://www.bsk-consulting.de/yargen/good-opcodes-part8.db', + 'good-opcodes-part9.db': 'https://www.bsk-consulting.de/yargen/good-opcodes-part9.db', + + 'good-strings-part1.db': 'https://www.bsk-consulting.de/yargen/good-strings-part1.db', + 'good-strings-part2.db': 'https://www.bsk-consulting.de/yargen/good-strings-part2.db', + 'good-strings-part3.db': 'https://www.bsk-consulting.de/yargen/good-strings-part3.db', + 'good-strings-part4.db': 'https://www.bsk-consulting.de/yargen/good-strings-part4.db', + 'good-strings-part5.db': 'https://www.bsk-consulting.de/yargen/good-strings-part5.db', + 'good-strings-part6.db': 'https://www.bsk-consulting.de/yargen/good-strings-part6.db', + 'good-strings-part7.db': 'https://www.bsk-consulting.de/yargen/good-strings-part7.db', + 'good-strings-part8.db': 'https://www.bsk-consulting.de/yargen/good-strings-part8.db', + 'good-strings-part9.db': 'https://www.bsk-consulting.de/yargen/good-strings-part9.db', + + 'good-exports-part1.db': 'https://www.bsk-consulting.de/yargen/good-exports-part1.db', + 'good-exports-part2.db': 'https://www.bsk-consulting.de/yargen/good-exports-part2.db', + 'good-exports-part3.db': 'https://www.bsk-consulting.de/yargen/good-exports-part3.db', + 'good-exports-part4.db': 'https://www.bsk-consulting.de/yargen/good-exports-part4.db', + 'good-exports-part5.db': 'https://www.bsk-consulting.de/yargen/good-exports-part5.db', + 'good-exports-part6.db': 'https://www.bsk-consulting.de/yargen/good-exports-part6.db', + 'good-exports-part7.db': 'https://www.bsk-consulting.de/yargen/good-exports-part7.db', + 'good-exports-part8.db': 'https://www.bsk-consulting.de/yargen/good-exports-part8.db', + 'good-exports-part9.db': 'https://www.bsk-consulting.de/yargen/good-exports-part9.db', + + 'good-imphashes-part1.db': 'https://www.bsk-consulting.de/yargen/good-imphashes-part1.db', + 'good-imphashes-part2.db': 'https://www.bsk-consulting.de/yargen/good-imphashes-part2.db', + 'good-imphashes-part3.db': 'https://www.bsk-consulting.de/yargen/good-imphashes-part3.db', + 'good-imphashes-part4.db': 'https://www.bsk-consulting.de/yargen/good-imphashes-part4.db', + 'good-imphashes-part5.db': 'https://www.bsk-consulting.de/yargen/good-imphashes-part5.db', + 'good-imphashes-part6.db': 'https://www.bsk-consulting.de/yargen/good-imphashes-part6.db', + 'good-imphashes-part7.db': 'https://www.bsk-consulting.de/yargen/good-imphashes-part7.db', + 'good-imphashes-part8.db': 'https://www.bsk-consulting.de/yargen/good-imphashes-part8.db', + 'good-imphashes-part9.db': 'https://www.bsk-consulting.de/yargen/good-imphashes-part9.db', +} + +PE_STRINGS_FILE = "./3rdparty/strings.xml" + +KNOWN_IMPHASHES = {'a04dd9f5ee88d7774203e0a0cfa1b941': 'PsExec', + '2b8c9d9ab6fefc247adaf927e83dcea6': 'RAR SFX variant'} + + +def get_abs_path(filename): + return os.path.join(os.path.dirname(os.path.abspath(__file__)), filename) + + +def get_files(dir, notRecursive): + # Not Recursive + if notRecursive: + for filename in os.listdir(dir): + filePath = os.path.join(dir, filename) + if os.path.isdir(filePath): + continue + yield filePath + # Recursive + else: + for root, directories, files in scandir.walk(dir, followlinks=False): + for filename in files: + filePath = os.path.join(root, filename) + yield filePath + + +def parse_sample_dir(dir, notRecursive=False, generateInfo=False, onlyRelevantExtensions=False): + # Prepare dictionary + string_stats = {} + opcode_stats = {} + file_info = {} + known_sha1sums = [] + + for filePath in get_files(dir, notRecursive): + try: + print("[+] Processing %s ..." % filePath) + + # Get Extension + extension = os.path.splitext(filePath)[1].lower() + if not extension in RELEVANT_EXTENSIONS and onlyRelevantExtensions: + if args.debug: + print("[-] EXTENSION %s - Skipping file %s" % (extension, filePath)) + continue + + # Info file check + if os.path.basename(filePath) == os.path.basename(args.b) or \ + os.path.basename(filePath) == os.path.basename(args.r): + continue + + # Size Check + size = 0 + try: + size = os.stat(filePath).st_size + if size > (args.fs * 1024 * 1024): + if args.debug: + print("[-] File is to big - Skipping file %s (use -fs to adjust this behaviour)" % (filePath)) + continue + except Exception as e: + pass + + # Check and read file + try: + with open(filePath, 'rb') as f: + fileData = f.read() + except Exception as e: + print("[-] Cannot read file - skipping %s" % filePath) + + # Extract strings from file + strings = extract_strings(fileData) + + # Extract opcodes from file + opcodes = [] + if use_opcodes: + print("[-] Extracting OpCodes: %s" % filePath) + opcodes = extract_opcodes(fileData) + + # Add sha256 value + if generateInfo: + sha256sum = sha256(fileData).hexdigest() + file_info[filePath] = {} + file_info[filePath]["hash"] = sha256sum + file_info[filePath]["imphash"], file_info[filePath]["exports"] = get_pe_info(fileData) + + # Skip if hash already known - avoid duplicate files + if sha256sum in known_sha1sums: + # if args.debug: + print("[-] Skipping strings/opcodes from %s due to MD5 duplicate detection" % filePath) + continue + else: + known_sha1sums.append(sha256sum) + + # Magic evaluation + if not args.nomagic: + file_info[filePath]["magic"] = fileData[:2] + else: + file_info[filePath]["magic"] = "" + + # File Size + file_info[filePath]["size"] = os.stat(filePath).st_size + + # Add stats for basename (needed for inverse rule generation) + fileName = os.path.basename(filePath) + folderName = os.path.basename(os.path.dirname(filePath)) + if fileName not in file_info: + file_info[fileName] = {} + file_info[fileName]["count"] = 0 + file_info[fileName]["hashes"] = [] + file_info[fileName]["folder_names"] = [] + file_info[fileName]["count"] += 1 + file_info[fileName]["hashes"].append(sha256sum) + if folderName not in file_info[fileName]["folder_names"]: + file_info[fileName]["folder_names"].append(folderName) + + # Add strings to statistics + for string in strings: + # String is not already known + if string not in string_stats: + string_stats[string] = {} + string_stats[string]["count"] = 0 + string_stats[string]["files"] = [] + string_stats[string]["files_basename"] = {} + # String count + string_stats[string]["count"] += 1 + # Add file information + if fileName not in string_stats[string]["files_basename"]: + string_stats[string]["files_basename"][fileName] = 0 + string_stats[string]["files_basename"][fileName] += 1 + string_stats[string]["files"].append(filePath) + + # Add opcods to statistics + for opcode in opcodes: + # String is not already known + if opcode not in opcode_stats: + opcode_stats[opcode] = {} + opcode_stats[opcode]["count"] = 0 + opcode_stats[opcode]["files"] = [] + opcode_stats[opcode]["files_basename"] = {} + # opcode count + opcode_stats[opcode]["count"] += 1 + # Add file information + if fileName not in opcode_stats[opcode]["files_basename"]: + opcode_stats[opcode]["files_basename"][fileName] = 0 + opcode_stats[opcode]["files_basename"][fileName] += 1 + opcode_stats[opcode]["files"].append(filePath) + + if args.debug: + print("[+] Processed " + filePath + " Size: " + str(size) + " Strings: " + str(len(string_stats)) + \ + " OpCodes: " + str(len(opcode_stats)) + " ... ") + + except Exception as e: + traceback.print_exc() + print("[E] ERROR reading file: %s" % filePath) + + return string_stats, opcode_stats, file_info + + +def parse_good_dir(dir, notRecursive=False, onlyRelevantExtensions=True): + # Prepare dictionary + all_strings = Counter() + all_opcodes = Counter() + all_imphashes = Counter() + all_exports = Counter() + + for filePath in get_files(dir, notRecursive): + # Get Extension + extension = os.path.splitext(filePath)[1].lower() + if extension not in RELEVANT_EXTENSIONS and onlyRelevantExtensions: + if args.debug: + print("[-] EXTENSION %s - Skipping file %s" % (extension, filePath)) + continue + + # Size Check + size = 0 + try: + size = os.stat(filePath).st_size + if size > (args.fs * 1024 * 1024): + continue + except Exception as e: + pass + + # Check and read file + try: + with open(filePath, 'rb') as f: + fileData = f.read() + except Exception as e: + print("[-] Cannot read file - skipping %s" % filePath) + + # Extract strings from file + strings = extract_strings(fileData) + # Append to all strings + all_strings.update(strings) + + # Extract Opcodes from file + opcodes = [] + if use_opcodes: + print("[-] Extracting OpCodes: %s" % filePath) + opcodes = extract_opcodes(fileData) + # Append to all opcodes + all_opcodes.update(opcodes) + + # Imphash and Exports + (imphash, exports) = get_pe_info(fileData) + all_exports.update(exports) + all_imphashes.update([imphash]) + + if args.debug: + print("[+] Processed %s - %d strings %d opcodes %d exports and imphash %s" % (filePath, len(strings), + len(opcodes), len(exports), + imphash)) + + # return it as a set (unique strings) + return all_strings, all_opcodes, all_imphashes, all_exports + + +def extract_strings(fileData): + # String list + cleaned_strings = [] + # Read file data + try: + # Read strings + strings_full = re.findall("[\x1f-\x7e]{6,}", fileData) + strings_limited = re.findall("[\x1f-\x7e]{6,%d}" % args.s, fileData) + strings_hex = extract_hex_strings(fileData) + strings = list(set(strings_full) | set(strings_limited) | set(strings_hex)) + strings += [str("UTF16LE:%s" % ws.decode("utf-16le")) for ws in re.findall("(?:[\x1f-\x7e][\x00]){6,}", fileData)] + + # Escape strings + for string in strings: + # Check if last bytes have been string and not yet saved to list + if len(string) > 0: + string = string.replace('\\', '\\\\') + string = string.replace('"', '\\"') + if string not in cleaned_strings: + cleaned_strings.append(string.lstrip(" ")) + + except Exception as e: + if args.debug: + traceback.print_exc() + pass + + return cleaned_strings + + +def extract_opcodes(fileData): + # String list + opcodes = [] + + # Read file data + try: + pe = pefile.PE(data=fileData) + name = "" + ep = pe.OPTIONAL_HEADER.AddressOfEntryPoint + pos = 0 + for sec in pe.sections: + if (ep >= sec.VirtualAddress) and \ + (ep < (sec.VirtualAddress + sec.Misc_VirtualSize)): + name = sec.Name.replace('\x00', '') + break + else: + pos += 1 + + for section in pe.sections: + if section.Name.rstrip("\x00") == name: + text = section.get_data() + # Split text into subs + text_parts = re.split("[\x00]{3,}", text) + # Now truncate and encode opcodes + for text_part in text_parts: + if text_part == '' or len(text_part) < 8: + continue + opcodes.append(text_part[:16].encode('hex')) + + except Exception as e: + #if args.debug: + # traceback.print_exc() + pass + + return opcodes + + +def get_pe_info(fileData): + """ + Get different PE attributes and hashes + :param fileData: + :return: + """ + imphash = "" + exports = [] + # Check for MZ header (speed improvement) + if fileData[:2] != "MZ": + return imphash, exports + try: + if args.debug: + print("Extracting PE information") + p = pefile.PE(data=fileData) + # Imphash + imphash = p.get_imphash() + # Exports (names) + for exp in p.DIRECTORY_ENTRY_EXPORT.symbols: + exports.append(exp.name) + except Exception as e: + #if args.debug: + # traceback.print_exc() + pass + return imphash, exports + + +def sample_string_evaluation(string_stats, opcode_stats, file_info): + # Generate Stats ----------------------------------------------------------- + print("[+] Generating statistical data ...") + file_strings = {} + file_opcodes = {} + combinations = {} + inverse_stats = {} + max_combi_count = 0 + super_rules = [] + + # OPCODE EVALUATION -------------------------------------------------------- + for opcode in opcode_stats: + # If string occurs not too often in sample files + if opcode_stats[opcode]["count"] < 10: + # If string list in file dictionary not yet exists + for filePath in opcode_stats[opcode]["files"]: + if filePath in file_opcodes: + # Append string + file_opcodes[filePath].append(opcode) + else: + # Create list and than add the first string to the file + file_opcodes[filePath] = [] + file_opcodes[filePath].append(opcode) + + # STRING EVALUATION ------------------------------------------------------- + + # Iterate through strings found in malware files + for string in string_stats: + + # If string occurs not too often in (goodware) sample files + if string_stats[string]["count"] < 10: + # If string list in file dictionary not yet exists + for filePath in string_stats[string]["files"]: + if filePath in file_strings: + # Append string + file_strings[filePath].append(string) + else: + # Create list and than add the first string to the file + file_strings[filePath] = [] + file_strings[filePath].append(string) + + # INVERSE RULE GENERATION ------------------------------------- + if args.inverse: + for fileName in string_stats[string]["files_basename"]: + string_occurrance_count = string_stats[string]["files_basename"][fileName] + total_count_basename = file_info[fileName]["count"] + # print "string_occurance_count %s - total_count_basename %s" % ( string_occurance_count, + # total_count_basename ) + if string_occurrance_count == total_count_basename: + if fileName not in inverse_stats: + inverse_stats[fileName] = [] + if args.trace: + print("Appending %s to %s" % (string, fileName)) + inverse_stats[fileName].append(string) + + # SUPER RULE GENERATION ----------------------------------------------- + + if not nosuper and not args.inverse: + + # SUPER RULES GENERATOR - preliminary work + # If a string occurs more than once in different files + # print sample_string_stats[string]["count"] + if string_stats[string]["count"] > 1: + if args.debug: + print("OVERLAP Count: %s\nString: \"%s\"%s" % (string_stats[string]["count"], string, + "\nFILE: ".join(string_stats[string]["files"]))) + # Create a combination string from the file set that matches to that string + combi = ":".join(sorted(string_stats[string]["files"])) + # print "STRING: " + string + if args.debug: + print("COMBI: " + combi) + # If combination not yet known + if combi not in combinations: + combinations[combi] = {} + combinations[combi]["count"] = 1 + combinations[combi]["strings"] = [] + combinations[combi]["strings"].append(string) + combinations[combi]["files"] = string_stats[string]["files"] + else: + combinations[combi]["count"] += 1 + combinations[combi]["strings"].append(string) + # Set the maximum combination count + if combinations[combi]["count"] > max_combi_count: + max_combi_count = combinations[combi]["count"] + # print "Max Combi Count set to: %s" % max_combi_count + + print("[+] Generating Super Rules ... (a lot of foo magic)") + for combi_count in range(max_combi_count, 1, -1): + for combi in combinations: + if combi_count == combinations[combi]["count"]: + # print "Count %s - Combi %s" % ( str(combinations[combi]["count"]), combi ) + # Filter the string set + # print "BEFORE" + # print len(combinations[combi]["strings"]) + # print combinations[combi]["strings"] + string_set = combinations[combi]["strings"] + combinations[combi]["strings"] = [] + combinations[combi]["strings"] = filter_string_set(string_set) + # print combinations[combi]["strings"] + # print "AFTER" + # print len(combinations[combi]["strings"]) + # Combi String count after filtering + # print "String count after filtering: %s" % str(len(combinations[combi]["strings"])) + + # If the string set of the combination has a required size + if len(combinations[combi]["strings"]) >= int(args.rc): + # Remove the files in the combi rule from the simple set + if args.nosimple: + for file in combinations[combi]["files"]: + if file in file_strings: + del file_strings[file] + # Add it as a super rule + print("[-] Adding Super Rule with %s strings." % str(len(combinations[combi]["strings"]))) + # if args.debug: + # print "Rule Combi: %s" % combi + super_rules.append(combinations[combi]) + + # Return all data + return (file_strings, file_opcodes, combinations, super_rules, inverse_stats) + + +def filter_opcode_set(opcode_set): + # Preferred Opcodes + pref_opcodes = [' 34 ', 'ff ff ff '] + + # Useful set + useful_set = [] + pref_set = [] + + for opcode in opcode_set: + if opcode in good_opcodes_db: + continue + + # Format the opcode + formatted_opcode = get_opcode_string(opcode) + + # Preferred opcodes + set_in_pref = False + for pref in pref_opcodes: + if pref in formatted_opcode: + pref_set.append(formatted_opcode) + set_in_pref = True + if set_in_pref: + continue + + # Else add to useful set + useful_set.append(get_opcode_string(opcode)) + + # Preferred opcodes first + useful_set = pref_set + useful_set + + # Only return the number of opcodes defined with the "-n" parameter + return useful_set[:int(args.n)] + + +def filter_string_set(string_set): + # This is the only set we have - even if it's a weak one + useful_set = [] + + # Bayes Classificator (new method) + stringClassifier = Classifier(stringTrainer.data, tokenizer) + + # Local string scores + localStringScores = {} + + # Local UTF strings + utfstrings = [] + + for string in string_set: + + # Goodware string marker + goodstring = False + goodcount = 0 + + # Goodware Strings + if string in good_strings_db: + goodstring = True + goodcount = good_strings_db[string] + # print "%s - %s" % ( goodstring, good_strings[string] ) + if args.excludegood: + continue + + # UTF + original_string = string + if string[:8] == "UTF16LE:": + # print "removed UTF16LE from %s" % string + string = string[8:] + utfstrings.append(string) + + # Good string evaluation (after the UTF modification) + if goodstring: + # Reduce the score by the number of occurence in goodware files + localStringScores[string] = (goodcount * -1) + 5 + else: + localStringScores[string] = 0 + + # PEStudio String Blacklist Evaluation + if pestudio_available: + (pescore, type) = get_pestudio_score(string) + # print("PE Match: %s" % string) + # Reset score of goodware files to 5 if blacklisted in PEStudio + if type != "": + pestudioMarker[string] = type + # Modify the PEStudio blacklisted strings with their goodware stats count + if goodstring: + pescore = pescore - (goodcount / 1000.0) + # print "%s - %s - %s" % (string, pescore, goodcount) + localStringScores[string] = pescore + + if not goodstring: + + # Bayes Classifier + classification = stringClassifier.classify(string) + if classification[0][1] == 0 and len(string) > 10: + # Try to split the string into words and then check again + modified_string = re.sub(r'[\\\/\-\.\_<>="\']', ' ', string).rstrip(" ").lstrip(" ") + # print "Checking instead: %s" % modified_string + classification = stringClassifier.classify(modified_string) + + #if args.debug: + # print "[D] Bayes Score: %s %s" % (str(classification), string) + localStringScores[string] += classification[0][1] + + # Length Score + length = len(string) + if length > int(args.y) and length < int(args.s): + localStringScores[string] += round(len(string) / 8, 2) + #if length >= int(args.s): + # localStringScores[string] += 1 + + # Reduction + if ".." in string: + localStringScores[string] -= 5 + if " " in string: + localStringScores[string] -= 5 + # Packer Strings + if re.search(r'(WinRAR\\SFX)', string): + localStringScores[string] -= 4 + # US ASCII char + if "\x1f" in string: + localStringScores[string] -= 4 + # Chains of 00s + if string.count('0000000000') > 2: + localStringScores[string] -= 5 + # Repeated characters + if re.search(r'(?!.* ([A-Fa-f0-9])\1{8,})', string): + localStringScores[string] -= 5 + + # Certain strings add-ons ---------------------------------------------- + # Extensions - Drive + if re.search(r'[A-Za-z]:\\', string, re.IGNORECASE): + localStringScores[string] += 2 + # Relevant file extensions + if re.search(r'(\.exe|\.pdb|\.scr|\.log|\.cfg|\.txt|\.dat|\.msi|\.com|\.bat|\.dll|\.pdb|\.vbs|' + r'\.tmp|\.sys|\.ps1|\.vbp|\.hta|\.lnk)', string, re.IGNORECASE): + localStringScores[string] += 4 + # System keywords + if re.search(r'(cmd.exe|system32|users|Documents and|SystemRoot|Grant|hello|password|process|log)', + string, re.IGNORECASE): + localStringScores[string] += 5 + # Protocol Keywords + if re.search(r'(ftp|irc|smtp|command|GET|POST|Agent|tor2web|HEAD)', string, re.IGNORECASE): + localStringScores[string] += 5 + # Connection keywords + if re.search(r'(error|http|closed|fail|version|proxy)', string, re.IGNORECASE): + localStringScores[string] += 3 + # Browser User Agents + if re.search(r'(Mozilla|MSIE|Windows NT|Macintosh|Gecko|Opera|User\-Agent)', string, re.IGNORECASE): + localStringScores[string] += 5 + # Temp and Recycler + if re.search(r'(TEMP|Temporary|Appdata|Recycler)', string, re.IGNORECASE): + localStringScores[string] += 4 + # Malicious keywords - hacktools + if re.search(r'(scan|sniff|poison|intercept|fake|spoof|sweep|dump|flood|inject|forward|scan|vulnerable|' + r'credentials|creds|coded|p0c|Content|host)', string, re.IGNORECASE): + localStringScores[string] += 5 + # Network keywords + if re.search(r'(address|port|listen|remote|local|process|service|mutex|pipe|frame|key|lookup|connection)', + string, re.IGNORECASE): + localStringScores[string] += 3 + # Drive + if re.search(r'([C-Zc-z]:\\)', string, re.IGNORECASE): + localStringScores[string] += 4 + # IP + if re.search( + r'\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b', + string, re.IGNORECASE): # IP Address + localStringScores[string] += 5 + # Copyright Owner + if re.search(r'(coded | c0d3d |cr3w\b|Coded by |codedby)', string, re.IGNORECASE): + localStringScores[string] += 7 + # Extension generic + if re.search(r'\.[a-zA-Z]{3}\b', string): + localStringScores[string] += 3 + # All upper case + if re.search(r'^[A-Z]{6,}$', string): + localStringScores[string] += 2.5 + # All lower case + if re.search(r'^[a-z]{6,}$', string): + localStringScores[string] += 2 + # All lower with space + if re.search(r'^[a-z\s]{6,}$', string): + localStringScores[string] += 2 + # All characters + if re.search(r'^[A-Z][a-z]{5,}$', string): + localStringScores[string] += 2 + # URL + if re.search(r'(%[a-z][:\-,;]|\\\\%s|\\\\[A-Z0-9a-z%]+\\[A-Z0-9a-z%]+)', string): + localStringScores[string] += 2.5 + # certificates + if re.search(r'(thawte|trustcenter|signing|class|crl|CA|certificate|assembly)', string, re.IGNORECASE): + localStringScores[string] -= 4 + # Parameters + if re.search(r'( \-[a-z]{,2}[\s]?[0-9]?| /[a-z]+[\s]?[\w]*)', string, re.IGNORECASE): + localStringScores[string] += 4 + # Directory + if re.search(r'([a-zA-Z]:|^|%)\\[A-Za-z]{4,30}\\', string): + localStringScores[string] += 4 + # Executable - not in directory + if re.search(r'^[^\\]+\.(exe|com|scr|bat|sys)$', string, re.IGNORECASE): + localStringScores[string] += 4 + # Date placeholders + if re.search(r'(yyyy|hh:mm|dd/mm|mm/dd|%s:%s:)', string, re.IGNORECASE): + localStringScores[string] += 3 + # Placeholders + if re.search(r'[^A-Za-z](%s|%d|%i|%02d|%04d|%2d|%3s)[^A-Za-z]', string, re.IGNORECASE): + localStringScores[string] += 3 + # String parts from file system elements + if re.search(r'(cmd|com|pipe|tmp|temp|recycle|bin|secret|private|AppData|driver|config)', string, + re.IGNORECASE): + localStringScores[string] += 3 + # Programming + if re.search(r'(execute|run|system|shell|root|cimv2|login|exec|stdin|read|process|netuse|script|share)', + string, re.IGNORECASE): + localStringScores[string] += 3 + # Credentials + if re.search(r'(user|pass|login|logon|token|cookie|creds|hash|ticket|NTLM|LMHASH|kerberos|spnego|session|' + r'identif|account|login|auth|privilege)', string, re.IGNORECASE): + localStringScores[string] += 3 + # Malware + if re.search(r'(\.[a-z]/[^/]+\.txt|)', string, re.IGNORECASE): + localStringScores[string] += 3 + # Variables + if re.search(r'%[A-Z_]+%', string, re.IGNORECASE): + localStringScores[string] += 4 + # RATs / Malware + if re.search(r'(spy|logger|dark|cryptor|RAT\b|eye|comet|evil|xtreme|poison|meterpreter|metasploit)', + string, re.IGNORECASE): + localStringScores[string] += 5 + # Missed user profiles + if re.search(r'[\\](users|profiles|username|benutzer|Documents and Settings|Utilisateurs|Utenti|' + r'Usuários)[\\]', string, re.IGNORECASE): + localStringScores[string] += 3 + # Strings: Words ending with numbers + if re.search(r'^[A-Z][a-z]+[0-9]+$', string, re.IGNORECASE): + localStringScores[string] += 1 + # Spying + if re.search(r'(implant)', string, re.IGNORECASE): + localStringScores[string] += 1 + # Program Path - not Programs or Windows + if re.search(r'^[Cc]:\\\\[^PW]', string): + localStringScores[string] += 3 + # Special strings + if re.search(r'(\\\\\.\\|kernel|.dll|usage|\\DosDevices\\)', string, re.IGNORECASE): + localStringScores[string] += 5 + # Parameters + if re.search(r'( \-[a-z] | /[a-z] | \-[a-z]:[a-zA-Z]| \/[a-z]:[a-zA-Z])', string): + localStringScores[string] += 4 + # File + if re.search(r'^[a-zA-Z0-9]{3,40}\.[a-zA-Z]{3}', string, re.IGNORECASE): + localStringScores[string] += 3 + # Comment Line / Output Log + if re.search(r'^([\*\#]+ |\[[\*\-\+]\] |[\-=]> |\[[A-Za-z]\] )', string): + localStringScores[string] += 4 + # Output typo / special expression + if re.search(r'(!\.$|!!!$| :\)$| ;\)$|fucked|[\w]\.\.\.\.$)', string): + localStringScores[string] += 4 + # Base64 + if re.search(r'^(?:[A-Za-z0-9+/]{4}){30,}(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$', string) and \ + re.search(r'[A-Za-z]', string) and re.search(r'[0-9]', string): + localStringScores[string] += 6 + # Base64 Executables + if re.search(r'(TVqQAAMAAAAEAAAA//8AALgAAAA|TVpQAAIAAAAEAA8A//8AALgAAAA|TVqAAAEAAAAEABAAAAAAAAAAAAA|' + r'TVoAAAAAAAAAAAAAAAAAAAAAAAA|TVpTAQEAAAAEAAAA//8AALgAAAA)', string): + localStringScores[string] += 5 + # Malicious intent + if re.search(r'(loader|cmdline|ntlmhash|lmhash|infect|encrypt|exec|elevat|dump|target|victim|override|' + r'traverse|mutex|pawnde|exploited|shellcode|injected|spoofed|dllinjec|exeinj|reflective|' + r'payload|inject|back conn)', + string, re.IGNORECASE): + localStringScores[string] += 5 + # Privileges + if re.search(r'(administrator|highest|system|debug|dbg|admin|adm|root) privilege', string, re.IGNORECASE): + localStringScores[string] += 4 + # System file/process names + if re.search(r'(LSASS|SAM|lsass.exe|cmd.exe|LSASRV.DLL)', string): + localStringScores[string] += 4 + # System file/process names + if re.search(r'(\.exe|\.dll|\.sys)$', string, re.IGNORECASE): + localStringScores[string] += 4 + # Indicators that string is valid + if re.search(r'(^\\\\)', string, re.IGNORECASE): + localStringScores[string] += 1 + # Compiler output directories + if re.search(r'(\\Release\\|\\Debug\\|\\bin|\\sbin)', string, re.IGNORECASE): + localStringScores[string] += 2 + # Special - Malware related strings + if re.search(r'(Management Support Team1|/c rundll32|DTOPTOOLZ Co.|net start|Exec|taskkill)', string): + localStringScores[string] += 4 + # Powershell + if re.search(r'(bypass|windowstyle | hidden |-command|IEX |Invoke-Expression|Net.Webclient|Invoke[A-Z]|' + r'Net.WebClient|-w hidden |-encoded' + r'-encodedcommand| -nop |MemoryLoadLibrary|FromBase64String|Download|EncodedCommand)', string, re.IGNORECASE): + localStringScores[string] += 4 + # WMI + if re.search(r'( /c WMIC)', string, re.IGNORECASE): + localStringScores[string] += 3 + # Windows Commands + if re.search(r'( net user | net group |ping |whoami |bitsadmin |rundll32.exe javascript:|' + r'schtasks.exe /create|/c start )', + string, re.IGNORECASE): + localStringScores[string] += 3 + # JavaScript + if re.search(r'(new ActiveXObject\("WScript.Shell"\).Run|.Run\("cmd.exe|.Run\("%comspec%\)|' + r'.Run\("c:\\Windows|.RegisterXLL\()', string, re.IGNORECASE): + localStringScores[string] += 3 + # Signing Certificates + if re.search(r'( Inc | Co.| Ltd.,| LLC| Limited)', string): + localStringScores[string] += 2 + # Privilege escalation + if re.search(r'(sysprep|cryptbase|secur32)', string, re.IGNORECASE): + localStringScores[string] += 2 + # Webshells + if re.search(r'(isset\($post\[|isset\($get\[|eval\(Request)', string, re.IGNORECASE): + localStringScores[string] += 2 + # Suspicious words 1 + if re.search(r'(impersonate|drop|upload|download|execute|shell|\bcmd\b|decode|rot13|decrypt)', string, + re.IGNORECASE): + localStringScores[string] += 2 + # Suspicious words 1 + if re.search(r'([+] |[-] |[*] |injecting|exploit|dumped|dumping|scanning|scanned|elevation|' + r'elevated|payload|vulnerable|payload|reverse connect|bind shell|reverse shell| dump | ' + r'back connect |privesc|privilege escalat|debug privilege| inject |interactive shell|' + r'shell commands| spawning |] target |] Transmi|] Connect|] connect|] Dump|] command |' + r'] token|] Token |] Firing | hashes | etc/passwd| SAM | NTML|unsupported target|' + r'race condition|Token system |LoaderConfig| add user |ile upload |ile download |' + r'Attaching to |ser has been successfully added|target system |LSA Secrets|DefaultPassword|' + r'Password: |loading dll|.Execute\(|Shellcode|Loader|inject x86|inject x64|bypass|katz|' + r'sploit|ms[0-9][0-9][^0-9]|\bCVE[^a-zA-Z]|privilege::|lsadump)', + string, re.IGNORECASE): + localStringScores[string] += 4 + # Mutex / Named Pipes + if re.search(r'(Mutex|NamedPipe|\\Global\\|\\pipe\\)', string, re.IGNORECASE): + localStringScores[string] += 3 + # Usage + if re.search(r'(isset\($post\[|isset\($get\[)', string, re.IGNORECASE): + localStringScores[string] += 2 + # Hash + if re.search(r'\b([a-f0-9]{32}|[a-f0-9]{40}|[a-f0-9]{64})\b', string, re.IGNORECASE): + localStringScores[string] += 2 + # Persistence + if re.search(r'(sc.exe |schtasks|at \\\\|at [0-9]{2}:[0-9]{2})', string, re.IGNORECASE): + localStringScores[string] += 3 + # Unix/Linux + if re.search(r'(;chmod |; chmod |sh -c|/dev/tcp/|/bin/telnet|selinux| shell| cp /bin/sh )', string, + re.IGNORECASE): + localStringScores[string] += 3 + # Attack + if re.search( + r'(attacker|brute force|bruteforce|connecting back|EXHAUSTIVE|exhaustion| spawn| evil| elevated)', + string, re.IGNORECASE): + localStringScores[string] += 3 + # Strings with less value + if re.search(r'(abcdefghijklmnopqsst|ABCDEFGHIJKLMNOPQRSTUVWXYZ|0123456789:;)', string, re.IGNORECASE): + localStringScores[string] -= 5 + # VB Backdoors + if re.search( + r'(kill|wscript|plugins|svr32|Select |)', + string, re.IGNORECASE): + localStringScores[string] += 3 + + # ENCODING DETECTIONS -------------------------------------------------- + try: + if len(string) > 8: + # Try different ways - fuzz string + # Base64 + if args.trace: + print("Starting Base64 string analysis ...") + for m_string in (string, string[1:], string[1:] + "=", string + "=", string + "=="): + if is_base_64(m_string): + decoded_string = m_string.decode('base64') + # print decoded_string + if is_ascii_string(decoded_string, padding_allowed=True): + # print "match" + localStringScores[string] += 10 + base64strings[string] = decoded_string + # Hex Encoded string + if args.trace: + print("Starting Hex encoded string analysis ...") + for m_string in ([string, re.sub('[^a-zA-Z0-9]', '', string)]): + #print m_string + if is_hex_encoded(m_string): + #print("^ is HEX") + decoded_string = m_string.decode('hex') + #print removeNonAsciiDrop(decoded_string) + if is_ascii_string(decoded_string, padding_allowed=True): + # not too many 00s + if '00' in m_string: + if len(m_string) / float(m_string.count('0')) <= 1.2: + continue + #print("^ is ASCII / WIDE") + localStringScores[string] += 8 + hexEncStrings[string] = decoded_string + except Exception as e: + if args.debug: + traceback.print_exc() + pass + + # Reversed String ----------------------------------------------------- + if string[::-1] in good_strings_db: + localStringScores[string] += 10 + reversedStrings[string] = string[::-1] + + # Certain string reduce ----------------------------------------------- + if re.search(r'(rundll32\.exe$|kernel\.dll$)', string, re.IGNORECASE): + localStringScores[string] -= 4 + + # Set the global string score + stringScores[original_string] = localStringScores[string] + + if args.debug: + if string in utfstrings: + is_utf = True + else: + is_utf = False + # print "SCORE: %s\tUTF: %s\tSTRING: %s" % ( localStringScores[string], is_utf, string ) + + sorted_set = sorted(localStringScores.iteritems(), key=operator.itemgetter(1), reverse=True) + + # Only the top X strings + c = 0 + result_set = [] + for string in sorted_set: + + # Skip the one with a score lower than -z X + if not args.noscorefilter and not args.inverse: + if string[1] < int(args.z): + continue + + if string[0] in utfstrings: + result_set.append("UTF16LE:%s" % string[0]) + else: + result_set.append(string[0]) + + #c += 1 + #if c > int(args.rc): + # break + + if args.trace: + print("RESULT SET:") + print(result_set) + + # return the filtered set + return result_set + + +def generate_general_condition(file_info): + """ + Generates a general condition for a set of files + :param file_info: + :return: + """ + conditions_string = "" + conditions = [] + pe_module_neccessary = False + + # Different Magic Headers and File Sizes + magic_headers = [] + file_sizes = [] + imphashes = [] + + try: + for filePath in file_info: + # Short file name info used for inverse generation has no magic/size fields + if "magic" not in file_info[filePath]: + continue + magic = file_info[filePath]["magic"] + size = file_info[filePath]["size"] + imphash = file_info[filePath]["imphash"] + + # Add them to the lists + if magic not in magic_headers and magic != "": + magic_headers.append(magic) + if size not in file_sizes: + file_sizes.append(size) + if imphash not in imphashes and imphash != "": + imphashes.append(imphash) + + # If different magic headers are less than 5 + if len(magic_headers) <= 5: + magic_string = " or ".join(get_uint_string(h) for h in magic_headers) + if " or " in magic_string: + conditions.append("( {0} )".format(magic_string)) + else: + conditions.append("{0}".format(magic_string)) + + # Biggest size multiplied with maxsize_multiplier + if not args.nofilesize and len(file_sizes) > 0: + conditions.append(get_file_range(max(file_sizes))) + + # If different magic headers are less than 5 + if len(imphashes) == 1: + conditions.append("pe.imphash() == \"{0}\"".format(imphashes[0])) + pe_module_neccessary = True + + # If enough attributes were special + condition_string = " and ".join(conditions) + + except Exception as e: + if args.debug: + traceback.print_exc() + exit(1) + print("[E] ERROR while generating general condition - check the global rule and remove it if it's faulty") + + return condition_string, pe_module_neccessary + + +def generate_rules(file_strings, file_opcodes, super_rules, file_info, inverse_stats): + # Write to file --------------------------------------------------- + if args.o: + try: + fh = open(args.o, 'w') + except Exception as e: + traceback.print_exc() + + # General Info + general_info = "/*\n" + general_info += " YARA Rule Set\n" + general_info += " Author: {0}\n".format(args.a) + general_info += " Date: {0}\n".format(get_timestamp_basic()) + general_info += " Identifier: {0}\n".format(identifier) + general_info += " Reference: {0}\n".format(reference) + if args.l != "": + general_info += " License: {0}\n".format(args.l) + general_info += "*/\n\n" + + fh.write(general_info) + + # GLOBAL RULES ---------------------------------------------------- + if args.globalrule: + + condition, pe_module_necessary = generate_general_condition(file_info) + + # Global Rule + if condition != "": + global_rule = "/* Global Rule -------------------------------------------------------------- */\n" + global_rule += "/* Will be evaluated first, speeds up scanning process, remove at will */\n\n" + global_rule += "global private rule gen_characteristics {\n" + global_rule += " condition:\n" + global_rule += " {0}\n".format(condition) + global_rule += "}\n\n" + + # Write rule + if args.o: + fh.write(global_rule) + + # General vars + rules = "" + printed_rules = {} + opcodes_to_add = [] + rule_count = 0 + inverse_rule_count = 0 + super_rule_count = 0 + pe_module_necessary = False + + if not args.inverse: + # PROCESS SIMPLE RULES ---------------------------------------------------- + print("[+] Generating Simple Rules ...") + # Apply intelligent filters + print("[-] Applying intelligent filters to string findings ...") + for filePath in file_strings: + + print("[-] Filtering string set for %s ..." % filePath) + + # Replace the original string set with the filtered one + string_set = file_strings[filePath] + file_strings[filePath] = [] + file_strings[filePath] = filter_string_set(string_set) + + # Replace the original string set with the filtered one + if filePath not in file_opcodes: + file_opcodes[filePath] = [] + else: + print("[-] Filtering opcode set for %s ..." % filePath) + opcode_set = file_opcodes[filePath] + file_opcodes[filePath] = [] + file_opcodes[filePath] = filter_opcode_set(opcode_set) + + # GENERATE SIMPLE RULES ------------------------------------------- + fh.write("/* Rule Set ----------------------------------------------------------------- */\n\n") + + for filePath in file_strings: + + # Skip if there is nothing to do + if len(file_strings[filePath]) == 0: + print("[W] Not enough high scoring strings to create a rule. " + "(Try -z 0 to reduce the min score or --opcodes to include opcodes) FILE: %s" % filePath) + continue + elif len(file_strings[filePath]) == 0 and len(file_opcodes[filePath]) == 0: + print("[W] Not enough high scoring strings and opcodes to create a rule. " \ + "(Try -z 0 to reduce the min score) FILE: %s" % filePath) + continue + + # Create Rule + try: + rule = "" + (path, file) = os.path.split(filePath) + # Prepare name + fileBase = os.path.splitext(file)[0] + # Create a clean new name + cleanedName = fileBase + # Adapt length of rule name + if len(fileBase) < 8: # if name is too short add part from path + cleanedName = path.split('\\')[-1:][0] + "_" + cleanedName + # File name starts with a number + if re.search(r'^[0-9]', cleanedName): + cleanedName = "sig_" + cleanedName + # clean name from all characters that would cause errors + cleanedName = re.sub('[^\w]', r'_', cleanedName) + # Check if already printed + if cleanedName in printed_rules: + printed_rules[cleanedName] += 1 + cleanedName = cleanedName + "_" + str(printed_rules[cleanedName]) + else: + printed_rules[cleanedName] = 1 + + # Print rule title ---------------------------------------- + rule += "rule %s {\n" % cleanedName + + # Meta data ----------------------------------------------- + rule += " meta:\n" + rule += " description = \"%s - file %s\"\n" % (prefix, file) + rule += " author = \"%s\"\n" % args.a + rule += " reference = \"%s\"\n" % reference + rule += " date = \"%s\"\n" % get_timestamp_basic() + rule += " hash1 = \"%s\"\n" % file_info[filePath]["hash"] + rule += " strings:\n" + + # Get the strings ----------------------------------------- + # Rule String generation + (rule_strings, opcodes_included, string_rule_count, high_scoring_strings) = \ + get_rule_strings(file_strings[filePath], file_opcodes[filePath]) + rule += rule_strings + + # Extract rul strings + if args.strings: + strings = get_strings(file_strings[filePath]) + write_strings(filePath, strings, args.e, args.score) + + # Condition ----------------------------------------------- + # Conditions list (will later be joined with 'or') + conditions = [] # AND connected + subconditions = [] # OR connected + + # Condition PE + # Imphash and Exports - applicable to PE files only + condition_pe = [] + condition_pe_part1 = [] + condition_pe_part2 = [] + if not args.noextras and file_info[filePath]["magic"] == "MZ": + # Add imphash - if certain conditions are met + if file_info[filePath]["imphash"] not in good_imphashes_db and file_info[filePath]["imphash"] != "": + # Comment to imphash + imphash = file_info[filePath]["imphash"] + comment = "" + if imphash in KNOWN_IMPHASHES: + comment = " /* {0} */".format(KNOWN_IMPHASHES[imphash]) + # Add imphash to condition + condition_pe_part1.append("pe.imphash() == \"{0}\"{1}".format(imphash, comment)) + pe_module_necessary = True + if file_info[filePath]["exports"]: + e_count = 0 + for export in file_info[filePath]["exports"]: + if export not in good_exports_db: + condition_pe_part2.append("pe.exports(\"{0}\")".format(export)) + e_count += 1 + pe_module_necessary = True + if e_count > 5: + break + + # 1st Part of Condition 1 + basic_conditions = [] + # Filesize + if not args.nofilesize: + basic_conditions.insert(0, get_file_range(file_info[filePath]["size"])) + # Magic + if file_info[filePath]["magic"] != "": + uint_string = get_uint_string(file_info[filePath]["magic"]) + basic_conditions.insert(0, uint_string) + # Basic Condition + if len(basic_conditions): + conditions.append(" and ".join(basic_conditions)) + + # Add extra PE conditions to condition 1 + pe_conditions_add = False + if condition_pe_part1 or condition_pe_part2: + if len(condition_pe_part1) == 1: + condition_pe.append(condition_pe_part1[0]) + elif len(condition_pe_part1) > 1: + condition_pe.append("( %s )" % " or ".join(condition_pe_part1)) + if len(condition_pe_part2) == 1: + condition_pe.append(condition_pe_part2[0]) + elif len(condition_pe_part2) > 1: + condition_pe.append("( %s )" % " and ".join(condition_pe_part2)) + # Marker that PE conditions have been added + pe_conditions_add = True + # Add to sub condition + subconditions.append(" and ".join(condition_pe)) + + # String combinations + cond_op = "" # opcodes condition + cond_hs = "" # high scoring strings condition + cond_ls = "" # low scoring strings condition + + low_scoring_strings = (string_rule_count - high_scoring_strings) + if high_scoring_strings > 0: + cond_hs = "1 of ($x*)" + if low_scoring_strings > 0: + if low_scoring_strings > 10: + if high_scoring_strings > 0: + cond_ls = "4 of them" + else: + cond_ls = "8 of them" + else: + cond_ls = "all of them" + + # If low scoring and high scoring + cond_combined = "all of them" + needs_brackets = False + if low_scoring_strings > 0 and high_scoring_strings > 0: + # If PE conditions have been added, don't be so strict with the strings + if pe_conditions_add: + cond_combined = "{0} or {1}".format(cond_hs, cond_ls) + needs_brackets = True + else: + cond_combined = "{0} and {1}".format(cond_hs, cond_ls) + elif low_scoring_strings > 0 and not high_scoring_strings > 0: + cond_combined = "{0}".format(cond_ls) + elif not low_scoring_strings > 0 and high_scoring_strings > 0: + cond_combined = "{0}".format(cond_hs) + if opcodes_included: + cond_op = " and all of ($op*)" + + # Opcodes (if needed) + if cond_op or needs_brackets: + subconditions.append("( {0}{1} )".format(cond_combined, cond_op)) + else: + subconditions.append(cond_combined) + + # Now add string condition to the conditions + if len(subconditions) == 1: + conditions.append(subconditions[0]) + elif len(subconditions) > 1: + conditions.append("( %s )" % " or ".join(subconditions)) + + # Create condition string + condition_string = " and\n ".join(conditions) + + rule += " condition:\n" + rule += " %s\n" % condition_string + rule += "}\n\n" + + # Add to rules string + rules += rule + + rule_count += 1 + except Exception as e: + traceback.print_exc() + + # GENERATE SUPER RULES -------------------------------------------- + if not nosuper and not args.inverse: + + rules += "/* Super Rules ------------------------------------------------------------- */\n\n" + super_rule_names = [] + + print("[+] Generating Super Rules ...") + printed_combi = {} + for super_rule in super_rules: + try: + rule = "" + # Prepare Name + rule_name = "" + file_list = [] + + # Loop through files + imphashes = Counter() + for filePath in super_rule["files"]: + (path, file) = os.path.split(filePath) + file_list.append(file) + # Prepare name + fileBase = os.path.splitext(file)[0] + # Create a clean new name + cleanedName = fileBase + # Append it to the full name + rule_name += "_" + cleanedName + # Check if imphash of all files is equal + imphash = file_info[filePath]["imphash"] + if imphash != "-" and imphash != "": + imphashes.update([imphash]) + + # Imphash usable + if len(imphashes) == 1: + unique_imphash = imphashes.items()[0][0] + if unique_imphash in good_imphashes_db: + unique_imphash = "" + + # Shorten rule name + rule_name = rule_name[:124] + # Add count if rule name already taken + if rule_name not in super_rule_names: + rule_name = "%s_%s" % (rule_name, super_rule_count) + super_rule_names.append(rule_name) + + # Create a list of files + file_listing = ", ".join(file_list) + + # File name starts with a number + if re.search(r'^[0-9]', rule_name): + rule_name = "sig_" + rule_name + # clean name from all characters that would cause errors + rule_name = re.sub('[^\w]', r'_', rule_name) + # Check if already printed + if rule_name in printed_rules: + printed_combi[rule_name] += 1 + rule_name = rule_name + "_" + str(printed_combi[rule_name]) + else: + printed_combi[rule_name] = 1 + + # Print rule title + rule += "rule %s {\n" % rule_name + rule += " meta:\n" + rule += " description = \"%s - from files %s\"\n" % (prefix, file_listing) + rule += " author = \"%s\"\n" % args.a + rule += " reference = \"%s\"\n" % reference + rule += " date = \"%s\"\n" % get_timestamp_basic() + for i, filePath in enumerate(super_rule["files"]): + rule += " hash%s = \"%s\"\n" % (str(i + 1), file_info[filePath]["hash"]) + + rule += " strings:\n" + + # Adding the strings + if file_opcodes.get(filePath) is None: + tmp_file_opcodes = {} + else: + tmp_file_opcodes = file_opcodes.get(filePath) + (rule_strings, opcodes_included, string_rule_count, high_scoring_strings) = \ + get_rule_strings(super_rule["strings"], tmp_file_opcodes) + rule += rule_strings + + # Condition ----------------------------------------------- + # Conditions list (will later be joined with 'or') + conditions = [] + + # 1st condition + # Evaluate the general characteristics + file_info_super = {} + for filePath in super_rule["files"]: + file_info_super[filePath] = file_info[filePath] + condition_strings, pe_module_necessary_gen = generate_general_condition(file_info_super) + if pe_module_necessary_gen: + pe_module_necessary = True + + # 2nd condition + # String combinations + cond_op = "" # opcodes condition + cond_hs = "" # high scoring strings condition + cond_ls = "" # low scoring strings condition + + low_scoring_strings = (string_rule_count - high_scoring_strings) + if high_scoring_strings > 0: + cond_hs = "1 of ($x*)" + if low_scoring_strings > 0: + if low_scoring_strings > 10: + if high_scoring_strings > 0: + cond_ls = "4 of them" + else: + cond_ls = "8 of them" + else: + cond_ls = "all of them" + + # If low scoring and high scoring + cond_combined = "all of them" + if low_scoring_strings > 0 and high_scoring_strings > 0: + cond_combined = "{0} and {1}".format(cond_hs, cond_ls) + elif low_scoring_strings > 0 and not high_scoring_strings > 0: + cond_combined = "{0}".format(cond_ls) + elif not low_scoring_strings > 0 and high_scoring_strings > 0: + cond_combined = "{0}".format(cond_hs) + if opcodes_included: + cond_op = " and all of ($op*)" + + condition2 = "( {0} ){1}".format(cond_combined, cond_op) + conditions.append(" and ".join([condition_strings, condition2])) + + # 3nd condition + # In memory detection base condition (no magic, no filesize) + condition_pe = "all of them" + conditions.append(condition_pe) + + # Create condition string + condition_string = "\n ) or ( ".join(conditions) + + rule += " condition:\n" + rule += " ( %s )\n" % condition_string + rule += "}\n\n" + + # print rule + # Add to rules string + rules += rule + + super_rule_count += 1 + except Exception as e: + traceback.print_exc() + + try: + # WRITING RULES TO FILE + # PE Module ------------------------------------------------------- + if not args.noextras: + if pe_module_necessary: + fh.write('import "pe"\n\n') + # RULES ----------------------------------------------------------- + if args.o: + fh.write(rules) + except Exception as e: + traceback.print_exc() + + # PROCESS INVERSE RULES --------------------------------------------------- + # print inverse_stats.keys() + if args.inverse: + print("[+] Generating inverse rules ...") + inverse_rules = "" + # Apply intelligent filters ------------------------------------------- + print("[+] Applying intelligent filters to string findings ...") + for fileName in inverse_stats: + + print("[-] Filtering string set for %s ..." % fileName) + + # Replace the original string set with the filtered one + string_set = inverse_stats[fileName] + inverse_stats[fileName] = [] + inverse_stats[fileName] = filter_string_set(string_set) + + # Preset if empty + if fileName not in file_opcodes: + file_opcodes[fileName] = {} + + # GENERATE INVERSE RULES ------------------------------------------- + fh.write("/* Inverse Rules ------------------------------------------------------------- */\n\n") + + for fileName in inverse_stats: + try: + rule = "" + # Create a clean new name + cleanedName = fileName.replace(".", "_") + # Add ANOMALY + cleanedName += "_ANOMALY" + # File name starts with a number + if re.search(r'^[0-9]', cleanedName): + cleanedName = "sig_" + cleanedName + # clean name from all characters that would cause errors + cleanedName = re.sub('[^\w]', r'_', cleanedName) + # Check if already printed + if cleanedName in printed_rules: + printed_rules[cleanedName] += 1 + cleanedName = cleanedName + "_" + str(printed_rules[cleanedName]) + else: + printed_rules[cleanedName] = 1 + + # Print rule title ---------------------------------------- + rule += "rule %s {\n" % cleanedName + + # Meta data ----------------------------------------------- + rule += " meta:\n" + rule += " description = \"%s for anomaly detection - file %s\"\n" % (prefix, fileName) + rule += " author = \"%s\"\n" % args.a + rule += " reference = \"%s\"\n" % reference + rule += " date = \"%s\"\n" % get_timestamp_basic() + for i, hash in enumerate(file_info[fileName]["hashes"]): + rule += " hash%s = \"%s\"\n" % (str(i + 1), hash) + + rule += " strings:\n" + + # Get the strings ----------------------------------------- + # Rule String generation + (rule_strings, opcodes_included, string_rule_count, high_scoring_strings) = \ + get_rule_strings(inverse_stats[fileName], file_opcodes[fileName]) + rule += rule_strings + + # Condition ----------------------------------------------- + folderNames = "" + if not args.nodirname: + folderNames += "and ( filepath matches /" + folderNames += "$/ or filepath matches /".join(file_info[fileName]["folder_names"]) + folderNames += "$/ )" + condition = "filename == \"%s\" %s and not ( all of them )" % (fileName, folderNames) + + rule += " condition:\n" + rule += " %s\n" % condition + rule += "}\n\n" + + # print rule + # Add to rules string + inverse_rules += rule + + except Exception as e: + traceback.print_exc() + + try: + # Try to write rule to file + if args.o: + fh.write(inverse_rules) + inverse_rule_count += 1 + except Exception as e: + traceback.print_exc() + + # Close the rules file -------------------------------------------- + if args.o: + try: + fh.close() + except Exception as e: + traceback.print_exc() + + # Print rules to command line ------------------------------------- + if args.debug: + print(rules) + + return (rule_count, inverse_rule_count, super_rule_count) + + +def get_rule_strings(string_elements, opcode_elements): + rule_strings = "" + high_scoring_strings = 0 + string_rule_count = 0 + + # Adding the strings -------------------------------------- + for i, string in enumerate(string_elements): + + # Collect the data + is_fullword = True + initial_string = string + enc = " ascii" + base64comment = "" + hexEncComment = "" + reversedComment = "" + fullword = "" + pestudio_comment = "" + score_comment = "" + goodware_comment = "" + + if string in good_strings_db: + goodware_comment = " /* Goodware String - occured %s times */" % (good_strings_db[string]) + + if string in stringScores: + if args.score: + score_comment += " /* score: '%.2f'*/" % (stringScores[string]) + else: + print("NO SCORE: %s" % string) + + if string[:8] == "UTF16LE:": + string = string[8:] + enc = " wide" + if string in base64strings: + base64comment = " /* base64 encoded string '%s' */" % base64strings[string] + if string in hexEncStrings: + hexEncComment = " /* hex encoded string '%s' */" % removeNonAsciiDrop(hexEncStrings[string]) + if string in pestudioMarker and args.score: + pestudio_comment = " /* PEStudio Blacklist: %s */" % pestudioMarker[string] + if string in reversedStrings: + reversedComment = " /* reversed goodware string '%s' */" % reversedStrings[string] + + # Extra checks + if is_hex_encoded(string, check_length=False): + is_fullword = False + + # Checking string length + if len(string) >= args.s: + # cut string + string = string[:args.s].rstrip("\\") + # not fullword anymore + is_fullword = False + # Show as fullword + if is_fullword: + fullword = " fullword" + + # Now compose the rule line + if float(stringScores[initial_string]) > score_highly_specific: + high_scoring_strings += 1 + rule_strings += " $x%s = \"%s\"%s%s%s%s%s%s%s%s\n" % ( + str(i + 1), string, fullword, enc, base64comment, reversedComment, pestudio_comment, score_comment, + goodware_comment, hexEncComment) + else: + rule_strings += " $s%s = \"%s\"%s%s%s%s%s%s%s%s\n" % ( + str(i + 1), string, fullword, enc, base64comment, reversedComment, pestudio_comment, score_comment, + goodware_comment, hexEncComment) + + # If too many string definitions found - cut it at the + # count defined via command line param -rc + if (i + 1) >= int(args.rc): + break + + string_rule_count += 1 + + # If too few strings - add opcodes + # Adding the strings -------------------------------------- + opcodes_included = False + if len(opcode_elements) > 0: + rule_strings += "\n" + for i, opcode in enumerate(opcode_elements): + rule_strings += " $op%s = { %s }\n" % (str(i), opcode) + opcodes_included = True + else: + if args.opcodes: + print("[-] Not enough unique opcodes found to include them") + + return rule_strings, opcodes_included, string_rule_count, high_scoring_strings + + +def get_strings(string_elements): + """ + Get a dictionary of all string types + :param string_elements: + :return: + """ + strings = { + "ascii": [], + "wide": [], + "base64 encoded": [], + "hex encoded": [], + "reversed": [] + } + + # Adding the strings -------------------------------------- + for i, string in enumerate(string_elements): + + if string[:8] == "UTF16LE:": + string = string[8:] + strings["wide"].append(string) + elif string in base64strings: + strings["base64 encoded"].append(string) + elif string in hexEncStrings: + strings["hex encoded"].append(string) + elif string in reversedStrings: + strings["reversed"].append(string) + else: + strings["ascii"].append(string) + + return strings + + +def write_strings(filePath, strings, output_dir, scores): + """ + Writes string information to an output file + :param filePath: + :param strings: + :param output_dir: + :param scores: + :return: + """ + SECTIONS = ["ascii", "wide", "base64 encoded", "hex encoded", "reversed"] + # File + filename = os.path.basename(filePath) + strings_filename = os.path.join(output_dir, "%s_strings.txt" % filename) + print("[+] Writing strings to file %s" % strings_filename) + # Strings + output_string = [] + for key in SECTIONS: + # Skip empty + if len(strings[key]) < 1: + continue + # Section + output_string.append("%s Strings" % key.upper()) + output_string.append("------------------------------------------------------------------------") + for string in strings[key]: + if scores: + score = "unknown" + if key == "wide": + score = stringScores["UTF16LE:%s" % string] + else: + score = stringScores[string] + output_string.append("%d;%s" % score, string) + else: + output_string.append(string) + # Empty line between sections + output_string.append("\n") + with open(strings_filename, "w") as fh: + fh.write("\n".join(output_string)) + + +def initialize_pestudio_strings(): + pestudio_strings = {} + + tree = etree.parse(get_abs_path(PE_STRINGS_FILE)) + + pestudio_strings["strings"] = tree.findall(".//string") + pestudio_strings["av"] = tree.findall(".//av") + pestudio_strings["folder"] = tree.findall(".//folder") + pestudio_strings["os"] = tree.findall(".//os") + pestudio_strings["reg"] = tree.findall(".//reg") + pestudio_strings["guid"] = tree.findall(".//guid") + pestudio_strings["ssdl"] = tree.findall(".//ssdl") + pestudio_strings["ext"] = tree.findall(".//ext") + pestudio_strings["agent"] = tree.findall(".//agent") + pestudio_strings["oid"] = tree.findall(".//oid") + pestudio_strings["priv"] = tree.findall(".//priv") + + # Obsolete + # for elem in string_elems: + # strings.append(elem.text) + + return pestudio_strings + + +def initialize_bayes_filter(): + # BayesTrainer + stringTrainer = Trainer(tokenizer) + + # Read the sample files and train the algorithm + print("[-] Training filter with good strings from ./lib/good.txt") + with open(get_abs_path("./lib/good.txt"), "r") as fh_goodstrings: + for line in fh_goodstrings: + # print line.rstrip("\n") + stringTrainer.train(line.rstrip("\n"), "string") + modified_line = re.sub(r'(\\\\|\/|\-|\.|\_)', ' ', line) + stringTrainer.train(modified_line, "string") + return stringTrainer + + +def get_pestudio_score(string): + for type in pestudio_strings: + for elem in pestudio_strings[type]: + # Full match + if elem.text.lower() == string.lower(): + # Exclude the "extension" black list for now + if type != "ext": + return 5, type + return 0, "" + + +def get_opcode_string(opcode): + return ' '.join(opcode[i:i + 2] for i in range(0, len(opcode), 2)) + + +def get_uint_string(magic): + if len(magic) == 2: + return "uint16(0) == 0x{1}{0}".format(magic[0].encode('hex'), magic[1].encode('hex')) + if len(magic) == 4: + return "uint32(0) == 0x{3}{2}{1}{0}".format(magic[0].encode('hex'), magic[1].encode('hex'), + magic[2].encode('hex'), magic[3].encode('hex')) + return "" + + +def get_file_range(size): + size_string = "" + try: + # max sample size - args.fm times the original size + max_size_b = size * args.fm + # Minimum size + if max_size_b < 1024: + max_size_b = 1024 + # in KB + max_size = max_size_b / 1024 + max_size_kb = max_size + # Round + if len(str(max_size)) == 2: + max_size = int(round(max_size, -1)) + elif len(str(max_size)) == 3: + max_size = int(round(max_size, -2)) + elif len(str(max_size)) == 4: + max_size = int(round(max_size, -3)) + elif len(str(max_size)) == 5: + max_size = int(round(max_size, -3)) + size_string = "filesize < {0}KB".format(max_size) + if args.debug: + print("File Size Eval: SampleSize (b): {0} SizeWithMultiplier (b/Kb): {1} / {2} RoundedSize: {3}".format( + str(size), str(max_size_b), str(max_size_kb), str(max_size))) + except Exception as e: + if args.debug: + traceback.print_exc() + pass + finally: + return size_string + + +def get_timestamp_basic(date_obj=None): + if not date_obj: + date_obj = datetime.datetime.now() + date_str = date_obj.strftime("%Y-%m-%d") + return date_str + + +def is_ascii_char(b, padding_allowed=False): + if padding_allowed: + if (ord(b) < 127 and ord(b) > 31) or ord(b) == 0: + return 1 + else: + if ord(b) < 127 and ord(b) > 31: + return 1 + return 0 + + +def is_ascii_string(string, padding_allowed=False): + for b in string: + if padding_allowed: + if not ((ord(b) < 127 and ord(b) > 31) or ord(b) == 0): + return 0 + else: + if not (ord(b) < 127 and ord(b) > 31): + return 0 + return 1 + + +def is_base_64(s): + return (len(s) % 4 == 0) and re.match('^[A-Za-z0-9+/]+[=]{0,2}$', s) + + +def is_hex_encoded(s, check_length=True): + if re.match('^[A-Fa-f0-9]+$', s): + if check_length: + if len(s) % 2 == 0: + return True + else: + return True + return False + + +def extract_hex_strings(s): + strings = [] + hex_strings = re.findall("([a-fA-F0-9]{10,})", s) + for string in list(hex_strings): + hex_strings += string.split('0000') + hex_strings += string.split('0d0a') + hex_strings += re.findall(r'((?:0000|002[a-f0-9]|00[3-9a-f][0-9a-f]){6,})', string, re.IGNORECASE) + hex_strings = list(set(hex_strings)) + # ASCII Encoded Strings + for string in hex_strings: + for x in string.split('00'): + if len(x) > 10: + strings.append(x) + # WIDE Encoded Strings + for string in hex_strings: + try: + if len(string) % 2 != 0 or len(string) < 8: + continue + dec = string.replace('00', '').decode('hex') + #print("Testing: %s" % string) + #print("Decoded: %s" % dec) + if is_ascii_string(dec, padding_allowed=True): + #print("CAN USE >>>>>>>>>>>>>>>>>>>>>>>> %s" % string) + strings.append(string) + except Exception as e: + traceback.print_exc() + #print len(hex_strings) + #sys.exit(0) + return strings + + +def removeNonAsciiDrop(string): + nonascii = "error" + try: + # Generate a new string without disturbing characters + nonascii = "".join(i for i in string if ord(i)<127 and ord(i)>31) + except Exception as e: + traceback.print_exc() + pass + return nonascii + + +def save(object, filename, protocol=0): + file = gzip.GzipFile(filename, 'wb') + file.write(pickle.dumps(object, protocol)) + file.close() + + +def load(filename): + file = gzip.GzipFile(filename, 'rb') + buffer = "" + while 1: + data = file.read() + if data == "": + break + buffer += data + object = pickle.loads(buffer) + del (buffer) + file.close() + return object + + +def update_databases(): + # Preparations + try: + dbDir = './dbs/' + if not os.path.exists(dbDir): + os.makedirs(dbDir) + except Exception as e: + if args.debug: + traceback.print_exc() + print("Error while creating the database directory ./dbs") + sys.exit(1) + + # Downloading current repository + try: + for filename, repo_url in REPO_URLS.iteritems(): + print("Downloading %s from %s ..." % (filename, repo_url)) + fileDownloader = urllib.URLopener() + fileDownloader.retrieve(repo_url, "./dbs/%s" % filename) + except Exception as e: + if args.debug: + traceback.print_exc() + print("Error while downloading the database file - check your Internet connection") + print("Alterntive download link: https://drive.google.com/drive/folders/0B2S_IOa0MiOHS0xmekR6VWRhZ28") + print("Download the files and place them into the ./dbs/ folder") + sys.exit(1) + + +def processSampleDir(targetDir): + """ + Processes samples in a given directory and creates a yara rule file + :param directory: + :return: + """ + # Special strings + base64strings = {} + hexEncStrings = {} + reversedStrings = {} + pestudioMarker = {} + stringScores = {} + + # Extract all information + (sample_string_stats, sample_opcode_stats, file_info) = \ + parse_sample_dir(targetDir, args.nr, generateInfo=True, onlyRelevantExtensions=args.oe) + + # Evaluate Strings + (file_strings, file_opcodes, combinations, super_rules, inverse_stats) = \ + sample_string_evaluation(sample_string_stats, sample_opcode_stats, file_info) + + # Create Rule Files + (rule_count, inverse_rule_count, super_rule_count) = \ + generate_rules(file_strings, file_opcodes, super_rules, file_info, inverse_stats) + + if args.inverse: + print("[=] Generated %s INVERSE rules." % str(inverse_rule_count)) + else: + print("[=] Generated %s SIMPLE rules." % str(rule_count)) + if not nosuper: + print("[=] Generated %s SUPER rules." % str(super_rule_count)) + print("[=] All rules written to %s" % args.o) + + +def emptyFolder(dir): + """ + Removes all files from a given folder + :return: + """ + for file in os.listdir(dir): + filePath = os.path.join(dir, file) + try: + if os.path.isfile(filePath): + print("[!] Removing %s ..." % filePath) + os.unlink(filePath) + except Exception as e: + print(e) + + +def getReference(ref): + """ + Get a reference string - if the provided string is the path to a text file, then read the contents and return it as + reference + :param ref: + :return: + """ + if os.path.exists(ref): + reference = getFileContent(ref) + print("[+] Read reference from file %s > %s" % (ref, reference)) + return reference + else: + return ref + + +def getIdentifier(id, path): + """ + Get a identifier string - if the provided string is the path to a text file, then read the contents and return it as + reference, otherwise use the last element of the full path + :param ref: + :return: + """ + # Identifier + if id == "not set" or not os.path.exists(id): + # Identifier is the highest folder name + return os.path.basename(path.rstrip('/')) + else: + # Read identifier from file + identifier = getFileContent(id) + print("[+] Read identifier from file %s > %s" % (id, identifier)) + return identifier + + +def getPrefix(prefix, identifier): + """ + Get a prefix string for the rule description based on the identifier + :param prefix: + :param identifier: + :return: + """ + if prefix == "Auto-generated rule": + return identifier + else: + return prefix + + +def getFileContent(file): + """ + Gets the contents of a file (limited to 1024 characters) + :param file: + :return: + """ + try: + with open(file) as f: + return f.read(1024) + except Exception as e: + return "not found" + + +# CTRL+C Handler -------------------------------------------------------------- +def signal_handler(signal_name, frame): + print("> yarGen's work has been interrupted") + sys.exit(0) + + +def print_welcome(): + print("###############################################################################") + print(" ______") + print(" __ ______ ______/ ____/__ ____") + print(" / / / / __ `/ ___/ / __/ _ \/ __ \\") + print(" / /_/ / /_/ / / / /_/ / __/ / / /") + print(" \__, /\__,_/_/ \____/\___/_/ /_/") + print(" /____/") + print(" ") + print(" Yara Rule Generator") + print(" by Florian Roth") + print(" November 2018") + print(" Version 0.21.0") + print(" ") + print("###############################################################################") + + +# MAIN ################################################################ +if __name__ == '__main__': + + # Signal handler for CTRL+C + signal_module.signal(signal_module.SIGINT, signal_handler) + + # Parse Arguments + parser = argparse.ArgumentParser(description='yarGen') + + group_creation = parser.add_argument_group('Rule Creation') + group_creation.add_argument('-m', help='Path to scan for malware') + group_creation.add_argument('-y', help='Minimum string length to consider (default=8)', metavar='min-size', + default=8) + group_creation.add_argument('-z', help='Minimum score to consider (default=5)', metavar='min-score', default=5) + group_creation.add_argument('-x', help='Score required to set string as \'highly specific string\' (default: 30)', metavar='high-scoring', default=30) + group_creation.add_argument('-s', help='Maximum length to consider (default=128)', metavar='max-size', default=128) + group_creation.add_argument('-rc', help='Maximum number of strings per rule (default=20, intelligent filtering ' + 'will be applied)', metavar='maxstrings', default=20) + group_creation.add_argument('--excludegood', help='Force the exclude all goodware strings', action='store_true', + default=False) + + group_output = parser.add_argument_group('Rule Output') + group_output.add_argument('-o', help='Output rule file', metavar='output_rule_file', default='yargen_rules.yar') + group_output.add_argument('-e', help='Output directory for string exports', metavar='output_dir_strings', default='') + group_output.add_argument('-a', help='Author Name', metavar='author', default='yarGen Rule Generator') + group_output.add_argument('-r', help='Reference (can be string or text file)', metavar='ref', + default='https://github.com/Neo23x0/yarGen') + group_output.add_argument('-l', help='License', metavar='lic', default='') + group_output.add_argument('-p', help='Prefix for the rule description', metavar='prefix', + default='Auto-generated rule') + group_output.add_argument('-b', help='Text file from which the identifier is read (default: last folder name in ' + 'the full path, e.g. "myRAT" if -m points to /mnt/mal/myRAT)', + metavar='identifier', + default='not set') + group_output.add_argument('--score', help='Show the string scores as comments in the rules', action='store_true', + default=False) + group_output.add_argument('--strings', help='Show the string scores as comments in the rules', action='store_true', + default=False) + group_output.add_argument('--nosimple', help='Skip simple rule creation for files included in super rules', + action='store_true', default=False) + group_output.add_argument('--nomagic', help='Don\'t include the magic header condition statement', + action='store_true', default=False) + group_output.add_argument('--nofilesize', help='Don\'t include the filesize condition statement', + action='store_true', default=False) + group_output.add_argument('-fm', help='Multiplier for the maximum \'filesize\' condition value (default: 3)', + default=3) + group_output.add_argument('--globalrule', help='Create global rules (improved rule set speed)', + action='store_true', default=False) + group_output.add_argument('--nosuper', action='store_true', default=False, help='Don\'t try to create super rules ' + 'that match against various files') + + group_db = parser.add_argument_group('Database Operations') + group_db.add_argument('--update', action='store_true', default=False, help='Update the local strings and opcodes ' + 'dbs from the online repository') + group_db.add_argument('-g', help='Path to scan for goodware (dont use the database shipped with yaraGen)') + group_db.add_argument('-u', action='store_true', default=False, help='Update local standard goodware database with ' + 'a new analysis result (used with -g)') + group_db.add_argument('-c', action='store_true', default=False, help='Create new local goodware database ' + '(use with -g and optionally -i "identifier")') + group_db.add_argument('-i', default="", help='Specify an identifier for the newly created databases ' + '(good-strings-identifier.db, good-opcodes-identifier.db)') + + group_general = parser.add_argument_group('General Options') + group_general.add_argument('--dropzone', action='store_true', default=False, + help='Dropzone mode - monitors a directory [-m] for new samples to process' + 'WARNING: Processed files will be deleted!') + group_general.add_argument('--nr', action='store_true', default=False, help='Do not recursively scan directories') + group_general.add_argument('--oe', action='store_true', default=False, help='Only scan executable extensions EXE, ' + 'DLL, ASP, JSP, PHP, BIN, INFECTED') + group_general.add_argument('-fs', help='Max file size in MB to analyze (default=10)', metavar='size-in-MB', + default=10) + group_general.add_argument('--noextras', action='store_true', default=False, + help='Don\'t use extras like Imphash or PE header specifics') + group_general.add_argument('--debug', action='store_true', default=False, help='Debug output') + group_general.add_argument('--trace', action='store_true', default=False, help='Trace output') + + group_opcode = parser.add_argument_group('Other Features') + group_opcode.add_argument('--opcodes', action='store_true', default=False, help='Do use the OpCode feature ' + '(use this if not enough high ' + 'scoring strings can be found)') + group_opcode.add_argument('-n', help='Number of opcodes to add if not enough high scoring string could be found ' + '(default=3)', metavar='opcode-num', default=3) + + group_inverse = parser.add_argument_group('Inverse Mode (unstable)') + group_inverse.add_argument('--inverse', help=argparse.SUPPRESS, action='store_true', default=False) + group_inverse.add_argument('--nodirname', help=argparse.SUPPRESS, action='store_true', default=False) + group_inverse.add_argument('--noscorefilter', help=argparse.SUPPRESS, action='store_true', default=False) + + args = parser.parse_args() + + # Print Welcome + print_welcome() + + # Update + if args.update: + update_databases() + print("[+] Updated databases - you can now start creating YARA rules") + sys.exit(0) + + # Typical input erros + if args.m: + if os.path.isfile(args.m): + print("[E] Input is a file, please use a directory instead (-m path)") + sys.exit(0) + + # Opcodes evaluation or not + use_opcodes = False + if args.opcodes: + use_opcodes = True + + # Read PEStudio string list + pestudio_strings = {} + pestudio_available = False + + # Super Rule Generation + nosuper = args.nosuper + + # Identifier + sourcepath = args.m + if args.g: + sourcepath = args.g + identifier = getIdentifier(args.b, sourcepath) + print("[+] Using identifier '%s'" % identifier) + + # Reference + reference = getReference(args.r) + print("[+] Using reference '%s'" % reference) + + # Prefix + prefix = getPrefix(args.p, identifier) + print("[+] Using prefix '%s'" % prefix) + + if os.path.isfile(get_abs_path(PE_STRINGS_FILE)) and lxml_available: + print("[+] Processing PEStudio strings ...") + pestudio_strings = initialize_pestudio_strings() + pestudio_available = True + else: + if lxml_available: + print("\nTo improve the analysis process please download the awesome PEStudio tool by marc @ochsenmeier " \ + "from http://winitor.com and place the file 'strings.xml' in the ./3rdparty directory.\n") + time.sleep(5) + + # Highly specific string score + score_highly_specific = int(args.x) + + # Scan goodware files + if args.g: + print("[+] Processing goodware files ...") + good_strings_db, good_opcodes_db, good_imphashes_db, good_exports_db = \ + parse_good_dir(args.g, args.nr, args.oe) + + # Update existing databases + if args.u: + try: + print("[+] Updating databases ...") + + # Evaluate the database identifiers + db_identifier = "" + if args.i != "": + db_identifier = "-%s" % args.i + strings_db = "./dbs/good-strings%s.db" % db_identifier + opcodes_db = "./dbs/good-opcodes%s.db" % db_identifier + imphashes_db = "./dbs/good-imphashes%s.db" % db_identifier + exports_db = "./dbs/good-exports%s.db" % db_identifier + + # Strings ----------------------------------------------------- + print("[+] Updating %s ..." % strings_db) + good_pickle = load(get_abs_path(strings_db)) + print("Old string database entries: %s" % len(good_pickle)) + good_pickle.update(good_strings_db) + print("New string database entries: %s" % len(good_pickle)) + save(good_pickle, strings_db) + + # Opcodes ----------------------------------------------------- + print("[+] Updating %s ..." % opcodes_db) + good_opcode_pickle = load(get_abs_path(opcodes_db)) + print("Old opcode database entries: %s" % len(good_opcode_pickle)) + good_opcode_pickle.update(good_opcodes_db) + print("New opcode database entries: %s" % len(good_opcode_pickle)) + save(good_opcode_pickle, opcodes_db) + + # Imphashes --------------------------------------------------- + print("[+] Updating %s ..." % imphashes_db) + good_imphashes_pickle = load(get_abs_path(imphashes_db)) + print("Old opcode database entries: %s" % len(good_imphashes_pickle)) + good_imphashes_pickle.update(good_imphashes_db) + print("New opcode database entries: %s" % len(good_imphashes_pickle)) + save(good_imphashes_pickle, imphashes_db) + + # Exports ----------------------------------------------------- + print("[+] Updating %s ..." % exports_db) + good_exports_pickle = load(get_abs_path(exports_db)) + print("Old opcode database entries: %s" % len(good_exports_pickle)) + good_exports_pickle.update(good_exports_db) + print("New opcode database entries: %s" % len(good_exports_pickle)) + save(good_exports_pickle, exports_db) + + except Exception as e: + traceback.print_exc() + + # Create new databases + if args.c: + print("[+] Creating local database ...") + # Evaluate the database identifiers + db_identifier = "" + if args.i != "": + db_identifier = "-%s" % args.i + strings_db = "./dbs/good-strings%s.db" % db_identifier + opcodes_db = "./dbs/good-opcodes%s.db" % db_identifier + imphashes_db = "./dbs/good-imphashes%s.db" % db_identifier + exports_db = "./dbs/good-exports%s.db" % db_identifier + + # Creating the databases + print("[+] Using '%s' as filename for newly created strings database" % strings_db) + print("[+] Using '%s' as filename for newly created opcodes database" % opcodes_db) + print("[+] Using '%s' as filename for newly created opcodes database" % imphashes_db) + print("[+] Using '%s' as filename for newly created opcodes database" % exports_db) + + try: + + if os.path.isfile(strings_db): + raw_input("File %s alread exists. Press enter to proceed or CTRL+C to exit." % strings_db) + os.remove(strings_db) + if os.path.isfile(opcodes_db): + raw_input("File %s alread exists. Press enter to proceed or CTRL+C to exit." % opcodes_db) + os.remove(opcodes_db) + if os.path.isfile(imphashes_db): + raw_input("File %s alread exists. Press enter to proceed or CTRL+C to exit." % imphashes_db) + os.remove(imphashes_db) + if os.path.isfile(exports_db): + raw_input("File %s alread exists. Press enter to proceed or CTRL+C to exit." % exports_db) + os.remove(exports_db) + + # Strings + good_pickle = Counter() + good_pickle = good_strings_db + # Opcodes + good_op_pickle = Counter() + good_op_pickle = good_opcodes_db + # Imphashes + good_imphashes_pickle = Counter() + good_imphashes_pickle = good_imphashes_db + # Exports + good_exports_pickle = Counter() + good_exports_pickle = good_exports_db + + # Save + save(good_pickle, strings_db) + save(good_op_pickle, opcodes_db) + save(good_imphashes_pickle, imphashes_db) + save(good_exports_pickle, exports_db) + + print("New database with %d string, %d opcode, %d imphash, %d export entries created. " \ + "(remember to use --opcodes to extract opcodes from the samples and create the opcode databases)"\ + % (len(good_strings_db), len(good_opcodes_db), len(good_imphashes_db), len(good_exports_db))) + except Exception as e: + traceback.print_exc() + + # Analyse malware samples and create rules + else: + if use_opcodes: + print("[+] Reading goodware strings from database 'good-strings.db' and 'good-opcodes.db' ...") + print(" (This could take some time and uses at least 6 GB of RAM)") + else: + print("[+] Reading goodware strings from database 'good-strings.db' ...") + print(" (This could take some time and uses at least 3 GB of RAM)") + + good_strings_db = Counter() + good_opcodes_db = Counter() + good_imphashes_db = Counter() + good_exports_db = Counter() + + opcodes_num = 0 + strings_num = 0 + imphash_num = 0 + exports_num = 0 + + # Initialize all databases + for file in os.listdir(get_abs_path("./dbs/")): + if not file.endswith(".db"): + continue + filePath = os.path.join("./dbs/", file) + # String databases + if file.startswith("good-strings"): + try: + print("[+] Loading %s ..." % filePath) + good_pickle = load(get_abs_path(filePath)) + good_strings_db.update(good_pickle) + print("[+] Total: %s / Added %d entries" % ( + len(good_strings_db), len(good_strings_db) - strings_num)) + strings_num = len(good_strings_db) + except Exception as e: + traceback.print_exc() + # Opcode databases + if file.startswith("good-opcodes"): + try: + if use_opcodes: + print("[+] Loading %s ..." % filePath) + good_op_pickle = load(get_abs_path(filePath)) + good_opcodes_db.update(good_op_pickle) + print("[+] Total: %s (removed duplicates) / Added %d entries" % ( + len(good_opcodes_db), len(good_opcodes_db) - opcodes_num)) + opcodes_num = len(good_opcodes_db) + except Exception as e: + use_opcodes = False + traceback.print_exc() + # Imphash databases + if file.startswith("good-imphash"): + try: + print("[+] Loading %s ..." % filePath) + good_imphashes_pickle = load(get_abs_path(filePath)) + good_imphashes_db.update(good_imphashes_pickle) + print("[+] Total: %s / Added %d entries" % ( + len(good_imphashes_db), len(good_imphashes_db) - imphash_num)) + imphash_num = len(good_imphashes_db) + except Exception as e: + traceback.print_exc() + # Export databases + if file.startswith("good-exports"): + try: + print("[+] Loading %s ..." % filePath) + good_exports_pickle = load(get_abs_path(filePath)) + good_exports_db.update(good_exports_pickle) + print("[+] Total: %s / Added %d entries" % ( + len(good_exports_db), len(good_exports_db) - exports_num)) + exports_num = len(good_exports_db) + except Exception as e: + traceback.print_exc() + + if use_opcodes and len(good_opcodes_db) < 1: + print("[E] Missing goodware opcode databases." + " Please run 'yarGen.py --update' to retrieve the newest database set.") + use_opcodes = False + + if len(good_exports_db) < 1 and len(good_imphashes_db) < 1: + print("[E] Missing goodware imphash/export databases. " + " Please run 'yarGen.py --update' to retrieve the newest database set.") + use_opcodes = False + + if len(good_strings_db) < 1 and not args.c: + print("[E] Error - no goodware databases found. " + " Please run 'yarGen.py --update' to retrieve the newest database set.") + sys.exit(1) + + # If malware directory given + if args.m: + + # Initialize Bayes Trainer (we will use the goodware string database for this) + print("[+] Initializing Bayes Filter ...") + stringTrainer = initialize_bayes_filter() + + # Deactivate super rule generation if there's only a single file in the folder + if len(os.listdir(args.m)) < 2: + nosuper = True + + # Special strings + base64strings = {} + reversedStrings = {} + hexEncStrings = {} + pestudioMarker = {} + stringScores = {} + + # Dropzone mode + if args.dropzone: + # Monitoring folder for changes + print("Monitoring %s for new sample files (processed samples will be removed)" % args.m) + while(True): + if len(os.listdir(args.m)) > 0: + # Deactivate super rule generation if there's only a single file in the folder + if len(os.listdir(args.m)) < 2: + nosuper = True + else: + nosuper = False + # Read a new identifier + identifier = getIdentifier(args.b, args.m) + # Read a new reference + reference = getReference(args.r) + # Generate a new description prefix + prefix = getPrefix(args.p, identifier) + # Process the samples + processSampleDir(args.m) + # Delete all samples from the dropzone folder + emptyFolder(args.m) + time.sleep(1) + else: + # Scan malware files + print("[+] Processing malware files ...") + processSampleDir(args.m) + + print("[+] yarGen run finished") \ No newline at end of file diff --git a/yara-brg.py b/yara-brg.py deleted file mode 100644 index 86fc0a5..0000000 --- a/yara-brg.py +++ /dev/null @@ -1,486 +0,0 @@ -#!/usr/bin/env python -# -*- coding: iso-8859-1 -*- -# -*- coding: utf-8 -*- -# -# Yara BRG -# A bulk rule generator for Yara rules -# -# Florian Roth -# January 2014 -# v0.5 - -import os -import sys -import betterwalk -import argparse -import re -import traceback -from hashlib import md5 -from collections import OrderedDict - -def getFiles(dir, recursive): - # Recursive - if recursive: - for root, directories, files in betterwalk.walk (dir, followlinks=False): - for filename in files: - filePath = os.path.join(root,filename) - yield filePath - # Non recursive - else: - for filename in os.listdir(dir): - filePath = os.path.join(dir,filename) - yield filePath - -def parseDir(dir, recursive=False, generateInfo=False): - - # Prepare dictionary - string_stats = {} - file_info = {} - known_md5s = [] - - for filePath in getFiles(dir, recursive): - # Get Extension - extension = os.path.splitext(filePath)[1]; - if not extension in [ ".exe", ".dll", ".cmd", ".asp", ".php", ".jsp" ]: - continue - - # Size Check - size = 0 - try: - size = os.stat(filePath).st_size - if size > 3000000: - continue - except Exception, e: - pass - - # Extract strings from file - ( strings, md5sum ) = extractStrings(filePath, generateInfo) - - # Skip if MD5 already known - avoid duplicate files - if md5sum in known_md5s: - #if args.debug: - print "Skipping strings from %s due to MD5 duplicate detection" % filePath - continue - - # Add md5 value - if generateInfo: - known_md5s.append(md5sum) - file_info[filePath] = {} - file_info[filePath]["md5"] = md5sum - - # Add strings to statistics - invalid_count = 0 - for string in strings: - if string in string_stats: - string_stats[string]["count"] += 1 - string_stats[string]["files"].append(filePath) - else: - string_stats[string] = {} - string_stats[string]["count"] = 0 - string_stats[string]["files"] = [] - string_stats[string]["files"].append(filePath) - - if args.debug: - print "Processed " + filePath + " Size: "+ str(size) +" Strings: "+ str(len(string_stats)) + " ... " - - return string_stats, file_info - -def extractStrings(filePath, generateInfo): - # String list - strings = [] - # Read file data - try: - f = open(filePath, 'rb') - filedata = f.read() - f.close() - # Generate md5 - md5sum = "" - if generateInfo: - md5sum = md5(filedata).hexdigest() - # Read strings to list - string = "" - for byte in filedata: - if isAscii(byte): - string += byte - else: - if len(string) >= args.l: - # Escape string and than add it to the list - string = string.replace('\\','\\\\') - string = string.replace('"','\\"') - if not string in strings: - strings.append(string) - if args.debug: - #print string - pass - string = "" - # Check if last bytes have been string and not yet saved to list - if len(string) > 0: - string = string.replace('\\','\\\\') - string = string.replace('"','\\"') - if not string in strings: - strings.append(string) - except Exception,e: - if args.debug: - traceback.print_exc() - pass - - return strings, md5sum - -def filterStringSet(string_set): - - string_count = len(string_set) - - # filter = [ "words", "length" ] # first filter - filter = "words" - # This is the only set we have - even if it's a weak one - last_useful_set = string_set - - # As long as too many strings are in the result set - while string_count > int(args.rc): - - if args.debug: - print "Filtering: " + filePath - - # Length filter - if filter == "length": - # Get the shortest string length - shortest_string_length = len(min(string_set, key=len)) - if args.debug: - print "BEFORE LENGTH FILTER: Size %s" % len(string_set) - string_set = [ s for s in string_set if len(s) != shortest_string_length ] - if args.debug: - print "AFTER LENGTH FILTER: Size %s" % len(string_set) - - # Words filter - if filter == "words": - new_string_set = [] - for string in string_set: - if re.search(r'[qwrtzpsdfghjklxcvbnm][euioa][qwrtzpsdfghjklxcvbnm]', string, re.IGNORECASE): - new_string_set.append(string) - - # If new string count is too low - try the other filter - if not len(new_string_set) < int(args.rc): - # Replace string set - string_set = new_string_set - # Now set filter to length - filter = "length" - - # Count the new size - string_count = len(string_set) - - # Save the last useful set - if string_count > 3: - last_useful_set = string_set - if args.debug: - print "Setting last useful set with a length of %s" % str(string_count) - - # If filtering has gone too far - if string_count < int(args.rc): - string_set = last_useful_set - - # return the filtered set - return last_useful_set - -def isAscii(b): - if ord(b)<127 and ord(b)>31 : - return 1 - return 0 - -def printWelcome(): - print "###############################################################################" - print " __ __ ___ ___ _____" - print " \ \/ /__ ________ _ / _ )/ _ \/ ___/" - print " \ / _ `/ __/ _ `/ / _ / , _/ (_ / " - print " /_/\_,_/_/ \_,_/ /____/_/|_|\___/ " - print " " - print " by Florian Roth" - print " January 2014" - print " Version 0.5" - print " " - print "###############################################################################" - -# MAIN ################################################################ -if __name__ == '__main__': - - # Parse Arguments - parser = argparse.ArgumentParser(description='Yara BRG') - parser.add_argument('-m', required=True, help='Path to scan for malware') - parser.add_argument('-g', required=True, help='Path to scan for goodware') - parser.add_argument('-o', help='Output rule file', metavar='output_rule_file', default='yara_brg_rules.yar') - parser.add_argument('-p', help='Prefix for the rule description', metavar='prefix', default='Auto-generated rule') - parser.add_argument('-a', help='Athor Name', metavar='author', default='Yara Bulk Rule Generator') - parser.add_argument('-l', help='Minimal string length to consider (default=6)', metavar='size', default=6) - parser.add_argument('-rm', action='store_true', default=False, help='Recursive scan of malware directories') - parser.add_argument('-rg', action='store_true', default=False, help='Recursive scan of goodware directories') - parser.add_argument('-fs', help='Max file size to analyze (default=2000000)', metavar='dir', default=2000000) - parser.add_argument('-rc', help='Maximum number of strings per rule (default=10, intelligent filtering will be applied)', metavar='maxstrings', default=10) - parser.add_argument('--nosuper', action='store_true', default=False, help='Don\'t try to create super rules that match against various files') - parser.add_argument('--debug', action='store_true', default=False, help='Debug output') - - args = parser.parse_args() - - # Print Welcome - printWelcome() - - # Scan goodware files - print "Processing goodware files ..." - good_string_stats, file_info_good = parseDir(args.g, args.rg, False) - - # Scan malware files - print "Processing malware files ..." - mal_string_stats, file_info_mal = parseDir(args.m, args.rm, True) - - # Generate Stats -------------------------------------------------- - print "Generating statistical data ..." - file_strings = {} - combinations = {} - max_combi_count = 0 - # Iterate through strings found in malware files - for string in mal_string_stats: - - # Skip if string is a good string - if string in good_string_stats: - continue - - # If string occurs not too often in malware files - if mal_string_stats[string]["count"] < 10: - if args.debug: - # print "String: " +string +" Found in: "+ ", ".join(mal_string_stats[string]["files"]) - pass - # If string list in file dictionary not yet exists - for file in mal_string_stats[string]["files"]: - if file in file_strings: - # Append string - file_strings[file].append(string) - else: - # Create list and than add the first string to the file - file_strings[file] = [] - file_strings[file].append(string) - - # SUPER RULES GENERATOR - preliminary work - # If a string occurs more than once in different files - if mal_string_stats[string]["count"] > 1: - if args.debug: - print "OVERLAP Count: %s\nString: \"%s\"%s" % ( mal_string_stats[string]["count"], string, "\nFILE: ".join(mal_string_stats[string]["files"]) ) - # Create a cobination string from the file set that matches to that string - combi = ":".join(sorted(mal_string_stats[string]["files"])) - # print "STRING: " + string - # print "COMBI: " + combi - # If combination not yet known - if not combi in combinations: - combinations[combi] = {} - combinations[combi]["count"] = 1 - combinations[combi]["strings"] = [] - combinations[combi]["strings"].append(string) - combinations[combi]["files"] = mal_string_stats[string]["files"] - else: - combinations[combi]["count"] += 1 - combinations[combi]["strings"].append(string) - # Set the maximum combination count - if combinations[combi]["count"] > max_combi_count: - max_combi_count = combinations[combi]["count"] - # print "Max Combi Count set to: %s" % max_combi_count - - # SUPER RULE GENERATION ------------------------------------------- - super_rules = [] - if not args.nosuper: - print "Generating Super Rules ... (a lot of foo magic)" - for combi_count in range(max_combi_count, 1, -1): - for combi in combinations: - if combi_count == combinations[combi]["count"]: - #print "Count %s - Combi %s" % ( str(combinations[combi]["count"]), combi ) - # Filter the string set - #print "BEFORE" - #print len(combinations[combi]["strings"]) - string_set = combinations[combi]["strings"] - combinations[combi]["strings"] = [] - combinations[combi]["strings"] = filterStringSet(string_set) - #print "AFTER" - #print len(combinations[combi]["strings"]) - # Combi String count after filtering - #print "String count after filtering: %s" % str(len(combinations[combi]["strings"])) - # If the string set of the combination has a required size - if len(combinations[combi]["strings"]) >= int(args.rc): - # Remove the files in the combi rule from the simple set - for file in combinations[combi]["files"]: - if file in file_strings: - del file_strings[file] - # Add it as a super rule - print "Adding Super Rule with %s strings." % str(len(combinations[combi]["strings"])) - super_rules.append(combinations[combi]) - - # PROCESS SIMPLE RULES - # Apply intelligent filters --------------------------------------- - print "Applying intelligent filters to string findings ..." - for filePath in file_strings: - - # Replace the original string set with the filtered one - string_set = file_strings[filePath] - file_strings[filePath] = [] - file_strings[filePath] = filterStringSet(string_set) - - # Write to file --------------------------------------------------- - if args.o: - try: - fh = open(args.o, 'w') - except Exception, e: - traceback.print_exc() - - # GENERATE SIMPLE RULES ------------------------------------------- - print "Generating simple rules ..." - rules = "" - printed_rules = {} - rule_count = 0 - for filePath in file_strings: - try: - rule = "" - (path, file) = os.path.split(filePath) - # Prepare name - fileBase = os.path.splitext(file)[0] - # Create a clean new name - cleanedName = fileBase - # Adapt length of rule name - if len(fileBase) < 8: # if name is too short add part from path - cleanedName = path.split('\\')[-1:][0] + "_" + cleanedName - # File name starts with a number - if re.search(r'^[0-9]', cleanedName): - cleanedName = "sig_" + cleanedName - # clean name from all characters that would cause errors - cleanedName = re.sub('[^\w]', r'_', cleanedName) - # Check if already printed - if cleanedName in printed_rules: - printed_rules[cleanedName] += 1 - cleanedName = cleanedName + "_" + str(printed_rules[cleanedName]) - else: - printed_rules[cleanedName] = 1 - # Print rule title - rule += "rule %s {\n" % cleanedName - rule += "\tmeta:\n" - rule += "\t\tdescription = \"%s - file %s\"\n" % ( args.p, file ) - rule += "\t\tauthor = \"%s\"\n" %args.a - rule += "\t\thash = \"%s\"\n" % file_info_mal[filePath]["md5"] - rule += "\tstrings:\n" - # Adding the strings - for i, string in enumerate(file_strings[filePath]): - # Checking string length - fullword = True - if len(string) > 80: - # cut string - string = string[:80].rstrip("\\") - # not fullword anymore - fullword = False - # Add rule - if fullword: - rule += "\t\t$s%s = \"%s\" fullword\n" % ( str(i), string ) - else: - rule += "\t\t$s%s = \"%s\"\n" % ( str(i), string ) - # If too many string definitions found - cut it at the - # count defined via command line param -rc - if i > int(args.rc): - break - rule += "\tcondition:\n" - rule += "\t\tall of them\n" - rule += "}\n" - # print rule - # Add to rules string - rules += rule - # Try to write rule to file - if args.o: - fh.write(rule) - rule_count += 1 - except Exception, e: - traceback.print_exc() - - # GENERATE SUPER RULES -------------------------------------------- - if not args.nosuper: - print "Generating super rules ..." - printed_combi = {} - super_rule_count = 0 - for super_rule in super_rules: - try: - rule = "" - # Prepare Name - rule_name = "" - file_list = [] - # Loop through files - for filePath in super_rule["files"]: - (path, file) = os.path.split(filePath) - file_list.append(file) - # Prepare name - fileBase = os.path.splitext(file)[0] - # Create a clean new name - cleanedName = fileBase - # Append it to the full name - rule_name += "_" + cleanedName - - # Create a list of files - file_listing = ", ".join(file_list) - - # File name starts with a number - if re.search(r'^[0-9]', rule_name): - rule_name = "sig_" + rule_name - # clean name from all characters that would cause errors - rule_name = re.sub('[^\w]', r'_', rule_name) - # Check if already printed - if rule_name in printed_rules: - printed_combi[rule_name] += 1 - rule_name = rule_name + "_" + str(printed_combi[rule_name]) - else: - printed_combi[rule_name] = 1 - - # Print rule title - rule += "rule %s {\n" % rule_name - rule += "\tmeta:\n" - rule += "\t\tdescription = \"%s - from files %s\"\n" % ( args.p, file_listing ) - rule += "\t\tauthor = \"%s\"\n" %args.a - rule += "\t\tsuper_rule = 1\n" - for i, filePath in enumerate(super_rule["files"]): - rule += "\t\thash%s = \"%s\"\n" % (str(i), file_info_mal[filePath]["md5"]) - rule += "\tstrings:\n" - # Adding the strings - for i, string in enumerate(super_rule["strings"]): - # Checking string length - fullword = True - if len(string) > 80: - # cut string - string = string[:80].rstrip("\\") - # not fullword anymore - fullword = False - # Add rule - if fullword: - rule += "\t\t$s%s = \"%s\" fullword\n" % ( str(i), string ) - else: - rule += "\t\t$s%s = \"%s\"\n" % ( str(i), string ) - # If too many string definitions found - cut it at the - # count defined via command line param -rc - if i > int(args.rc): - break - rule += "\tcondition:\n" - rule += "\t\tall of them\n" - rule += "}\n" - # print rule - # Add to rules string - rules += rule - # Try to write rule to file - if args.o: - fh.write(rule) - super_rule_count += 1 - except Exception, e: - traceback.print_exc() - - # Close the rules file -------------------------------------------- - if args.o: - try: - fh.close() - except Exception, e: - traceback.print_exc() - - # Print rules to command line ------------------------------------- - if args.debug: - print rules - - print "Generated %s SIMPLE rules." % str(rule_count) - if not args.nosuper: - print "Generated %s SUPER rules." % str(super_rule_count) - print "All rules written to %s" % args.o - \ No newline at end of file