
Cisco IOS XE 시스템에 이식된(implanted) 침해 여부를 탐지하는 Go 기반 스캐너로, 조작된 HTTP 요청을 전송하여 침해된 디바이스와 취약한 버전을 식별합니다.
2023년 10월 23일, 모든 임플란트가 /webui/logoutconfirm.html에 대한 요청에 더 이상 응답하지 않게 되자, Fox-IT는 시스템이 감염되었는지 여부를 판단하는 새로운 방법을 개발했습니다. 특히, 공격자의 임플란트는 요청에 대해 로그인으로 리다이렉트하는 대신, 요청된 URI에 %가 포함되어 있으면 404를 반환하는 로직을 가지고 있었습니다. 따라서 이 스캐너는 이제 /Fadf%25와 같은 HTTP GET 요청을 전송합니다. 임플란트가 설치된 시스템은 다음과 같은 페이로드를 반환합니다:
<html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>nginx</center>
</body>
</html>
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
사용법은 이전과 동일하지만(더 많은 사용 정보는 "Old Docs" 섹션 참조), 더 이상 implant-id를 복구할 수 없습니다.
makefile을 사용하여 도커 컨테이너를 빌드할 수 있습니다:
make docker
또는 Go 빌드 환경이 준비되어 있다면 make를 사용하면 됩니다:
albinolobster@mournland:~/cisco-ios-xe-implant-scanner$ make
gofmt -d -w implant-scanner.go
golangci-lint run --fix implant-scanner.go
GOOS=linux GOARCH=arm64 go build -o build/implant-scanner_linux-arm64 implant-scanner.go
./build/implant-scanner -a -v -c -rhost 10.9.49.180
time=2023-10-23T14:33:07.581-04:00 level=STATUS msg="Starting target" index=0 host=10.9.49.180 port=80 ssl=false "ssl auto"=true
time=2023-10-23T14:33:08.782-04:00 level=STATUS msg="Validating IOS XE target" host=10.9.49.180 port=80
time=2023-10-23T14:33:10.115-04:00 level=SUCCESS msg="Target validation succeeded!" host=10.9.49.180 port=80
time=2023-10-23T14:33:10.115-04:00 level=STATUS msg="Running a version check on the remote target" host=10.9.49.180 port=80
time=2023-10-23T14:33:10.624-04:00 level=SUCCESS msg="The target appears to be a vulnerable version!" host=10.9.49.180 port=80
./build/implant-scanner -a -v -c -rhost 10.9.49.124
time=2023-10-23T14:34:31.207-04:00 level=STATUS msg="Starting target" index=0 host=10.9.49.124 port=80 ssl=false "ssl auto"=true
time=2023-10-23T14:34:31.340-04:00 level=STATUS msg="Validating IOS XE target" host=10.9.49.124 port=80
time=2023-10-23T14:34:31.363-04:00 level=SUCCESS msg="Target validation succeeded!" host=10.9.49.124 port=80
time=2023-10-23T14:34:31.363-04:00 level=STATUS msg="Running a version check on the remote target" host=10.9.49.124 port=80
time=2023-10-23T14:34:31.378-04:00 level=ERROR msg="The target appears to be a patched version." host=10.9.49.124 port=80
Cisco PSIRT와 Cisco Talos가 설명한 IOS XE 임플란트를 스캔합니다. 스캐너는 /webui/logoutconfirm.html?logon_hash=1로 HTTP POST 요청을 전송하고 응답에서 18바이트 hexstring을 찾습니다. 임플란트를 발견하면 스캐너 출력에 다음과 같은 줄이 표시됩니다:
time=2023-10-17T06:09:02.967-04:00 level=SUCCESS msg=Found implant-id=1a80b7389ccd0a5dab rhost=192.168.1.1 rport=80 ssl=false
임플란트가 발견되지 않으면 스캐너는 다음과 같이 출력합니다:
{"time":"2023-10-17T06:13:48.241233896-04:00","level":"ERROR","msg":"The target appears to be a patched version.","host":"192.168.1.1","port":80}
이는 패치된 버전을 나타내는 것이 아니라 단지 임플란트가 발견되지 않았음을 의미합니다. 이것은 go-exploit의 버전 스캐너에서 나오는 일반적인 출력일 뿐입니다. 이 도구는 go-exploit을 기반으로 구축되었기 때문에 다양한 스캔 기능을 지원합니다. 사용 예시는 다음과 같습니다:
$ ./build/implant-scanner -rhost 192.168.1.1 -rport 80 -proxy socks5://127.0.0.1:9050 -a -v -c
time=2023-10-17T06:08:59.586-04:00 level=STATUS msg="Starting target" index=0 host=192.168.1.1port=80 ssl=false "ssl auto"=true
time=2023-10-17T06:09:00.882-04:00 level=STATUS msg="Validating IOS XE target" host=192.168.1.1port=80
time=2023-10-17T06:09:02.237-04:00 level=SUCCESS msg="Target validation succeeded!" host=192.168.1.1port=80
time=2023-10-17T06:09:02.237-04:00 level=STATUS msg="Running a version check on the remote target" host=192.168.1.1port=80
time=2023-10-17T06:09:02.967-04:00 level=SUCCESS msg=Found implant-id=1a80b7389ccd0a5dab rhost=192.168.1.1rport=80 ssl=false
time=2023-10-17T06:09:02.967-04:00 level=SUCCESS msg="The target appears to be a vulnerable version!" host=192.168.1.1port=80
$ ./build/implant-scanner -rhost 192.168.1.1-rport 80 -proxy socks5://127.0.0.1:9050 -a -v -c
time=2023-10-17T06:08:59.586-04:00 level=STATUS msg="Starting target" index=0 host=192.168.1.1port=80 ssl=false "ssl auto"=true
time=2023-10-17T06:09:00.882-04:00 level=STATUS msg="Validating IOS XE target" host=192.168.1.1port=80
time=2023-10-17T06:09:02.237-04:00 level=SUCCESS msg="Target validation succeeded!" host=192.168.1.1port=80
time=2023-10-17T06:09:02.237-04:00 level=STATUS msg="Running a version check on the remote target" host=192.168.1.1port=80
time=2023-10-17T06:09:02.967-04:00 level=SUCCESS msg=Found implant-id=1a80b7389ccd0a5dab rhost=192.168.1.1rport=80 ssl=false
time=2023-10-17T06:09:02.967-04:00 level=SUCCESS msg="The target appears to be a vulnerable version!" host=192.168.1.1port=80
-rhosts-file 형식에 대한 더 나은 이해를 위해 go-exploit 문서를 참조하세요.
$ ./build/implant-scanner -rhosts-file targets -log-json -log-file ./logs/output.json -v -c
$ tail logs/output.json
{"time":"2023-10-17T06:16:07.24555914-04:00","level":"STATUS","msg":"Validating IOS XE Implant target","host":"192.168.1.1","port":443}
{"time":"2023-10-17T06:16:10.363281285-04:00","level":"SUCCESS","msg":"Target validation succeeded!","host":"192.168.1.1","port":443}
{"time":"2023-10-17T06:16:10.363345035-04:00","level":"STATUS","msg":"Running a version check on the remote target","host":"192.168.1.1","port":443}