{"id":19045427,"url":"https://github.com/marirs/unquarantine-rs","last_synced_at":"2026-06-22T22:31:12.751Z","repository":{"id":84061073,"uuid":"453855584","full_name":"marirs/unquarantine-rs","owner":"marirs","description":"Unquarantine/extract/decrypt Quarantined files","archived":false,"fork":false,"pushed_at":"2026-05-29T07:33:29.000Z","size":369,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2026-05-29T09:07:40.964Z","etag":null,"topics":["antivirus","av","decrypt","extract","rust","rust-crate","rust-lang","rust-library","security","security-tools","unquarantine"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marirs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-01-31T02:15:21.000Z","updated_at":"2026-05-29T07:29:45.000Z","dependencies_parsed_at":"2023-03-15T09:30:33.332Z","dependency_job_id":null,"html_url":"https://github.com/marirs/unquarantine-rs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/marirs/unquarantine-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marirs%2Funquarantine-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marirs%2Funquarantine-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marirs%2Funquarantine-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marirs%2Funquarantine-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marirs","download_url":"https://codeload.github.com/marirs/unquarantine-rs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marirs%2Funquarantine-rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34668500,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-22T02:00:06.391Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["antivirus","av","decrypt","extract","rust","rust-crate","rust-lang","rust-library","security","security-tools","unquarantine"],"created_at":"2024-11-08T22:50:11.336Z","updated_at":"2026-06-22T22:31:12.746Z","avatar_url":"https://github.com/marirs.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# UnQuarantine\n\n[![Crates.io](https://img.shields.io/crates/v/unquarantine.svg)](https://crates.io/crates/unquarantine)\n[![Documentation](https://docs.rs/unquarantine/badge.svg)](https://docs.rs/unquarantine)\n[![CI](https://github.com/marirs/unquarantine-rs/actions/workflows/ci.yml/badge.svg)](https://github.com/marirs/unquarantine-rs/actions/workflows/ci.yml)\n[![License: MIT](https://img.shields.io/crates/l/unquarantine.svg)](LICENSE)\n\nRestore / decrypt / extract the original files that antivirus and security\nproducts place into quarantine. Given a quarantined file (or its bytes), the\ncrate detects the producing vendor, reverses the obfuscation/encryption, and\nreturns the recovered file(s) along with the detected vendor name.\n\nIt also recovers Portable Executables embedded in an encrypted form within\nother files using a generic one-byte-xor (\"X-RAY\") scan as a last resort.\n\n- Pure Rust.\n- Bounds-checked parsers: malformed or truncated input returns an error, never panics.\n- Thread-safe (`Send + Sync`); safe to fan out across threads.\n- Library + optional command-line binary.\n\n## Supported formats\n\n- AhnLab (V3B)\n- Amiti (IFC)\n- ASquared (EQF)\n- Avast/AVG (Magic@0='-chest- ')\n- Avira (QUA)\n- Baidu (QV)\n- BitDefender (BDQ)\n- BullGuard (Q)\n- Cisco AMP\n- CMC Antivirus (CMC)\n- Comodo \u0026lt;GUID\u0026gt; (not really; quarantined files are stored unencrypted)\n- ESafe (VIR)\n- ESET (NQF)\n- F-Prot (TMP) (Magic@0='KSS')\n- FortiClient (Magic@0='QUARF')\n- G-Data (Q) (Magic@0=0xCAFEBABE)\n- K7 Antivirus (\u0026lt;md5\u0026gt;.QNT)\n- Kaspersky (KLQ, System Watcher's \u0026lt;md5\u0026gt;.bin)\n- Lavasoft AdAware (BDQ) /BitDefender files really/\n- Lumension LEMSS (lqf)\n- MalwareBytes Data files (DATA) - 2 versions\n- MalwareBytes Quarantine files (QUAR) - 2 versions\n- McAfee Quarantine files (BUP) /full support for OLE format/\n- Microsoft Antimalware / Microsoft Security Essentials\n- Microsoft Defender PC (Magic@0=0B AD | D3 45)\n- Microsoft Defender Mac (Magic@0=75 6E)\n- Panda \u0026lt;GUID\u0026gt; Zip files\n- Sentinel One (MAL)\n- Spybot - Search \u0026amp; Destroy 2 'recovery'\n- SUPERAntiSpyware (SDB)\n- Symantec ccSubSdk files: {GUID} files and submissions.idx\n- Symantec Quarantine Data files (QBD)\n- Symantec Quarantine files (VBN), including from SEP on Linux\n- Symantec Quarantine Index files (QBI)\n- Symantec Quarantine files on MAC (quarantine.qtn)\n- Total AV ({GUID}.dat) 'infected'\n- Total Defense (BDQ) /BitDefender files really/\n- TrendMicro (Magic@0=A9 AC BD A7 which is a 'VSBX' string ^ 0xFF)\n- QuickHeal \u0026lt;hash\u0026gt; files\n- Vipre (\u0026lt;GUID\u0026gt;_ENC2)\n- Zemana \u0026lt;hash\u0026gt; files + quarantine.db\n- Any binary file (using X-RAY scanning)\n\n## Library usage\n\n```rust\nuse unquarantine::UnQuarantine;\n\nfn main() {\n    // From a path (uses both filename/extension and content for detection):\n    let result = UnQuarantine::from_file(\"data/99E865BA2BBCED427E8CB4785CCE58DDCCCE8337\")\n        .expect(\"not a recognised quarantine file\");\n\n    println!(\"detected: {}\", result.get_vendor());\n\n    // Borrow the restored buffer(s) without copying:\n    for buf in result.get_unquarantined_buffer() {\n        println!(\"recovered {} bytes\", buf.len());\n    }\n\n    // Or take ownership of the bytes:\n    let buffers = result.into_unquarantined_buffer();\n    let _ = buffers;\n}\n```\n\nWorking from an in-memory buffer (content/magic-based detection only):\n\n```rust\nuse unquarantine::UnQuarantine;\n\nlet bytes = std::fs::read(\"some.bup\").unwrap();\nif let Ok(result) = UnQuarantine::from_bytes(\u0026bytes) {\n    println!(\"detected: {}\", result.get_vendor());\n}\n```\n\n## Command-line tool\n\nThe CLI lives behind the `cli` feature (so library consumers don't pull in\n`clap`):\n\n```bash\ncargo build --release --features cli\n./target/release/unquarantine \u003cFILE\u003e... [-o OUTDIR]\n```\n\nFor each input it prints the detected vendor and writes every recovered item.\n**Restored files always get a trailing `_`** in their name\n(`\u003cfilename\u003e.NN_`) so a recovered — potentially malicious — sample cannot be\nexecuted by an accidental double-click.\n\n```\n$ unquarantine fa97a1ec61c005f8ecc2a73cf77ec34de73a73e7.bup -o ./restored\n[+] fa97a1ec...bup: detected McAfee BUP Files (2 item(s))\n    -\u003e ./restored/fa97a1ec...bup.00_ (218016 bytes)\n    -\u003e ./restored/fa97a1ec...bup.01_ (96 bytes)\n```\n\n---\nInspired by:\n- [Perl version (DeXRAY)](http://hexacorn.com/d/DeXRAY.pl)\n- [Python version](https://github.com/brad-accuvant/cuckoo-modified/blob/master/lib/cuckoo/common/quarantine.py)\n\nPorted by: Marirs \u0026lt;marirs@gmail.com\u0026gt;\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarirs%2Funquarantine-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarirs%2Funquarantine-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarirs%2Funquarantine-rs/lists"}