/etc/syslog.conf# in this file, you can read all the logs that Syslog logs.# on linux/unix, a lot of systems logs are stored : /var/logs# i.e. /var/log/messages/var/log/auth.log# ssh, sudo attempts# APACHE/var/log/apache2/access.log/var/log/apache2/error.log# remove your ip :grep-v'$src-ip-address'/path/to/access_log>a&&mva/path/to/access_loggrep-v<entry-to-remove><logfile>>/tmp/a ; mv/tmp/a<logfile> ; rm-f/tmp/a# utmp / wtmpwholastlastlog# COMMAND HISTORYecho $HISTFILE# You can set your file size like this to zero, to avoid storing commands.export HISTSIZE=0# SHRED FILES# lets you remove files in a more secure wayshred-zu $filename
MoonWalk πΊ
MoonWalk is a 400 KB single-binary executable that can clear your traceswhile penetration testing a Unix machine.
It saves the state of system logs pre-exploitation and reverts that state including the filesystem timestamps post-exploitation leaving zero traces of a ghost in the shell.
Installation
curl-Lhttps://github.com/mufeedvh/moonwalk/releases/download/v1.0.0/moonwalk_linux-omoonwalk# orcargoinstall--githttps://github.com/mufeedvh/moonwalk.git# from sourcegitclonehttps://github.com/mufeedvh/moonwalk.gitcdmoonwalk/cargobuild--release
Usage
# once we get a shell into the target unix machine, start moonwalk sessionmoonwalkstart# clear our traces moonwalkfinish