Commit graph

4,180 commits

Author SHA1 Message Date
DosX
571cd73f94
Update README.md db db_extra 2026-04-16 15:25:42 +03:00
DosX
d6818b2ef4 Add section flag constants and UPX-like detection
Introduce reusable SECTION_FLAGS_* constants and derived RWX masks to avoid duplicated local constants. Add a heuristic for detecting UPX-like binaries (3-section layout + RWX checks + common imports) and mark such files as a suspicious packer. Refactor packer/protector detection flow to use an isPackerOrProtectionNotDetected guard and to emit a "UPX-like" suspicion when appropriate. Also replace local RWX_MASK/RWX_CODE_MASK usage in scanForObfuscations_Native with the new global masks.
2026-04-16 13:21:46 +03:00
DosX
47f4b7d1cc dbs_min update 2026-04-15 15:56:54 +03:00
DosX
e507bc82e3 Recognize FNOP as NOP in heuristic scan
Treat the floating-point FNOP opcode the same as NOP in scanForObfuscations_Native by adding FNOP to the initial opcode check. This ensures sequences starting with FNOP are identified as NOPs and improves detection of NOP-equivalent obfuscation patterns.
2026-04-15 15:55:48 +03:00
DosX
1eb38ef069 Remove author email from rule header
Remove the author line containing 'horsicq <horsicq@gmail.com>' from the header comment in db/PE/__GenericHeuristicAnalysis_By_DosX.7.sg
2026-04-15 15:45:11 +03:00
DosX
3c7a9a47b3 Merge branch 'master' of https://github.com/horsicq/Detect-It-Easy 2026-04-15 15:30:08 +03:00
DosX
ae3196bcc8 Add Scylla PE detection rule
Add a Detect It Easy rule (db/PE/tool_Scylla.6.sg) to identify Scylla reconstructed PE dumps. The script (authored by DosX) skips .NET binaries, checks the last section for the name ".SCY" and a characteristics mask (0xe0000020), and marks the sample as a reconstructed dump by setting sOptions and bDetected. Includes upstream project link metadata.
2026-04-15 15:30:01 +03:00
DosX
763f42eefa Detect phantom EAT in PE heuristics
Add a heuristic in scanForObfuscations_Native to detect a phantom Export Address Table (EAT). If the PE header indicates an export section but numberOfUnmanagedExports is zero, the code now flags the sample by adding the "Phantom EAT" option. This helps identify an obfuscation trick that misleads PE parsers and analyzers.
2026-04-15 15:29:15 +03:00
Benjamin Funke
476d4d9a98 update Ubuntu version in BUILD.md 2026-04-13 18:21:26 +02:00
Benjamin Funke
6f4c7ec764 add more missing versions to changelog 2026-04-11 19:33:56 +02:00
DosX
8d9a65397c dbs_min update 2026-04-10 16:44:47 +03:00
DosX
169eec8e54 Add PE security/trust anomaly YARA rules
Introduce two YARA rules to detect PE signature/trust anomalies under a new section: Anomaly__AuthenticodeCorrupt (flags a present security directory with size smaller than a minimal PKCS#7 structure, ~8 bytes) and Anomaly__SecurityDirPointsBeyondFile (flags when the security directory offset + size exceeds the file size, indicating appended or corrupt data). Both rules target PE files and inspect pe.data_directories[4].
2026-04-10 16:41:50 +03:00
DosX
6935003c4f Add structural PE anomaly YARA rules
Append several structural/whole-file heuristic YARA rules to detect anomalous PE characteristics often associated with packers or custom toolchains. Rules added: TinyPE (filesize < 1KB), DOSStubMissing (e_lfanew < 0x50 indicating no DOS stub), DOSStubCustom (missing standard DOS stub strings), SelfModifyingHeaders (PE header located in a writable section), WholeFileHighEntropy (overall entropy > 7.0 for files >4KB), and VersionInfoMissing (native non-DLL PE with no version resource). Includes comments and detection thresholds explaining the rationale for each heuristic.
2026-04-10 16:41:40 +03:00
DosX
4017d1be29 Add PE resource anomaly YARA rules
Introduce two YARA rules to detect anomalous resources in PE files:

- Anomaly__ResourceHighEntropy: flags .rsrc sections >4KB with entropy >7.4 (used to catch likely encrypted/compressed payloads while acknowledging legitimate high-entropy resources like PNG/JPEG).
- Anomaly__ResourceDominatedBinary: flags PE files where a .rsrc section comprises >90% of the file size (possible embedded payload), excluding DLLs to reduce false positives.

Also adds a Resource anomalies comment header for organization.
2026-04-10 16:41:14 +03:00
DosX
5db4d1bc67 Add PE data-directory anomaly YARA rules
Introduce three YARA rules to detect PE data-directory anomalies: TLS callbacks (potential anti-debug/evasion), stripped debug directory despite a Rich header, and presence of CLR metadata in a PE with many native imports (mixed .NET/native). Rules check relevant data_directories indices (TLS=9, DEBUG=6, CLR=14), Rich signature, size, and import count to flag suspicious or uncommon binaries.
2026-04-10 16:41:02 +03:00
DosX
7626af9590 Add PE timestamp anomaly YARA rules
Introduce three new YARA rules detecting suspicious PE TimeDateStamp values: FutureTimestamp (pe.timestamp > Jan 1, 2026), AncientTimestamp (pe.timestamp < Jan 1, 1990 and not zero), and ZeroTimestamp (pe.timestamp == 0). These heuristics help flag likely forged, pre-PE-era, or intentionally stripped timestamps for further analysis.
2026-04-10 16:40:36 +03:00
DosX
ef54ac77bf Add PE overlay anomaly YARA rules
Add two YARA rules to detect suspicious overlays in PE files: Anomaly__LargeOverlay (flags overlays larger than 50% of the file, indicating possible embedded payloads) and Anomaly__OverlayPresent (flags overlays >1KB with entropy >7.0, indicating compressed/encrypted data). These heuristics help surface appended data that may contain hidden or packed content for further analysis.
2026-04-10 16:40:21 +03:00
DosX
df1038c6c2 Add PE import anomaly YARA rules
Add three import-related heuristics to DiE_EnhancedHeuristics_by_DosX.yar to detect suspicious PE import tables: Anomaly__NoImports (native PE with zero imports, excluding DLLs), Anomaly__SingleImportDll (native PE with exactly one import DLL), and Anomaly__SuspiciousMinimalImports (PEs importing only LoadLibrary[AW] and GetProcAddress). These rules help flag likely packed/crypted executables that resolve APIs manually and supplement existing entry-point/int3 heuristics.
2026-04-10 16:40:06 +03:00
DosX
a41cd5eca0 Add PE entry-point anomaly YARA rules
Introduce a new "Entry point anomalies" block with multiple YARA rules to detect suspicious PE entry-point placements and characteristics. Adds rules: Anomaly__EntryPointInLastSection (EP in last section, common for appended code/packers), Anomaly__EntryPointInNonCodeSection (EP inside a section without CODE flag), Anomaly__EntryPointOutsideAnySections (EP not in any section, skips DLLs and zero EP, ignores sections with no raw data), Anomaly__EPStartsWithNops (EP begins with a 4+ NOP sled), and Anomaly__EPStartsWithInt3 (EP begins with INT3). Rules use raw file offsets for pe.entry_point and include guards to reduce false positives.
2026-04-10 16:39:47 +03:00
DosX
bfd32a1317 Add section anomaly heuristics to YARA
Add multiple YARA rules to detect PE section anomalies commonly associated with packers, obfuscators, or tampered binaries. New rules cover: writable+executable code sections, executable .data/.rdata/.bss, empty or non-printable section names, sections with zero raw size but non-zero virtual size and execute flag, raw data extending beyond file size, virtual size much larger than raw size (excluding .bss), high-entropy sections (excluding .rsrc), and duplicate section names. These heuristics improve detection of suspicious PE files for further analysis.
2026-04-10 16:39:17 +03:00
DosX
8fc2c41722 Add DiE enhanced PE heuristics YARA rules
Add new YARA rules (yara_rules/DiE_EnhancedHeuristics_by_DosX.yar) for the Detect It Easy project authored by DosX. The file imports pe and math and defines reusable predicates (IsPE, IsNative, Is64) plus multiple PE header anomaly rules to detect suspicious or tampered PE files (e.g. zero-sized optional header, suspicious image base, zero entry point, entry point beyond image, invalid/tiny alignments, checksum mismatch, zero size_of_image, large section counts, suspicious subsystem, and forced integrity dll characteristic). These heuristics help flag manually crafted, packed, or corrupted binaries; copyright/author metadata is retained in the file.
2026-04-10 16:38:55 +03:00
DosX
4d6d56cc30 Avoid appending empty debug type
In detect(), assign sType.toLowerCase() to a local variable and only append it to sOptions when non-empty. This prevents empty strings from being added to sOptions when the debug type is blank, making debug data type handling more robust.
2026-04-10 16:21:25 +03:00
DosX
712ae27327 Enhance UX-Locker NET detection heuristics
Broaden the UX-Locker heuristic to trigger not only on lc.exe/lc module or assembly names but also on several .NET indicators. Add checks for PE.isNetObjectPresent("0xC00000FD: The memory location at the specified address returned \"null\"") and PE.isNetUStringPresent for "%temp%\\$unlocker_id.ux-cryptobytes", "attrib $h $s $r $i /D ", and "OneDrive10293" so samples without the original module/assembly names are still identified.
2026-04-10 16:14:35 +03:00
DosX
05d00ffb61 Heuristic: flag UX-Locker for 'lc' modules
Add a heuristic in scanForMaliciousCode_NET_and_Native to push a UX-Locker verdict when no other verdicts exist and the .NET module or assembly name is 'lc.exe' or 'lc'. The verdict object includes empty version and details fields. This introduces an early detection rule before existing RAT/anti-AV checks.
2026-04-10 15:49:33 +03:00
Benjamin Funke
1cb4eb11da merge changelog from old-die 2026-04-09 14:29:15 +02:00
Benjamin Funke
5203bef429 add release dates to changelog 2026-04-09 14:14:06 +02:00
DosX
ea101f2f63 Normalize OS version '0' to empty string
In detect() (db/ELF/_ELF.0.sg) handle the case where ELF.getOperationSystemVersion() returns the string "0" by converting it to an empty string (sVersion = String()). This prevents a misleading '0' value from being treated as a real version when verbose output is enabled.
2026-04-09 00:03:55 +03:00
horsicq
ad0f19a32c docs: fix typos and update method names in Binary.md 2026-04-07 23:11:43 +02:00
Benjamin Funke
07ea62d719 add DEV7 v1.20a variant to game_engine_DEV7.3.sg 2026-04-07 19:14:48 +02:00
DosX
11169a42e9 Add temporary Wayback guard in _setLang
Add a short-term compatibility check in db/language::_setLang to support legacy Wayback calls: if version is the boolean false, the function returns null and aborts further processing. Comment notes this is temporary and will be removed.
2026-04-07 14:02:57 +03:00
DosX
e8349e0db8 dbs_min update 2026-04-07 11:44:58 +03:00
DosX
d28f5465b8 Update DOS-mode signature strings
Expand and refine the list of DOS-mode signature messages used for custom DOS detection. Adds additional known headers (e.g., "This program requires Microsoft Windows" for MASM/FASM/older assemblers and "Win32 only." for Pellec C), reorders entries, and clarifies comments for existing strings (twinBASIC, Borland, Legacy Win32 SDK, Watcom). This improves detection of DOS stub messages emitted by various compilers/linkers.
2026-04-07 11:44:38 +03:00
DosX
101e21adcf Check overlay presence before compareOverlay
Add a guard using PE.isOverlayPresent() before calling PE.compareOverlay in the detect() function. This ensures overlay comparison only runs when an overlay exists, avoiding false comparisons or errors for files without an overlay. (Updated db/PE/sign_tool_Windows_Authenticode.7.sg)
2026-04-07 10:23:13 +03:00
DosX
95a65df591 dbs_min update 2026-04-04 21:30:18 +03:00
DosX
4ccb121e2b Merge branch 'master' of https://github.com/horsicq/Detect-It-Easy 2026-04-04 21:28:42 +03:00
DosX
d90c5ef5d6 Add 'Enhanced: DosX' and remove duplicate header
Update db/PE/_debug_data.5.sg: remove a duplicated header comment and add a new "// Enhanced: DosX" note. This clarifies the file metadata without changing detection logic for PE Debug Directory entries.
2026-04-04 21:28:28 +03:00
DosX
e443ef9a2e Include .reloc in section detection
Broaden the section name check to match both ".rsrc" and ".reloc" (using /. (rsrc|reloc)/i) instead of only matching "rsrc". This ensures reloc sections are counted in the resourceSectionsCounter and improves accuracy when identifying resource/relocation sections in PE parsing.
2026-04-04 21:28:11 +03:00
Benjamin Funke
e55da7cb08 dbs_min update 2026-04-04 17:08:31 +02:00
Benjamin Funke
3f3913f02e dbs_min update 2026-04-03 19:53:38 +02:00
Benjamin Funke
f8ecc41c4d dbs_min update 2026-04-02 12:55:33 +02:00
Benjamin Funke
7bce8fd158 dbs_min update 2026-04-01 20:32:58 +02:00
Benjamin Funke
ce43456555 refactor ILK signature 2026-04-01 19:57:46 +02:00
Benjamin Funke
a919a29d0e add version number to GME signature 2026-04-01 19:54:29 +02:00
Benjamin Funke
08662b9184 improve CloneCD signature
print 'v' before versionNumber variable output, to display the version number properly
2026-03-31 20:10:02 +02:00
Benjamin Funke
9e78bb925b remove unused zeros in archive_PAK.1.sg 2026-03-31 19:40:30 +02:00
Benjamin Funke
b3921c4c89 improve PAK Compiler detection 2026-03-31 19:39:00 +02:00
Benjamin Funke
03a9354f50 dbs_min update 2026-03-31 18:44:37 +02:00
DosX
383cd8f752 dbs_min update 2026-03-29 11:17:30 +03:00
DosX
da565edf49 Merge branch 'master' of https://github.com/horsicq/Detect-It-Easy 2026-03-29 11:16:37 +03:00
DosX
9cc535d698 Create format_SafeNova.1.sg 2026-03-29 11:16:34 +03:00