fixed payload sync and motd

This commit is contained in:
n0mad1k
2025-05-01 22:39:02 -04:00
parent 6b60b94768
commit 9e9383eeef
7 changed files with 83 additions and 59 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ C2_PAYLOAD_DIR="/root/Tools/Havoc/payloads"
REDIRECTOR_IP="{{ redirector_ip }}"
REDIRECTOR_USER="root"
SSH_KEY_PATH="/root/.ssh/id_ed25519"
REMOTE_PAYLOAD_DIR="/var/www/payloads"
REMOTE_PAYLOAD_DIR="/var/www/resources"
ENCRYPTED_TRANSFER=true
LOG_FILE="/root/Tools/logs/payload_sync.log"
LOG_RETENTION_DAYS=3
-54
View File
@@ -1,54 +0,0 @@
#!/bin/bash
# setup_payload_sync.sh - Configure systemd service and timer
# Create systemd service file
cat > /etc/systemd/system/payload-sync.service << EOF
[Unit]
Description=Secure Payload Sync Service
After=network-online.target
Wants=network-online.target
[Service]
Type=oneshot
ExecStart=/root/Tools/secure_payload_sync.sh
User=root
Group=root
# Security hardening
PrivateTmp=true
ProtectSystem=full
NoNewPrivileges=true
# Hide process information
StandardOutput=null
StandardError=journal
[Install]
WantedBy=multi-user.target
EOF
# Create systemd timer with randomized schedule
cat > /etc/systemd/system/payload-sync.timer << EOF
[Unit]
Description=Secure Payload Sync Timer
Requires=payload-sync.service
[Timer]
# Run every 30-60 minutes with randomization
OnBootSec=5min
OnUnitActiveSec=30m
RandomizedDelaySec=30m
Persistent=true
[Install]
WantedBy=timers.target
EOF
# Copy script to proper location
cp secure_payload_sync.sh /root/Tools/
chmod 700 /root/Tools/secure_payload_sync.sh
# Enable and start timer
systemctl daemon-reload
systemctl enable payload-sync.timer
systemctl start payload-sync.timer
echo "Payload sync service installed and timer started"