mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-12 19:55:14 +02:00
new capacity bits (#67)
This commit is contained in:
parent
afaffc0df6
commit
7d0e7320e2
261 changed files with 10591 additions and 231 deletions
|
|
@ -1,4 +1,6 @@
|
|||
use crate::labels::{Cap, DataLabel, Kind, LabelRule, ParamConfig, RuntimeLabelRule};
|
||||
use crate::labels::{
|
||||
Cap, DataLabel, GateActivation, Kind, LabelRule, ParamConfig, RuntimeLabelRule, SinkGate,
|
||||
};
|
||||
use crate::utils::project::{DetectedFramework, FrameworkContext};
|
||||
use phf::{Map, phf_map};
|
||||
|
||||
|
|
@ -265,6 +267,223 @@ pub static RULES: &[LabelRule] = &[
|
|||
label: DataLabel::Sink(Cap::CODE_EXEC),
|
||||
case_sensitive: false,
|
||||
},
|
||||
// ─── LDAP injection sinks ───
|
||||
//
|
||||
// JNDI / Spring LDAP search APIs accept an attacker-influenceable filter
|
||||
// expression as either the second positional argument (`DirContext.search(name,
|
||||
// filter, controls)` / `LdapTemplate.search(base, filter, mapper)`). Without
|
||||
// RFC 4515 escaping the filter can be rewritten to bypass authentication or
|
||||
// exfiltrate directory entries. Type-qualified resolution rewrites
|
||||
// `ctx.search(...)` → `LdapClient.search` when the receiver carries a
|
||||
// `TypeKind::LdapClient` fact (set by `class_name_to_type_kind` for the
|
||||
// declared types `DirContext`, `InitialDirContext`, `LdapContext`,
|
||||
// `LdapTemplate`, or by `constructor_type` for `new InitialDirContext(...)`
|
||||
// / `new InitialLdapContext(...)`). Direct flat matchers cover the
|
||||
// documentation-style class-qualified call forms that bypass receiver
|
||||
// typing.
|
||||
LabelRule {
|
||||
matchers: &[
|
||||
"LdapClient.search",
|
||||
"LdapClient.searchByEntity",
|
||||
"LdapClient.searchForObject",
|
||||
"LdapClient.searchForContext",
|
||||
"DirContext.search",
|
||||
"LdapTemplate.search",
|
||||
"LdapTemplate.searchByEntity",
|
||||
"LdapTemplate.searchForObject",
|
||||
"LdapTemplate.searchForContext",
|
||||
"ctx.search",
|
||||
],
|
||||
label: DataLabel::Sink(Cap::LDAP_INJECTION),
|
||||
case_sensitive: true,
|
||||
},
|
||||
// ─── LDAP-filter sanitizers ───
|
||||
//
|
||||
// Spring LDAP's `LdapEncoder.filterEncode(s)` applies RFC 4515 escaping to
|
||||
// metacharacters (`\`, `*`, `(`, `)`, ` | ||||