{"id":22799905,"url":"https://github.com/chocapikk/cve-2023-3519","last_synced_at":"2025-04-13T17:08:01.649Z","repository":{"id":206950609,"uuid":"682553540","full_name":"Chocapikk/CVE-2023-3519","owner":"Chocapikk","description":"Citrix ADC RCE CVE-2023-3519","archived":false,"fork":false,"pushed_at":"2023-08-30T15:47:22.000Z","size":23,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-12T07:10:07.132Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Chocapikk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-08-24T12:24:24.000Z","updated_at":"2024-08-12T20:32:35.000Z","dependencies_parsed_at":"2023-11-13T11:36:30.860Z","dependency_job_id":null,"html_url":"https://github.com/Chocapikk/CVE-2023-3519","commit_stats":null,"previous_names":["chocapikk/cve-2023-3519"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chocapikk%2FCVE-2023-3519","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chocapikk%2FCVE-2023-3519/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chocapikk%2FCVE-2023-3519/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chocapikk%2FCVE-2023-3519/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Chocapikk","download_url":"https://codeload.github.com/Chocapikk/CVE-2023-3519/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237381413,"owners_count":19300927,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-12T07:10:13.656Z","updated_at":"2025-02-05T21:47:43.720Z","avatar_url":"https://github.com/Chocapikk.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Citrix ADC RCE CVE-2023-3519 Exploit Guide\n\nThis document provides a comprehensive guide for the exploit targeting Citrix ADC RCE CVE-2023-3519. This vulnerability primarily impacts Citrix VPX 13.1-48.47, but it could potentially affect other versions as well.\n\n## Table of Contents\n\n1. Overview\n2. Prerequisites\n3. Usage\n   - Command Line Options\n   - Exploit Procedure\n   - Automatic Callback URL Generation\n4. Shellcode Artifacts\n5. Adapting for Other Versions\n6. Disclaimer\n\n## 1. Overview\n\nThis exploit leverages a vulnerability in Citrix ADC RCE. For a detailed analysis and writeup about this vulnerability, please refer to the article by Bishop Fox: [Analysis \u0026 Exploitation of CVE-2023-3519](https://bishopfox.com/blog/analysis-exploitation-cve-2023-3519).\n\n## 2. Prerequisites\n\nBefore you can use the exploit, you must ensure the NASM tool is installed, which is required to build the shellcode:\n\n```bash\n$ sudo apt install nasm\n```\n\n## 3. Usage\n\n### Command Line Options\n\nTo display the help menu and view the available options:\n\n```bash\n$ python3.10 exploit.py -h\n```\n\nThe available options include:\n\n- `--target TARGET`: Define the target. Format should be an URL or ip:port.\n- `--file FILE`: Use a file that contains a list of targets, one per line.\n- `--output OUTPUT`: Define an output file to save vulnerable targets.\n- `--threads THREADS`: Specify the number of threads for concurrent scanning.\n\n### Exploit Procedure\n\nTo initiate the exploit against a specific target:\n\n```bash\nOPENSSL_CONF=./openssl.cnf python3.10 exploit.py --target https://example.com\n```\n\nOR\n\n```bash\nOPENSSL_CONF=./openssl.cnf python3.10 exploit2.py --target https://example.com\n```\n\n### Automatic Callback URL Generation\n\nThe exploit script includes a feature to auto-generate a callback URL using a specific short-link service. While this is essential for the exploit process, users are urged to:\n\n1. Maintain **privacy** by not disclosing or sharing the generated URL.\n2. Limit the **usage** to avoid unintended consequences and potential service misuse.\n\n## 4. Shellcode Artifacts\n\nPost exploitation:\n\n1. A PHP backdoor will be created at `/var/netscaler/logon/a.php`.\n2. The SUID bit will be set on `/bin/sh`.\n\nTo automate the cleanup of these artifacts, use the provided `sh` payload. Note: The shellcode doesn't close its file descriptors. Running the exploit repeatedly might lead to resource exhaustion.\n\n## 5. Adapting for Other Versions\n\nIf you are looking to use this exploit on other FreeBSD-based Citrix versions, you need to:\n\n1. Identify the offset of the saved return pointer.\n2. Locate a `jmp rsp` ROP gadget or an equivalent.\n3. Determine the jump address to prevent crashing.\n\nThese parameters are specified at the beginning of the `exploit.py` script. Some versions might also need an adjustment to the RBP value.\n\n## 6. Disclaimer\n\nThis tool is intended for security research and testing. Unauthorized access to computer systems is illegal. Always obtain proper authorization before scanning or exploiting systems.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchocapikk%2Fcve-2023-3519","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchocapikk%2Fcve-2023-3519","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchocapikk%2Fcve-2023-3519/lists"}