Complete Ethical Hacking Exam 1

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/212

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 5:29 PM on 10/12/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

213 Terms

1
New cards

HTTP/HTTPS

Layer 7 — Application

2
New cards

DNS

Layer 7 — Application

3
New cards

SMTP

Layer 7 — Application

4
New cards

SSH

Layer 7 — Application

5
New cards

UTF-8

Layer 6 — Presentation

6
New cards

JPEG

Layer 6 — Presentation

7
New cards

Encryption

Layer 6 — Presentation

8
New cards

Session coordination

Layer 5 — Session

9
New cards

Checkpoints

Layer 5 — Session

10
New cards

Recovery

Layer 5 — Session

11
New cards

TCP

Layer 4 — Transport

12
New cards

UDP

Layer 4 — Transport

13
New cards

Port numbers

Layer 4 — Transport

14
New cards

IP

Layer 3 — Network

15
New cards

ICMP

Layer 3 — Network

16
New cards

Routers

Layer 3 — Network

17
New cards

Ethernet

Layer 2 — Data Link

18
New cards

Wi-Fi

Layer 2 — Data Link

19
New cards

MAC addresses

Layer 2 — Data Link

20
New cards

Switches

Layer 2 — Data Link

21
New cards

Cables

Layer 1 — Physical

22
New cards

Fiber

Layer 1 — Physical

23
New cards

Radio waves

Layer 1 — Physical

24
New cards

Hubs

Layer 1 — Physical

25
New cards

How do you know if a host is local?

If it's IP is in the same subnet as yours

26
New cards

What does /24 mean?

the first 24 bits identify the network

27
New cards

If your IP is 192.168.12.4, is 192.168.12.50/24 in the same network?

Yes

28
New cards

If your IP is 192.168.12.4, is 192.168.13.50/24 in the same network?

No

29
New cards

If your IP is 192.168.12.4, is 192.168.13.50/16 in the same network?

Yes

30
New cards

Ping

send a message from one computer to another to check whether it is reachable and active

31
New cards

Traceroute

A program that shows the route a packet takes across the Internet

32
New cards

What does - mean?

File

33
New cards

What permissions does the owner have? -rw-r--r-- 1 root www-data 891 index.php

read/write

34
New cards

What permissions does the group have? -rw-r--r-- 1 root www-data 891 index.php

read

35
New cards

Who is the owner? -rw-r--r-- 1 root www-data 891 index.php

root

36
New cards

Who has read permissions? -rw-r--r-- 1 root www-data 891 index.php

Group and everyone else

37
New cards

What is the file's size? -rw-r--r-- 1 root www-data 891 index.php

891 bytes

38
New cards

Network Address Translation (NAT)

Translates the private IP address to a public address for routing over the Internet

39
New cards

nmap

A network scanner that automates scanning ports to see what's open.

40
New cards

Wireshark

Application that captures and analyzes network packets

41
New cards

ICMP (Internet Control Message Protocol)

Internet Control Message Protocol. Used for diagnostics such as ping. Many DoS attacks use ICMP. It is common to block ICMP at firewalls and routers. If ping fails, but other connectivity to a server succeeds, it indicates that ICMP is blocked.

42
New cards

Spoofed source IP → reflected denial of service

Spoofed IP attacks from innocent third party.

43
New cards

Default credentials

Least glamorous and most effective initial access

44
New cards

TLS in an HTTPS connection uses: asymmetric / symmetric / both / neither?

Both

45
New cards

Asymmetric Cryptography

A form of cryptography that uses two separate, but mathematically related, keys for encryption and decryption; also called public key cryptography.

46
New cards

Symmetric Cryptography

Uses the same key for encryption and decryption.

47
New cards

What is symmetric encryption best at?

Encrypting lots of data quickly

48
New cards

What is asymmetric encryption best at?

Authentication and securely establishing shared keys

49
New cards

When you open https://utexas.edu, WHY do you trust the cert it sends?

Because your browser verified it through a trusted Certificate Authority (CA)

