# Swagshop (Easy) - Not Working

## Enumeration

### Nmap

```
nmap -sC -sV -oA nmap/swagshop 10.129.162.28
```

```
Starting Nmap 7.92 ( https://nmap.org ) at 2022-06-08 05:08 EDT
Nmap scan report for swagshop.htb (10.129.162.28)
Host is up (0.20s latency).
Not shown: 998 closed tcp ports (conn-refused)
PORT   STATE SERVICE VERSION
22/tcp open  ssh     OpenSSH 7.2p2 Ubuntu 4ubuntu2.8 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey: 
|   2048 b6:55:2b:d2:4e:8f:a3:81:72:61:37:9a:12:f6:24:ec (RSA)
|   256 2e:30:00:7a:92:f0:89:30:59:c1:77:56:ad:51:c0:ba (ECDSA)
|_  256 4c:50:d5:f2:70:c5:fd:c4:b2:f0:bc:42:20:32:64:34 (ED25519)
80/tcp open  http    Apache httpd 2.4.18 ((Ubuntu))
|_http-server-header: Apache/2.4.18 (Ubuntu)
|_http-title: Home page
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel

Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 34.91 seconds

```

We can navigate t port 80

![](https://1595701629-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M6jqZqh8dnhmWJDpTuf%2Fuploads%2FyzZSikAUMZ2RBCOWwMG1%2Fimage.png?alt=media\&token=48530345-5781-4e90-86a6-da21fae36953)

We can see when we navigate to port 80, it redirects us to swagshop.htb.

What we need to do is add the swagshop to **/etc/hosts**.

![](https://1595701629-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M6jqZqh8dnhmWJDpTuf%2Fuploads%2FpG7Dko6kBX5ExclofwRK%2Fimage.png?alt=media\&token=1cd179d5-fb2f-4c22-bcd8-2ac8ad41cc1e)



