Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
6f6893e
Add validators and reason codes first draft
malx-labs May 4, 2026
ce5da9d
Add missing heuristics rich C source code
malx-labs May 4, 2026
c741259
The order of heuristics has changed: entrypoint_out_of_bounds now com…
malx-labs May 4, 2026
c296d86
Re-write heuristics unit tests based on the refactored structural checks
malx-labs May 4, 2026
feea3c8
Removed invalid_rva size = 0 heuristic as this is valid under PE rule…
malx-labs May 4, 2026
7d9ed1c
import_rva_invalid now taken care of by data_directory_out_of_range a…
malx-labs May 4, 2026
85368ab
tls_callback_anomaly is now a pe_structure_anomaly with a callback_ou…
malx-labs May 4, 2026
8181352
entrypoint_out_of_bounds now at the start of the heuristics section, …
malx-labs May 4, 2026
900d242
Import rva_invalid rva=0 and size=0 is now not treated as an anomaly …
malx-labs May 4, 2026
c89a569
import_rva_invalid now taken care of by data_directory_out_of_range a…
malx-labs May 4, 2026
75533e2
Refactor validators to ensure heuristic coverage is on par with pre-r…
malx-labs May 5, 2026
e0a0c4b
Plug structural validators into engine so heuristics layer can access…
malx-labs May 5, 2026
01f49a3
Refactor heuristics: structural checks now performed strictly by vali…
malx-labs May 5, 2026
4e2d7a5
RVA vs file offset is now correct, header and bogus EP header handlin…
malx-labs May 5, 2026
c1202ac
Add new reason codes for entrypoint rework
malx-labs May 5, 2026
f8f7172
Rework PE section validator; full structural model, new anomaly detec…
malx-labs May 5, 2026
e754a6e
Fix failing integration test: added new section_raw_overlap heuristic…
malx-labs May 5, 2026
339c3af
Rework optional-header validator: full PE/COFF structural model, exap…
malx-labs May 5, 2026
fc8509e
Rework of the RVA graph validator, bringing it inline with real PE lo…
malx-labs May 5, 2026
86dc7f9
Updated Security policy to include idna dependency
malx-labs May 6, 2026
7b64262
Add idna threat model entry
malx-labs May 6, 2026
0ef69be
Rewrite the TLS structural validator with full loader-accurate semant…
malx-labs May 7, 2026
95a59ac
Rewrite signature validator with full certificate-level checks: added…
malx-labs May 8, 2026
83621cf
Extend entropy validator with low-entropy detection and region-specif…
malx-labs May 8, 2026
89589fd
First draft of resources validator
malx-labs May 8, 2026
0e5023b
Added fully hardened resource validator that enforces correct PE reso…
malx-labs May 8, 2026
f07cd5f
Fix failing test: include get_overlay_data_start_offset in PE fixture
malx-labs May 8, 2026
04ea2e4
Refactor validator pipeline: strong typing, explicit dependencies, un…
malx-labs May 9, 2026
18a28de
Make validators dispatcher testable and add validator contract tests.
malx-labs May 9, 2026
e0c4c37
Add MPL-2.0 SPDX headers and update project documentation
malx-labs May 9, 2026
5c00eb6
Unit tests for new validators: project coverage at 100%
malx-labs May 9, 2026
581a304
Rewritten README
malx-labs May 9, 2026
723cd97
Change JSON example for README
malx-labs May 10, 2026
1e706ea
Amend the roadmap
malx-labs May 10, 2026
572e5bd
Tighten up Why IOCX Matter and Exists sections
malx-labs May 10, 2026
f871cdf
Add structural validation deterministic heuristics document
malx-labs May 11, 2026
d16471b
Final changes to documentation
malx-labs May 11, 2026
83dbc92
Add version highlights to README
malx-labs May 11, 2026
0ac84c5
Update final test qty
malx-labs May 11, 2026
2fe7e6b
Add missing resource directory anomalies to reason code documentation
malx-labs May 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 48 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,52 @@
# v0.7.3 — Structural Correctness & Deterministic Heuristics
**Released: 2026‑05‑11**

