14.1 Test review Flashcards

Cover topics from the first 6 days of Mod 14

1
Q

Anatomy of an Exploit

3 parts

A

Delivery
Execution
Connection

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Anatomy of a Masquerade

3 parts

A

Delivery
Execution
Connection
(Same as Anatomy of an Exploit)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Common Exploit techniques

2 Parts

A

Code-Based Exploit

Masquerade

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Masquerade

A

use of credentials (usually stolen of “forged”), to geain access to a service ie SSH, Telnet, RDP

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Code Based Exploit

A

Targets a specific vulnerability in an application. Usually ran from an exploit framework (Meteasploit), most common vulnerability is a buffer overflow

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Buffer Overflow

A

Overwrites program data in the stack or heap memory to exploit code that allows an exploit of the machine or program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

No Operation (NOP) Sled

A

assembly opcode x90 that tells the processor to execute nothing and to just move the instruction pointer forward one. Can be manipulated to create a buffer overflow

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Types of Shell Code Payloads

2 types

A

SIngle payload

Staged Payload

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Are code-based exploits big or small?

A

Small, the amount of memory a code based exploit can pass is only a few hundred bytes. This means that a small shell can be passed such as in a SINGLE payload, or instructions to set up a STAGED payload in increments to pass larger amounts of data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How does Meterpreter avoid forensic detection

A

By using in-memory DLL injection, which writes nothing to the disk, and using encryption for its network connection

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are the 2 stages of a Staged Payload?

A

