Commands for common services Flashcards
Commands to interact with common services and utilities
How to connect to a host with xfreerdp?
xfreerdp /u:[uname] /p:[passwd] /v:[hostname]
How to connect to a smtp server?
telnet [hostname] [port]
How to check if a user exists on the system with smtp?
VRFY [username]
How to list commands on an smtp server?
EHLO
Whats the IMAP command to login?
1 LOGIN username password
Whats the IMAP command to list all directories?
LIST “” *
Whats the IMAP command to Create a mailbox with a specified name?
CREATE “[inbox name]”
Whats the IMAP command to delete a mailbox?
DELETE “[inbox name]”
Whats the IMAP command to rename a mailbox?
RENAME “[inbox name]” “[new inbox name]”
Whats the IMAP command to get a subset of names from the set of names that the User has declared as being active or subscribed?
LSUB “” *
Whats the IMAP command to select a mailbox so that messages in the mailbox can be accessed
SELECT [inbox name]
Whats the IMAP command to unselect the current mailbox?
UNSELECT INBOX
Whats the IMAP command to retrieve data associated with a message in the mailbox?
FETCH [ID] all
Whats the IMAP command to removes all messages with the Deleted flag set.
CLOSE
Whats the IMAP command to close the connection with the IMAP server?
LOGOUT
Whats the POP3 command to identify the user?
USER [username]
Whats the POP3 command to authenticate the user?
PASS [password]
Whats the POP3 command to request the number of saved emails from the server?
STAT
Whats the POP3 command to request from the server the number and size of all emails?
LIST
Whats the POP3 command to request the server to deliver the requested email by ID.
RETR [id]
Whats the POP3 command to request the server to delete the requested email by ID.
DELE [id]
Whats the POP3 command to request the server to display the server capabilities?
CAPA
Whats the POP3 command to request the server to reset the transmitted information?
RSET
Whats the POP3 command to close the connection with the POP3 server?
QUIT?
How can you connect to a service running SSL/TLS?
openssl s_client [hostname]:[protocol]
How to connect to a remote mysql server?
mysql -u [username] -p [password] -h [hostname]
How to show all databases in mysql?
show databases;
How to select a database in mysql?
use [database];
How to show tables in a database in mysql?
show tables;
How to show columns in a table in mysql?
show columns from [table];
How to show everything in a table in mysql?
select * from [table];
How to search for a needed string in a table in mysql?
select * from [table] where [column] = [string];
How can we connect to a MSSQL server instance?
python3 mssqlclient.py [user]@[hostname] -windows-auth
or
mssql_ping metasploit scanner.