├── README.md ├── all.yar ├── angler_ek_checkpoint.yar ├── angler_ek_redirector.yar ├── angler_flash.yar ├── angler_flash2.yar ├── angler_flash4.yar ├── angler_flash5.yar ├── angler_flash_uncompressed.yar ├── angler_html.yar ├── angler_html2.yar ├── angler_jar.yar ├── angler_js.yar ├── blackhole1_jar.yar ├── blackhole2_css.yar ├── blackhole2_htm.yar ├── blackhole2_htm10.yar ├── blackhole2_htm11.yar ├── blackhole2_htm12.yar ├── blackhole2_htm3.yar ├── blackhole2_htm4.yar ├── blackhole2_htm5.yar ├── blackhole2_htm6.yar ├── blackhole2_htm8.yar ├── blackhole2_jar.yar ├── blackhole2_jar2.yar ├── blackhole2_jar3.yar ├── blackhole2_pdf.yar ├── blackhole_basic.yar ├── bleedinglife2_adobe_2010_1297_exploit.yar ├── bleedinglife2_adobe_2010_2884_exploit.yar ├── bleedinglife2_jar2.yar ├── bleedinglife2_java_2010_0842_exploit.yar ├── crimepack_jar.yar ├── crimepack_jar3.yar ├── cve_2013_0074.yar ├── cve_2013_0422.yar ├── eleonore_jar.yar ├── eleonore_jar2.yar ├── eleonore_jar3.yar ├── eleonore_js.yar ├── eleonore_js2.yar ├── eleonore_js3.yar ├── fragus_htm.yar ├── fragus_js.yar ├── fragus_js2.yar ├── fragus_js_flash.yar ├── fragus_js_java.yar ├── fragus_js_quicktime.yar ├── fragus_js_vml.yar ├── javascript_exploit_and_obfuscation.yar ├── malicious_office.yar ├── malicious_pdf.yar ├── phoenix_html.yar ├── phoenix_html10.yar ├── phoenix_html11.yar ├── phoenix_html2.yar ├── phoenix_html3.yar ├── phoenix_html4.yar ├── phoenix_html5.yar ├── phoenix_html6.yar ├── phoenix_html7.yar ├── phoenix_html8.yar ├── phoenix_html9.yar ├── phoenix_jar.yar ├── phoenix_jar2.yar ├── phoenix_jar3.yar ├── phoenix_pdf.yar ├── phoenix_pdf2.yar ├── phoenix_pdf3.yar ├── redkit_bin_basic.yar ├── sakura_jar.yar ├── sakura_jar2.yar ├── zeroaccess_css.yar ├── zeroaccess_css2.yar ├── zeroaccess_htm.yar ├── zeroaccess_js.yar ├── zeroaccess_js2.yar ├── zeroaccess_js3.yar ├── zeroaccess_js4.yar ├── zerox88_js2.yar ├── zerox88_js3.yar └── zeus_js.yar /README.md: -------------------------------------------------------------------------------- 1 | Burp-Yara-Rules 2 | ======== 3 | 4 | ##Description 5 | Yara rules to be used with the Burp Yara-Scanner extension 6 | 7 | ##Introduction 8 | Burp-Yara-Rules is a collection of Yara rules built from malicious code samples found on the Internet, in addition to Yara rules created by third-parties that identify malicious software commonly found hosted on websites. 9 | 10 | The rules are intended to be used with the Burp Yara-Scanner extension found here: https://github.com/PolitoInc/Yara-Scanner. The goal being to identify infected web pages during a web application assessment. 11 | 12 | ##Usage 13 | Add the Yara-Scanner extension within Burp (follow the directions at the Yara-Scanner link above). Then use the all.yar rules file as it combines all rules in this repository into a single file. 14 | 15 | ##Additional Details 16 | The Yara rules in this repository were found by searching the Internet for rules that detect common exploit kits, as well as by running the YaraGenerator (https://github.com/Xen0ph0n/YaraGenerator/) against downloaded exploit kit samples. The rules look for: 17 | * Signs of infection in HTML code 18 | * Signs of infection in JavaScript code 19 | * Signs of infection in CSS code 20 | * Detection of infected JAR files 21 | * Detection of infected PDF files 22 | * Detection of infected SilverLight XAP files 23 | * Detection of infected Flash SWF files 24 | -------------------------------------------------------------------------------- /all.yar: -------------------------------------------------------------------------------- 1 | rule zerox88_js2 2 | { 3 | meta: 4 | author = "Josh Berry" 5 | date = "2016-06-26" 6 | description = "0x88 Exploit Kit Detection" 7 | hash0 = "cad8b652338f5e3bc93069c8aa329301" 8 | sample_filetype = "js-html" 9 | yaragenerator = "https://github.com/Xen0ph0n/YaraGenerator" 10 | strings: 11 | $string0 = "function gSH() {" 12 | $string1 = "200 HEIGHT" 13 | $string2 = "'sh.js'><\\/SCRIPT>" 14 | $string3 = " 2 - 26;" 15 | $string4 = "" fullword 84 | condition: 85 | all of them 86 | } 87 | 88 | rule angler_flash 89 | { 90 | meta: 91 | author = "Josh Berry" 92 | date = "2016-06-26" 93 | description = "Angler Exploit Kit Detection" 94 | hash0 = "8081397c30b53119716c374dd58fc653" 95 | sample_filetype = "unknown" 96 | yaragenerator = "https://github.com/Xen0ph0n/YaraGenerator" 97 | strings: 98 | $string0 = "(9OOSp" 99 | $string1 = "r$g@ 0'[A" 100 | $string2 = ";R-1qTP" 101 | $string3 = "xwBtR4" 102 | $string4 = "YbVjxp" 103 | $string5 = "ddgXkF" 104 | $string6 = ")n'URF" 105 | $string7 = "vAzq@W" 106 | $string8 = "rOkX$6m<" 107 | $string9 = "@@DB}q " 108 | $string10 = "TiKV'iV" 109 | $string11 = "538x;B" 110 | $string12 = "9pEM{d" 111 | $string13 = ".SIy/O" 112 | $string14 = "ER
';" fullword wide ascii /* score: '24.00' */ 1056 | $s9 = "var title = 'Session Timed Out \"YouTube\"';" fullword wide ascii /* score: '24.00' */ 1057 | $s10 = "var title = 'Session Timed Out \"Yammer\"';" fullword wide ascii /* score: '24.00' */ 1058 | $s11 = "var logobox = 'style=\"border:4px #84ACDD solid;border-radius:7px;height:45px;width:45px;background:#ffffff\"';" fullword wide ascii /* score: '21.00' */ 1059 | $s12 = "sneakydiv.innerHTML= '

