Hack the Box Starting Point: Preignition
文章描述了使用Gobuster进行网络目录暴力破解的过程,包括使用Nmap进行版本检测、指定端口扫描、利用字典文件扫描PHP文件,并最终发现并访问admin.php页面。 2025-10-14 13:9:4 Author: infosecwriteups.com(查看原文) 阅读量:77 收藏

KarmicDragoon92

Looks like for this box we’re going to be using Gobuster to do some web directory brute forcing shenanigans. After starting our Pwnbox and letting our instance spawn in we’re going to address the first task.

Task 1

Press enter or click to view image in full size

Dir busting is the other name for directory brute forcing, so that’s that.

Task 2

Press enter or click to view image in full size

That’s going to be the -sV flag in order to tell Nmap to do version detection (as we’ll see later).

Task 3

Press enter or click to view image in full size

Well this one is just http, but let’s go ahead and fire up Nmap and put out money where our mouth is.

Press enter or click to view image in full size

Here you see me run

sudo nmap -sV -p 80 10.129.29.48

which runs a service scan on the target, as mentioned earlier. Additionally I use the -p flag to specify port 80 as that’s the only one we are interested. And under service we see http so ta dah.

Task 4

Press enter or click to view image in full size

We can refer to our previous Nmap scan to see that the name and version number is nginx 1.14.2.

Task 5

Press enter or click to view image in full size

Now time to use some gobuster. I don’t actually remember the flag to specify that so…

Press enter or click to view image in full size

I ran gobuster -h for help using the command (most command use either -h or -help for usage information). Looks like we need the dir switch to perform dir busting which, yeah checks out.

Task 6

Press enter or click to view image in full size

Mmm another good question. Well, when we ran-h on gobuster a second ago we also saw there was a help command that gives us more info on other commands.

Press enter or click to view image in full size

So after running that at the bottom here we see we can specify a file extension with the -x flag. So our answer is-x php.

Task 7

Press enter or click to view image in full size

Time to finally fire it up, let’s point gobuster at the target.

Press enter or click to view image in full size

Here you can see my in progress gobuster scan and below the command I ran.

gobuster dir -x php -w /usr/share/wordlists/dirbuster/directory-list-2.3-small.txt -u http://10.129.29.48

Just to break it down a little. The -x flag we’ve already covered, the -w flag is the wordlist we are using in order to try and brute force some of these web directories. We can already see at the bottom that admin.php has been found which, yeah sounds interesting. The -u flag specifies the target url, which in our case is just http:// and then the targets IP address.

Press enter or click to view image in full size

After the scan completes we can see that it was just that admin page that was found making that the answer to this task.

Task 8

Press enter or click to view image in full size

From gobuster’s output we see it came back with an HTTP status code 200, which means OK or that it’s accessible. Just for fun let’s do this.

Press enter or click to view image in full size

Here I use a command called curl

curl http://10.129.29.48/admin.php

which just rips down the html of the web page. Curl can do so much more than just this, but this is just to demonstrate we can in fact navigate to this page unrestricted through like a browser if we wanted to.

Task 9

Press enter or click to view image in full size

Huh, alright let’s go look for it. Maybe we’ll actually try going there in our browser next.

Press enter or click to view image in full size

Yep, that’s a login page. Hang on, you don’t think that it would be admin:admin would you?

Press enter or click to view image in full size

Oh come on now, that’s just too easy.


文章来源: https://infosecwriteups.com/hack-the-box-starting-point-preignition-bb4ef527f887?source=rss----7b722bfd1b8d---4
如有侵权请联系:admin#unsafe.sh