ZAP intercept
In ZAP, interception is off by default, as shown by the green button on the top bar (green indicates that requests can pass and not be intercepted). We can click on this button to turn the Request Interception on or off, or we can use the shortcut [CTRL+B] to toggle it on or off:

ZAP also has a powerful feature called Heads Up Display (HUD), which allows us to control most of the main ZAP features from right within the pre-configured browser. We can enable the HUD by clicking its button at the end of the top menu bar:
burp automatic request modification
Let us start with an example of automatic request modification. We can choose to match any text within our requests, either in the request header or request body, and then replace them with different text. For the sake of demonstration, let's replace our User-Agent with HackTheBox Agent 1.0, which may be handy in cases where we may be dealing with filters that block certain User-Agents



Zap's equivalent is Replacer
We can do the same thing with responses (instead of requests.)
Make sure response interception is enabled: 
  
decoder section asked us to decode an encoded string, chatgpt helped with this but wasnt able to decode with burp directly. really not sure why

routing web requests from CLI tools through proxychains
/etc/proxychains.conf
#socks4 127.0.0.1 9050
http 127.0.0.1 8080
proxychains curl http://SERVER_IP:PORT
We see that it worked just as it normally would, with the additional ProxyChains-3.1 line at the beginning, to note that it is being routed through ProxyChains.
 
we can also nmap through this proxy
nmap -h | grep -i prox
--proxies <url1,[url2],...>: Relay connections through HTTP/SOCKS4 proxies
nmap --proxies http://127.0.0.1:8080 SERVER_IP -pPORT -Pn -sC
msfconsole also allows this behavior:
stejwes@htb[/htb]$ msfconsole
msf6 > use auxiliary/scanner/http/robots_txt
msf6 auxiliary(scanner/http/robots_txt) > set PROXIES HTTP:127.0.0.1:8080
PROXIES => HTTP:127.0.0.1:8080
msf6 auxiliary(scanner/http/robots_txt) > set RHOST SERVER_IP
RHOST => SERVER_IP
msf6 auxiliary(scanner/http/robots_txt) > set RPORT PORT
RPORT => PORT
msf6 auxiliary(scanner/http/robots_txt) > run
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed

burp payload processing, payload sets
Simple list: Self explanatory. Runtime file: Similar to above but loads line-by-line (scan runs to avoid excessive memory usage by Burp) Character substitution: Specify list of chars and their replacements, intruder tries all potential permutations
Tip: In case you wanted to use a very large wordlist, it's best to use Runtime file as the Payload Type instead of Simple List, so that Burp Intruder won't have to load the entire wordlist in advance, which may throttle memory usage.
- determine fuzzing rules over loaded wordlist
- add extensions, filter wordlist etc
- i.e. adding rule that skips any lines that start with
.Skip if matches regex- Match Regex:
^\..*$
Payload encoding: enable/disable payload URL encoding.
Options: Grep - Match
- flag specific requests on their responses
- i.e. only interested in
HTTP 400 ok
Options: Grep - Extract
- useful if HTTP responses are lengthy, and only interested in a certain part of the response.
Note: We may also use the Resource Pool tab to specify how much network resources Intruder will use, which may be useful for very large attacks. For our example, we'll leave it at its default values.
However, as the free version of Intruder is extremely throttled, in the next section, we will see ZAP's fuzzer and its various options, which do not have a paid tier.
zap fuzz

fuzz location very similar to intruder's payload position.  selected test, clicked add and it was highlighted. select from 8 different payload types. The following are some of them:
File: This allows us to select a payload wordlist from a file.File Fuzzers: This allows us to select wordlists from built-in databases of wordlists.Numberzz: Generates sequences of numbers with custom increments.
One of the advantages of ZAP Fuzzer is having built-in wordlists we can choose from so that we do not have to provide our own wordlist. More databases can be installed from the ZAP Marketplace, as we will see in a later section. So, we can select File Fuzzers as the Type, and then we will select the first wordlist from dirbuster:
directory-list.1.0.txt

We may also want to perform some processing on each word in our payload wordlist. The following are some of the payload processors we can use:
- Base64 Decode/Encode
- MD5 Hash
- Postfix String
- Prefix String
- SHA-1/256/512 Hash
- URL Decode/Encode
- Script
Custom string before payload with prefix string, custom string with postfix string
script allows us to select a custom script we built and run on every payload before using it in the attack
under Options we can select threads

we can also run payloads Depth first -> attempt all words on a single payload position before moving to the next
- ie. try all passwords for single user before following user
Breadth first-> every word from wordlist on all payload positions before moving to next word - ie attempt every pw all users before moving to following password
We can see from the response that this page is indeed accessible by us. There are other fields that may indicate a successful hit depending on the attack scenario, like Size Resp. Body which may indicate that we got a different page if its size was different than other responses, or RTT for attacks like time-based SQL injections, which are detected by a time delay in the server response.
The directory we found above sets the cookie to the md5 hash of the username, as we can see the md5 cookie in the request for the (guest) user. Visit '/skills/' to get a request with a cookie, then try to use ZAP Fuzzer to fuzz the cookie for different md5 hashed usernames to get the flag. Use the "top-usernames-shortlist.txt" wordlist from Seclists.
 same steps as above. select cookie field and modify payload to parse as md5