Files
NeuroSploit/neurosploit-rs/crates/harness/src/lib.rs
T
CyberSecurityUPandClaude Opus 5 4b71ac63a0 feat(mobile): binary/APK/IPA testing mode + 12 RE skills — v4.2.0
New `mobile` engagement mode: `neurosploit mobile <app.apk|app.ipa|binary>`
reverse-engineers a local artifact with a dedicated `mobile` agent set, all
headless and provisioned on demand (Ghidra analyzeHeadless, MobSF REST/Docker,
Frida, apktool/jadx, radare2).

Twelve original, generic skills (agents_md/mobile/, English): static binary
triage, APK static analysis, IPA static analysis, RASP & anti-tamper mapping,
root/jailbreak detection + bypass, TLS pinning detection + bypass, anti-debug
detection + bypass, obfuscation analysis & deobfuscation, code-integrity /
tamper-check bypass, hardcoded-secrets extraction, insecure local storage, and
mobile network traffic analysis. Findings are proven from the artifact
(decompilation or Frida trace), non-destructively.

- agents.rs: new `mobile` Library category (loaded, counted).
- pipeline.rs: run_mobile() mirroring the host pipeline with a mobile recon and
  headless tooling doctrine; exported from the crate.
- CLI: `Cmd::Mobile` + `Mode::Mobile`, wired in main and the TUI.
- README + TUTORIAL document the new test type; engagement-modes badge + table
  updated; "New in v4.2.0" note. Version bumped to 4.2.0 across the workspace.

383 tests.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-20 21:08:14 -03:00

93 lines
3.0 KiB
Rust

//! NeuroSploit v3.6.5 harness — a robust multi-model runtime for the
//! markdown-driven autonomous pentest engine.
//!
//! The harness loads the `agents_md/` library, drives a *pool* of LLM models
//! (any OpenAI-compatible provider) with concurrency + provider failover, runs
//! the specialist agents in parallel, then validates every candidate finding by
//! **N-model voting** before scoring and reporting.
pub mod agents;
pub mod assurance;
pub mod attack_graph;
pub mod audit;
pub mod belief;
pub mod browser;
pub mod budget;
pub mod capability;
pub mod chain;
pub mod claims;
pub mod compliance;
pub mod creds;
pub mod cvss;
pub mod grounding;
pub mod hygiene;
pub mod inbox;
pub mod integrations;
pub mod integrity;
pub mod internal;
pub mod knowledge_graph;
pub mod memory;
pub mod policy;
pub mod poc;
pub mod pomdp;
pub mod proxy;
pub mod prosecutor;
pub mod provenance;
pub mod models;
pub mod netguard;
pub mod oob;
pub mod pipeline;
pub mod pool;
pub mod probe;
pub mod replay;
pub mod report;
pub mod rl;
pub mod sandbox;
pub mod scope;
pub mod taint;
pub mod transport;
pub mod types;
pub mod typesafe;
pub mod typesafe_agent;
pub mod uncertainty;
pub mod validation;
pub mod waf;
pub use agents::{Agent, Library};
pub use models::{
cli_binary_for, ensure_playwright_mcp, installed_cli_backends, mcp_supported, provider_for,
providers, write_mcp_config, ChatClient, ModelRef, Provider,
};
pub use pipeline::{run_greybox, run_host, run_mobile, run_whitebox, RunOutput};
pub use pipeline::run;
pub use knowledge_graph::{EdgeKind, KnowledgeGraph, NodeKind};
pub use memory::{Memory, Query as MemoryQuery, Tier as MemoryTier};
pub use pool::{ModelPool, Task};
pub use audit::{AuditLog, AuditRecord, KillReason, KillSwitch};
pub use capability::{Capability, TokenError};
pub use browser::{BrowserProbe, BrowserResult};
pub use budget::{Budget, Effort, Governor, Mode as BudgetMode, Order as BudgetOrder, Phase as BudgetPhase};
pub use chain::{AttackPath, Capability as ChainCapability, Link};
pub use claims::{Claim, ClaimSet, ClaimStatus, Decision, EvidenceLedger};
pub use policy::{Act, ActionKind, BlastRadius, EngagementPolicy, Environment, Protocol, Risk, RiskDecision, SafetyPolicy};
pub use prosecutor::{ProsecutorVerdict, PROSECUTOR_SYS};
pub use replay::{ReplayEngine, ReqSpec};
pub use scope::{Action as ScopeAction, Decision as ScopeDecision, ScopePolicy};
pub use types::{Finding, RunConfig};
pub use uncertainty::{assess as assess_uncertainty, Assessment, Gap, Rounds};
pub use validation::{judge as judge_finding, CweValidator, Evidence, Verdict};
/// Download bytes over HTTPS with a bounded timeout. Used by the app to fetch
/// the pinned agent library when it is not present next to the binary.
pub async fn fetch_bytes(url: &str, timeout_secs: u64) -> anyhow::Result<Vec<u8>> {
let b = reqwest::Client::new()
.get(url)
.header("user-agent", "neurosploit")
.timeout(std::time::Duration::from_secs(timeout_secs))
.send().await?
.error_for_status()?
.bytes().await?;
Ok(b.to_vec())
}