dgallagher

Shlayer hunting

Jun 18th, 2020
617
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.27 KB | None | 0 0
  1. rule shlayer_bash_embedded_app
  2. {
  3. meta:
  4. description = "Detects Shlayer bash script with embedded Mac app"
  5. author = "Daniel Gallagher"
  6. date = "2020-06-18"
  7. hash1 = "86561207a7ebeb29771666bdc6469d81f9fc9f57eedda4f813ca3047b8162cfb"
  8. hash2 = "2c2c611965f7b9c8e3524a77da9b2ebedf1b7705e6276140cffe2c848bff9113"
  9.  
  10. strings:
  11. // tail +$((LINENO+4)) $0
  12. $x1 = {74 61 69 6c 20 2b 24 28 28 4c 49 4e 45 4e 4f 2b 34 29 29 20 24 30}
  13.  
  14. condition:
  15. 1 of ($x*)
  16. }
  17.  
  18. rule shlayer_bash_script
  19. {
  20. meta:
  21. description = "Detects Shlayer bash install script"
  22. author = "Daniel Gallagher"
  23. date = "2020-05-27"
  24. hash1 = "82e4cdbe361c126f35c45a1e44f942022d360c80674d149efbc8112e0e3f3220"
  25. hash2 = "bb63b8513907cc7a39421b09a059dc3c131cfba75c46c537a4e002b131401580"
  26.  
  27. strings:
  28. // eval "$(openssl enc -base64 -d -aes-256-cbc -nosalt -pass pass:
  29. $x1 = {65 76 61 6c 20 22 24 28 6f 70 65 6e 73 73 6c 20 65 6e 63 20 2d 62 61 73 65 36 34 20 2d 64 20 2d 61 65 73 2d 32 35 36 2d 63 62 63 20 2d 6e 6f 73 61 6c 74 20 2d 70 61 73 73 20 70 61 73 73 3a}
  30.  
  31. condition:
  32. 1 of ($x*)
  33. }
  34.  
  35. rule shlayer_python_script
  36. {
  37. meta:
  38. description = "Detects Shlayer python install script"
  39. author = "Daniel Gallagher"
  40. date = "2020-05-28"
  41. hash1 = "6f5d3e4adb0933c402878f2a93a5c3352bb2a77a210a887c266ae79ae66a6f42"
  42. hash2 = "b139b02dae8b3a038e5128279f4980958b2e73eca6d92ff908d4efe41ffe46f8"
  43.  
  44. strings:
  45. $s1 = "u=%(machineID)s" ascii nocase
  46. $s2 = "s=%(uuid)s" ascii nocase
  47. $s3 = "o=%(osVersion)s" ascii nocase
  48. $s4 = "fileUrl = edt.encryptText(url, key)" ascii nocase
  49.  
  50. // commands = ["curl", "-f0L", "-o"]
  51. $x1 = {63 6f 6d 6d 61 6e 64 73 20 3d 20 5b 22 63 75 72 6c 22 2c 20 22 2d 66 30 4c 22 2c 20 22 2d 6f 22 5d}
  52.  
  53. condition:
  54. all of ($s*)
  55. or 1 of ($x*)
  56. }
  57.  
  58. rule shlayer_c2_domain
  59. {
  60. meta:
  61. description = "Detects existence of known Shlayer C2 domain"
  62. author = "Daniel Gallagher"
  63. date = "2020-06-09"
  64. hash1 = "6f5d3e4adb0933c402878f2a93a5c3352bb2a77a210a887c266ae79ae66a6f42"
  65. hash2 = "ac6b301b46b795dc5573d6fbdfa6e1906845d03a019566c1a9f0b1c488ef12df"
  66.  
  67. strings:
  68. $x1 = "api.frequencymode.com" wide ascii nocase
  69. $x2 = "api.operativeupgrade.com" wide ascii nocase
  70. $x3 = "api.defaultrotator.com" wide ascii nocase
  71. $x4 = "api.resultsformat.com" wide ascii nocase
  72. $x5 = "api.launchlookup.com" wide ascii nocase
  73. $x6 = "api.entrycache.com" wide ascii nocase
  74. $x7 = "api.typicalarchive.com" wide ascii nocase
  75. $x8 = "api.macsmoments.com" wide ascii nocase
  76.  
  77. condition:
  78. 1 of ($x*)
  79. }
Add Comment
Please, Sign In to add comment