Phonebook - Hack the box Write up -- Web LDAP injection
0x00 Problem 0x01 Check the vulnerability When we see the login form on the website, it might be command injection, SQL injection, LDAP injection. We can see that this need us to login with workstation username, it might be LDAP injection. 0x02 LDAP injection payload Here is the basic LDAP injection payload. We can check the vulnerability. user=*)(& password=*)(& --> (&(user=*)(&)(password=*)(&)) After we type it, we found the response shows successful, and return a page has search box. Then we type a character in the search box, and it returns some user phonebook information. I tried 'flag', 'HTB', it doesn't find any results. Then we try to find user 'Reese', but the information doesn't look like flag. 0x03 Locate the flag Then we change our payload to check if the password is the flag. user=Reese password=HTB*)(& --> (&(user=Reese)(password=HTB*)(& It can also return to the search page which means it...