40 Commits

Author SHA1 Message Date
Lee Chagolla-Christensen 3b4f110686 Async/performance improvement (#83)
* make all enrichment (should)process methods async

* fix office2john resource leak

* check for none

* more resource errors, add ole hash tests, pytest configs

* update chromium to use async pool

* update registry module to use asyncpg pool

* more asyncpg

* use async get_file_enriched

* update sleep

* fix dapr configs, new ones for workflow services

* remove deprecate/redundant httprequestmax setting

* disable workflow tracking (for now)

---------

Co-authored-by: Lee Chagolla-Christensen <lee@localhost>
2025-10-28 15:12:24 -07:00
Lee Chagolla-Christensen 01384800a0 fix broken jwt scanning, ruff linting errors 2025-10-17 15:00:10 -07:00
Lee Chagolla-Christensen 2e48a0d3a5 ruff - auto fixes 2025-10-17 14:29:45 -07:00
Lee Chagolla-Christensen b63813e300 Standardize path handling and centralize database connection management
- Add centralized PostgreSQL connection string helper in common/db.py
- Replace ntpath with posixpath
- Add get_drive_from_path() helper for extracting drive letters from paths
- Update all modules to use centralized DB connection helper instead of individual Dapr client calls
- Improve path normalization across Chromium, DPAPI, and file enrichment modules
- Added dependencies to local libraries
- Expand file linking tests with comprehensive rule engine test cases
- Refactor masterkey path construction to use posixpath.normpath for proper path joining
- Update state helpers and API models to use centralized connection
- Updated web API to use strongly typed models instead of dicts
  internally
- Improve DPAPI core functionality with better error handling and path normalization
2025-10-15 13:48:50 -07:00
Lee Chagolla-Christensen 7969d77480 remove redundant file normalization(file_enriched.path should be normalize), add initial linking tests 2025-10-15 00:10:53 -07:00
Lee Chagolla-Christensen a6a7891626 revert to just using dpapick3, added chrome test files 2025-10-14 20:28:23 -07:00
Lee Chagolla-Christensen 614b08af1e fix stupid null byte 2025-10-14 15:18:59 -07:00
Lee Chagolla-Christensen d0163b5a9e add CNG decrypt test (currently failing) 2025-10-14 14:24:44 -07:00
Lee Chagolla-Christensen 42d0a32d6b validate or auto-calc mk sha1 2025-10-14 13:48:55 -07:00
Lee Chagolla-Christensen 9dc4fa22cc added write-once tests 2025-10-11 02:29:36 -07:00
Lee Chagolla-Christensen 3b969b2d01 rename UserAccountType to MasterKeyType 2025-10-10 23:49:26 -07:00
Lee Chagolla-Christensen a22218fcef fix ruff/tests in project, install venv script, local state link to user masterkey, masterkey type from path 2025-10-10 14:16:52 -07:00
Lee Chagolla-Christensen 5afb864fca update masterkey parsing 2025-10-09 08:55:20 -07:00
Lee Chagolla-Christensen de507dcdb5 improved backup key parsing, enhanced backup key auto decryption, backup key parsing of masterkeys 2025-10-08 19:40:28 -07:00
Lee Chagolla-Christensen 62d303c0ca parse domain back GUID from masterkeys 2025-10-03 18:07:47 -07:00
Lee Chagolla-Christensen 7d16798b49 update async dpapi in modules 2025-10-03 11:55:33 -07:00
Lee Chagolla-Christensen 47ba702a10 fixup asyncio/dapr problems 2025-10-02 14:16:18 -07:00
Lee Chagolla-Christensen a661a32425 changeup decryption 2025-09-30 22:09:29 -07:00
Lee Chagolla-Christensen 499e4a4bfa fix dpapi dapr integration 2025-09-30 21:24:30 -07:00
Lee Chagolla-Christensen 007419ca74 add missing test, update err msg 2025-09-29 22:03:01 -07:00
Lee Chagolla-Christensen 0eb5504bdc dpapi fixes/refactorings, enrichment logging 2025-09-29 16:33:27 -07:00
Lee Chagolla-Christensen 2af2c68c6f initial temp async enrichment fixes 2025-09-29 11:36:09 -07:00
Lee Chagolla-Christensen eeb6e198c7 more strict masterkey validation 2025-09-25 23:19:48 -07:00
Lee Chagolla-Christensen 017674b312 add dpapi system data 2025-09-25 21:14:30 -07:00
Lee Chagolla-Christensen 7c282b4152 remove old DPAPI_BLOB 2025-09-24 17:08:26 -07:00
Lee Chagolla-Christensen a27414fba8 use dpapick3 for blobs, actually use entropy, fix entroyp test 2025-09-24 15:34:17 -07:00
Lee Chagolla-Christensen 113f197b88 add decryption benchmarks 2025-09-23 23:15:32 -07:00
Lee Chagolla-Christensen 91cc2b4028 dpapi postgres hookups, backup key validation 2025-09-23 15:45:32 -07:00
Lee Chagolla-Christensen af1de56a72 repositories upsert, fix DPAPI system decryption 2025-09-09 03:17:10 -07:00
Lee Chagolla-Christensen 77a10a75fb add repositories 2025-09-08 16:38:23 -07:00
Lee Chagolla-Christensen d872df7383 simplify adding masterkeys 2025-09-08 15:53:45 -07:00
Lee Chagolla-Christensen 3e03c81c6e masterkey decryption tests 2025-09-08 10:45:35 -07:00
Lee Chagolla-Christensen c8e7446126 fixup auto decrypt, make models frozen 2025-09-08 00:41:01 -07:00
Lee Chagolla-Christensen d08dcf8a96 Merge branch 'nemesis-2.1.3' of github.com:SpecterOps/Nemesis into nemesis-2.1.3
Rename DpapiCryptoError, formatting/linting
2025-09-07 09:33:24 -07:00
Lee Chagolla-Christensen e5a0145b28 initial DPAPI_SYSTEM 2025-09-07 09:29:54 -07:00
Lee Chagolla-Christensen 51f280c900 better key type handling, show responses in UI 2025-09-04 15:34:11 -07:00
Lee Chagolla-Christensen d27c0259af add dpapimanager to route+backgroud task, better types 2025-09-04 02:22:26 -07:00
Lee Chagolla-Christensen 1b0213b649 type/lint errors 2025-09-03 17:10:39 -07:00
Lee Chagolla-Christensen d7df9de3ba add in old backup format test files 2025-09-03 16:41:58 -07:00
harmj0y fdb9d26a28 Rename dpapi to nemesis_dpapi due to naming conflicts
-Rename `dpapi` to `nemesis_dpapi` due to naming conflicts with Impacket
2025-09-03 15:44:24 -07:00