parascope
Weggli ruleset scanner for binaries and source code. Organise your weggli rules and scan source code and binaries in parallel!
Build/installation
To build and install parascope requires IDA Pro v9.2 and access to the latest SDK.
Install via crates.io:
# optional
Build/install from source:
# optional
Examples and usage
Scan a single binary and output the rule matches to stdout:
parascope --display -r rules /path/of/binary
Scan all binaries in the given directory and stream rule matches to results.jsonl:
parascope -o results.jsonl -r rules /directory/of/binaries
Scan the C source code in the given directory and stream rule matches to results.jsonl:
parascope -m c -o results.jsonl -r rules /directory/of/source-code
Complete set of capabilities:
<INPUT>
)
)
)
)
)
Rules
We use weggli-ruleset to help manage weggli patterns. It provides a yaml-based rule format that allows different (related) patterns to be grouped along with metadata useful for categorising and triaging matches. For example, we can encode the patterns from here, as follows:
id: call-to-unbounded-copy-functions
description: call to unbounded copy functions
severity: medium
tags:
- CWE-120
- CWE-242
- CWE-676
check-patterns:
- name: gets
regex: func=^gets$
pattern: |
{ $func(); }
- name: st(r|p)(cpy|cat)
regex: func=st(r|p)(cpy|cat)$
pattern: |
{ $func(); }
- name: wc(r|p)(cpy|cat)
regex: func=wc(r|p)(cpy|cat)$
pattern: |
{ $func(); }
- name: sprintf
regex: func=sprintf$
pattern: |
{ $func(); }
- name: scanf
regex: func=scanf$
pattern: |
{ $func(); }
Rulesets & Resources
Below is a list of resources containing weggli patterns/rules that can easily be ported to parascope rules: