@sylix/coworker 2.0.11 → 2.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. package/dist/commands/slash/config.d.ts.map +1 -1
  2. package/dist/commands/slash/config.js +22 -4
  3. package/dist/commands/slash/config.js.map +1 -1
  4. package/dist/core/CoWorkerAgent.d.ts.map +1 -1
  5. package/dist/core/CoWorkerAgent.js +6 -3
  6. package/dist/core/CoWorkerAgent.js.map +1 -1
  7. package/dist/skills/defaults/accessibility/screen-reader-testing.md +545 -0
  8. package/dist/skills/defaults/accessibility/wcag-audit-patterns.md +555 -0
  9. package/dist/skills/defaults/ai-ml/rag.md +276 -0
  10. package/dist/skills/defaults/backend-development/api-design-principles.md +528 -0
  11. package/dist/skills/defaults/backend-development/api-design.md +285 -0
  12. package/dist/skills/defaults/backend-development/architecture-patterns.md +494 -0
  13. package/dist/skills/defaults/backend-development/async-python.md +237 -0
  14. package/dist/skills/defaults/backend-development/auth-implementation-patterns.md +638 -0
  15. package/dist/skills/defaults/backend-development/bazel-build-optimization.md +387 -0
  16. package/dist/skills/defaults/backend-development/billing-automation/SKILL.md +566 -0
  17. package/dist/skills/defaults/backend-development/code-review-excellence.md +538 -0
  18. package/dist/skills/defaults/backend-development/cqrs-implementation.md +554 -0
  19. package/dist/skills/defaults/backend-development/database-design.md +305 -0
  20. package/dist/skills/defaults/backend-development/debugging-strategies.md +536 -0
  21. package/dist/skills/defaults/backend-development/e2e-testing-patterns.md +544 -0
  22. package/dist/skills/defaults/backend-development/error-handling-patterns.md +641 -0
  23. package/dist/skills/defaults/backend-development/fastapi-templates.md +559 -0
  24. package/dist/skills/defaults/backend-development/fastapi.md +309 -0
  25. package/dist/skills/defaults/backend-development/git-advanced-workflows.md +405 -0
  26. package/dist/skills/defaults/backend-development/microservices-patterns.md +595 -0
  27. package/dist/skills/defaults/backend-development/microservices.md +284 -0
  28. package/dist/skills/defaults/backend-development/monorepo-management.md +623 -0
  29. package/dist/skills/defaults/backend-development/nodejs-backend-patterns.md +1048 -0
  30. package/dist/skills/defaults/backend-development/nx-workspace-patterns.md +457 -0
  31. package/dist/skills/defaults/backend-development/paypal-integration/SKILL.md +478 -0
  32. package/dist/skills/defaults/backend-development/pci-compliance/SKILL.md +480 -0
  33. package/dist/skills/defaults/backend-development/python-anti-patterns.md +349 -0
  34. package/dist/skills/defaults/backend-development/python-background-jobs.md +364 -0
  35. package/dist/skills/defaults/backend-development/python-code-style.md +360 -0
  36. package/dist/skills/defaults/backend-development/python-configuration.md +368 -0
  37. package/dist/skills/defaults/backend-development/python-design-patterns.md +296 -0
  38. package/dist/skills/defaults/backend-development/python-error-handling.md +323 -0
  39. package/dist/skills/defaults/backend-development/python-packaging.md +887 -0
  40. package/dist/skills/defaults/backend-development/python-performance-optimization.md +874 -0
  41. package/dist/skills/defaults/backend-development/python-project-structure.md +252 -0
  42. package/dist/skills/defaults/backend-development/python-resilience.md +376 -0
  43. package/dist/skills/defaults/backend-development/python-resource-management.md +421 -0
  44. package/dist/skills/defaults/backend-development/python-type-safety.md +428 -0
  45. package/dist/skills/defaults/backend-development/sql-optimization-patterns.md +509 -0
  46. package/dist/skills/defaults/backend-development/stripe-integration/SKILL.md +522 -0
  47. package/dist/skills/defaults/backend-development/turborepo-caching.md +376 -0
  48. package/dist/skills/defaults/blockchain/defi-protocol-templates.md +430 -0
  49. package/dist/skills/defaults/blockchain/nft-standards.md +364 -0
  50. package/dist/skills/defaults/blockchain/solidity-security.md +514 -0
  51. package/dist/skills/defaults/blockchain/web3-testing.md +360 -0
  52. package/dist/skills/defaults/business/competitive-landscape/SKILL.md +527 -0
  53. package/dist/skills/defaults/business/market-sizing-analysis/SKILL.md +451 -0
  54. package/dist/skills/defaults/business/startup-financial-modeling/SKILL.md +494 -0
  55. package/dist/skills/defaults/business/startup-metrics-framework/SKILL.md +564 -0
  56. package/dist/skills/defaults/business/team-composition-analysis.md +437 -0
  57. package/dist/skills/defaults/compliance/employment-contract-templates/SKILL.md +527 -0
  58. package/dist/skills/defaults/compliance/gdpr-data-handling/SKILL.md +630 -0
  59. package/dist/skills/defaults/data-engineering/airflow-dag-patterns.md +436 -0
  60. package/dist/skills/defaults/data-engineering/airflow.md +519 -0
  61. package/dist/skills/defaults/data-engineering/data-quality.md +583 -0
  62. package/dist/skills/defaults/data-engineering/dbt-transformation-patterns.md +482 -0
  63. package/dist/skills/defaults/data-engineering/dbt.md +556 -0
  64. package/dist/skills/defaults/data-engineering/ml-pipeline-workflow/SKILL.md +247 -0
  65. package/dist/skills/defaults/data-engineering/spark-optimization.md +348 -0
  66. package/dist/skills/defaults/data-engineering/spark.md +411 -0
  67. package/dist/skills/defaults/database/postgresql.md +202 -0
  68. package/dist/skills/defaults/debugging/systematic-debugging.md +249 -0
  69. package/dist/skills/defaults/devops/architecture-decision-records.md +448 -0
  70. package/dist/skills/defaults/devops/changelog-automation.md +580 -0
  71. package/dist/skills/defaults/devops/cicd.md +314 -0
  72. package/dist/skills/defaults/devops/cloud.md +263 -0
  73. package/dist/skills/defaults/devops/code-review-excellence.md +299 -0
  74. package/dist/skills/defaults/devops/cost-optimization.md +295 -0
  75. package/dist/skills/defaults/devops/deployment-pipeline-design.md +356 -0
  76. package/dist/skills/defaults/devops/docker.md +281 -0
  77. package/dist/skills/defaults/devops/git-workflows.md +205 -0
  78. package/dist/skills/defaults/devops/github-actions.md +311 -0
  79. package/dist/skills/defaults/devops/gitlab-ci-patterns.md +266 -0
  80. package/dist/skills/defaults/devops/hybrid-cloud-networking.md +241 -0
  81. package/dist/skills/defaults/devops/istio-traffic-management.md +327 -0
  82. package/dist/skills/defaults/devops/kubernetes.md +339 -0
  83. package/dist/skills/defaults/devops/linkerd-patterns.md +311 -0
  84. package/dist/skills/defaults/devops/multi-cloud-architecture.md +181 -0
  85. package/dist/skills/defaults/devops/observability.md +243 -0
  86. package/dist/skills/defaults/devops/openapi-spec-generation.md +1024 -0
  87. package/dist/skills/defaults/devops/postmortem-writing.md +396 -0
  88. package/dist/skills/defaults/devops/prometheus-configuration.md +265 -0
  89. package/dist/skills/defaults/devops/secrets-management.md +341 -0
  90. package/dist/skills/defaults/devops/service-mesh-observability.md +385 -0
  91. package/dist/skills/defaults/devops/terraform-module-library.md +244 -0
  92. package/dist/skills/defaults/finance/backtesting-frameworks/SKILL.md +663 -0
  93. package/dist/skills/defaults/finance/risk-metrics-calculation/SKILL.md +557 -0
  94. package/dist/skills/defaults/frontend/accessibility-compliance.md +420 -0
  95. package/dist/skills/defaults/frontend/design-system-patterns.md +337 -0
  96. package/dist/skills/defaults/frontend/interaction-design.md +327 -0
  97. package/dist/skills/defaults/frontend/javascript.md +311 -0
  98. package/dist/skills/defaults/frontend/modern-javascript-patterns.md +927 -0
  99. package/dist/skills/defaults/frontend/react-native-design.md +440 -0
  100. package/dist/skills/defaults/frontend/react.md +345 -0
  101. package/dist/skills/defaults/frontend/responsive-design.md +472 -0
  102. package/dist/skills/defaults/frontend/tailwind-design-system.md +337 -0
  103. package/dist/skills/defaults/frontend/typescript-advanced-types.md +724 -0
  104. package/dist/skills/defaults/frontend/typescript.md +334 -0
  105. package/dist/skills/defaults/frontend/visual-design-foundations.md +326 -0
  106. package/dist/skills/defaults/frontend/web-component-design.md +279 -0
  107. package/dist/skills/defaults/game-development/godot-gdscript-patterns.md +188 -0
  108. package/dist/skills/defaults/game-development/unity-ecs-patterns.md +594 -0
  109. package/dist/skills/defaults/kubernetes/gitops-workflow.md +285 -0
  110. package/dist/skills/defaults/kubernetes/gitops.md +280 -0
  111. package/dist/skills/defaults/kubernetes/helm-chart-scaffolding.md +553 -0
  112. package/dist/skills/defaults/kubernetes/helm.md +343 -0
  113. package/dist/skills/defaults/kubernetes/k8s-manifest-generator.md +501 -0
  114. package/dist/skills/defaults/kubernetes/k8s-security-policies.md +342 -0
  115. package/dist/skills/defaults/kubernetes/manifests.md +330 -0
  116. package/dist/skills/defaults/kubernetes/security.md +337 -0
  117. package/dist/skills/defaults/llm-application/embedding-strategies.md +608 -0
  118. package/dist/skills/defaults/llm-application/hybrid-search-implementation.md +570 -0
  119. package/dist/skills/defaults/llm-application/hybrid-search.md +570 -0
  120. package/dist/skills/defaults/llm-application/langchain-architecture.md +666 -0
  121. package/dist/skills/defaults/llm-application/langchain.md +259 -0
  122. package/dist/skills/defaults/llm-application/llm-evaluation.md +695 -0
  123. package/dist/skills/defaults/llm-application/prompt-engineering-patterns.md +449 -0
  124. package/dist/skills/defaults/llm-application/prompt-engineering.md +219 -0
  125. package/dist/skills/defaults/llm-application/rag-implementation.md +434 -0
  126. package/dist/skills/defaults/llm-application/similarity-search-patterns.md +560 -0
  127. package/dist/skills/defaults/llm-application/similarity-search.md +560 -0
  128. package/dist/skills/defaults/llm-application/vector-index-tuning.md +523 -0
  129. package/dist/skills/defaults/mobile/mobile-android-design.md +440 -0
  130. package/dist/skills/defaults/mobile/mobile-ios-design.md +266 -0
  131. package/dist/skills/defaults/monitoring/distributed-tracing.md +436 -0
  132. package/dist/skills/defaults/monitoring/grafana-dashboards.md +370 -0
  133. package/dist/skills/defaults/monitoring/prometheus-configuration.md +379 -0
  134. package/dist/skills/defaults/monitoring/slo-implementation.md +323 -0
  135. package/dist/skills/defaults/refactoring/code-refactoring.md +349 -0
  136. package/dist/skills/defaults/security/anti-reversing-techniques/SKILL.md +559 -0
  137. package/dist/skills/defaults/security/auditor.md +168 -0
  138. package/dist/skills/defaults/security/binary-analysis-patterns/SKILL.md +438 -0
  139. package/dist/skills/defaults/security/memory-forensics/SKILL.md +483 -0
  140. package/dist/skills/defaults/security/mtls-configuration.md +349 -0
  141. package/dist/skills/defaults/security/protocol-reverse-engineering/SKILL.md +520 -0
  142. package/dist/skills/defaults/security/sast-configuration.md +182 -0
  143. package/dist/skills/defaults/security/security.md +313 -0
  144. package/dist/skills/defaults/security/stride-analysis.md +273 -0
  145. package/dist/skills/defaults/security/threat-mitigation-mapping.md +290 -0
  146. package/dist/skills/defaults/systems/bash-defensive-patterns/SKILL.md +539 -0
  147. package/dist/skills/defaults/systems/bats-testing-patterns/SKILL.md +631 -0
  148. package/dist/skills/defaults/systems/go-concurrency-patterns.md +657 -0
  149. package/dist/skills/defaults/systems/memory-safety-patterns.md +605 -0
  150. package/dist/skills/defaults/systems/rust-async-patterns.md +519 -0
  151. package/dist/skills/defaults/systems/shellcheck-configuration/SKILL.md +456 -0
  152. package/dist/skills/defaults/team-collaboration/multi-reviewer-patterns.md +126 -0
  153. package/dist/skills/defaults/team-collaboration/parallel-feature-development.md +151 -0
  154. package/dist/skills/defaults/testing/javascript-testing-patterns.md +1021 -0
  155. package/dist/skills/defaults/testing/python-testing-patterns.md +351 -0
  156. package/dist/skills/defaults/testing/testing.md +332 -0
  157. package/dist/skills/defaults/workflows/context-driven-development.md +384 -0
  158. package/dist/skills/defaults/workflows/track-management.md +592 -0
  159. package/dist/skills/defaults/workflows/workflow-patterns.md +622 -0
  160. package/dist/skills/index.d.ts +11 -0
  161. package/dist/skills/index.d.ts.map +1 -0
  162. package/dist/skills/index.js +129 -0
  163. package/dist/skills/index.js.map +1 -0
  164. package/dist/utils/character.js +4 -4
  165. package/dist/utils/character.js.map +1 -1
  166. package/dist/utils/inputbar.d.ts.map +1 -1
  167. package/dist/utils/inputbar.js +7 -0
  168. package/dist/utils/inputbar.js.map +1 -1
  169. package/package.json +1 -1
