Skip to main content

Posts

Showing posts from August, 2020

Bash Reverse Shell explained.

 

OWASP Top 10 : Injection Attacks

Injection Attacks.   This can be broadly classified in to two major kinds. SQL injection and Command Injection. SQL Injection : Occurs when the user input is passed to SQL queries. And as a result, the attacker can access the database and do what ever he want. He can manipulate the tables, delete etc.   Command Injection : This occurs when user input is passed to the the target system as system commands. The attacker is able to execute arbitrary system commands on application servers. The best way to prevent injection attacks is ensuring that user controlled input is not interpreted as queries or commands. Or simply known as input validation. This can be done in different ways: Using an allow list: when a user input is sent to the target server, this input is compared to a list of safe input or characters. If the input is marked as safe, then it is processed. Stripping input: If the input contains suspicious characters, these characters are stripped off before they are processed.     

THM Walkthrough : Git Happens

THM Room : Git Happens Link : https://tryhackme.com/room/githappens  Perform a Directory scan. Here i used Gobuster . Git directory found. Same you can find using the nmap scan. If you browse the address, you can see the login page. finding the credential is the goal of this room. If you go through the page source, you can find some javascript. You can try to decode to find something relevant. You can also browse through the site pages to find hints. However i couldn't find anything relevant. I found some logs though. I used gitdumper.sh script to dump all the items to my local machine. Link ( https://raw.githubusercontent.com/internetwache/GitTools/master/Dumper/gitdumper.sh )   Checkout Go through the logs to find the commit history (reference : https://git-scm.com/book/en/v2/Git-Basics-Viewing-the-Commit-History ) Based on the hint/statement, look for the commit entry made by Boss and checkout. Check out again using the new entry. And go through the index.html file. You can fin

Root credentials for Latest Kali Linux [ver 2020.1 & later]

Kali had changed to a non-root user policy by default since the release of 2020.1.Which means, the old  root/toor credentials won't work by default. When some one login to the Kali linux using the new default credentials kali/kali , they wont be having the root privileges. Even unable to view the IP Address using the ifconfig command. So the command not found, due to the lack of privileges. To solve this, you can run the command in sudo . #sudo ifconfig will give you the result. But executing all commands with sudo is bit inconvenience. So let''s activate the root user. #sudo su and then reset the password using # passwd root Enter your new password for the root user. Restart Kali or switch user, and then login with root and the new password that you've set.