Skip to content

Øvelse 10 – Aktiv Rekognoscering

Forfatter: Mathias Greisen

Dato: 2026-09-11

Fag/modul: IT-Sikkerhed i Webapplikationer

Status: Færdig


1. Beskrivelse af øvelsen

I denne øvelse arbejdes der med aktiv rekognoscering af Crapi.

Følgende steps skal gennemføres:

  1. Nmap til port- og service-scanning

  2. Gobuster til path-enumeration via wordlists

  3. OWASP ZAP(Ekstra opgave) til mere automatiseret API-analyse

Øvelserne fokuserer på at lære praktiske teknikker og værktøjsbrug – men også på at kunne analysere og dokumentere resultaterne.

Husk

Gem og genbrug de wordlister, du udarbejder til crAPI – de skal bruges i senere øvelser og som dokumentation.


2. Reproduktion trin for trin

Forudsætninger

Man skal have adgang til følgende værktøjer

  • Crapi
  • Nmap
  • Gobuster
  • OWASP ZAP

Trin

  1. Installer seclists:

    sudo apt update
    
    sudo apt install seclists
    
  2. Brug Nmap til at udføre en fuld scanning og gem resultatet i en XML fil:

    nmap -p- -oX allportscan.xml 127.0.0.1
    
    - -p- - Scan all ports - -oX [filename] - Output as xml

    Nmap all port scan resultat

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE nmaprun>
    <?xml-stylesheet href="file:///usr/share/nmap/nmap.xsl" type="text/xsl"?>
    <!-- Nmap 7.99 scan initiated Fri Sep 11 11:29:25 2026 as: /usr/lib/nmap/nmap -&#45;privileged -p- -oX allportscan.xml 127.0.0.1 -->
    <nmaprun scanner="nmap" args="/usr/lib/nmap/nmap -&#45;privileged -p- -oX allportscan.xml 127.0.0.1" start="1789118965" startstr="Fri Sep 11 11:29:25 2026" version="7.99" xmloutputversion="1.05">
    <scaninfo type="syn" protocol="tcp" numservices="65535" services="1-65535"/>
    <verbose level="0"/>
    <debugging level="0"/>
    <host starttime="1789118965" endtime="1789118966"><status state="up" reason="localhost-response" reason_ttl="0"/>
    <address addr="127.0.0.1" addrtype="ipv4"/>
    <hostnames>
    <hostname name="localhost" type="PTR"/>
    </hostnames>
    <ports><extraports state="closed" count="65530">
    <extrareasons reason="reset" count="65530" proto="tcp" ports="1-2999,3001-4279,4281-8024,8026-8442,8444-8887,8889-65535"/>
    </extraports>
    <port protocol="tcp" portid="3000"><state state="open" reason="syn-ack" reason_ttl="64"/><service name="ppp" method="table" conf="3"/></port>
    <port protocol="tcp" portid="4280"><state state="open" reason="syn-ack" reason_ttl="64"/><service name="vrml-multi-use" method="table" conf="3"/></port>
    <port protocol="tcp" portid="8025"><state state="open" reason="syn-ack" reason_ttl="64"/><service name="ca-audit-da" method="table" conf="3"/></port>
    <port protocol="tcp" portid="8443"><state state="open" reason="syn-ack" reason_ttl="64"/><service name="https-alt" method="table" conf="3"/></port>
    <port protocol="tcp" portid="8888"><state state="open" reason="syn-ack" reason_ttl="64"/><service name="sun-answerbook" method="table" conf="3"/></port>
    </ports>
    <times srtt="1" rttvar="0" to="100000"/>
    </host>
    <runstats><finished time="1789118966" timestr="Fri Sep 11 11:29:26 2026" summary="Nmap done at Fri Sep 11 11:29:26 2026; 1 IP address (1 host up) scanned in 0.33 seconds" elapsed="0.33" exit="success"/><hosts up="1" down="0" total="1"/>
    </runstats>
    </nmaprun>
    
  3. Brug Nmap til at udføre default scripts og version detection, detection:

    nmap -p 3000,4280,8025,8443,8888 -sC -sV -oX servicedetection.xml 127.0.0.1
    
    • -p 3000,4280,8025,8443,8888
      • Scan ports 3000,4280,8025,8443,8888
    • -sC
      • equivalent to --script=default
    • -sV
      • Probe open ports to determine service/version info
    • -oX [filename]
      • Output as xml

    Nmap all port scan resultat

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE nmaprun>
    <?xml-stylesheet href="file:///usr/share/nmap/nmap.xsl" type="text/xsl"?>
    <!-- Nmap 7.99 scan initiated Fri Sep 11 12:51:40 2026 as: /usr/lib/nmap/nmap -&#45;privileged -p 3000,4280,8025,8443,8888 -sC -sV -oX servicedetection1.xml 127.0.0.1 -->
    <nmaprun scanner="nmap" args="/usr/lib/nmap/nmap -&#45;privileged -p 3000,4280,8025,8443,8888 -sC -sV -oX servicedetection1.xml 127.0.0.1" start="1789123900" startstr="Fri Sep 11 12:51:40 2026" version="7.99" xmloutputversion="1.05">
    <scaninfo type="syn" protocol="tcp" numservices="5" services="3000,4280,8025,8443,8888"/>
    <verbose level="0"/>
    <debugging level="0"/>
    <host starttime="1789123901" endtime="1789123914"><status state="up" reason="localhost-response" reason_ttl="0"/>
    <address addr="127.0.0.1" addrtype="ipv4"/>
    <hostnames>
    <hostname name="localhost" type="PTR"/>
    </hostnames>
    <ports><port protocol="tcp" portid="3000"><state state="open" reason="syn-ack" reason_ttl="64"/><service name="ppp" servicefp="SF-Port3000-TCP:V=7.99%I=7%D=9/11%Time=6AA3DD48%P=x86_64-pc-linux-gnu%r(GetRequest,101B9,&quot;HTTP/1\.1\x20200\x20OK\r\nAccess-Control-Allow-Origin:\x20\*\r\nX-Content-Type-Options:\x20nosniff\r\nX-Frame-Options:\x20SAMEORIGIN\r\nFeature-Policy:\x20payment\x20&apos;self&apos;\r\nX-Recruiting:\x20/#/jobs\r\nAccept-Ranges:\x20bytes\r\nCache-Control:\x20public,\x20max-age=0\r\nLast-Modified:\x20Fri,\x2011\x20Sep\x202026\x2009:24:23\x20GMT\r\nETag:\x20W/\&quot;124fa-1a08fc84ca3\&quot;\r\nContent-Type:\x20text/html;\x20charset=UTF-8\r\nContent-Length:\x2075002\r\nVary:\x20Accept-Encoding\r\nDate:\x20Fri,\x2011\x20Sep\x202026\x2010:51:52\x20GMT\r\nConnection:\x20close\r\n\r\n&lt;!-&#45;\n\x20\x20~\x20Copyright\x20\(c\)\x202014-2025\x20Bjoern\x20Kimminich\x20&amp;\x20the\x20OWASP\x20Juice\x20Shop\x20contributors\.\n\x20\x20~\x20SPDX-License-Identifier:\x20MIT\n\x20\x20-&#45;&gt;\n\n&lt;!doctype\x20html&gt;\n&lt;html\x20lang=\&quot;en\&quot;\x20data-beasties-container&gt;\n&lt;head&gt;\n\x20\x20&lt;meta\x20charset=\&quot;utf-8\&quot;&gt;\n\x20\x20&lt;title&gt;OWASP\x20Juice\x20Shop&lt;/title&gt;\n\x20\x20&lt;meta\x20name=\&quot;description\&quot;\x20content=\&quot;Probably\x20the\x20most\x20modern\x20and\x20sophisticated\x20insecure\x20web\x20application\&quot;&gt;\n\x20\x20&lt;meta\x20name=\&quot;viewport\&quot;\x20content=\&quot;width=device-width,\x20initial-scale=1\&quot;&gt;\n\x20\x20&lt;link\x20id=\&quot;favicon\&quot;\x20rel=\&quot;icon\&quot;\x20&quot;)%r(Help,2F,&quot;HTTP/1\.1\x20400\x20Bad\x20Request\r\nConnection:\x20close\r\n\r\n&quot;)%r(NCP,2F,&quot;HTTP/1\.1\x20400\x20Bad\x20Request\r\nConnection:\x20close\r\n\r\n&quot;)%r(HTTPOptions,EA,&quot;HTTP/1\.1\x20204\x20No\x20Content\r\nAccess-Control-Allow-Origin:\x20\*\r\nAccess-Control-Allow-Methods:\x20GET,HEAD,PUT,PATCH,POST,DELETE\r\nVary:\x20Access-Control-Request-Headers\r\nContent-Length:\x200\r\nDate:\x20Fri,\x2011\x20Sep\x202026\x2010:51:52\x20GMT\r\nConnection:\x20close\r\n\r\n&quot;)%r(RTSPRequest,EA,&quot;HTTP/1\.1\x20204\x20No\x20Content\r\nAccess-Control-Allow-Origin:\x20\*\r\nAccess-Control-Allow-Methods:\x20GET,HEAD,PUT,PATCH,POST,DELETE\r\nVary:\x20Access-Control-Request-Headers\r\nContent-Length:\x200\r\nDate:\x20Fri,\x2011\x20Sep\x202026\x2010:51:52\x20GMT\r\nConnection:\x20close\r\n\r\n&quot;);" method="table" conf="3"/><script id="fingerprint-strings" output="&#xa;  GetRequest: &#xa;    HTTP/1.1 200 OK&#xa;    Access-Control-Allow-Origin: *&#xa;    X-Content-Type-Options: nosniff&#xa;    X-Frame-Options: SAMEORIGIN&#xa;    Feature-Policy: payment &apos;self&apos;&#xa;    X-Recruiting: /#/jobs&#xa;    Accept-Ranges: bytes&#xa;    Cache-Control: public, max-age=0&#xa;    Last-Modified: Fri, 11 Sep 2026 09:24:23 GMT&#xa;    ETag: W/&quot;124fa-1a08fc84ca3&quot;&#xa;    Content-Type: text/html; charset=UTF-8&#xa;    Content-Length: 75002&#xa;    Vary: Accept-Encoding&#xa;    Date: Fri, 11 Sep 2026 10:51:52 GMT&#xa;    Connection: close&#xa;    &lt;!-&#45;&#xa;    Copyright (c) 2014-2025 Bjoern Kimminich &amp; the OWASP Juice Shop contributors.&#xa;    SPDX-License-Identifier: MIT&#xa;    &lt;!doctype html&gt;&#xa;    &lt;html lang=&quot;en&quot; data-beasties-container&gt;&#xa;    &lt;head&gt;&#xa;    &lt;meta charset=&quot;utf-8&quot;&gt;&#xa;    &lt;title&gt;OWASP Juice Shop&lt;/title&gt;&#xa;    &lt;meta name=&quot;description&quot; content=&quot;Probably the most modern and sophisticated insecure web application&quot;&gt;&#xa;    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1&quot;&gt;&#xa;    &lt;link id=&quot;favicon&quot; rel=&quot;icon&quot;&#xa;  HTTPOptions, RTSPRequest: &#xa;    HTTP/1.1 204 No Content&#xa;    Access-Control-Allow-Origin: *&#xa;    Access-Control-Allow-Methods: GET,HEAD,PUT,PATCH,POST,DELETE&#xa;    Vary: Access-Control-Request-Headers&#xa;    Content-Length: 0&#xa;    Date: Fri, 11 Sep 2026 10:51:52 GMT&#xa;    Connection: close&#xa;  Help, NCP: &#xa;    HTTP/1.1 400 Bad Request&#xa;    Connection: close"><elem key="GetRequest">&#xa;    HTTP/1.1 200 OK&#xa;    Access-Control-Allow-Origin: *&#xa;    X-Content-Type-Options: nosniff&#xa;    X-Frame-Options: SAMEORIGIN&#xa;    Feature-Policy: payment &apos;self&apos;&#xa;    X-Recruiting: /#/jobs&#xa;    Accept-Ranges: bytes&#xa;    Cache-Control: public, max-age=0&#xa;    Last-Modified: Fri, 11 Sep 2026 09:24:23 GMT&#xa;    ETag: W/&quot;124fa-1a08fc84ca3&quot;&#xa;    Content-Type: text/html; charset=UTF-8&#xa;    Content-Length: 75002&#xa;    Vary: Accept-Encoding&#xa;    Date: Fri, 11 Sep 2026 10:51:52 GMT&#xa;    Connection: close&#xa;    &lt;!-&#45;&#xa;    Copyright (c) 2014-2025 Bjoern Kimminich &amp; the OWASP Juice Shop contributors.&#xa;    SPDX-License-Identifier: MIT&#xa;    &lt;!doctype html&gt;&#xa;    &lt;html lang=&quot;en&quot; data-beasties-container&gt;&#xa;    &lt;head&gt;&#xa;    &lt;meta charset=&quot;utf-8&quot;&gt;&#xa;    &lt;title&gt;OWASP Juice Shop&lt;/title&gt;&#xa;    &lt;meta name=&quot;description&quot; content=&quot;Probably the most modern and sophisticated insecure web application&quot;&gt;&#xa;    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1&quot;&gt;&#xa;    &lt;link id=&quot;favicon&quot; rel=&quot;icon&quot;</elem>
    <elem key="HTTPOptions, RTSPRequest">&#xa;    HTTP/1.1 204 No Content&#xa;    Access-Control-Allow-Origin: *&#xa;    Access-Control-Allow-Methods: GET,HEAD,PUT,PATCH,POST,DELETE&#xa;    Vary: Access-Control-Request-Headers&#xa;    Content-Length: 0&#xa;    Date: Fri, 11 Sep 2026 10:51:52 GMT&#xa;    Connection: close</elem>
    <elem key="Help, NCP">&#xa;    HTTP/1.1 400 Bad Request&#xa;    Connection: close</elem>
    </script></port>
    <port protocol="tcp" portid="4280"><state state="open" reason="syn-ack" reason_ttl="64"/><service name="http" product="Apache httpd" version="2.4.62" extrainfo="(Debian)" method="probed" conf="10"><cpe>cpe:/a:apache:http_server:2.4.62</cpe></service><script id="http-title" output="Login :: Damn Vulnerable Web Application (DVWA)&#xa;Requested resource was login.php"><elem key="title">Login :: Damn Vulnerable Web Application (DVWA)</elem>
    <elem key="redirect_url">login.php</elem>
    </script><script id="http-robots.txt" output="1 disallowed entry &#xa;/"/><script id="http-server-header" output="Apache/2.4.62 (Debian)"><elem>Apache/2.4.62 (Debian)</elem>
    </script></port>
    <port protocol="tcp" portid="8025"><state state="open" reason="syn-ack" reason_ttl="64"/><service name="http" product="Golang net/http server" extrainfo="Go-IPFS json-rpc or InfluxDB API" method="probed" conf="10"><cpe>cpe:/a:protocol_labs:go-ipfs</cpe></service><script id="http-title" output="MailHog"><elem key="title">MailHog</elem>
    </script></port>
    <port protocol="tcp" portid="8443"><state state="open" reason="syn-ack" reason_ttl="64"/><service name="http" product="OpenResty web app server" version="1.25.3.1" tunnel="ssl" method="probed" conf="10"><cpe>cpe:/a:openresty:ngx_openresty:1.25.3.1</cpe></service><script id="http-server-header" output="openresty/1.25.3.1"><elem>openresty/1.25.3.1</elem>
    </script><script id="ssl-cert" output="Subject: commonName=localhost/organizationName=DEVELOPMENT COMPANY/stateOrProvinceName=DEVELOPMENT STATE/countryName=US&#xa;Not valid before: 2017-07-23T22:53:19&#xa;Not valid after:  2027-07-21T22:53:19"><table key="subject">
    <elem key="commonName">localhost</elem>
    <elem key="countryName">US</elem>
    <elem key="emailAddress">development@example.com</elem>
    <elem key="localityName">DEVELOPMENT CITY</elem>
    <elem key="organizationName">DEVELOPMENT COMPANY</elem>
    <elem key="organizationalUnitName">DJANGO DEVELOPERS</elem>
    <elem key="stateOrProvinceName">DEVELOPMENT STATE</elem>
    </table>
    <table key="issuer">
    <elem key="commonName">localhost</elem>
    <elem key="countryName">US</elem>
    <elem key="emailAddress">development@example.com</elem>
    <elem key="localityName">DEVELOPMENT CITY</elem>
    <elem key="organizationName">DEVELOPMENT COMPANY</elem>
    <elem key="organizationalUnitName">DJANGO DEVELOPERS</elem>
    <elem key="stateOrProvinceName">DEVELOPMENT STATE</elem>
    </table>
    <table key="pubkey">
    <elem key="type">rsa</elem>
    <elem key="bits">4096</elem>
    <elem key="modulus">B8E0C7BE59BDF1F647D6F417C7A8DA437104B7B0466E6E88AB8256F3E9C2DE8F68086FACDACFDDCC1468F0E27CA9EA57E6FD1B2CE7A8027DC5709ABAF16458EA9CA2DB20CEDBD857ACDD578C14E1AD606152E17EB410FAB5D53E4C1B6557F004499C3457E2829668C6B0520DD4AE34CE59A768070769FA4DC458BC8E73D9A23073AB3E198A89A61C64974CEFC9E54CB1BB0EA312B65B55A439F822E256930D18F5061E440112B10F832E9FA3BC846FEC327B5233805DAD08A62272AF56C9EEA70205DEBF631CFC963FF6C90ACE4AF1C78CDEBD79807C81C65A5683FEF8DF2E63279ADB4E549B347F6F7294845208C145C92A15A7B1FD18BF86BFF5153CFD95713ECC3EE376EF9D6FD5BC531773BF919BC8091E0E6A217241FB60266CCD2483B0F082433A7FE0CB9FB9BF48866B824E8FBF666BBFE93A0243EE09C4C3F15639C9844075D259F5C58A23009853054EDF6F9428DF00E35C52841ED73F277D56DA4F32101942BC2FB962536E2598A10197CA4B4648AAF71867BA91E53C34DC56414E079F4FA785EFCB3B31D8C3BB12A138E005FBCFF01CBE7A2E338625947ADCA881DD7C9BD1751E790E2477579FCB9F172D246E5096BBCDE3206CC3C16F2E91ED8EB1D9B83798492F6423D005C639638DE0E33A25E2444EE5E3657B2A02A59566A33803B806A35DAB2117E0D9C67DB71DC984E86F48C581139300F71ED2193D9F01</elem>
    <elem key="exponent">65537</elem>
    </table>
    <table key="extensions">
    <table>
    <elem key="name">X509v3 Subject Key Identifier</elem>
    <elem key="value">CA:31:F2:0C:6D:98:A2:CF:1D:C6:1A:22:51:3D:38:A1:54:7E:25:DC</elem>
    </table>
    <table>
    <elem key="name">X509v3 Authority Key Identifier</elem>
    <elem key="value">CA:31:F2:0C:6D:98:A2:CF:1D:C6:1A:22:51:3D:38:A1:54:7E:25:DC</elem>
    </table>
    <table>
    <elem key="name">X509v3 Basic Constraints</elem>
    <elem key="value">CA:TRUE</elem>
    </table>
    </table>
    <elem key="sig_algo">sha256WithRSAEncryption</elem>
    <table key="validity">
    <elem key="notBefore">2017-07-23T22:53:19</elem>
    <elem key="notAfter">2027-07-21T22:53:19</elem>
    </table>
    <elem key="md5">0e58297e61b00b26c764862b1e3cdb7c</elem>
    <elem key="sha1">ab776a9a9401f7298a5cff832ce2829fb329db51</elem>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;KNp1c48gmIOsxRYYOQYB9TKfqmv6icYUPZ7wUhahYyf5z5EMnvfXEyflmSAsHOy6&#xa;kkSLd8TfC8VQxAhL87DeCEkWkDl1xeEcPuRu3gOm90dxVZfphrqlBZ9hW9j7dysg&#xa;Xp2xSqDYOcyKAMR5mMajOogE8vDXgoSRkQK+/HYCNCtKthVIXT2x5h8VP8MGFWNH&#xa;YBQwmKnIT6PT2DV2TgpF3X9T9lLdPbg+TwnaoBuYxCIIEbTK+LNKnqaj2dLCxdOq&#xa;VjVM6fboLD/7AqtVyld7pX/5FbcD3PaZURQw3p0=&#xa;-&#45;&#45;&#45;&#45;END CERTIFICATE-&#45;&#45;&#45;&#45;&#xa;</elem>
    </script><script id="tls-alpn" output="&#xa;  http/1.1&#xa;  http/1.0&#xa;  http/0.9"><elem>http/1.1</elem>
    <elem>http/1.0</elem>
    <elem>http/0.9</elem>
    </script><script id="http-title" output="crAPI"><elem key="title">crAPI</elem>
    </script><script id="ssl-date" output="TLS randomness does not represent time"></script></port>
    <port protocol="tcp" portid="8888"><state state="open" reason="syn-ack" reason_ttl="64"/><service name="http" product="OpenResty web app server" version="1.25.3.1" method="probed" conf="10"><cpe>cpe:/a:openresty:ngx_openresty:1.25.3.1</cpe></service><script id="http-title" output="crAPI"><elem key="title">crAPI</elem>
    </script><script id="http-server-header" output="openresty/1.25.3.1"><elem>openresty/1.25.3.1</elem>
    </script></port>
    </ports>
    <times srtt="77" rttvar="1647" to="100000"/>
    </host>
    <runstats><finished time="1789123914" timestr="Fri Sep 11 12:51:54 2026" summary="Nmap done at Fri Sep 11 12:51:54 2026; 1 IP address (1 host up) scanned in 14.27 seconds" elapsed="14.27" exit="success"/><hosts up="1" down="0" total="1"/>
    </runstats>
    </nmaprun>
    
  4. Enumerate Crapi with Gobuster and "common.txt" wordlist:

    Find content lenght for sider som ikke findes
    curl -k -i https://127.0.0.1:8443/thispathshouldnotexist
    

    Content-Length: 2837

    Go buster kommando
    gobuster dir -d "100ms" -k --xl "2837" -w "/usr/share/seclists/Discovery/Web-Content/common.txt" -u "https://127.0.0.1:8443" | tee -a crAPI_gobuster.txt
    
    • --url value, -u value
      • The target URL
    • --no-tls-validation, -k
      • Skip TLS certificate verification
    • --exclude-length, --xl
      • exclude the following content lengths (completely ignores the status). You can separate multiple lengths by comma and it also supports ranges like 203-206
    • --wordlist value, -w value
      • Path to the wordlist. Set to - to use STDIN.
    • --delay value, -d value
      • Time each thread waits between requests (e.g. 1500ms) (default: 0s)
    • --status-codes value, -s value
      • Positive status codes (will be overwritten with status-codes-blacklist if set). Can also handle ranges like 200,300-400,404
    • --status-codes-blacklist value, -b value
      • Negative status codes (will override status-codes if set). Can also handle ranges like 200,300-400,404. (default: "404")
    • --output value, -o value
      • Output file to write results to (defaults to stdout)
    • --username value, -U value
      • Username for Basic Auth
    • --password value, -P value
      • Password for Basic Auth
    • --cookies value, -c value
      • Cookies to use for the requests

    Resultat

  5. Enumerate found directories of Crapi with Gobuster and "quickhits.txt" wordlist:

    Eksempel go buster kommando med ny path
    gobuster dir -d "100ms" -k --xl "2837" -w "/usr/share/seclists/Discovery/Web-Content/quickhits.txt" -u "https://127.0.0.1:8443/community" -o "crAPI-gobuster-community-quickhits.txt"
    

    Resultat

  6. Enumerate with api specific wordlist

    Go buster kommando
    gobuster dir -d "100ms" -k --xl "2837" -w "/usr/share/seclists/Discovery/Web-Content/api/api-endpoints.txt" -u "https://127.0.0.1:8443/workshop/admin" | tee -a crAPI_gobuster.txt
    

    Resultat