50
New cards

SSH with an RSA key: how does the server verify it's really you -- and how

does your client know it reached the real server, not a MITM?

The server has your public key and uses it to verify you. Your client knows it reached the real server because the server proves it owns its private host key and your client checks the server's public host key against the one saved in ~/.ssh/known_hosts.

51
New cards

Identify the first field: kali:yyj9T$syJ4...$0RGh...:19212:0:99999:7:::

kali, the username

52
New cards

Identify the second field: kali:yyj9T$syJ4...$0RGh...:19212:0:99999:7:::

Password hash: yy = yescrypt, j9T = parameters, syJ4... = salt, 0RGh... = hash

53
New cards

Identify the third field: kali:yyj9T$syJ4...$0RGh...:19212:0:99999:7:::

19212, Last password change, in days since January 1, 1970

54
New cards

Identify the fourth field: kali:yyj9T$syJ4...$0RGh...:19212:0:99999:7:::

Minimum days between password changes; 0 allows changes immediately

55
New cards

Identify the five field: kali:yyj9T$syJ4...$0RGh...:19212:0:99999:7:::

999999: Maximum password age in days; a very large limit

56
New cards

Identify the sixth field: kali:yyj9T$syJ4...$0RGh...:19212:0:99999:7:::

Warn the user 7 days before their password expires

57
New cards

Seventh field in /etc/shadow?

Inactivity period after password expiration before disabling the account; unset

58
New cards

Eighth field in /etc/shadow?

Account expiration date, in days.

59
New cards

Ninth field in /etc/shadow?

Reserved for future use

60
New cards

Turn a hash/digest back into a password: name the approaches.

Brute force, Dictionary, Rule based, rainbow tables

61
New cards

Turn a hash/digest back into a password: say what a per-user SALT defeats, and why.

A unique per-user salt is combined with the password before hashing. It defeats:

Reusable precomputed tables: attackers need separate computations for each salt.

Spotting identical passwords by identical hashes: different salts produce different hashes, even for the same password.

Testing one computed hash against many users: each user's salt requires a separate computation.

62
New cards

How does nmap 1.1.1.1 learn a port is open?

Defaults to SYN scanning if it has the required privileges; otherwise uses connect scanning.

63
New cards

How does nmap -sT 1.1.1.1 learn a port is open?

Asks the OS to complete the TCP handshake: SYN → SYN-ACK → ACK. A successful connection means the port is open.

64
New cards

How does nmap -sS 1.1.1.1 learn a port is open?

Sends SYN; receiving SYN-ACK means the port is open. Resets the connection without completing the handshake.

65
New cards

Why is a SYN (-sS) scan "stealthier" than a full connect (-sT)?

It never establishes a full connection, so it is less likely to appear in application connection logs.

66
New cards

What does nc -l -p 1337 -e /bin/bash do?

-l: listen for incoming connections.

-p 1337: listen on port 1337.

-e /bin/bash: run Bash when someone connects, connecting its input/output to the network.

This creates a bind shell.

67
New cards

If nc -l -p 1337 -e /bin/bash is on a host you want to compromise, what do you run as the attacker to use it?

nc 1337

68
New cards

DNS (Domain Name System)

The service that translates URLs to IP addresses.

69
New cards

TCP (Transmission Control Protocol)

Transmission Control Protocol - provides reliable, ordered, and error-checked delivery of a stream of packets on the internet.. Three way Handshake.

70
New cards

TCP Port Closed?

RST ACK — or silence, if filtered

71
New cards

Three Way Handshake

Source → Destination: SYN

Destination → Source: SYN ACK

Source → Destination: ACK

72
New cards

TCP connection identified by:

(Source IP, Source Port, Destination IP, Destination Port)

73
New cards

CVE (Common Vulnerabilities and Exposures)

A unique ID for one specific vulnerability.

74
New cards

CVSS — Common Vulnerability Scoring System

Impact (RCE? DoS? info leak?) + access (remote? auth required?) + more

