Skip to main content

TRYHACKME NEIGHBOUR WALK-THROUGH



Neighbour is an easy-level machine that I was able to solve in 5 minutes. 
Make sure you are connected to VPN and the victim machine is up and running.
Browsing to the IP generated opens up a web login interface, which requires a valid username and password. 


At this point, you can test for multiple vulnerabilities like SQL injection, default credentials, and all but for now, we will keep it simple here as the hint says to look into the source. 


Looking at the source code we find a pair of credentials and also an additional username admin.


After logging in as a guest we observe an anomaly in the URL, the user parameter defines the current user we are logged in as, assuming that the back end treats this parameter as an object we can try to reference it to another user, so we try to access admin panel via IDOR.


And we successfully log in as an admin user and we also retrieved the flag.

Preventions:- 
  • Verification of all referenced objects should be done.
  • Implement access control on all endpoints.
  • Use hashes or random strings for some obvious parameters so that they cannot be guessed instead of plain text or incremented/decremented integer

Happy hacking !!

Comments

Popular posts from this blog

VULNHUB INFOSEC PREP : OSCP

Welcome to the walkthrough of InfoSec Prep: OSCP walkthrough. It is a beginner-level boot2root machine and it can be downloaded from  here . I cracked this machine literally 5 minutes after it booted properly. So you can consider this machine the easiest.  Hint: Nmap Finding secret.txt and decoding it. Login via ssh. Privilege escalation to root via SUID binary.  Boot up the machine and it should show the IP address. We start off by pinging the box to verify that the box is up and running and we can reach out to it. Command: ping <IP> Then we can run Nmap scan to look for open ports and services running on the box. We will use -sC for running default scripts, -sV for Version/Service info and -T4 for faster execution, and -o for saving the result on a file named nmap The command is: sudo nmap -sC -sV -T4 <IP> -o filename Looking at the scan results, port 22 is open and running ssh, and port 80 is open, and it's running Apache. We can also see a directory named ...

Beginners Code Review Part 1

  Image credits to  Leobit This is a walkthrough of an exercise created by  PentesterLab  as a free course for learning beginner-friendly source code review. The link to the source code is here . Either clone it or download it as a zip locally. As instructed in the exercise we won't run the run, just read through the source code and look for possible weaknesses that we can leverage into vulnerabilities. LIST OF WEAKNESSES You can find below the list of issues present in the application: Hardcoded credentials or secrets Information leak Missing security flags Weak password hashing mechanism Cross-Site Scripting No CSRF protection Directory Listing Crypto issue Signature bypass Authentication bypass Authorization bypass Remote Code Execution Hand-On Findings and Objectives * Hardcoded credentials or secrets      ...

Understanding Kubernetes 101

Image credits to  Dribble What is Kubernetes? "Kubernetes is a portable, extensible, open-source platform for managing containerized workloads and services, that facilitates both declarative configuration and automation." - Kubernetes To understand in a simple way, we can say Kubernetes is an open source system to scale, deploy and manage containers. It automates operational tasks and has built-in commands for deploying applications, rolling back changes, scaling up and down your application as per requirements, and monitoring which makes managing applications easier. Why  Kubernetes? Containers are a good way to bundle and run your application, but when these are deployed in large volumes then you need a centralized framework for running distributed systems resiliently ensuring minimum downtime. Benefits of  Kubernetes: Automation  of day-to-day operations, rollouts, and rollbacks. Secret and Configuration Management  -  Kubernetes lets you store and manag...