Stager (s0); sets up tcp connection back to the attackers host and reads the much larger Stage payload into memory on the targets machine
Stage (s1); Fully functional remote shell loaded by the Stager

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are the 2 payload types that create a connection between target and attacker?
(ones –> and ones

A

Bind TCP; opens a port on the taget machine to listen for incoming connections, often blocked by firewalls
Reverse TCP: Creates a connection (callback) to the attacker, firewalls often allow this as they are more lenient on traffic that is outbound of the network

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are the 2 Metasploit interfaces?

2 commands

A

msfconsole; command line access to all metasploit options

msfpayload; generates shellcode payloads

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Metasploit Commands

6 of them

A
search
info
use
show options
show payloads
set
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

mspayload syntax

command part1 part2 part3

A

msfpayload

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

2 options for output_types in msfpayload

hugs and kisses

A

x; Creates an executable payload

o; Lists payload with configurable parameters

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

what is the Handler?

A

The handler is how metasploit connects to remote payloads and is the command line interface used to access the remote computer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

what are the 2 ways to use the Handler?

A
Automatic; used in code-based exploits, connects to the shellcode payload the exploit started on the remote machine
Manual; During masquerades, or when connected to a backdoor, a handler can be started by itself to connect to the target. This is often referred to as the multi/handler because the module is using the command use multi/handler
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

what command would allow you to manually connect to a Meterpreter payload?

A

use multi/handler

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

what are the 5 options that can be changed with most exploits?

A
RHOST
RPORT
Payload
LHOST
LPORT
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Meterpreter Commands:
File system commands
(3 of them)

A

ls
pwd
cd

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Meterpreter Commands:
Logged on Users and Accounts
(3 of them)

A

getuid: displays user Meterpreter is running as
getpid: Displays pid for running Meterpreter payload
pwd: displays working directory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Meterpreter Commands:
Running Processes
(1 command)

A

ps: lists running processes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Meterpreter Commands:
System and Hardware info:
(1 command)

A

sysinfo: displays target system info

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

Meterpreter Commands:
Network Information
(2 commands)

A

route; display/modify routing table info

arp: displays system arp cahce

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

Meterpreter Commands:
File Placement:
(1 command)

A

upload: uploads files onto target.
syntax: upload

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

Meterpreter Commands:
File Collection
(1 command)

A

download

syntax; download

28
Q

2 locations you may find WINDOWS user hashes

A

%systemroot%\system32\config\SAM (local only)

%systemroot%\ntds\ntds.dit (Domain controller)

29
Q

What are the 4 parts of a WINDOWS hash?

A

UserID; user name
RID: identifies group or account for security/authorization
LM Hash: 14 characters, only uses A-Z 0-9, (36 chars)
NTLM Hash; supports 256-character password with all characters (211

30
Q

4 parts of a UNIX/LINUX hash?

A

User Id: common name of user account
Hash: obfuscated password
Password Last set: days from Jan 1 1970 since pword change
Password control Fields; max/min pword length, etc.

31
Q

Windows commands for hash collection

2 commands

A

PWdump (from windows command line)

hashdump (from meterpreter command line)

32
Q

3 modes of operation for John the Ripper (JtR)

A

Single; fastest mode
Wordlist; (JtR default wordlist is password.lst)
Incremental; (aka brute force)

33
Q

John the Ripper syntax

A

john

34
Q

what is the syntax and function of the command nslookup?

used in WINDOWS, dig is for UNIX/LINUX

A

syntax: nslookup
Function: retrieves generally available info on a domain or ip address such as names and sometimes contact info

35
Q

What is the syntax/function of the dig command in UNIX/LINUX?

A

Syntax: dig
Function: Pulls DNS records of any type

36
Q

what is the syntax for a zone transfer using the dig command in UNIX/LINUX?

A

dig @ -t axfr

37
Q

what are the entry types for DNS records?

6 of them

A
SOA 
A
NS
AAAA
MX
CNAME
38
Q

What are the 3 types of traceroute?

A

ICMP (WINDOWS default)
UDP (UNIX/LINUX default dest port range 33434-3440)
TCP

39
Q

what is the syntax for ping with record route and how should you use it?

A

syntax: ping -r 9 (WINDOWS)
ping -R (UNIX/LINUX)
Use: you should use ping with traceroute from the target to the Attack platform to get the ip’s on the inside of the routers between the two.

40
Q

Active OS fingerprinting techniques

8 of them

A
ping
Nmap
Nmap Scripting engine/winscan
Scanline
Banner Grabbing
Telnet
Netcat
Web Enumeration
41
Q

OS Default TTL’s

A

Cisco 225
LInux 64
Unix (Solaris) 255
Windows 128

42
Q

Ping sweep Syntax using Nmap

A

nmap -sn -PI

  • sn = Ping sweep scan
  • PI = ICMP echo request
43
Q

Nmap port scan types

7 of them

A
  • sT: TCP connect scan
  • sS: SYN stealth scan
  • sA: Ack Stealth Scan
  • sF: FIN stealth scan
  • sN: TCP null scan
  • sX: TCP Xmas Tree Scan
44
Q

nmap -sT

TCP Connect Scan

A

performs a full TCP connection; completes the 3-way handshake by opening a connection to every open port encountered on the target host. Closed ports respond with RST. If SYN/ACK response happens, port is open

45
Q

nmap -sS

SYN Stealth Scan

A

Referred to as a half-open scan because it does not complete the three-way handshake even though the SYN control flag is sent to all ports on the target host.

46
Q

nmap -sA

ACK Stealth Scan

A

Used to map out firewall rule sets and determine if a firewall is stateful or a simple packet filter, that blocks incoming SYN packets. This scan sends an ACK packet to the specified ports. If a RST flag is returned, the port is classified as unfiltered. If nothing comes back (or if an ICMP unreachable is returned) the port is classified as filtered. Nmap does not print unfiltered ports; getting no ports shown in the output implies all probes got through and returned RST’s. This scan NEVER shows ports in OPEN or CLOSED state.

47
Q

nmap -sF

FIN Stealth Scan

A

Has the ability to pass undetected through some firewalls, packet filters, and scan detection programs that monitor the SYN flag. This scan sends a FIN control flag to all target ports and waits for responses. Open ports ignore the packet, while closed ports respond with RST.

48
Q

nmap -sN

TCP Null Scan

A

Can bypass some firewalls and boundry routers by sending packets with no control flags set to all target ports and waits for responses. Open ports ignore packets, while closed ports respond with RST.

49
Q

nmap -sX

TCP Xmas Tree Scan

A

Can get through some firewalls and boundary routers by sending FIN, URG, and PSH control flags set to all target ports and waits for responses. Open ports ignore packets, while closed ports respond with RST.

50
Q

nmap -sU

UDP Scan

A

Sends UDP requests to a target port. If no replies come back, port is assumed open. If a Destination Unreachable is recieved, port is assumed closed.

51
Q

What is Scanline?

A

Scanline is a command line port scanner for WINDOWS. Scanline is known as a portable scanner due to the small size (20KB) of its executable.

52
Q

what tools can be used for banner grabbing?

A

Nmap, Telnet, and Netcat

53
Q

What are 3 commands that allow banner grabbing?

A

nmap -sV
telnet
nc -v (Netcat)

54
Q

Name an open source web scanner

A

Nikto

syntax: nikto -host

55
Q

What is the syntax for the UNIX/LINUX command that can manipulate timestamps?

A

touch -t

56
Q

syntax for scp from local to target

A

scp @:

57
Q

syntax for scp from target to ap

A

scp @:

58
Q

what 6 UNIX/LINUX commands show logged on users and account info?

A
w
who
whodo
logins
finger
rusers
59
Q

what UNIX/LINUX 2 commands allow interactive monitoring of active processes?

A

UNIX: prstat -e -f
LINUX: top -a

60
Q

what UNIX/LINUX command prints processor information?

A

psrinfo -v

61
Q

what UNIX/LINUX command displays disk space

A

df -k

62
Q

what 2 UNIX/LINUX commands display software package info?

A

pkginfo -l

showrev -p

63
Q

program to remove last entry from WTMP, UTMP, WTMPX, and UTMPX files (binary files)

A

zap3, must be chmod +x and then ./zap3 once per log entry to delete them

64
Q

UNIX command to see recent logging changes

A

last

65
Q

forward tunnel use and syntax

A

syntax: ssh root@ -L
-L = listening
rhp1= should be a port allowed by acl’s
vp= vulnerable port being used by the exploit
This opens a port on the AP an forwards data through the redirector who then send it to the target’s vulnerable port

66
Q

reverse tunnel us and syntax

A

syntax: ssh root@ -R

opens a port on the redirector and returns data to the AP

67
Q

Syntax and usage for multiple tunnels

A

syntax: root@ -L -R
this combines forward and reverse tunneling and allows the AP to forward data through the redirector to the vulnerable port on the target the target then talks to the port on the ap by sending to 0.0.0.0 which the redirector knows to forward to the AP, the ap is listening for incoming traffic on the designated rhp2 because the handler has already brought it up into a listening state when i started the exploit.