· Combines into one number, e.g. 8.2 — never perfect, but triageable

75
New cards

CWE — Common Weakness Enumeration

A category, not an instance — e.g. CWE-862, Missing Authorization

76
New cards

vsftpd 2.3.4 backdoor

A username containing a smiley face trips the backdoor

77
New cards

Your resolver doesn't know the answer

for utexas.edu. Where does it look, in order?

Root → .edu TLD → utexas.edu authoritative server

78
New cards

What is /etc/shadow?

/etc/shadow is a Linux file that stores users’ password hashes and password-aging information.

Each entry includes:

  • Username.

  • Salted password hash, not the plaintext password.

  • Last password-change date.

  • Minimum and maximum password age.

  • Expiration warnings and account-expiration settings.


79
New cards

Debian's OpenSSL bug

Commented out entropy pool - no real randomness

80
New cards

Hash tables

Hash tables contain a table with data and a mapping function which assigns each entry a corresponding hash. Use fast, PUBLIC, no-crypto hash

81
New cards

Uses of asymmetric cryptography?

Confidentiality — encrypt TO someone and Authentication / signing — prove something came FROM you

82
New cards

Diffie-Hellman

shared secret over a public channel

83
New cards

SSH known_hosts

File used to store public keys of a remote system(s) that a Linux workstation has previously connected to.

84
New cards

Certificate Pinning

hardcode the expected cert/key, skip the CA check entirely

85
New cards

Forward secrecy

Combine Diffie-Hellman WITH a long-term key (RSA cert, etc.) Payoff: even if the long-term key leaks or is cracked YEARS later ...a recorded old session still can't be decrypted

86
New cards

Given a snippet that builds a shell command from user input: what's the vulnerability, how is it exploited, and how do you fix it (properly)?

OS command injection, user input becomes part of a shell command, allowing it to be interpreted as instructions. Fix it by: avoiding the shell

87
New cards

"They wrapped the input in quotes." Is that fix adequate? Why / why not?

No, because the attacker can use input to break out of the quotes.

88
New cards

SQL injection: a login runs ...WHERE user='u′ANDpass=′u' AND pass='p'. What input logs you in as admin with no password, and how do you fix it?

Username: admin' -- Password: anything (... WHERE user='admin' -- ' AND pass='anything')

Fix: use parameterized queries

89
New cards

return open('/data/' + user).read() -- what can an attacker read, and how?

The attacker can traverse out of the path with ../ and climb out of data to read any file the OS user can.

90
New cards

Command Injection

A web app builds a shell command by gluing together a fixed string and user input.

91
New cards

Fixes for Command Injection (in order of effectiveness):

Quoting, Escaping via Regex, Encoding, Parameterization

92
New cards

Quoting Flaws

Malicious input can still break out, using a quote character in input closes quote early

93
New cards

Escaping via regex Flaws

If you get the regex slightly wrong (like forgetting the /g) and only the first quote in the input gets escaped, a second quote can still break out.

94
New cards

Encoding Flaws

You can still use a file path to break out.

95
New cards

What is parameterization?

Stop building a STRING at all — pass arguments as separate, structured values. No shell parsing step left for an attacker to hijack.

96
New cards

SQL injection

Same build a string and give to interpreter. Able to escape.

97
New cards

Parameterized statements

Same idea as command injection's fix, from earlier — stop building a string at all:

String query = "SELECT id FROM table WHERE name = ?";

PreparedStatement pstmt = connection.prepareStatement(query);

pstmt.setString(1, name); pstmt.execute();

▸ The database engine keeps the query structure and the data cleanly separate

98
New cards

What is escape via regex?

Escape quote characters so they can't close the wrapper early:

$userName = $userName.sub(s/\"/\\\"/g) # replace " with \"

99
New cards

What is encoding?

Use a real, tested encoding function instead of a hand-rolled regex:

userName=encode(userName = encode(userName)

100
New cards

Why does wrapping user input in quotes

fail to stop command injection?

Adding a quote closes the wrapper early