👨‍💻Access Tricks

Got DB/server creds, What's next?

☁️ Server

FTP

1- Conn to the server:

ftp <IP/Domain>

2-set local FTP file download dir:

lcd /your/pc/dir

3-Download the file:

get <file>

You can also download multiple files with wildcard + mget.

mget *.txt

Great to work with FTP servers

Anonymous FTP:

When faced with an anon-ftp server just:

  • username: "Anonymous"

  • Password: anything really (sometimes empty).

Telnet

1-Conn to the telnet server:

then it will ask for the password.

then you have $ check if you are <username>

$whoami

SSH

1-Conn the SSH server:

then same as the telnet server.

SMB

1- Conn to a share:

2- Find your flag pwd the dir and download the file:

⚠ Will ask for a pass but by enum you should know if null sesssoin attack is possible so just click enter (no pass).

  • Checking the share permissions:

🛢Database

MySQL

1-Conn to MySQL server:

  • -p tells mysql to prompt for a password.

Great MySQL tut.

2-List all DB:

3-Select a DB:

4-Show tables

5-Select a Table:

💪By Here probably you got what you want...

You can show info about (structure: feild/type/PK..etc)

MongoDB

Install mongo client (debian):

Connect to MongoDB:

Greate to work with MongoDB

SQL Server (MS-SQL)

Great Articles:

1-Connect: if you got the username/password you can conn using Impackt (col. of python tools):

2-Check what role you have in the server:

output is 1 then it's true.

3-Activate shell: xp-cmdshell

4-Now you can excute commands:

Achieve a Reverse shell: now you can use python SimpleHTTPServer & nc to transfer a payload.

also use powershell to get much more power:

Download a payload:

I'm downloading nc64.exe

Reverse shell:

Now you will notice in your nc that the target got connected to you...🎉

we can use PEASS-ng for win privilage escalation.

in same way download it via python httpserver then excute it:

you might be able to find: ConsoleHost_history.txt .bash_history equivlant in MS it exsits in: \AppData\Roaming\Microsoft\Windows\PowerShell\PSReadline\ read it you might find cred info spo you can use:

Last updated

Was this helpful?