@@ -0,0 +1,483 @@
1
+ ---
2
+ name: memory-forensics
3
+ description: Master memory forensics techniques including memory acquisition, process analysis, and artifact extraction using Volatility and related tools. Use when analyzing memory dumps, investigating incidents, or performing malware analysis from RAM captures.
4
+ ---
5
+
6
+ # Memory Forensics
7
+
8
+ Comprehensive techniques for acquiring, analyzing, and extracting artifacts from memory dumps for incident response and malware analysis.
9
+
10
+ ## Memory Acquisition
11
+
12
+ ### Live Acquisition Tools
13
+
14
+ #### Windows
15
+
16
+ ```powershell
17
+ # WinPmem (Recommended)
18
+ winpmem_mini_x64.exe memory.raw
19
+
20
+ # DumpIt
21
+ DumpIt.exe
22
+
23
+ # Belkasoft RAM Capturer
24
+ # GUI-based, outputs raw format
25
+
26
+ # Magnet RAM Capture
27
+ # GUI-based, outputs raw format
28
+ ```
29
+
30
+ #### Linux
31
+
32
+ ```bash
33
+ # LiME (Linux Memory Extractor)
34
+ sudo insmod lime.ko "path=/tmp/memory.lime format=lime"
35
+
36
+ # /dev/mem (limited, requires permissions)
37
+ sudo dd if=/dev/mem of=memory.raw bs=1M
38
+
39
+ # /proc/kcore (ELF format)
40
+ sudo cp /proc/kcore memory.elf
41
+ ```
42
+
43
+ #### macOS
44
+
45
+ ```bash
46
+ # osxpmem
47
+ sudo ./osxpmem -o memory.raw
48
+
49
+ # MacQuisition (commercial)
50
+ ```
51
+
52
+ ### Virtual Machine Memory
53
+
54
+ ```bash
55
+ # VMware: .vmem file is raw memory
56
+ cp vm.vmem memory.raw
57
+
58
+ # VirtualBox: Use debug console
59
+ vboxmanage debugvm "VMName" dumpvmcore --filename memory.elf
60
+
61
+ # QEMU
62
+ virsh dump <domain> memory.raw --memory-only
63
+
64
+ # Hyper-V
65
+ # Checkpoint contains memory state
66
+ ```
67
+
68
+ ## Volatility 3 Framework
69
+
70
+ ### Installation and Setup
71
+
72
+ ```bash
73
+ # Install Volatility 3
74
+ pip install volatility3
75
+
76
+ # Install symbol tables (Windows)
77
+ # Download from https://downloads.volatilityfoundation.org/volatility3/symbols/
78
+
79
+ # Basic usage
80
+ vol -f memory.raw <plugin>
81
+
82
+ # With symbol path
83
+ vol -f memory.raw -s /path/to/symbols windows.pslist
84
+ ```
85
+
86
+ ### Essential Plugins
87
+
88
+ #### Process Analysis
89
+
90
+ ```bash
91
+ # List processes
92
+ vol -f memory.raw windows.pslist
93
+
94
+ # Process tree (parent-child relationships)
95
+ vol -f memory.raw windows.pstree
96
+
97
+ # Hidden process detection
98
+ vol -f memory.raw windows.psscan
99
+
100
+ # Process memory dumps
101
+ vol -f memory.raw windows.memmap --pid <PID> --dump
102
+
103
+ # Process environment variables
104
+ vol -f memory.raw windows.envars --pid <PID>
105
+
106
+ # Command line arguments
107
+ vol -f memory.raw windows.cmdline
108
+ ```
109
+
110
+ #### Network Analysis
111
+
112
+ ```bash
113
+ # Network connections
114
+ vol -f memory.raw windows.netscan
115
+
116
+ # Network connection state
117
+ vol -f memory.raw windows.netstat
118
+ ```
119
+
120
+ #### DLL and Module Analysis
121
+
122
+ ```bash
123
+ # Loaded DLLs per process
124
+ vol -f memory.raw windows.dlllist --pid <PID>
125
+
126
+ # Find hidden/injected DLLs
127
+ vol -f memory.raw windows.ldrmodules
128
+
129
+ # Kernel modules
130
+ vol -f memory.raw windows.modules
131
+
132
+ # Module dumps
133
+ vol -f memory.raw windows.moddump --pid <PID>
134
+ ```
135
+
136
+ #### Memory Injection Detection
137
+
138
+ ```bash
139
+ # Detect code injection
140
+ vol -f memory.raw windows.malfind
141
+
142
+ # VAD (Virtual Address Descriptor) analysis
143
+ vol -f memory.raw windows.vadinfo --pid <PID>
144
+
145
+ # Dump suspicious memory regions
146
+ vol -f memory.raw windows.vadyarascan --yara-rules rules.yar
147
+ ```
148
+
149
+ #### Registry Analysis
150
+
151
+ ```bash
152
+ # List registry hives
153
+ vol -f memory.raw windows.registry.hivelist
154
+
155
+ # Print registry key
156
+ vol -f memory.raw windows.registry.printkey --key "Software\Microsoft\Windows\CurrentVersion\Run"
157
+
158
+ # Dump registry hive
159
+ vol -f memory.raw windows.registry.hivescan --dump
160
+ ```
161
+
162
+ #### File System Artifacts
163
+
164
+ ```bash
165
+ # Scan for file objects
166
+ vol -f memory.raw windows.filescan
167
+
168
+ # Dump files from memory
169
+ vol -f memory.raw windows.dumpfiles --pid <PID>
170
+
171
+ # MFT analysis
172
+ vol -f memory.raw windows.mftscan
173
+ ```
174
+
175
+ ### Linux Analysis
176
+
177
+ ```bash
178
+ # Process listing
179
+ vol -f memory.raw linux.pslist
180
+
181
+ # Process tree
182
+ vol -f memory.raw linux.pstree
183
+
184
+ # Bash history
185
+ vol -f memory.raw linux.bash
186
+
187
+ # Network connections
188
+ vol -f memory.raw linux.sockstat
189
+
190
+ # Loaded kernel modules
191
+ vol -f memory.raw linux.lsmod
192
+
193
+ # Mount points
194
+ vol -f memory.raw linux.mount
195
+
196
+ # Environment variables
197
+ vol -f memory.raw linux.envars
198
+ ```
199
+
200
+ ### macOS Analysis
201
+
202
+ ```bash
203
+ # Process listing
204
+ vol -f memory.raw mac.pslist
205
+
206
+ # Process tree
207
+ vol -f memory.raw mac.pstree
208
+
209
+ # Network connections
210
+ vol -f memory.raw mac.netstat
211
+
212
+ # Kernel extensions
213
+ vol -f memory.raw mac.lsmod
214
+ ```
215
+
216
+ ## Analysis Workflows
217
+
218
+ ### Malware Analysis Workflow
219
+
220
+ ```bash
221
+ # 1. Initial process survey
222
+ vol -f memory.raw windows.pstree > processes.txt
223
+ vol -f memory.raw windows.pslist > pslist.txt
224
+
225
+ # 2. Network connections
226
+ vol -f memory.raw windows.netscan > network.txt
227
+
228
+ # 3. Detect injection
229
+ vol -f memory.raw windows.malfind > malfind.txt
230
+
231
+ # 4. Analyze suspicious processes
232
+ vol -f memory.raw windows.dlllist --pid <PID>
233
+ vol -f memory.raw windows.handles --pid <PID>
234
+
235
+ # 5. Dump suspicious executables
236
+ vol -f memory.raw windows.pslist --pid <PID> --dump
237
+
238
+ # 6. Extract strings from dumps
239
+ strings -a pid.<PID>.exe > strings.txt
240
+
241
+ # 7. YARA scanning
242
+ vol -f memory.raw windows.yarascan --yara-rules malware.yar
243
+ ```
244
+
245
+ ### Incident Response Workflow
246
+
247
+ ```bash
248
+ # 1. Timeline of events
249
+ vol -f memory.raw windows.timeliner > timeline.csv
250
+
251
+ # 2. User activity
252
+ vol -f memory.raw windows.cmdline
253
+ vol -f memory.raw windows.consoles
254
+
255
+ # 3. Persistence mechanisms
256
+ vol -f memory.raw windows.registry.printkey \
257
+ --key "Software\Microsoft\Windows\CurrentVersion\Run"
258
+
259
+ # 4. Services
260
+ vol -f memory.raw windows.svcscan
261
+
262
+ # 5. Scheduled tasks
263
+ vol -f memory.raw windows.scheduled_tasks
264
+
265
+ # 6. Recent files
266
+ vol -f memory.raw windows.filescan | grep -i "recent"
267
+ ```
268
+
269
+ ## Data Structures
270
+
271
+ ### Windows Process Structures
272
+
273
+ ```c
274
+ // EPROCESS (Executive Process)
275
+ typedef struct _EPROCESS {
276
+ KPROCESS Pcb; // Kernel process block
277
+ EX_PUSH_LOCK ProcessLock;
278
+ LARGE_INTEGER CreateTime;
279
+ LARGE_INTEGER ExitTime;
280
+ // ...
281
+ LIST_ENTRY ActiveProcessLinks; // Doubly-linked list
282
+ ULONG_PTR UniqueProcessId; // PID
283
+ // ...
284
+ PEB* Peb; // Process Environment Block
285
+ // ...
286
+ } EPROCESS;
287
+
288
+ // PEB (Process Environment Block)
289
+ typedef struct _PEB {
290
+ BOOLEAN InheritedAddressSpace;
291
+ BOOLEAN ReadImageFileExecOptions;
292
+ BOOLEAN BeingDebugged; // Anti-debug check
293
+ // ...
294
+ PVOID ImageBaseAddress; // Base address of executable
295
+ PPEB_LDR_DATA Ldr; // Loader data (DLL list)
296
+ PRTL_USER_PROCESS_PARAMETERS ProcessParameters;
297
+ // ...
298
+ } PEB;
299
+ ```
300
+
301
+ ### VAD (Virtual Address Descriptor)
302
+
303
+ ```c
304
+ typedef struct _MMVAD {
305
+ MMVAD_SHORT Core;
306
+ union {
307
+ ULONG LongFlags;
308
+ MMVAD_FLAGS VadFlags;
309
+ } u;
310
+ // ...
311
+ PVOID FirstPrototypePte;
312
+ PVOID LastContiguousPte;
313
+ // ...
314
+ PFILE_OBJECT FileObject;
315
+ } MMVAD;
316
+
317
+ // Memory protection flags
318
+ #define PAGE_EXECUTE 0x10
319
+ #define PAGE_EXECUTE_READ 0x20
320
+ #define PAGE_EXECUTE_READWRITE 0x40
321
+ #define PAGE_EXECUTE_WRITECOPY 0x80
322
+ ```
323
+
324
+ ## Detection Patterns
325
+
326
+ ### Process Injection Indicators
327
+
328
+ ```python
329
+ # Malfind indicators
330
+ # - PAGE_EXECUTE_READWRITE protection (suspicious)
331
+ # - MZ header in non-image VAD region
332
+ # - Shellcode patterns at allocation start
333
+
334
+ # Common injection techniques
335
+ # 1. Classic DLL Injection
336
+ # - VirtualAllocEx + WriteProcessMemory + CreateRemoteThread
337
+
338
+ # 2. Process Hollowing
339
+ # - CreateProcess (SUSPENDED) + NtUnmapViewOfSection + WriteProcessMemory
340
+
341
+ # 3. APC Injection
342
+ # - QueueUserAPC targeting alertable threads
343
+
344
+ # 4. Thread Execution Hijacking
345
+ # - SuspendThread + SetThreadContext + ResumeThread
346
+ ```
347
+
348
+ ### Rootkit Detection
349
+
350
+ ```bash
351
+ # Compare process lists
352
+ vol -f memory.raw windows.pslist > pslist.txt
353
+ vol -f memory.raw windows.psscan > psscan.txt
354
+ diff pslist.txt psscan.txt # Hidden processes
355
+
356
+ # Check for DKOM (Direct Kernel Object Manipulation)
357
+ vol -f memory.raw windows.callbacks
358
+
359
+ # Detect hooked functions
360
+ vol -f memory.raw windows.ssdt # System Service Descriptor Table
361
+
362
+ # Driver analysis
363
+ vol -f memory.raw windows.driverscan
364
+ vol -f memory.raw windows.driverirp
365
+ ```
366
+
367
+ ### Credential Extraction
368
+
369
+ ```bash
370
+ # Dump hashes (requires hivelist first)
371
+ vol -f memory.raw windows.hashdump
372
+
373
+ # LSA secrets
374
+ vol -f memory.raw windows.lsadump
375
+
376
+ # Cached domain credentials
377
+ vol -f memory.raw windows.cachedump
378
+
379
+ # Mimikatz-style extraction
380
+ # Requires specific plugins/tools
381
+ ```
382
+
383
+ ## YARA Integration
384
+
385
+ ### Writing Memory YARA Rules
386
+
387
+ ```yara
388
+ rule Suspicious_Injection
389
+ {
390
+ meta:
391
+ description = "Detects common injection shellcode"
392
+
393
+ strings:
394
+ // Common shellcode patterns
395
+ $mz = { 4D 5A }
396
+ $shellcode1 = { 55 8B EC 83 EC } // Function prologue
397
+ $api_hash = { 68 ?? ?? ?? ?? 68 ?? ?? ?? ?? E8 } // Push hash, call
398
+
399
+ condition:
400
+ $mz at 0 or any of ($shellcode*)
401
+ }
402
+
403
+ rule Cobalt_Strike_Beacon
404
+ {
405
+ meta:
406
+ description = "Detects Cobalt Strike beacon in memory"
407
+
408
+ strings:
409
+ $config = { 00 01 00 01 00 02 }
410
+ $sleep = "sleeptime"
411
+ $beacon = "%s (admin)" wide
412
+
413
+ condition:
414
+ 2 of them
415
+ }
416
+ ```
417
+
418
+ ### Scanning Memory
419
+
420
+ ```bash
421
+ # Scan all process memory
422
+ vol -f memory.raw windows.yarascan --yara-rules rules.yar
423
+
424
+ # Scan specific process
425
+ vol -f memory.raw windows.yarascan --yara-rules rules.yar --pid 1234
426
+
427
+ # Scan kernel memory
428
+ vol -f memory.raw windows.yarascan --yara-rules rules.yar --kernel
429
+ ```
430
+
431
+ ## String Analysis
432
+
433
+ ### Extracting Strings
434
+
435
+ ```bash
436
+ # Basic string extraction
437
+ strings -a memory.raw > all_strings.txt
438
+
439
+ # Unicode strings
440
+ strings -el memory.raw >> all_strings.txt
441
+
442
+ # Targeted extraction from process dump
443
+ vol -f memory.raw windows.memmap --pid 1234 --dump
444
+ strings -a pid.1234.dmp > process_strings.txt
445
+
446
+ # Pattern matching
447
+ grep -E "(https?://|[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})" all_strings.txt
448
+ ```
449
+
450
+ ### FLOSS for Obfuscated Strings
451
+
452
+ ```bash
453
+ # FLOSS extracts obfuscated strings
454
+ floss malware.exe > floss_output.txt
455
+
456
+ # From memory dump
457
+ floss pid.1234.dmp
458
+ ```
459
+
460
+ ## Best Practices
461
+
462
+ ### Acquisition Best Practices
463
+
464
+ 1. **Minimize footprint**: Use lightweight acquisition tools
465
+ 2. **Document everything**: Record time, tool, and hash of capture
466
+ 3. **Verify integrity**: Hash memory dump immediately after capture
467
+ 4. **Chain of custody**: Maintain proper forensic handling
468
+
469
+ ### Analysis Best Practices
470
+
471
+ 1. **Start broad**: Get overview before deep diving
472
+ 2. **Cross-reference**: Use multiple plugins for same data
473
+ 3. **Timeline correlation**: Correlate memory findings with disk/network
474
+ 4. **Document findings**: Keep detailed notes and screenshots
475
+ 5. **Validate results**: Verify findings through multiple methods
476
+
477
+ ### Common Pitfalls
478
+
479
+ - **Stale data**: Memory is volatile, analyze promptly
480
+ - **Incomplete dumps**: Verify dump size matches expected RAM
481
+ - **Symbol issues**: Ensure correct symbol files for OS version
482
+ - **Smear**: Memory may change during acquisition
483
+ - **Encryption**: Some data may be encrypted in memory