Your session has timed out!

For" wide ascii /* score: '23.00' */ 1060 | $s13 = "inner.append(title, description, user,password);" fullword wide ascii /* score: '23.00' */ 1061 | $s14 = "sneakydiv.innerHTML= '

10 and 1 of ($cond*)) or ($action1 and $cond0 and $nop) 1212 | } 1213 | 1214 | rule shellcode_blob_metadata : PDF 1215 | { 1216 | meta: 1217 | author = "Glenn Edwards (@hiddenillusion)" 1218 | version = "0.1" 1219 | description = "When there's a large Base64 blob inserted into metadata fields it often indicates shellcode to later be decoded" 1220 | weight = 4 1221 | strings: 1222 | $magic = { 25 50 44 46 } 1223 | 1224 | $reg_keyword = /\/Keywords.?\(([a-zA-Z0-9]{200,})/ //~6k was observed in BHEHv2 PDF exploits holding the shellcode 1225 | $reg_author = /\/Author.?\(([a-zA-Z0-9]{200,})/ 1226 | $reg_title = /\/Title.?\(([a-zA-Z0-9]{200,})/ 1227 | $reg_producer = /\/Producer.?\(([a-zA-Z0-9]{200,})/ 1228 | $reg_creator = /\/Creator.?\(([a-zA-Z0-9]{300,})/ 1229 | $reg_create = /\/CreationDate.?\(([a-zA-Z0-9]{200,})/ 1230 | 1231 | condition: 1232 | $magic at 0 and 1 of ($reg*) 1233 | } 1234 | 1235 | rule multiple_filtering : PDF 1236 | { 1237 | meta: 1238 | author = "Glenn Edwards (@hiddenillusion)" 1239 | version = "0.2" 1240 | weight = 3 1241 | 1242 | strings: 1243 | $magic = { 25 50 44 46 } 1244 | $attrib = /\/Filter.*?(\/ASCIIHexDecode\W+|\/LZWDecode\W+|\/ASCII85Decode\W+|\/FlateDecode\W+|\/RunLengthDecode){2}/ 1245 | // left out: /CCITTFaxDecode, JBIG2Decode, DCTDecode, JPXDecode, Crypt 1246 | 1247 | condition: 1248 | $magic at 0 and $attrib 1249 | } 1250 | 1251 | rule suspicious_js : PDF 1252 | { 1253 | meta: 1254 | author = "Glenn Edwards (@hiddenillusion)" 1255 | version = "0.1" 1256 | weight = 3 1257 | 1258 | strings: 1259 | $magic = { 25 50 44 46 } 1260 | 1261 | $attrib0 = /\/OpenAction / 1262 | $attrib1 = /\/JavaScript / 1263 | 1264 | $js0 = "eval" 1265 | $js1 = "Array" 1266 | $js2 = "String.fromCharCode" 1267 | 1268 | condition: 1269 | $magic at 0 and all of ($attrib*) and 2 of ($js*) 1270 | } 1271 | 1272 | rule suspicious_launch_action : PDF 1273 | { 1274 | meta: 1275 | author = "Glenn Edwards (@hiddenillusion)" 1276 | version = "0.1" 1277 | weight = 2 1278 | 1279 | strings: 1280 | $magic = { 25 50 44 46 } 1281 | 1282 | $attrib0 = /\/Launch/ 1283 | $attrib1 = /\/URL / 1284 | $attrib2 = /\/Action/ 1285 | $attrib3 = /\/F / 1286 | 1287 | condition: 1288 | $magic at 0 and 3 of ($attrib*) 1289 | } 1290 | 1291 | rule suspicious_embed : PDF 1292 | { 1293 | meta: 1294 | author = "Glenn Edwards (@hiddenillusion)" 1295 | version = "0.1" 1296 | ref = "https://feliam.wordpress.com/2010/01/13/generic-pdf-exploit-hider-embedpdf-py-and-goodbye-av-detection-012010/" 1297 | weight = 2 1298 | 1299 | strings: 1300 | $magic = { 25 50 44 46 } 1301 | 1302 | $meth0 = /\/Launch/ 1303 | $meth1 = /\/GoTo(E|R)/ //means go to embedded or remote 1304 | $attrib0 = /\/URL / 1305 | $attrib1 = /\/Action/ 1306 | $attrib2 = /\/Filespec/ 1307 | 1308 | condition: 1309 | $magic at 0 and 1 of ($meth*) and 2 of ($attrib*) 1310 | } 1311 | 1312 | rule suspicious_obfuscation : PDF 1313 | { 1314 | meta: 1315 | author = "Glenn Edwards (@hiddenillusion)" 1316 | version = "0.1" 1317 | weight = 2 1318 | 1319 | strings: 1320 | $magic = { 25 50 44 46 } 1321 | $reg = /\/\w#[a-zA-Z0-9]{2}#[a-zA-Z0-9]{2}/ 1322 | 1323 | condition: 1324 | $magic at 0 and #reg > 5 1325 | } 1326 | 1327 | rule invalid_XObject_js : PDF 1328 | { 1329 | meta: 1330 | author = "Glenn Edwards (@hiddenillusion)" 1331 | description = "XObject's require v1.4+" 1332 | ref = "https://blogs.adobe.com/ReferenceXObjects/" 1333 | version = "0.1" 1334 | weight = 2 1335 | 1336 | strings: 1337 | $magic = { 25 50 44 46 } 1338 | $ver = /%PDF-1\.[4-9]/ 1339 | 1340 | $attrib0 = /\/XObject/ 1341 | $attrib1 = /\/JavaScript/ 1342 | 1343 | condition: 1344 | $magic at 0 and not $ver and all of ($attrib*) 1345 | } 1346 | 1347 | rule invalid_trailer_structure : PDF 1348 | { 1349 | meta: 1350 | author = "Glenn Edwards (@hiddenillusion)" 1351 | version = "0.1" 1352 | weight = 1 1353 | 1354 | strings: 1355 | $magic = { 25 50 44 46 } 1356 | // Required for a valid PDF 1357 | $reg0 = /trailer\r?\n?.*\/Size.*\r?\n?\.*/ 1358 | $reg1 = /\/Root.*\r?\n?.*startxref\r?\n?.*\r?\n?%%EOF/ 1359 | 1360 | condition: 1361 | $magic at 0 and not $reg0 and not $reg1 1362 | } 1363 | 1364 | rule multiple_versions : PDF 1365 | { 1366 | meta: 1367 | author = "Glenn Edwards (@hiddenillusion)" 1368 | version = "0.1" 1369 | description = "Written very generically and doesn't hold any weight - just something that might be useful to know about to help show incremental updates to the file being analyzed" 1370 | weight = 0 1371 | 1372 | strings: 1373 | $magic = { 25 50 44 46 } 1374 | $s0 = "trailer" 1375 | $s1 = "%%EOF" 1376 | 1377 | condition: 1378 | $magic at 0 and #s0 > 1 and #s1 > 1 1379 | } 1380 | 1381 | rule js_wrong_version : PDF 1382 | { 1383 | meta: 1384 | author = "Glenn Edwards (@hiddenillusion)" 1385 | description = "JavaScript was introduced in v1.3" 1386 | ref = "http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/pdf/pdfs/pdf_reference_1-7.pdf" 1387 | version = "0.1" 1388 | weight = 2 1389 | 1390 | strings: 1391 | $magic = { 25 50 44 46 } 1392 | $js = /\/JavaScript/ 1393 | $ver = /%PDF-1\.[3-9]/ 1394 | 1395 | condition: 1396 | $magic at 0 and $js and not $ver 1397 | } 1398 | 1399 | rule JBIG2_wrong_version : PDF 1400 | { 1401 | meta: 1402 | author = "Glenn Edwards (@hiddenillusion)" 1403 | description = "JBIG2 was introduced in v1.4" 1404 | ref = "http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/pdf/pdfs/pdf_reference_1-7.pdf" 1405 | version = "0.1" 1406 | weight = 1 1407 | 1408 | strings: 1409 | $magic = { 25 50 44 46 } 1410 | $js = /\/JBIG2Decode/ 1411 | $ver = /%PDF-1\.[4-9]/ 1412 | 1413 | condition: 1414 | $magic at 0 and $js and not $ver 1415 | } 1416 | 1417 | rule FlateDecode_wrong_version : PDF 1418 | { 1419 | meta: 1420 | author = "Glenn Edwards (@hiddenillusion)" 1421 | description = "Flate was introduced in v1.2" 1422 | ref = "http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/pdf/pdfs/pdf_reference_1-7.pdf" 1423 | version = "0.1" 1424 | weight = 1 1425 | 1426 | strings: 1427 | $magic = { 25 50 44 46 } 1428 | $js = /\/FlateDecode/ 1429 | $ver = /%PDF-1\.[2-9]/ 1430 | 1431 | condition: 1432 | $magic at 0 and $js and not $ver 1433 | } 1434 | 1435 | rule embed_wrong_version : PDF 1436 | { 1437 | meta: 1438 | author = "Glenn Edwards (@hiddenillusion)" 1439 | description = "EmbeddedFiles were introduced in v1.3" 1440 | ref = "http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/pdf/pdfs/pdf_reference_1-7.pdf" 1441 | version = "0.1" 1442 | weight = 1 1443 | 1444 | strings: 1445 | $magic = { 25 50 44 46 } 1446 | $embed = /\/EmbeddedFiles/ 1447 | $ver = /%PDF-1\.[3-9]/ 1448 | 1449 | condition: 1450 | $magic at 0 and $embed and not $ver 1451 | } 1452 | 1453 | rule invalid_xref_numbers : PDF 1454 | { 1455 | meta: 1456 | author = "Glenn Edwards (@hiddenillusion)" 1457 | version = "0.1" 1458 | description = "The first entry in a cross-reference table is always free and has a generation number of 65,535" 1459 | notes = "This can be also be in a stream..." 1460 | weight = 1 1461 | 1462 | strings: 1463 | $magic = { 25 50 44 46 } 1464 | $reg0 = /xref\r?\n?.*\r?\n?.*65535\sf/ 1465 | $reg1 = /endstream.*?\r?\n?endobj.*?\r?\n?startxref/ 1466 | condition: 1467 | $magic at 0 and not $reg0 and not $reg1 1468 | } 1469 | 1470 | rule js_splitting : PDF 1471 | { 1472 | meta: 1473 | author = "Glenn Edwards (@hiddenillusion)" 1474 | version = "0.1" 1475 | description = "These are commonly used to split up JS code" 1476 | weight = 2 1477 | 1478 | strings: 1479 | $magic = { 25 50 44 46 } 1480 | $js = /\/JavaScript/ 1481 | $s0 = "getAnnots" 1482 | $s1 = "getPageNumWords" 1483 | $s2 = "getPageNthWord" 1484 | $s3 = "this.info" 1485 | 1486 | condition: 1487 | $magic at 0 and $js and 1 of ($s*) 1488 | } 1489 | 1490 | rule BlackHole_v2 : PDF 1491 | { 1492 | meta: 1493 | author = "Glenn Edwards (@hiddenillusion)" 1494 | version = "0.1" 1495 | ref = "http://fortknoxnetworks.blogspot.no/2012/10/blackhhole-exploit-kit-v-20-url-pattern.html" 1496 | weight = 3 1497 | 1498 | strings: 1499 | $magic = { 25 50 44 46 } 1500 | $content = "Index[5 1 7 1 9 4 23 4 50" 1501 | 1502 | condition: 1503 | $magic at 0 and $content 1504 | } 1505 | 1506 | 1507 | rule XDP_embedded_PDF : PDF 1508 | { 1509 | meta: 1510 | author = "Glenn Edwards (@hiddenillusion)" 1511 | version = "0.1" 1512 | ref = "http://blog.9bplus.com/av-bypass-for-malicious-pdfs-using-xdp" 1513 | weight = 1 1514 | 1515 | strings: 1516 | $s1 = "" 1518 | $s3 = "" 1519 | $header0 = "%PDF" 1520 | $header1 = "JVBERi0" 1521 | 1522 | condition: 1523 | all of ($s*) and 1 of ($header*) 1524 | } 1525 | 1526 | rule FlashNewfunction: decodedPDF 1527 | { 1528 | meta: 1529 | ref = "CVE-2010-1297" 1530 | hide = true 1531 | impact = 5 1532 | ref = "http://blog.xanda.org/tag/jsunpack/" 1533 | strings: 1534 | $unescape = "unescape" fullword nocase 1535 | $shellcode = /%u[A-Fa-f0-9]{4}/ 1536 | $shellcode5 = /(%u[A-Fa-f0-9]{4}){5}/ 1537 | $cve20101297 = /\/Subtype ?\/Flash/ 1538 | condition: 1539 | ($unescape and $shellcode and $cve20101297) or ($shellcode5 and $cve20101297) 1540 | } 1541 | 1542 | rule phoenix_html 1543 | { 1544 | meta: 1545 | author = "Josh Berry" 1546 | date = "2016-06-26" 1547 | description = "Phoenix Exploit Kit Detection" 1548 | hash0 = "8395f08f1371eb7b2a2e131b92037f9a" 1549 | sample_filetype = "js-html" 1550 | yaragenerator = "https://github.com/Xen0ph0n/YaraGenerator" 1551 | strings: 1552 | $string1 = "'>= 0xC0) and (((uint8(@a[i] + 1) & 0x38) >> 3) == (uint8(@a[i] + 1) & 0x07)) and ((uint8(@a[i] + 2) & 0xF8) == 0xA0) and (uint8(@a[i] + 6) <= 0x3F) and (((uint8(@a[i] + 6) & 0x38) >> 3) != (uint8(@a[i] + 6) & 0x07))) 2840 | } 2841 | 2842 | rule maldoc_find_kernel32_base_method_3 : maldoc 2843 | { 2844 | meta: 2845 | author = "Didier Stevens (https://DidierStevens.com)" 2846 | strings: 2847 | $a = {68 30 00 00 00 (58|59|5A|5B|5C|5D|5E|5F) 64 8B ??} 2848 | condition: 2849 | for any i in (1..#a): (((uint8(@a[i] + 5) & 0x07) == (uint8(@a[i] + 8) & 0x07)) and (uint8(@a[i] + 8) <= 0x3F) and (((uint8(@a[i] + 8) & 0x38) >> 3) != (uint8(@a[i] + 8) & 0x07))) 2850 | } 2851 | 2852 | rule mwi_document: exploitdoc maldoc 2853 | { 2854 | meta: 2855 | description = "MWI generated document" 2856 | author = "@Ydklijnsma" 2857 | source = "http://blog.0x3a.com/post/117760824504/analysis-of-a-microsoft-word-intruder-sample" 2858 | 2859 | strings: 2860 | $field_creation_tag = "{\\field{\\*\\fldinst { INCLUDEPICTURE" 2861 | $mwistat_url = ".php?id=" 2862 | $field_closing_tag = "\\\\* MERGEFORMAT \\\\d}}{\\fldrslt}}" 2863 | 2864 | condition: 2865 | all of them 2866 | } 2867 | 2868 | rule macrocheck : maldoc 2869 | { 2870 | meta: 2871 | Author = "Fireeye Labs" 2872 | Date = "2014/11/30" 2873 | Description = "Identify office documents with the MACROCHECK credential stealer in them. It can be run against .doc files or VBA macros extraced from .docx files (vbaProject.bin files)." 2874 | Reference = "https://www.fireeye.com/blog/threat-research/2014/11/fin4_stealing_insid.html" 2875 | 2876 | strings: 2877 | $PARAMpword = "pword=" ascii wide 2878 | $PARAMmsg = "msg=" ascii wide 2879 | $PARAMuname = "uname=" ascii 2880 | $userform = "UserForm" ascii wide 2881 | $userloginform = "UserLoginForm" ascii wide 2882 | $invalid = "Invalid username or password" ascii wide 2883 | $up1 = "uploadPOST" ascii wide 2884 | $up2 = "postUpload" ascii wide 2885 | 2886 | condition: 2887 | all of ($PARAM*) or (($invalid or $userloginform or $userform) and ($up1 or $up2)) 2888 | } 2889 | 2890 | rule Office_AutoOpen_Macro : maldoc { 2891 | meta: 2892 | description = "Detects an Microsoft Office file that contains the AutoOpen Macro function" 2893 | author = "Florian Roth" 2894 | date = "2015-05-28" 2895 | score = 60 2896 | hash1 = "4d00695d5011427efc33c9722c61ced2" 2897 | hash2 = "63f6b20cb39630b13c14823874bd3743" 2898 | hash3 = "66e67c2d84af85a569a04042141164e6" 2899 | hash4 = "a3035716fe9173703941876c2bde9d98" 2900 | hash5 = "7c06cab49b9332962625b16f15708345" 2901 | hash6 = "bfc30332b7b91572bfe712b656ea8a0c" 2902 | hash7 = "25285b8fe2c41bd54079c92c1b761381" 2903 | strings: 2904 | $s1 = "AutoOpen" ascii fullword 2905 | $s2 = "Macros" wide fullword 2906 | condition: 2907 | uint32be(0) == 0xd0cf11e0 and all of ($s*) and filesize < 300000 2908 | } 2909 | 2910 | rule Embedded_EXE_Cloaking : maldoc { 2911 | meta: 2912 | description = "Detects an embedded executable in a non-executable file" 2913 | author = "Florian Roth" 2914 | date = "2015/02/27" 2915 | score = 80 2916 | strings: 2917 | $noex_png = { 89 50 4E 47 } 2918 | $noex_pdf = { 25 50 44 46 } 2919 | $noex_rtf = { 7B 5C 72 74 66 31 } 2920 | $noex_jpg = { FF D8 FF E0 } 2921 | $noex_gif = { 47 49 46 38 } 2922 | $mz = { 4D 5A } 2923 | $a1 = "This program cannot be run in DOS mode" 2924 | $a2 = "This program must be run under Win32" 2925 | condition: 2926 | ( 2927 | ( $noex_png at 0 ) or 2928 | ( $noex_pdf at 0 ) or 2929 | ( $noex_rtf at 0 ) or 2930 | ( $noex_jpg at 0 ) or 2931 | ( $noex_gif at 0 ) 2932 | ) 2933 | and 2934 | for any i in (1..#mz): ( @a1 < ( @mz[i] + 200 ) or @a2 < ( @mz[i] + 200 ) ) 2935 | } 2936 | -------------------------------------------------------------------------------- /angler_ek_checkpoint.yar: -------------------------------------------------------------------------------- 1 | rule angler_ek_checkpoint 2 | { 3 | meta: 4 | description = "Angler EK Exploit Kit - Checkpoint Detection" 5 | strings: 6 | $a = "Jul 2039" nocase 7 | $b = "Jul 2040" nocase 8 | condition: 9 | any of them 10 | } -------------------------------------------------------------------------------- /angler_ek_redirector.yar: -------------------------------------------------------------------------------- 1 | rule AnglerEKredirector 2 | { 3 | meta: 4 | description = "Angler Exploit Kit Redirector" 5 | ref = "http://blog.xanda.org/2015/08/28/yara-rule-for-angler-ek-redirector-js/" 6 | author = "adnan.shukor@gmail.com" 7 | date = "08-July-2015" 8 | impact = "5" 9 | version = "1" 10 | strings: 11 | $ekr1 = "" fullword 14 | $ekr4 = "" 18 | $string7 = "setTimeout(" 19 | $string8 = "'about:blank' WIDTH" 20 | $string9 = "mf.document.write(" 21 | $string10 = "document.write(" 22 | $string11 = "Kasper " 23 | condition: 24 | 11 of them 25 | } 26 | -------------------------------------------------------------------------------- /zerox88_js3.yar: -------------------------------------------------------------------------------- 1 | rule zerox88_js3 2 | { 3 | meta: 4 | author = "Josh Berry" 5 | date = "2016-06-26" 6 | description = "0x88 Exploit Kit Detection" 7 | hash0 = "9df0ac2fa92e602ec11bac53555e2d82" 8 | sample_filetype = "js-html" 9 | yaragenerator = "https://github.com/Xen0ph0n/YaraGenerator" 10 | strings: 11 | $string0 = " new ActiveXObject(szHTTP); " 12 | $string1 = " Csa2;" 13 | $string2 = "var ADO " 14 | $string3 = " new ActiveXObject(szOx88);" 15 | $string4 = " unescape(" 16 | $string5 = "/test.exe" 17 | $string6 = " szEtYij;" 18 | $string7 = "var HTTP " 19 | $string8 = "%41%44%4F%44%42%2E" 20 | $string9 = "%4D%65%64%69%61" 21 | $string10 = "var szSRjq" 22 | $string11 = "%43%3A%5C%5C%50%72%6F%67%72%61%6D" 23 | $string12 = "var METHOD " 24 | $string13 = "ADO.Mode " 25 | $string14 = "%61%79%65%72" 26 | $string15 = "%2E%58%4D%4C%48%54%54%50" 27 | $string16 = " 7 - 6; HTTP.Open(METHOD, szURL, i-3); " 28 | condition: 29 | 16 of them 30 | } 31 | -------------------------------------------------------------------------------- /zeus_js.yar: -------------------------------------------------------------------------------- 1 | rule zeus_js 2 | { 3 | meta: 4 | author = "Josh Berry" 5 | date = "2016-06-26" 6 | description = "Zeus Exploit Kit Detection" 7 | hash0 = "c87ac7a25168df49a64564afb04dc961" 8 | sample_filetype = "js-html" 9 | yaragenerator = "https://github.com/Xen0ph0n/YaraGenerator" 10 | strings: 11 | $string0 = "var jsmLastMenu " 12 | $string1 = "position:absolute; z-index:99' " 13 | $string2 = " -1)jsmSetDisplayStyle('popupmenu' " 14 | $string3 = " '