Revision of Challenges
Credits to the numerous other walkthroughs posted by other players of the HTB Cyber Santa CTF 2021, these are just notes I compiled for future referencing and for revision
Forensics Day 3 : Persistence
Here are my recorded theory learnings and notes taken when I attempted to do the challenge again after the event.
- Pre Challenge Learnings
The clue is in the name, persistence. Googling this and malicious actors gives us the following information:
Define :
Persistence is an overall tactic that adversaries, malware, and tools will use to ensure they keep access to systems across events that might interrupt access. Some examples of events that may interrupt access are shutdowns and restarts, file deletion, or credential changes. Persistence may also be used as a means of “cleaning up” the evidence that a malware payload was ever even there.
Common techniques:
1. Registry run keys
2. Startup folder
Registry run keys are very specific keys in the Windows registry that are invoked during system start up.
These keys allow specific settings or configurations to be loaded automatically. In addition, registry run keys can also point directly at executable files, allowing specific programs (and DLL files) to be executed at start up.
Similarly, the startup folder corresponds to a series of registry keys that will execute files in specific locations on start up.
Persistence, when talking about technique T1547.001, is the modification of specific registry keys and values in order to have an executable, command, or script run every time the system is rebooted.
Most Common targets:
While there are several registry keys that can be used, the most commonly abused are the default keys on a Windows system, specifically:
Similarly, the registry keys that are used to launch programs or set folder items for persistence are:
Tools to be used :
- Memory dump > look for above registry keys
- Sysinternals for manual hunting across registries + cross ref with virustotals to flag viruses
- HTB Challenge
Given : Data File
The below code block shows the numerous steps taken to solve the challenge :
- The final Result

- Volatility Command References for our purpose - analysing registry for threat persistence :
From https://github.com/volatilityfoundation/volatility/wiki/Command-Reference
hivescan - To find the physical addresses of CMHIVEs (registry hives) in memory
hivelist - To locate the virtual addresses of registry hives in memory, and the full paths to the corresponding hive on disk
printkey - To display the subkeys, values, data, and data types contained within a specified registry key, use the printkey command. By default, printkey will search all hives and print the key information (if found) for the requested key.
hivedump - To recursively list all subkeys in a hive, use the hivedump command and pass it the virtual address to the desired hive.
hashdump - To extract and decrypt cached domain credentials stored in the registry
lsadump - To dump LSA secrets from the registry, use the lsadump command. This exposes information such as the default password (for systems with autologin enabled), the RDP public key, and credentials used by DPAPI
shellbags This plugin parses and prints Shellbag (pdf) information obtained from the registry
dumpregistry - dump registry hive files to disk
Crypto Day 3 : Missing Reindeer
Given : Email with public key and encrypted text
Hello Mr Jingles,
We got the reindeer as you requested. There is a problem though. Its nose is so red and bright and makes it very hard to hide him anywhere near north pole. We have moved to a secret location far away. I have encrypted this information with your public key in case you know who is watching.
------=_Part_5028_7368284.1115579351471 Content-Type: application/text/plain; name*=secret.enc Content-Transfer-Encoding: base64 Content-Disposition: attachment Ci95oTkIL85VWrJLVhns1O2vyBeCd0weKp9o3dSY7hQl7CyiIB/D3HaXQ619k0+4FxkVEksPL6j3wLp8HMJAPxeA321RZexR9qwswQv2S6xQ3QFJi6sgvxkN0YnXtLKRYHQ3te1Nzo53gDnbvuR6zWV8fdlOcBoHtKXlVlsqODku2GvkTQ/06x8zOAWgQCKj78V2mkPiSSXf2/qfDp+FEalbOJlILsZMe3NdgjvohpJHN3O5hLfBPdod2v6iSeNxl7eVcpNtwjkhjzUx35SScJDzKuvAv+6DupMrVSLUfcWyvYUyd/l4v01w+8wvPH9l ------=_Part_5028_7368284.1115579351471 Content-Type: application/octet-stream; name*=pubkey.der Content-Transfer-Encoding: base64 Content-Disposition: attachment -----BEGIN PUBLIC KEY----- MIIBIDANBgkqhkiG9w0BAQEFAAOCAQ0AMIIBCAKCAQEA5iOXKISx9NcivdXuW+uE y4R2DC7Q/6/ZPNYDD7INeTCQO9FzHcdMlUojB1MD39cbiFzWbphb91ntF6mF9+fY N8hXvTGhR9dNomFJKFj6X8+4kjCHjvT//P+S/CkpiTJkVK+1G7erJT/v1bNXv4Om OfFTIEr8Vijz4CAixpSdwjyxnS/WObbVmHrDMqAd0jtDemd3u5Z/gOUi6UHl+XIW Cu1Vbbc5ORmAZCKuGn3JsZmW/beykUFHLWgD3/QqcT21esB4/KSNGmhhQj3joS7Z z6+4MeXWm5LXGWPQIyKMJhLqM0plLEYSH1BdG1pVEiTGn8gjnP4Qk95oCV9xUxWW ZwIBAw== -----END PUBLIC KEY-----
Tool : RsaCtfTool.py
The steps below are taken to crack the challenge :
- RsaCtfTool.py Command References
--dumpkey : Just dump the RSA variables from a key - n,e,d,p,q
--pubickey : The public key input
--private : enable recovery of private key
- Some good writeups to learn RSA challenges
Crypto Day 4 : Meet Me Halfway
Given : The following encryption python script
Vulnerability of the double AES enncryption :
Last updated