## Added
- Comprehensive structural validation across all PE subsystems
- New checks for entrypoint mapping, section flags, RVA graph consistency, TLS callbacks, and certificate bounds
- Region‑specific entropy validation
- Deterministic structural anomaly surfacing in heuristics layer
- Extensive new structural and heuristic tests
- Snapshot tests ensuring deterministic output

## Changed
- Reworked entrypoint validator with correct RVA→file offset mapping
- Expanded section validator with overlap, ordering, and flag‑consistency checks
- Strengthened optional header validation (alignment, size fields, directory count)
- Hardened RVA graph validator (bounds, mapping, overlap)
- Improved TLS validator (range, callbacks, mapping)
- Improved signature validator (symmetry, bounds, type/revision checks)
- Refined entropy validator (low entropy, region entropy, uniformity)

## Fixed
- Conceptual inconsistencies around RVA vs file offsets
- Redundant or contradictory structural checks
- Missing structural anomalies in several validators
- Inconsistent or unclear ReasonCodes
- Edge‑case crashes on malformed or truncated binaries

## Removed
- No removals in this release

## Notes
- v0.7.3 remains strictly static-only
- No dynamic analysis, unpacking, emulation, or new dependencies introduced

---

# v0.7.2 — Dependency fix
**Released: 2026‑05‑01**

## Added
- Required `idna` dependency for punycode and Unicode domain handling
- No behavioural changes to extractors
- No schema changes
- Fully compatible with v0.7.1

---

# **v0.7.1 — Heuristics Engine Expansion & Structural Analysis Improvements**
**Released: 2026‑05‑??**
**Released: 2026‑05‑01**

v0.7.1 delivers a major upgrade to IOCX’s **PE heuristics engine**, **extractor correctness**, and **adversarial‑input resilience**. This release introduces six new structural heuristics, broad extractor hardening, and a significantly expanded adversarial test suite — including **full adversarial coverage for every IOC category**.

Expand Down
115 changes: 78 additions & 37 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,24 @@ IOCX is part of the MalX Labs ecosystem — a family of modern, deterministic, d
We welcome contributions of all kinds: bug fixes, static‑analysis improvements, new extractors, documentation updates, and thoughtful design discussions.
This guide explains how to contribute effectively while keeping IOCX predictable, secure, and maintainable.

---

## Project Philosophy

IOCX is intentionally:

- Minimal — extremely small dependency footprint
- Secure — safe handling of untrusted input
- Deterministic — no network access, no non-deterministic behaviour
- Extensible — new static‑analysis modules can be added cleanly
- **Minimal** — extremely small dependency footprint
- **Secure** — safe handling of untrusted input
- **Deterministic** — no network access, no nondeterministic behaviour
- **Extensible** — new static‑analysis modules can be added cleanly

All contributions must align with these principles.

---

## Core vs Plugins

IOCX has a strict boundary between core functionality and plugin‑based extensions.
IOCX has a strict boundary between **core functionality** and **plugin‑based extensions**.
This keeps the core predictable and universally safe while allowing users to extend IOCX for their own environments.

### What Belongs in the Core
Expand Down Expand Up @@ -51,7 +55,7 @@ Plugins are for functionality that is:
- optional or environment‑specific
- based on external data
- organisation‑specific
- user-maintained
- usermaintained
- likely to evolve independently

Examples:
Expand All @@ -65,6 +69,8 @@ If the information comes from the user’s environment, it belongs in a plugin.

This separation keeps IOCX clean, predictable, and safe to run anywhere.

---

## How to Contribute

### Fix bugs
Expand All @@ -80,12 +86,12 @@ Open an issue or submit a PR with:
Regex‑based extractors live under:

```
detectors/extractors/
iocx/detectors/extractors/
```

Please include:

