cleanup

Remove operational artifacts and traces from Unix-like and Windows systems.

482|68|Updated Sep 5, 2023
One-click install
npx skills add https://github.com/chainreactors/malice-network --skill cleanup-chainreactors
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cleanup
Source: https://github.com/chainreactors/malice-network/tree/main/helper/intl/community/resources/skills/cleanup
Command: npx skills add https://github.com/chainreactors/malice-network --skill cleanup-chainreactors

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Clean up operational artifacts and traces from the target system.

Core Features & Use Cases

  • Shell history: clear current session history, remove entries from history files related to our operations
  • Log entries: purge or selectively remove recent entries in auth.log, syslog, wtmp/btmp, Windows Event Logs related to our activity
  • Temp files: remove any temporary files created during operations in /tmp, %TEMP%, working directories
  • Persistence artifacts: remove any persistence mechanisms we installed (specify which: $ARGUMENTS)
  • Timestamps: restore file modification times if we modified any configs (use touch -r with reference file)
  • Network traces: clear ARP cache, DNS cache, recent connections from logs

Rules

  • List all artifacts you intend to remove BEFORE removing them — wait for confirmation
  • Show the exact commands that will be executed
  • For log files, only remove specific entries — do NOT truncate or delete entire log files
  • Record what was cleaned for the operator's reference
  • If $ARGUMENTS is empty, only perform discovery (list what WOULD be cleaned) without actually cleaning

$ARGUMENTS

Frequently Asked Questions about cleanup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I selectively remove specific entries from syslog and auth.log without deleting the entire file?

To selectively remove log entries, this cleanup skill targets and purges only specific activity-related lines from auth.log and syslog, ensuring it never truncates or deletes entire log files.

What's the best way to clear shell history and remove command traces across Unix and Windows systems?

Clear shell history and remove command traces by targeting current session history and history files across Unix-like and Windows environments, ensuring operational commands are purged securely.

How does artifact removal handle temporary files and persistence mechanisms on a target system?

Artifact removal handles temporary files by purging contents in /tmp and %TEMP%, and eliminates persistence mechanisms by uninstalling installed persistence artifacts specified in the arguments.

Can I discover what artifacts would be cleaned from a system before actually removing them?

Yes, you can discover removable artifacts by running the skill with empty arguments to perform a read-only discovery scan, listing exactly what would be cleaned without executing any removal.

How do I restore file modification timestamps and clear network traces after system operations?

Restore file modification timestamps using a reference file with touch -r, and clear network traces by flushing the ARP cache, DNS cache, and recent connection logs from the target system.