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: kape-target

Inputs

  • examples/inputs/kape-target-samples/browser_artifacts.txt

Profile

# KAPE Target Example
# This example demonstrates using KAPE-style forensic collection profiles
# Uses includes to combine multiple base profiles similar to KAPE targets

# Include base profiles to provide comprehensive forensic coverage
# These profiles include patterns for malware, credentials, and network artifacts
includes = [
  "../../profiles/base/malware.toml",
  "../../profiles/base/credentials.toml",
  "../../profiles/base/network.toml",
  "../../profiles/base/forensics.toml"
]

decode = ["base64"]

tag = "kape-target"

# Additional browser artifact patterns to complement the base profiles
[[patterns]]
  name = "Browser History URL"
  pattern = "https?://[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}"
  type = "regex"

[[patterns]]
  name = "Cookie Data"
  pattern = "cookie|session_id|auth_token"
  type = "regex"
  case-insensitive = true

# Windows execution artifacts
[[patterns]]
  name = "Prefetch Reference"
  pattern = "\\.pf$"
  type = "regex"

[[patterns]]
  name = "LNK File"
  pattern = "\\.lnk$"
  type = "regex"

# Registry artifact patterns  
[[patterns]]
  name = "Registry Hive"
  pattern = "NTUSER\\.DAT|SAM|SECURITY|SOFTWARE|SYSTEM"
  type = "regex"
  case-insensitive = true

[[patterns]]
  name = "Run Key"
  pattern = "CurrentVersion\\\\Run"
  type = "regex"
  case-insensitive = true

# Signatures for triage
[[signatures]]
  name = "High Value Artifacts"
  query = "SELECT DISTINCT sha256 FROM pattern_matches WHERE pattern_name IN ('Registry Hive', 'Prefetch Reference', 'LNK File', 'Browser History URL')"

[[signatures]]
  name = "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_files1
critical_count0
high_count0
medium_count0
low_count1
minimal_count0
must_investigate_count0
all_scoresNone
generated_at2025-12-03T09:19:44.191952511+00:00

top_scores

characteristics_scorefile_typefile_type_scoremust_investigatepathpattern_count_scorepattern_matchespattern_severity_scorereasonsrisk_levelscoresha256
0Other0False/browser_artifacts.txt202616["26 suspicious patterns detected"]Low3602b7836931f1b41384a04ceea08bb913daf5b95779493223c86c06d0923bc84b

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
/browser_artifacts.txtbrowser_artifacts.txt02b7836931f1b41384a04ceea08bb913daf5b95779493223c86c06d0923bc84b2025-12-03T08:56:20.496889204Z2025-12-03T08:56:20.496889204Z2025-12-03T09:19:17.543962359Z["text/plain"]0000

pattern_matches.csv

idsha256pattern_namematch_typematchlocationlength
102b7836931f1b41384a04ceea08bb913daf5b95779493223c86c06d0923bc84bSuspicious Registry AutorunregexHKCU\Software\Microsoft\Windows\CurrentVersion\Run21:050
202b7836931f1b41384a04ceea08bb913daf5b95779493223c86c06d0923bc84bHTTP URLregexhttps://example.com/login5:525
302b7836931f1b41384a04ceea08bb913daf5b95779493223c86c06d0923bc84bHTTP URLregexhttps://mail.google.com/6:524
402b7836931f1b41384a04ceea08bb913daf5b95779493223c86c06d0923bc84bHTTP URLregexhttps://github.com/user/repo7:528
502b7836931f1b41384a04ceea08bb913daf5b95779493223c86c06d0923bc84bHTTP URLregexhttp://suspicious-site.example.com/download8:543
602b7836931f1b41384a04ceea08bb913daf5b95779493223c86c06d0923bc84bRegistry HiveregexSam1:23
702b7836931f1b41384a04ceea08bb913daf5b95779493223c86c06d0923bc84bRegistry HiveregexSoftware21:58
802b7836931f1b41384a04ceea08bb913daf5b95779493223c86c06d0923bc84bRegistry HiveregexNTUSER.DAT22:010
902b7836931f1b41384a04ceea08bb913daf5b95779493223c86c06d0923bc84bRegistry HiveregexSAM23:03
1002b7836931f1b41384a04ceea08bb913daf5b95779493223c86c06d0923bc84bBrowser Historyregexhistory1:177
1102b7836931f1b41384a04ceea08bb913daf5b95779493223c86c06d0923bc84bBrowser HistoryregexHistory4:117
1202b7836931f1b41384a04ceea08bb913daf5b95779493223c86c06d0923bc84bBrowser History URLregexhttps://example.com5:519
1302b7836931f1b41384a04ceea08bb913daf5b95779493223c86c06d0923bc84bBrowser History URLregexhttps://mail.google.com6:523
1402b7836931f1b41384a04ceea08bb913daf5b95779493223c86c06d0923bc84bBrowser History URLregexhttps://github.com7:518
1502b7836931f1b41384a04ceea08bb913daf5b95779493223c86c06d0923bc84bBrowser History URLregexhttp://suspicious-site.example.com8:534
1602b7836931f1b41384a04ceea08bb913daf5b95779493223c86c06d0923bc84bCookie DataregexCookie10:36
1702b7836931f1b41384a04ceea08bb913daf5b95779493223c86c06d0923bc84bCookie Dataregexcookie11:06
1802b7836931f1b41384a04ceea08bb913daf5b95779493223c86c06d0923bc84bCookie Dataregexsession_id11:810
1902b7836931f1b41384a04ceea08bb913daf5b95779493223c86c06d0923bc84bCookie Dataregexcookie12:06
2002b7836931f1b41384a04ceea08bb913daf5b95779493223c86c06d0923bc84bCookie Dataregexauth_token12:810
2102b7836931f1b41384a04ceea08bb913daf5b95779493223c86c06d0923bc84bCookie DataregexCookie13:46
2202b7836931f1b41384a04ceea08bb913daf5b95779493223c86c06d0923bc84bRegistry HiveregexSam1:23
2302b7836931f1b41384a04ceea08bb913daf5b95779493223c86c06d0923bc84bRegistry HiveregexSoftware21:58
2402b7836931f1b41384a04ceea08bb913daf5b95779493223c86c06d0923bc84bRegistry HiveregexNTUSER.DAT22:010
2502b7836931f1b41384a04ceea08bb913daf5b95779493223c86c06d0923bc84bRegistry HiveregexSAM23:03
2602b7836931f1b41384a04ceea08bb913daf5b95779493223c86c06d0923bc84bRun KeyregexCurrentVersion\Run21:3218

signature_matches.csv

idsignature_namesha256
1Potential Data Exfiltration02b7836931f1b41384a04ceea08bb913daf5b95779493223c86c06d0923bc84b
2Browser Forensic Artifacts02b7836931f1b41384a04ceea08bb913daf5b95779493223c86c06d0923bc84b
3High Value Artifacts02b7836931f1b41384a04ceea08bb913daf5b95779493223c86c06d0923bc84b
4Multiple Indicators02b7836931f1b41384a04ceea08bb913daf5b95779493223c86c06d0923bc84b

unique_files.csv

sha256sha1md5file_sizemime_type_for_contentshannon_entropy
02b7836931f1b41384a04ceea08bb913daf5b95779493223c86c06d0923bc84bea5a887633c8bd219c8a6246d47e60595eb51eb08319f272c8364b72070c0e7f2aef66de665text/plain5.25520055683943