- a clear, well-scoped regex
- a clear, wellscoped regex
- validation logic
- test cases
- example inputs
Expand All @@ -102,7 +108,7 @@ Enhancements to metadata extraction, imports, sections, or resources are welcome

- static
- deterministic
- dependency-minimal
- dependencyminimal

### Add synthetic test samples

Expand All @@ -113,67 +119,69 @@ See the “Testing” section below.

Better examples, diagrams, and explanations are always appreciated.

### Contribution Process
---

## Contribution Process

1. Fork the repository
1. **Fork the repository**

```bash
git clone https://github.com/iocx-dev/iocx.git

```

2. Create a feature branch
2. **Create a feature branch**

```bash
git checkout -b feature/my-improvement

```

3. Install locally
3. **Install locally**

```bash
pip install -e .
```

4. Run tests
4. **Run tests**

```bash
pytest
```

5. Run security checks
5. **Run security checks**

```bash
bandit -r iocx -lll
pip-audit --skip-editable
```

6. Open a Pull Request
6. **Open a Pull Request**

- Target the main branch
- Target the `main` branch
- Describe what you changed and why
- Link any related issues

CI will run automatically.

---

## Testing

IOCX is designed to be **safe to develop on any machine**.

### Do NOT:

- Upload or commit real malware
- Submit password‑protected malware archives
- Include malicious payloads or exploit code
- Add samples requiring execution to analyse
- upload or commit real malware
- submit password‑protected malware archives
- include malicious payloads or exploit code
- add samples requiring execution to analyse

### Do:

- Use synthetic PE files
- Embed fake IOCs inside harmless executables
- Use benign Windows binaries for structural testing
- Use public test files like EICAR or GTUBE
- Add text files containing mixed IOCs
- use synthetic PE files
- embed fake IOCs inside harmless executables
- use benign Windows binaries for structural testing
- use public test files like EICAR or GTUBE
- add text files containing mixed IOCs

If unsure, open an issue before submitting.

Expand All @@ -183,33 +191,38 @@ All new features should include tests.
Bug fixes should include a test that reproduces the issue.

Tests live in:
```plaintext

```
tests/
```

We use pytest.

---

## Adding New Extractors

Extractors live in:

```plaintext
```
iocx/detectors/extractors/
```

To add one:

- Create a new file in that directory
- Follow existing patterns
- Ensure it registers itself on import
- Add tests under `tests/unit/extractors/`
- create a new file in that directory
- follow existing patterns
- ensure it registers itself on import
- add tests under `tests/unit/extractors/`

Extractors must be:

- deterministic
- side‑effect‑free
- safe for untrusted input

---

## Code Style

We keep the codebase clean and consistent.
Expand All @@ -225,20 +238,48 @@ ruff check iocx
black iocx
```

---

## Security

If you discover a security issue, do not open a GitHub issue.
Follow the instructions in `SECURITY.md`.

Follow the instructions in SECURITY.md.
---

## Code of Conduct

Be respectful, constructive, and supportive.
We aim for a collaborative, professional environment.

## License
---

## Licensing of Contributions

By contributing to IOCX, you agree that:

- Your contributions are licensed under the **Mozilla Public License 2.0 (MPL‑2.0)**.
- You grant the project maintainers the right to **dual‑license your contributions** under commercial terms as part of the IOCX open‑core model.
- You retain copyright to your contributions.

This ensures:

- the open‑source core remains healthy
- improvements remain open
- commercial customers can use IOCX under proprietary terms
- your work is properly attributed

By submitting a contribution, you certify that you have the right to do so and that your contribution does not violate any third-party rights.

---

## Trademark Notice

Contributors may not use the IOCX name in a way that implies endorsement.
See [TRADEMARK_POLICY.md](TRADEMARK_POLICY.md) for details.
See [LICENSE](LICENSE) for full MPL-2.0 terms.

By contributing, you agree that your contributions are licensed under the project's MIT License.
---

## Thank You

Expand Down
Loading
Loading