
एक go-exploit जो CVE-2023-36845 के प्रति कमजोर Juniper फ़ायरवॉल को स्कैन करने के लिए है।
यह भेद्यता स्कैनर जुनिपर फ़ायरवॉल को स्कैन करने के लिए उपयोग किया जा सकता है ताकि यह निर्धारित किया जा सके कि वे CVE-2023-36845 के प्रति संवेदनशील हैं या नहीं। चूंकि यह go-exploit के ऊपर बनाया गया है, इस स्कैनर के दो चरण हैं:
LD_PRELOAD संदेश भेजता है।CVE-2023-36845 के शोषण पर अधिक विवरण के लिए हमारा ब्लॉग देखें, जुनिपर फ़ायरवॉल पर फ़ाइल रहित रिमोट कोड निष्पादन।
आप डॉकर कंटेनर बनाने के लिए makefile का उपयोग कर सकते हैं:
make docker
या, यदि आपके पास Go बिल्ड वातावरण तैयार है, तो बस make का उपयोग करें:
albinolobster@mournland:~/cve-2023-36845-scanner$ make
gofmt -d -w scan.go
golangci-lint run --fix scan.go
GOOS=linux GOARCH=arm64 go build -o build/scan_linux-arm64 scan.go
यह उपकरण go-exploit के ऊपर बनाया गया है, इसलिए स्कैन करने के लिए लक्ष्य प्रदान करने के कई तरीके हैं। पूर्ण विवरण प्रोजेक्ट के स्कैनिंग दस्तावेज़ में पाया जा सकता है। हालाँकि, निम्नलिखित कुछ उदाहरण दिखाता है:
$ ./build/scan_linux-arm64 -a -v -e -rhost 10.12.72.1 -log-json=true | jq 'select(.msg == "Vulnerable")'
{
"time": "2023-09-16T06:18:01.964471183-04:00",
"level": "SUCCESS",
"msg": "Vulnerable",
"vulnerable": true,
"rhost": "10.12.72.1",
"rport": 80
}
$ ./build/scan_linux-arm64 -a -v -e -rhosts 10.12.72.1,10.12.72.2
time=2023-09-16T06:19:26.592-04:00 level=STATUS msg="Starting target" index=0 host=10.12.72.1 port=80 ssl=false "ssl auto"=true
time=2023-09-16T06:19:36.607-04:00 level=STATUS msg="Validating JunOS Web Interface target" host=10.12.72.1 port=80
time=2023-09-16T06:19:37.528-04:00 level=SUCCESS msg="Target validation succeeded!" host=10.12.72.1 port=80
time=2023-09-16T06:19:37.574-04:00 level=SUCCESS msg=Vulnerable vulnerable=true rhost=10.12.72.1 rport=80
time=2023-09-16T06:19:37.575-04:00 level=STATUS msg="Exploit successfully completed"
time=2023-09-16T06:19:37.575-04:00 level=STATUS msg="Starting target" index=1 host=10.12.72.2 port=80 ssl=false "ssl auto"=true
time=2023-09-16T06:19:37.575-04:00 level=STATUS msg="Validating JunOS Web Interface target" host=10.12.72.2 port=80
time=2023-09-16T06:19:37.576-04:00 level=ERROR msg="The target isn't recognized as JunOS Web Interface, quitting" host=10.12.72.2 port=80
go-exploit प्रदान किए गए लक्ष्य csv के माध्यम से स्कैन करने की क्षमता प्रदान करता है, जहाँ csv है: host, port, anything if ssl is enabled (हालाँकि SSL फ़ील्ड को अनदेखा किया जाता है यदि -a का उपयोग किया जाता है)। पूर्ण विवरण के लिए कृपया स्कैनिंग दस्तावेज़ देखें। यह प्रॉक्सी के माध्यम से स्कैन करने की क्षमता भी प्रदान करता है। कमांड इस प्रकार काम करता है:
$ ./build/scan_linux-arm64 -v -e -rhosts-file ~/junos/junos.targets.csv -proxy socks5://127.0.0.1:9050 -log-file vulnscan.json
^C
$ tail vulnscan.json
time=2023-09-17T05:11:19.256-04:00 level=STATUS msg="Starting target" index=0 host=x port=443 ssl=true "ssl auto"=false
time=2023-09-17T05:11:19.256-04:00 level=STATUS msg="Validating JunOS Web Interface target" host=x port=443
time=2023-09-17T05:11:29.257-04:00 level=ERROR msg="HTTP request error: Get \"https://x:443/\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)"
time=2023-09-17T05:11:29.257-04:00 level=ERROR msg="The target isn't recognized as JunOS Web Interface, quitting" host=x port=443
time=2023-09-17T05:11:29.257-04:00 level=STATUS msg="Starting target" index=1 host=x port=80 ssl=false "ssl auto"=false
time=2023-09-17T05:11:29.257-04:00 level=STATUS msg="Validating JunOS Web Interface target" host=xport=80