Endelige resultat

Alle fundne endpoints

3. Problemer og løsninger

[Beskriv de udfordringer du stødte på undervejs, og hvordan du løste dem. Dette hjælper både dig selv og andre til at undgå samme faldgruber fremover.]

Problem Årsag Løsning
Kunne ikke append output fra gobuster til samme fil Go Buster overskriver automatisk filen Gemte output i to filer, da brug af "| tee -a filnavn.txt" ikke gave det samme output fra gobuster

4. Resultater og besvarelser

Besvarelse af reflektionsspørgsmål:

  1. What types of services and ports did you discover?

    • Ports: 3000,4280,8025,8443,8888
    • Services: OWASP Juice Shop, Damn Vulnerable Web Application (DVWA), MailHog, crAPI (8443,8888)
  2. Which tool gave you the most useful information about crAPI’s structure — and why?

    • OWASP ZAP da man får et site tree samt informationer om potentielle sårbarheder kategoriseret efter niveau.
  3. How could an attacker use the discovered endpoints to plan a more targeted attack?

    • .env filen som blev fundet kan muligvis bruges til at angibe database servere.
    • admin og api endpoint kan bruges til at teste for sårbarheder og muligvis få adgang til siden.
  4. If an endpoint always returns 200 OK, how can that mislead automation tools like Gobuster?

    • Værktøjerne tror at siden findes, men i virkeligheden er det blot en blank side med at den ikke findes.
  5. How would you explain the purpose of active reconnaissance to a non-technical stakeholder?

    • Ved at udføre aktiv rekogniscering kan man kortlægge angrebsfladen for en virksomhed eller service. Man skal kende netop angrebsfladen for at vide hvilke potentielle sårbarheder der findes og hvad man evt skal beskytte.

    • Man skal vide hvor vinduer og døre er i et hus hvis man enten vil låse af eller bryde ind.


5. Anvendte ressourcer


6. Opsummering af erfaringer

Jeg har opbygget erfaringer med aktiv rekogniscering med brug af forskellige værktøjer: Nmap og Gobuster

Jeg har lært vigtigheden af at kende til angrebsfladen, uanset om man skal angribe eller beskytte noget.