APEC Flashcards

1
Q

How does Firewalling come into
play for C2 channels?

A
  • Forces direction of Traffic
  • Forces specific ports
  • Allows Blue to redirect, such as to
    a web proxy
  • Allows Blue to control DNS
    resolution
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What do firewalls do to packets?

A

Firewalls either allow or block packets

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

how are firewalls implemented?

A

They can be implemented as software programs or hardware devices

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

What layers do firewalls operate at?

A

Operate at Layers 3 & 4 (Network & Transport)

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

What are firewalls main purpose?

A

Used to prohibit forbidden information from
passing though, while allowing approved
information.

based on a set of rules that pass
or reject packets

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

what is stateless firewall?

A

Does not track connections.
No knowledge of which IP is talking to who

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

what is a stateful firewall?

A

Can identify and track when a connection is being established. Packets that are part of that connection can be treated
differently.

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

possible states in a stateful firewall

A
  • New: First packet in conversation. (ie TCP Three-Way
    Handshake SYN packet)
  • Established: Packets seen in both directions. (ie TCP Session)
  • Related: A new connection spawned by an established
    connection. (ie FTP data transfer connection spawned from
    FTP command connection)
  • Invalid: Not part of any recognized connection
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

iptables three main constructs?

A

Tables
* Main packet processing component
Chains
* List of rules associated with tables
Targets
* Result of a rule triggering inside a
chain

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

What are some attributes of good protocols to hide a c2 channel in?

A
  • Common
  • Supports Encryption
  • Allowed out of Firewall
  • High Bandwidth
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

places to hide in web traffic?

A
  • Cookies and other headers
  • Url Parameters
  • Post Data
  • Stenography in Files
  • Broken up Across Requests
  • Encoded/Encrypted content
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How does DNS come into play for C2 channels?

A
  • We use domains to better blend in
  • We often rely on the target
    network for DNS resolution
  • In many networks, DNS requests are made in plaintext
  • Domains are a common IOC for malware, with many blocklists out there of known malicious domains.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

what is dns sinkholing?

A

DNS sinkholing is very simply making a custom
DNS record for a known malicious domain.

The custom record will point to some bogus IP.

The client requesting DNS resolution will get this

bogus IP and no longer be able to call back
home.

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

Knowing that sinkholing is a threat to our Malware over time, how might we protect the domains we are using from getting sinkholed?

A
  • Rotate domains.
  • Use a different DNS server.
  • Use encrypted DNS resolution.
  • Don’t use DNS at all!
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How does HTTPS come into play
for C2 channels?

A
  • Turns Web traffic into an encrypted
    channel
  • Uses certificates to confirm server
    identity
  • Client/Server negotiate encrypted
    session
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

what are two attributes of TLS in terms of HTTPS

A
  • Modern HTTPS is driven by the Transport Layer Security protocol.
  • It establishes a symmetric encrypted session on top of the TCP connection.
17
Q

What are the steps of the TLS handshake

A
  • Client Hello
  • Server Hello
  • Key Exchange
18
Q

what happens during the “Client hello” during the TLS handshake

A
  • Gives the server some cipher suite options
  • Optionally provides a Server Name Identification field (SNI) specifying which host the client wants to connect to
19
Q

what happens during the “Client hello” during the TLS Server

A
  • Selects a cipher suite
  • Sends the servers certificate, selects the cert based on the SNI if
    provided
20
Q

what happens during the “Key Exchange” during the TLS handshake

A
  • After validating the certificate, they then use the public key in the certificate in some fashion to establish the pre master secret
21
Q

how does the certificate exchange and handshakes effect a red team.

A
  • Need to consider getting our C2 servers certificates signed
  • Need to consider whether the cipher suites our implant uses blends in well in the target network (ja#hashing relies on this info)
  • The version of TLS that our C2 server supports can have significant impact on what is seen by outside observers
22
Q

What two groups of people are heavily benefited by encrypted web

A
  • Regular users
  • Malware authors
23
Q

what are some form of traffic inspection

A
  • Timing analysis
  • TLS Handshake analysis (ja# hashes for example)
  • Packet size
  • SNI values or previous DNS resolution.
  • Inspecting Web Certificates
24
Q

What is a Explicit web proxy

A
  • Similar to the socks proxy, if you want to use it, you need to configure your system to point to it.
  • We will know that our traffic is getting proxied.
25