diff --git a/404.html b/404.html index 0c908548..08ccf2ec 100644 --- a/404.html +++ b/404.html @@ -2996,6 +2996,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/binary-exploitation/address-space-layout-randomization/index.html b/binary-exploitation/address-space-layout-randomization/index.html index 61706cee..0003d290 100644 --- a/binary-exploitation/address-space-layout-randomization/index.html +++ b/binary-exploitation/address-space-layout-randomization/index.html @@ -3019,6 +3019,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/binary-exploitation/buffer-overflow/index.html b/binary-exploitation/buffer-overflow/index.html index 0365a215..a2a01461 100644 --- a/binary-exploitation/buffer-overflow/index.html +++ b/binary-exploitation/buffer-overflow/index.html @@ -3082,6 +3082,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/binary-exploitation/heap-exploitation/index.html b/binary-exploitation/heap-exploitation/index.html index 9e294ff5..80bf3eef 100644 --- a/binary-exploitation/heap-exploitation/index.html +++ b/binary-exploitation/heap-exploitation/index.html @@ -3082,6 +3082,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/binary-exploitation/no-execute/index.html b/binary-exploitation/no-execute/index.html index 7d54dcd5..e857d41e 100644 --- a/binary-exploitation/no-execute/index.html +++ b/binary-exploitation/no-execute/index.html @@ -3019,6 +3019,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/binary-exploitation/overview/index.html b/binary-exploitation/overview/index.html index fad5a858..10f7316d 100644 --- a/binary-exploitation/overview/index.html +++ b/binary-exploitation/overview/index.html @@ -3017,6 +3017,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/binary-exploitation/relocation-read-only/index.html b/binary-exploitation/relocation-read-only/index.html index 0ec5299d..ed8341d3 100644 --- a/binary-exploitation/relocation-read-only/index.html +++ b/binary-exploitation/relocation-read-only/index.html @@ -3067,6 +3067,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/binary-exploitation/return-oriented-programming/index.html b/binary-exploitation/return-oriented-programming/index.html index 6513d63c..d1935da6 100644 --- a/binary-exploitation/return-oriented-programming/index.html +++ b/binary-exploitation/return-oriented-programming/index.html @@ -3106,6 +3106,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/binary-exploitation/stack-canaries/index.html b/binary-exploitation/stack-canaries/index.html index 39ac55e7..d1e61d97 100644 --- a/binary-exploitation/stack-canaries/index.html +++ b/binary-exploitation/stack-canaries/index.html @@ -3082,6 +3082,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/binary-exploitation/what-are-buffers/index.html b/binary-exploitation/what-are-buffers/index.html index 5362f32c..9109dd82 100644 --- a/binary-exploitation/what-are-buffers/index.html +++ b/binary-exploitation/what-are-buffers/index.html @@ -3058,6 +3058,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/binary-exploitation/what-are-calling-conventions/index.html b/binary-exploitation/what-are-calling-conventions/index.html index 525acba8..2ba06d0f 100644 --- a/binary-exploitation/what-are-calling-conventions/index.html +++ b/binary-exploitation/what-are-calling-conventions/index.html @@ -3076,6 +3076,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/binary-exploitation/what-are-registers/index.html b/binary-exploitation/what-are-registers/index.html index fbb1b189..6284741a 100644 --- a/binary-exploitation/what-are-registers/index.html +++ b/binary-exploitation/what-are-registers/index.html @@ -3019,6 +3019,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/binary-exploitation/what-is-a-format-string-vulnerability/index.html b/binary-exploitation/what-is-a-format-string-vulnerability/index.html index 5dfbd2cd..5b140c22 100644 --- a/binary-exploitation/what-is-a-format-string-vulnerability/index.html +++ b/binary-exploitation/what-is-a-format-string-vulnerability/index.html @@ -16,6 +16,8 @@ + + @@ -3056,6 +3058,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/binary-exploitation/what-is-binary-security/index.html b/binary-exploitation/what-is-binary-security/index.html index 3e6dcf07..750b82cf 100644 --- a/binary-exploitation/what-is-binary-security/index.html +++ b/binary-exploitation/what-is-binary-security/index.html @@ -3019,6 +3019,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/binary-exploitation/what-is-the-got/index.html b/binary-exploitation/what-is-the-got/index.html index 9fd7a3f8..ecdc9ada 100644 --- a/binary-exploitation/what-is-the-got/index.html +++ b/binary-exploitation/what-is-the-got/index.html @@ -3058,6 +3058,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/binary-exploitation/what-is-the-heap/index.html b/binary-exploitation/what-is-the-heap/index.html index f40335c2..d48ecf0d 100644 --- a/binary-exploitation/what-is-the-heap/index.html +++ b/binary-exploitation/what-is-the-heap/index.html @@ -3058,6 +3058,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/binary-exploitation/what-is-the-stack/index.html b/binary-exploitation/what-is-the-stack/index.html index 1931a181..87848ea3 100644 --- a/binary-exploitation/what-is-the-stack/index.html +++ b/binary-exploitation/what-is-the-stack/index.html @@ -3067,6 +3067,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2011/Crypto/crypto1/index.html b/challenges/2011/Crypto/crypto1/index.html index 5f86f207..85880d92 100644 --- a/challenges/2011/Crypto/crypto1/index.html +++ b/challenges/2011/Crypto/crypto1/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2011/Crypto/crypto10/index.html b/challenges/2011/Crypto/crypto10/index.html index e360fe94..d3583101 100644 --- a/challenges/2011/Crypto/crypto10/index.html +++ b/challenges/2011/Crypto/crypto10/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2011/Crypto/crypto2/index.html b/challenges/2011/Crypto/crypto2/index.html index 02fd0682..5ef40229 100644 --- a/challenges/2011/Crypto/crypto2/index.html +++ b/challenges/2011/Crypto/crypto2/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2011/Crypto/crypto3/index.html b/challenges/2011/Crypto/crypto3/index.html index 43936151..cf28b3a4 100644 --- a/challenges/2011/Crypto/crypto3/index.html +++ b/challenges/2011/Crypto/crypto3/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2011/Crypto/crypto4/index.html b/challenges/2011/Crypto/crypto4/index.html index 54b7c628..35b53105 100644 --- a/challenges/2011/Crypto/crypto4/index.html +++ b/challenges/2011/Crypto/crypto4/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2011/Crypto/crypto5/index.html b/challenges/2011/Crypto/crypto5/index.html index d449ff3e..c6de28f8 100644 --- a/challenges/2011/Crypto/crypto5/index.html +++ b/challenges/2011/Crypto/crypto5/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2011/Crypto/crypto6/index.html b/challenges/2011/Crypto/crypto6/index.html index 5404bea3..61bdc62e 100644 --- a/challenges/2011/Crypto/crypto6/index.html +++ b/challenges/2011/Crypto/crypto6/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2011/Crypto/crypto7/index.html b/challenges/2011/Crypto/crypto7/index.html index 2ccf054c..7b26e16e 100644 --- a/challenges/2011/Crypto/crypto7/index.html +++ b/challenges/2011/Crypto/crypto7/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2011/Crypto/crypto8/index.html b/challenges/2011/Crypto/crypto8/index.html index bc63bbdf..73b65413 100644 --- a/challenges/2011/Crypto/crypto8/index.html +++ b/challenges/2011/Crypto/crypto8/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2011/Crypto/crypto9/index.html b/challenges/2011/Crypto/crypto9/index.html index 7ebd4d86..e356f430 100644 --- a/challenges/2011/Crypto/crypto9/index.html +++ b/challenges/2011/Crypto/crypto9/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2011/Forensics/android1/index.html b/challenges/2011/Forensics/android1/index.html index 3b841e34..bbb685bd 100644 --- a/challenges/2011/Forensics/android1/index.html +++ b/challenges/2011/Forensics/android1/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2011/Forensics/android2/index.html b/challenges/2011/Forensics/android2/index.html index 26edfd9e..5060caf4 100644 --- a/challenges/2011/Forensics/android2/index.html +++ b/challenges/2011/Forensics/android2/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2011/Forensics/evilburritos/index.html b/challenges/2011/Forensics/evilburritos/index.html index 775056fd..09ec291f 100644 --- a/challenges/2011/Forensics/evilburritos/index.html +++ b/challenges/2011/Forensics/evilburritos/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2011/Forensics/evilburritos2/index.html b/challenges/2011/Forensics/evilburritos2/index.html index 10559293..8e61ba6a 100644 --- a/challenges/2011/Forensics/evilburritos2/index.html +++ b/challenges/2011/Forensics/evilburritos2/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2011/Forensics/hardware/index.html b/challenges/2011/Forensics/hardware/index.html index 3b98be4a..e7c04e76 100644 --- a/challenges/2011/Forensics/hardware/index.html +++ b/challenges/2011/Forensics/hardware/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2011/Forensics/loveletter/index.html b/challenges/2011/Forensics/loveletter/index.html index 255339b8..d4f963e4 100644 --- a/challenges/2011/Forensics/loveletter/index.html +++ b/challenges/2011/Forensics/loveletter/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2011/Forensics/networking101/index.html b/challenges/2011/Forensics/networking101/index.html index 01354db8..5fe7908a 100644 --- a/challenges/2011/Forensics/networking101/index.html +++ b/challenges/2011/Forensics/networking101/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2011/Forensics/patchmanagement/index.html b/challenges/2011/Forensics/patchmanagement/index.html index e0cc1232..09800451 100644 --- a/challenges/2011/Forensics/patchmanagement/index.html +++ b/challenges/2011/Forensics/patchmanagement/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2011/Pwn/bin1/index.html b/challenges/2011/Pwn/bin1/index.html index 0eb69d5c..5a50a7b7 100644 --- a/challenges/2011/Pwn/bin1/index.html +++ b/challenges/2011/Pwn/bin1/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2011/Pwn/bin2/index.html b/challenges/2011/Pwn/bin2/index.html index 5fb37421..38712d47 100644 --- a/challenges/2011/Pwn/bin2/index.html +++ b/challenges/2011/Pwn/bin2/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2011/Pwn/bin3/index.html b/challenges/2011/Pwn/bin3/index.html index 4d804780..cea1e2a8 100644 --- a/challenges/2011/Pwn/bin3/index.html +++ b/challenges/2011/Pwn/bin3/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2011/Pwn/bin4/index.html b/challenges/2011/Pwn/bin4/index.html index 5a47b1ff..501dd050 100644 --- a/challenges/2011/Pwn/bin4/index.html +++ b/challenges/2011/Pwn/bin4/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2011/Pwn/bin5/index.html b/challenges/2011/Pwn/bin5/index.html index 405b814b..631578fa 100644 --- a/challenges/2011/Pwn/bin5/index.html +++ b/challenges/2011/Pwn/bin5/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2011/Pwn/exploitation101/index.html b/challenges/2011/Pwn/exploitation101/index.html index ae2b1f6e..4f94b327 100644 --- a/challenges/2011/Pwn/exploitation101/index.html +++ b/challenges/2011/Pwn/exploitation101/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2011/Pwn/python/index.html b/challenges/2011/Pwn/python/index.html index 432ec2e4..7e98f59a 100644 --- a/challenges/2011/Pwn/python/index.html +++ b/challenges/2011/Pwn/python/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2011/Reversing/linux/index.html b/challenges/2011/Reversing/linux/index.html index 5792ccd7..2eaa7352 100644 --- a/challenges/2011/Reversing/linux/index.html +++ b/challenges/2011/Reversing/linux/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2011/Reversing/net1/index.html b/challenges/2011/Reversing/net1/index.html index fed527ca..066b8ebe 100644 --- a/challenges/2011/Reversing/net1/index.html +++ b/challenges/2011/Reversing/net1/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2011/Reversing/opengl/index.html b/challenges/2011/Reversing/opengl/index.html index 1ba67490..5137dcf0 100644 --- a/challenges/2011/Reversing/opengl/index.html +++ b/challenges/2011/Reversing/opengl/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2011/Reversing/reversing101/index.html b/challenges/2011/Reversing/reversing101/index.html index 3d75fc2c..19375f4a 100644 --- a/challenges/2011/Reversing/reversing101/index.html +++ b/challenges/2011/Reversing/reversing101/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2012/Crypto/crypto1/index.html b/challenges/2012/Crypto/crypto1/index.html index d9384d07..1e9eff84 100644 --- a/challenges/2012/Crypto/crypto1/index.html +++ b/challenges/2012/Crypto/crypto1/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2012/Forensics/core/index.html b/challenges/2012/Forensics/core/index.html index 22022e93..db996660 100644 --- a/challenges/2012/Forensics/core/index.html +++ b/challenges/2012/Forensics/core/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2012/Forensics/dongle.pcap/index.html b/challenges/2012/Forensics/dongle.pcap/index.html index d2610549..2c0244cf 100644 --- a/challenges/2012/Forensics/dongle.pcap/index.html +++ b/challenges/2012/Forensics/dongle.pcap/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2012/Forensics/forensics1/index.html b/challenges/2012/Forensics/forensics1/index.html index 1158f43e..26e055f7 100644 --- a/challenges/2012/Forensics/forensics1/index.html +++ b/challenges/2012/Forensics/forensics1/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2012/Forensics/forensics2/index.html b/challenges/2012/Forensics/forensics2/index.html index 901828bf..a77741d3 100644 --- a/challenges/2012/Forensics/forensics2/index.html +++ b/challenges/2012/Forensics/forensics2/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2012/Forensics/lemieux.pcap/index.html b/challenges/2012/Forensics/lemieux.pcap/index.html index 9b4b4c14..e3ca4ebc 100644 --- a/challenges/2012/Forensics/lemieux.pcap/index.html +++ b/challenges/2012/Forensics/lemieux.pcap/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2012/Forensics/telnet.pcap/index.html b/challenges/2012/Forensics/telnet.pcap/index.html index ab24d32d..1ac4e0ca 100644 --- a/challenges/2012/Forensics/telnet.pcap/index.html +++ b/challenges/2012/Forensics/telnet.pcap/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2012/Forensics/timewave-zero.pcap/index.html b/challenges/2012/Forensics/timewave-zero.pcap/index.html index e7455064..22f62c0a 100644 --- a/challenges/2012/Forensics/timewave-zero.pcap/index.html +++ b/challenges/2012/Forensics/timewave-zero.pcap/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2012/Forensics/version1.png/index.html b/challenges/2012/Forensics/version1.png/index.html index 4b3a0dde..b106a802 100644 --- a/challenges/2012/Forensics/version1.png/index.html +++ b/challenges/2012/Forensics/version1.png/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2012/Forensics/version2.png/index.html b/challenges/2012/Forensics/version2.png/index.html index f1733f5f..872af0b7 100644 --- a/challenges/2012/Forensics/version2.png/index.html +++ b/challenges/2012/Forensics/version2.png/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2012/Pwn/12345/index.html b/challenges/2012/Pwn/12345/index.html index da6f1d1f..0a354f70 100644 --- a/challenges/2012/Pwn/12345/index.html +++ b/challenges/2012/Pwn/12345/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2012/Pwn/23456/index.html b/challenges/2012/Pwn/23456/index.html index c1fd49f0..308fc14e 100644 --- a/challenges/2012/Pwn/23456/index.html +++ b/challenges/2012/Pwn/23456/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2012/Pwn/4842/index.html b/challenges/2012/Pwn/4842/index.html index 27e7b6eb..82701063 100644 --- a/challenges/2012/Pwn/4842/index.html +++ b/challenges/2012/Pwn/4842/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2012/Pwn/54321/index.html b/challenges/2012/Pwn/54321/index.html index 6d8d738c..7bcc78b0 100644 --- a/challenges/2012/Pwn/54321/index.html +++ b/challenges/2012/Pwn/54321/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2012/Reversing/csaw2012reversing.exe/index.html b/challenges/2012/Reversing/csaw2012reversing.exe/index.html index d0411202..dead15f4 100644 --- a/challenges/2012/Reversing/csaw2012reversing.exe/index.html +++ b/challenges/2012/Reversing/csaw2012reversing.exe/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2012/Reversing/csaw2012reversing/index.html b/challenges/2012/Reversing/csaw2012reversing/index.html index 39010fa9..275fddfd 100644 --- a/challenges/2012/Reversing/csaw2012reversing/index.html +++ b/challenges/2012/Reversing/csaw2012reversing/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2012/Reversing/csawqualification.exe/index.html b/challenges/2012/Reversing/csawqualification.exe/index.html index e3595cdc..5218bab2 100644 --- a/challenges/2012/Reversing/csawqualification.exe/index.html +++ b/challenges/2012/Reversing/csawqualification.exe/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2012/Reversing/csawqualificationeasy.exe/index.html b/challenges/2012/Reversing/csawqualificationeasy.exe/index.html index 621572c4..6d5bd017 100644 --- a/challenges/2012/Reversing/csawqualificationeasy.exe/index.html +++ b/challenges/2012/Reversing/csawqualificationeasy.exe/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2012/Reversing/reversing1/index.html b/challenges/2012/Reversing/reversing1/index.html index 89137d46..42b0d3ed 100644 --- a/challenges/2012/Reversing/reversing1/index.html +++ b/challenges/2012/Reversing/reversing1/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2012/Reversing/reversing2/index.html b/challenges/2012/Reversing/reversing2/index.html index 0f78b992..ecd421cd 100644 --- a/challenges/2012/Reversing/reversing2/index.html +++ b/challenges/2012/Reversing/reversing2/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2012/Reversing/reversing3/index.html b/challenges/2012/Reversing/reversing3/index.html index 4111a519..152adf03 100644 --- a/challenges/2012/Reversing/reversing3/index.html +++ b/challenges/2012/Reversing/reversing3/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2013/Crypto/CSAWpad/index.html b/challenges/2013/Crypto/CSAWpad/index.html index bec0dd46..caf6ce84 100644 --- a/challenges/2013/Crypto/CSAWpad/index.html +++ b/challenges/2013/Crypto/CSAWpad/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2013/Crypto/onlythisprogram/index.html b/challenges/2013/Crypto/onlythisprogram/index.html index f4c320cc..756a6464 100644 --- a/challenges/2013/Crypto/onlythisprogram/index.html +++ b/challenges/2013/Crypto/onlythisprogram/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2013/Crypto/slurp/index.html b/challenges/2013/Crypto/slurp/index.html index 7bc6d0b3..495d952e 100644 --- a/challenges/2013/Crypto/slurp/index.html +++ b/challenges/2013/Crypto/slurp/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2013/Crypto/stfu/index.html b/challenges/2013/Crypto/stfu/index.html index 1d468712..d4ae10b8 100644 --- a/challenges/2013/Crypto/stfu/index.html +++ b/challenges/2013/Crypto/stfu/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2013/Forensics/Black_and_White/index.html b/challenges/2013/Forensics/Black_and_White/index.html index 6b06b6ef..7b69d289 100644 --- a/challenges/2013/Forensics/Black_and_White/index.html +++ b/challenges/2013/Forensics/Black_and_White/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2013/Forensics/deeeeeeaaaaaadbeeeeeeeeeef/index.html b/challenges/2013/Forensics/deeeeeeaaaaaadbeeeeeeeeeef/index.html index 9a30a07c..f02008bc 100644 --- a/challenges/2013/Forensics/deeeeeeaaaaaadbeeeeeeeeeef/index.html +++ b/challenges/2013/Forensics/deeeeeeaaaaaadbeeeeeeeeeef/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2013/Forensics/saidzed/index.html b/challenges/2013/Forensics/saidzed/index.html index 5a4658c7..681d4e40 100644 --- a/challenges/2013/Forensics/saidzed/index.html +++ b/challenges/2013/Forensics/saidzed/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2013/Misc/Alexander_Taylor/index.html b/challenges/2013/Misc/Alexander_Taylor/index.html index f5d92fce..8c29a838 100644 --- a/challenges/2013/Misc/Alexander_Taylor/index.html +++ b/challenges/2013/Misc/Alexander_Taylor/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2013/Misc/Jordan_Weins/index.html b/challenges/2013/Misc/Jordan_Weins/index.html index 9ce1a2e9..b30e56aa 100644 --- a/challenges/2013/Misc/Jordan_Weins/index.html +++ b/challenges/2013/Misc/Jordan_Weins/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2013/Misc/Julian_Cohen/index.html b/challenges/2013/Misc/Julian_Cohen/index.html index ffddc854..a4bab6a6 100644 --- a/challenges/2013/Misc/Julian_Cohen/index.html +++ b/challenges/2013/Misc/Julian_Cohen/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2013/Misc/Life/index.html b/challenges/2013/Misc/Life/index.html index fd44363a..f388b0d1 100644 --- a/challenges/2013/Misc/Life/index.html +++ b/challenges/2013/Misc/Life/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2013/Misc/Networking_1/index.html b/challenges/2013/Misc/Networking_1/index.html index 405bbf53..e95dcf4e 100644 --- a/challenges/2013/Misc/Networking_1/index.html +++ b/challenges/2013/Misc/Networking_1/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2013/Misc/Networking_2/index.html b/challenges/2013/Misc/Networking_2/index.html index 29e877a1..352862b4 100644 --- a/challenges/2013/Misc/Networking_2/index.html +++ b/challenges/2013/Misc/Networking_2/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2013/Misc/historypeats/index.html b/challenges/2013/Misc/historypeats/index.html index 0befd9bb..daf78d51 100644 --- a/challenges/2013/Misc/historypeats/index.html +++ b/challenges/2013/Misc/historypeats/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2013/Misc/trivia_questions/index.html b/challenges/2013/Misc/trivia_questions/index.html index 0bc889c3..ff09628a 100644 --- a/challenges/2013/Misc/trivia_questions/index.html +++ b/challenges/2013/Misc/trivia_questions/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2013/Pwn/CSAW_Diary/index.html b/challenges/2013/Pwn/CSAW_Diary/index.html index 5132bb65..ef5ffedf 100644 --- a/challenges/2013/Pwn/CSAW_Diary/index.html +++ b/challenges/2013/Pwn/CSAW_Diary/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2013/Pwn/Exploitation_1/index.html b/challenges/2013/Pwn/Exploitation_1/index.html index 13ddc431..71c601c0 100644 --- a/challenges/2013/Pwn/Exploitation_1/index.html +++ b/challenges/2013/Pwn/Exploitation_1/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2013/Pwn/Exploitation_2/index.html b/challenges/2013/Pwn/Exploitation_2/index.html index d84ca1eb..3415f63d 100644 --- a/challenges/2013/Pwn/Exploitation_2/index.html +++ b/challenges/2013/Pwn/Exploitation_2/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2013/Pwn/SCP-hack/index.html b/challenges/2013/Pwn/SCP-hack/index.html index 0c2f500e..81c75175 100644 --- a/challenges/2013/Pwn/SCP-hack/index.html +++ b/challenges/2013/Pwn/SCP-hack/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2013/Pwn/itsy/index.html b/challenges/2013/Pwn/itsy/index.html index d8c7f5d7..0d5bbc27 100644 --- a/challenges/2013/Pwn/itsy/index.html +++ b/challenges/2013/Pwn/itsy/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2013/Pwn/kernelchallenge/index.html b/challenges/2013/Pwn/kernelchallenge/index.html index b3fb608a..b1a2fa1a 100644 --- a/challenges/2013/Pwn/kernelchallenge/index.html +++ b/challenges/2013/Pwn/kernelchallenge/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2013/Pwn/miteegashun/index.html b/challenges/2013/Pwn/miteegashun/index.html index ca51a96b..e7c62ff9 100644 --- a/challenges/2013/Pwn/miteegashun/index.html +++ b/challenges/2013/Pwn/miteegashun/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2013/Pwn/silkstreet/index.html b/challenges/2013/Pwn/silkstreet/index.html index e285886b..48970e97 100644 --- a/challenges/2013/Pwn/silkstreet/index.html +++ b/challenges/2013/Pwn/silkstreet/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2013/Reversing/BikiniBonanza/index.html b/challenges/2013/Reversing/BikiniBonanza/index.html index 7329ea03..939a29bd 100644 --- a/challenges/2013/Reversing/BikiniBonanza/index.html +++ b/challenges/2013/Reversing/BikiniBonanza/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2013/Reversing/Brad_Anton/index.html b/challenges/2013/Reversing/Brad_Anton/index.html index 31983cd2..2ea86397 100644 --- a/challenges/2013/Reversing/Brad_Anton/index.html +++ b/challenges/2013/Reversing/Brad_Anton/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2013/Reversing/CSAW_2013_Reversing_1/index.html b/challenges/2013/Reversing/CSAW_2013_Reversing_1/index.html index 4a40409e..2cbdcf34 100644 --- a/challenges/2013/Reversing/CSAW_2013_Reversing_1/index.html +++ b/challenges/2013/Reversing/CSAW_2013_Reversing_1/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2013/Reversing/CSAW_2013_Reversing_2/index.html b/challenges/2013/Reversing/CSAW_2013_Reversing_2/index.html index 06602630..72d13454 100644 --- a/challenges/2013/Reversing/CSAW_2013_Reversing_2/index.html +++ b/challenges/2013/Reversing/CSAW_2013_Reversing_2/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2013/Reversing/DotNet/index.html b/challenges/2013/Reversing/DotNet/index.html index 42a234d2..b647c8bc 100644 --- a/challenges/2013/Reversing/DotNet/index.html +++ b/challenges/2013/Reversing/DotNet/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2013/Reversing/Impossible/index.html b/challenges/2013/Reversing/Impossible/index.html index f3bdc537..7ed607d2 100644 --- a/challenges/2013/Reversing/Impossible/index.html +++ b/challenges/2013/Reversing/Impossible/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2013/Reversing/Noobs_First_Firmware_Mod/index.html b/challenges/2013/Reversing/Noobs_First_Firmware_Mod/index.html index ec13e289..605dbc77 100644 --- a/challenges/2013/Reversing/Noobs_First_Firmware_Mod/index.html +++ b/challenges/2013/Reversing/Noobs_First_Firmware_Mod/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2013/Reversing/bad_bios/index.html b/challenges/2013/Reversing/bad_bios/index.html index e0e8edd0..4febac21 100644 --- a/challenges/2013/Reversing/bad_bios/index.html +++ b/challenges/2013/Reversing/bad_bios/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2013/Reversing/crackme/index.html b/challenges/2013/Reversing/crackme/index.html index 3082367e..0de88dd0 100644 --- a/challenges/2013/Reversing/crackme/index.html +++ b/challenges/2013/Reversing/crackme/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2013/Reversing/csaw2013reversing3/index.html b/challenges/2013/Reversing/csaw2013reversing3/index.html index b0f6731a..a9c60184 100644 --- a/challenges/2013/Reversing/csaw2013reversing3/index.html +++ b/challenges/2013/Reversing/csaw2013reversing3/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2013/Reversing/keygenme/index.html b/challenges/2013/Reversing/keygenme/index.html index 94386793..006d0138 100644 --- a/challenges/2013/Reversing/keygenme/index.html +++ b/challenges/2013/Reversing/keygenme/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2013/Web/Guess_Harder/index.html b/challenges/2013/Web/Guess_Harder/index.html index 3a22a544..ccd0c888 100644 --- a/challenges/2013/Web/Guess_Harder/index.html +++ b/challenges/2013/Web/Guess_Harder/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2013/Web/Michael_Hanchak/index.html b/challenges/2013/Web/Michael_Hanchak/index.html index 78250698..bfef103c 100644 --- a/challenges/2013/Web/Michael_Hanchak/index.html +++ b/challenges/2013/Web/Michael_Hanchak/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2013/Web/Nevernote/index.html b/challenges/2013/Web/Nevernote/index.html index cf1d2174..b922e4e6 100644 --- a/challenges/2013/Web/Nevernote/index.html +++ b/challenges/2013/Web/Nevernote/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2013/Web/Notes/index.html b/challenges/2013/Web/Notes/index.html index 1868f313..398438e7 100644 --- a/challenges/2013/Web/Notes/index.html +++ b/challenges/2013/Web/Notes/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2013/Web/herpderper/index.html b/challenges/2013/Web/herpderper/index.html index 53296c7f..c3bfe450 100644 --- a/challenges/2013/Web/herpderper/index.html +++ b/challenges/2013/Web/herpderper/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2013/Web/historypeats/index.html b/challenges/2013/Web/historypeats/index.html index 2e807ad0..b71d0933 100644 --- a/challenges/2013/Web/historypeats/index.html +++ b/challenges/2013/Web/historypeats/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2013/Web/iSEC_Challenge/index.html b/challenges/2013/Web/iSEC_Challenge/index.html index 6907f0f9..36de7de2 100644 --- a/challenges/2013/Web/iSEC_Challenge/index.html +++ b/challenges/2013/Web/iSEC_Challenge/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2013/Web/twisted/index.html b/challenges/2013/Web/twisted/index.html index 3395ad81..19b3c2c3 100644 --- a/challenges/2013/Web/twisted/index.html +++ b/challenges/2013/Web/twisted/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2014/Crypto/Wieners_-_Antoniewicz/index.html b/challenges/2014/Crypto/Wieners_-_Antoniewicz/index.html index 865a5314..b56b576d 100644 --- a/challenges/2014/Crypto/Wieners_-_Antoniewicz/index.html +++ b/challenges/2014/Crypto/Wieners_-_Antoniewicz/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2014/Crypto/cfbsum/index.html b/challenges/2014/Crypto/cfbsum/index.html index 0865ca98..4208cbe9 100644 --- a/challenges/2014/Crypto/cfbsum/index.html +++ b/challenges/2014/Crypto/cfbsum/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2014/Crypto/feal/index.html b/challenges/2014/Crypto/feal/index.html index aff6348d..7f796c00 100644 --- a/challenges/2014/Crypto/feal/index.html +++ b/challenges/2014/Crypto/feal/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2014/Crypto/mountainsound_-_Stortz/index.html b/challenges/2014/Crypto/mountainsound_-_Stortz/index.html index f1dd3d56..500327d1 100644 --- a/challenges/2014/Crypto/mountainsound_-_Stortz/index.html +++ b/challenges/2014/Crypto/mountainsound_-_Stortz/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2014/Crypto/psifer_school/index.html b/challenges/2014/Crypto/psifer_school/index.html index 46e1d37a..73668a53 100644 --- a/challenges/2014/Crypto/psifer_school/index.html +++ b/challenges/2014/Crypto/psifer_school/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2014/Forensics/Fluffy_No_More/index.html b/challenges/2014/Forensics/Fluffy_No_More/index.html index 0b982f30..a04c5ce1 100644 --- a/challenges/2014/Forensics/Fluffy_No_More/index.html +++ b/challenges/2014/Forensics/Fluffy_No_More/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2014/Forensics/aristotle_-_Wiens/index.html b/challenges/2014/Forensics/aristotle_-_Wiens/index.html index 0de236c5..5019da2e 100644 --- a/challenges/2014/Forensics/aristotle_-_Wiens/index.html +++ b/challenges/2014/Forensics/aristotle_-_Wiens/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2014/Forensics/dumpster_diving/index.html b/challenges/2014/Forensics/dumpster_diving/index.html index 2bfa3182..055c3f83 100644 --- a/challenges/2014/Forensics/dumpster_diving/index.html +++ b/challenges/2014/Forensics/dumpster_diving/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2014/Forensics/obscurity/index.html b/challenges/2014/Forensics/obscurity/index.html index dd694f3f..58a1890e 100644 --- a/challenges/2014/Forensics/obscurity/index.html +++ b/challenges/2014/Forensics/obscurity/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2014/Forensics/why_not_sftp__/index.html b/challenges/2014/Forensics/why_not_sftp__/index.html index 1ed28c6d..17267f12 100644 --- a/challenges/2014/Forensics/why_not_sftp__/index.html +++ b/challenges/2014/Forensics/why_not_sftp__/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2014/Misc/pps_-_Wiens/index.html b/challenges/2014/Misc/pps_-_Wiens/index.html index 9973637b..ff2507da 100644 --- a/challenges/2014/Misc/pps_-_Wiens/index.html +++ b/challenges/2014/Misc/pps_-_Wiens/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2014/Pwn/Xorcise2/index.html b/challenges/2014/Pwn/Xorcise2/index.html index e3f2db26..3c8d82a1 100644 --- a/challenges/2014/Pwn/Xorcise2/index.html +++ b/challenges/2014/Pwn/Xorcise2/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2014/Pwn/greenhornd/index.html b/challenges/2014/Pwn/greenhornd/index.html index 274df300..6aa2fc9f 100644 --- a/challenges/2014/Pwn/greenhornd/index.html +++ b/challenges/2014/Pwn/greenhornd/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2014/Pwn/ish/index.html b/challenges/2014/Pwn/ish/index.html index b7431973..a1c29d7b 100644 --- a/challenges/2014/Pwn/ish/index.html +++ b/challenges/2014/Pwn/ish/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2014/Pwn/krakme/index.html b/challenges/2014/Pwn/krakme/index.html index c415f80e..0b98c9cc 100644 --- a/challenges/2014/Pwn/krakme/index.html +++ b/challenges/2014/Pwn/krakme/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2014/Pwn/mbot/index.html b/challenges/2014/Pwn/mbot/index.html index 5e3ad836..1e889675 100644 --- a/challenges/2014/Pwn/mbot/index.html +++ b/challenges/2014/Pwn/mbot/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2014/Pwn/pybabbies/index.html b/challenges/2014/Pwn/pybabbies/index.html index 8fb26512..a87630f0 100644 --- a/challenges/2014/Pwn/pybabbies/index.html +++ b/challenges/2014/Pwn/pybabbies/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2014/Pwn/s3/index.html b/challenges/2014/Pwn/s3/index.html index 73184363..7cc94ccc 100644 --- a/challenges/2014/Pwn/s3/index.html +++ b/challenges/2014/Pwn/s3/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2014/Pwn/saturn/index.html b/challenges/2014/Pwn/saturn/index.html index 47e0a5b2..26d4140e 100644 --- a/challenges/2014/Pwn/saturn/index.html +++ b/challenges/2014/Pwn/saturn/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2014/Pwn/the_road_less_traveled/index.html b/challenges/2014/Pwn/the_road_less_traveled/index.html index 97c111e0..bc0cb71c 100644 --- a/challenges/2014/Pwn/the_road_less_traveled/index.html +++ b/challenges/2014/Pwn/the_road_less_traveled/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2014/Pwn/xorcise1/index.html b/challenges/2014/Pwn/xorcise1/index.html index 64f63686..3972b94e 100644 --- a/challenges/2014/Pwn/xorcise1/index.html +++ b/challenges/2014/Pwn/xorcise1/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2014/Reversing/aerosol_can/index.html b/challenges/2014/Reversing/aerosol_can/index.html index f1c4faec..b74c9445 100644 --- a/challenges/2014/Reversing/aerosol_can/index.html +++ b/challenges/2014/Reversing/aerosol_can/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2014/Reversing/csaw2013reversing2/index.html b/challenges/2014/Reversing/csaw2013reversing2/index.html index d3c35eb0..2dbead6d 100644 --- a/challenges/2014/Reversing/csaw2013reversing2/index.html +++ b/challenges/2014/Reversing/csaw2013reversing2/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2014/Reversing/odd/index.html b/challenges/2014/Reversing/odd/index.html index 830c8807..17e0c3c6 100644 --- a/challenges/2014/Reversing/odd/index.html +++ b/challenges/2014/Reversing/odd/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2014/Reversing/weissman/index.html b/challenges/2014/Reversing/weissman/index.html index 0fa49691..6a93ff47 100644 --- a/challenges/2014/Reversing/weissman/index.html +++ b/challenges/2014/Reversing/weissman/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2014/Reversing/wololo/index.html b/challenges/2014/Reversing/wololo/index.html index 950c2d49..59102576 100644 --- a/challenges/2014/Reversing/wololo/index.html +++ b/challenges/2014/Reversing/wololo/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2014/Web/app_-_Oberheide/index.html b/challenges/2014/Web/app_-_Oberheide/index.html index 4b833c7c..17494559 100644 --- a/challenges/2014/Web/app_-_Oberheide/index.html +++ b/challenges/2014/Web/app_-_Oberheide/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2014/Web/big_data/index.html b/challenges/2014/Web/big_data/index.html index 5560ddce..ff3fcf9f 100644 --- a/challenges/2014/Web/big_data/index.html +++ b/challenges/2014/Web/big_data/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2014/Web/guestbook_-_Toews/index.html b/challenges/2014/Web/guestbook_-_Toews/index.html index f864fc7d..cebe2e66 100644 --- a/challenges/2014/Web/guestbook_-_Toews/index.html +++ b/challenges/2014/Web/guestbook_-_Toews/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2014/Web/hashes/index.html b/challenges/2014/Web/hashes/index.html index e18ad710..58f0e556 100644 --- a/challenges/2014/Web/hashes/index.html +++ b/challenges/2014/Web/hashes/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2014/Web/silkgoat/index.html b/challenges/2014/Web/silkgoat/index.html index f52fbf29..f51debbb 100644 --- a/challenges/2014/Web/silkgoat/index.html +++ b/challenges/2014/Web/silkgoat/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2014/Web/webroot_-_Freeman/index.html b/challenges/2014/Web/webroot_-_Freeman/index.html index 40f024d6..417c36fb 100644 --- a/challenges/2014/Web/webroot_-_Freeman/index.html +++ b/challenges/2014/Web/webroot_-_Freeman/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2015/Crypto/bricks_of_gold/index.html b/challenges/2015/Crypto/bricks_of_gold/index.html index 91cfc39a..fec29096 100644 --- a/challenges/2015/Crypto/bricks_of_gold/index.html +++ b/challenges/2015/Crypto/bricks_of_gold/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2015/Crypto/check-plz/index.html b/challenges/2015/Crypto/check-plz/index.html index bc5d2636..c8588bdb 100644 --- a/challenges/2015/Crypto/check-plz/index.html +++ b/challenges/2015/Crypto/check-plz/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2015/Crypto/eps/index.html b/challenges/2015/Crypto/eps/index.html index 41e675d9..bf1f14f9 100644 --- a/challenges/2015/Crypto/eps/index.html +++ b/challenges/2015/Crypto/eps/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2015/Crypto/notesy/index.html b/challenges/2015/Crypto/notesy/index.html index 2f6901d3..a507f9db 100644 --- a/challenges/2015/Crypto/notesy/index.html +++ b/challenges/2015/Crypto/notesy/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2015/Crypto/punchout/index.html b/challenges/2015/Crypto/punchout/index.html index f91bb90d..7b461526 100644 --- a/challenges/2015/Crypto/punchout/index.html +++ b/challenges/2015/Crypto/punchout/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2015/Crypto/slabs-of-platinum/index.html b/challenges/2015/Crypto/slabs-of-platinum/index.html index 7c1f1adc..75287f2a 100644 --- a/challenges/2015/Crypto/slabs-of-platinum/index.html +++ b/challenges/2015/Crypto/slabs-of-platinum/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2015/Forensics/airport/index.html b/challenges/2015/Forensics/airport/index.html index 41110b84..2bed1803 100644 --- a/challenges/2015/Forensics/airport/index.html +++ b/challenges/2015/Forensics/airport/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2015/Forensics/flash/index.html b/challenges/2015/Forensics/flash/index.html index b5665cfe..0311dff3 100644 --- a/challenges/2015/Forensics/flash/index.html +++ b/challenges/2015/Forensics/flash/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2015/Forensics/keep-calm-and-ctf/index.html b/challenges/2015/Forensics/keep-calm-and-ctf/index.html index fe67ed1c..7dd9776c 100644 --- a/challenges/2015/Forensics/keep-calm-and-ctf/index.html +++ b/challenges/2015/Forensics/keep-calm-and-ctf/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2015/Forensics/mandiant/index.html b/challenges/2015/Forensics/mandiant/index.html index e95defc3..66c6c01a 100644 --- a/challenges/2015/Forensics/mandiant/index.html +++ b/challenges/2015/Forensics/mandiant/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2015/Forensics/net/index.html b/challenges/2015/Forensics/net/index.html index d48664a3..b9e1f2ec 100644 --- a/challenges/2015/Forensics/net/index.html +++ b/challenges/2015/Forensics/net/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2015/Forensics/pcapin/index.html b/challenges/2015/Forensics/pcapin/index.html index a57faa79..f1651cb2 100644 --- a/challenges/2015/Forensics/pcapin/index.html +++ b/challenges/2015/Forensics/pcapin/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2015/Forensics/phish-it-phish-it-good/index.html b/challenges/2015/Forensics/phish-it-phish-it-good/index.html index 0570d3aa..edefc15f 100644 --- a/challenges/2015/Forensics/phish-it-phish-it-good/index.html +++ b/challenges/2015/Forensics/phish-it-phish-it-good/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2015/Forensics/ransomewhere/index.html b/challenges/2015/Forensics/ransomewhere/index.html index e6f5e4a4..e8cb2812 100644 --- a/challenges/2015/Forensics/ransomewhere/index.html +++ b/challenges/2015/Forensics/ransomewhere/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2015/Forensics/sharpturn/index.html b/challenges/2015/Forensics/sharpturn/index.html index 99209568..44d50607 100644 --- a/challenges/2015/Forensics/sharpturn/index.html +++ b/challenges/2015/Forensics/sharpturn/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2015/Misc/sanity-check/index.html b/challenges/2015/Misc/sanity-check/index.html index 30c24301..09388f66 100644 --- a/challenges/2015/Misc/sanity-check/index.html +++ b/challenges/2015/Misc/sanity-check/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2015/Pwn/autobots/index.html b/challenges/2015/Pwn/autobots/index.html index 24230154..3f9b8751 100644 --- a/challenges/2015/Pwn/autobots/index.html +++ b/challenges/2015/Pwn/autobots/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2015/Pwn/blox/index.html b/challenges/2015/Pwn/blox/index.html index 9e9e25a1..78796fd4 100644 --- a/challenges/2015/Pwn/blox/index.html +++ b/challenges/2015/Pwn/blox/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2015/Pwn/boombox/index.html b/challenges/2015/Pwn/boombox/index.html index e7c446da..1e3ad872 100644 --- a/challenges/2015/Pwn/boombox/index.html +++ b/challenges/2015/Pwn/boombox/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2015/Pwn/contacts/index.html b/challenges/2015/Pwn/contacts/index.html index 2d6ba75e..d0d36533 100644 --- a/challenges/2015/Pwn/contacts/index.html +++ b/challenges/2015/Pwn/contacts/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2015/Pwn/creditforcredits/index.html b/challenges/2015/Pwn/creditforcredits/index.html index 006b0a33..aa3cffec 100644 --- a/challenges/2015/Pwn/creditforcredits/index.html +++ b/challenges/2015/Pwn/creditforcredits/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2015/Pwn/get-flag/index.html b/challenges/2015/Pwn/get-flag/index.html index b07f5995..d00e6a0b 100644 --- a/challenges/2015/Pwn/get-flag/index.html +++ b/challenges/2015/Pwn/get-flag/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2015/Pwn/greetingsearthling/index.html b/challenges/2015/Pwn/greetingsearthling/index.html index b2854707..56666dee 100644 --- a/challenges/2015/Pwn/greetingsearthling/index.html +++ b/challenges/2015/Pwn/greetingsearthling/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2015/Pwn/hiddencave/index.html b/challenges/2015/Pwn/hiddencave/index.html index 4fbadf23..bf846850 100644 --- a/challenges/2015/Pwn/hiddencave/index.html +++ b/challenges/2015/Pwn/hiddencave/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2015/Pwn/hipster/index.html b/challenges/2015/Pwn/hipster/index.html index 2e24050a..917a0184 100644 --- a/challenges/2015/Pwn/hipster/index.html +++ b/challenges/2015/Pwn/hipster/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2015/Pwn/meme-shop/index.html b/challenges/2015/Pwn/meme-shop/index.html index 3bd76446..0fd06af7 100644 --- a/challenges/2015/Pwn/meme-shop/index.html +++ b/challenges/2015/Pwn/meme-shop/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2015/Pwn/memory-disclosure-flag/index.html b/challenges/2015/Pwn/memory-disclosure-flag/index.html index efbf3104..298c98a5 100644 --- a/challenges/2015/Pwn/memory-disclosure-flag/index.html +++ b/challenges/2015/Pwn/memory-disclosure-flag/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2015/Pwn/precision/index.html b/challenges/2015/Pwn/precision/index.html index f5b35600..8176f8b9 100644 --- a/challenges/2015/Pwn/precision/index.html +++ b/challenges/2015/Pwn/precision/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2015/Pwn/quarantinebreaker/index.html b/challenges/2015/Pwn/quarantinebreaker/index.html index 9a8d876d..6bbf2337 100644 --- a/challenges/2015/Pwn/quarantinebreaker/index.html +++ b/challenges/2015/Pwn/quarantinebreaker/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2015/Pwn/rhinoxorus/index.html b/challenges/2015/Pwn/rhinoxorus/index.html index 390903af..c1ecb174 100644 --- a/challenges/2015/Pwn/rhinoxorus/index.html +++ b/challenges/2015/Pwn/rhinoxorus/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2015/Pwn/stringipc/index.html b/challenges/2015/Pwn/stringipc/index.html index b084b246..9b80a6bb 100644 --- a/challenges/2015/Pwn/stringipc/index.html +++ b/challenges/2015/Pwn/stringipc/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2015/Reversing/HackingTime/index.html b/challenges/2015/Reversing/HackingTime/index.html index 3ef02d0b..ed27af82 100644 --- a/challenges/2015/Reversing/HackingTime/index.html +++ b/challenges/2015/Reversing/HackingTime/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2015/Reversing/cookie-maze/index.html b/challenges/2015/Reversing/cookie-maze/index.html index ab752d8d..7db98294 100644 --- a/challenges/2015/Reversing/cookie-maze/index.html +++ b/challenges/2015/Reversing/cookie-maze/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2015/Reversing/ftp/index.html b/challenges/2015/Reversing/ftp/index.html index 661885e0..45a2e7b4 100644 --- a/challenges/2015/Reversing/ftp/index.html +++ b/challenges/2015/Reversing/ftp/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2015/Reversing/pwning-a-locked-container-plc/index.html b/challenges/2015/Reversing/pwning-a-locked-container-plc/index.html index 9d7dd489..f13b6611 100644 --- a/challenges/2015/Reversing/pwning-a-locked-container-plc/index.html +++ b/challenges/2015/Reversing/pwning-a-locked-container-plc/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2015/Reversing/return-of-the-wieners/index.html b/challenges/2015/Reversing/return-of-the-wieners/index.html index 5c8bfe4b..18347fab 100644 --- a/challenges/2015/Reversing/return-of-the-wieners/index.html +++ b/challenges/2015/Reversing/return-of-the-wieners/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2015/Reversing/wyvern/index.html b/challenges/2015/Reversing/wyvern/index.html index 3846bf1b..8efee16d 100644 --- a/challenges/2015/Reversing/wyvern/index.html +++ b/challenges/2015/Reversing/wyvern/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2015/Reversing/wyvern2/index.html b/challenges/2015/Reversing/wyvern2/index.html index 7bfcdab1..9c02d1f0 100644 --- a/challenges/2015/Reversing/wyvern2/index.html +++ b/challenges/2015/Reversing/wyvern2/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2015/Web/K_achieve-200/index.html b/challenges/2015/Web/K_achieve-200/index.html index d209a3d1..e4c2b0c2 100644 --- a/challenges/2015/Web/K_achieve-200/index.html +++ b/challenges/2015/Web/K_achieve-200/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2015/Web/K_stairs-100/index.html b/challenges/2015/Web/K_stairs-100/index.html index a9ddbfc2..03bfc7fd 100644 --- a/challenges/2015/Web/K_stairs-100/index.html +++ b/challenges/2015/Web/K_stairs-100/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2015/Web/animewall/index.html b/challenges/2015/Web/animewall/index.html index a8af4608..6a604d0a 100644 --- a/challenges/2015/Web/animewall/index.html +++ b/challenges/2015/Web/animewall/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2015/Web/lawn-care-simulator/index.html b/challenges/2015/Web/lawn-care-simulator/index.html index b52b58cf..66a24637 100644 --- a/challenges/2015/Web/lawn-care-simulator/index.html +++ b/challenges/2015/Web/lawn-care-simulator/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2015/Web/tbbpe/index.html b/challenges/2015/Web/tbbpe/index.html index 39b9651a..89111f0f 100644 --- a/challenges/2015/Web/tbbpe/index.html +++ b/challenges/2015/Web/tbbpe/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2015/Web/throwback-600/index.html b/challenges/2015/Web/throwback-600/index.html index 235dcd5b..0a92890c 100644 --- a/challenges/2015/Web/throwback-600/index.html +++ b/challenges/2015/Web/throwback-600/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2015/Web/weebdate-500/index.html b/challenges/2015/Web/weebdate-500/index.html index aa732845..d4951175 100644 --- a/challenges/2015/Web/weebdate-500/index.html +++ b/challenges/2015/Web/weebdate-500/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2016/Crypto/Another_Broken_box/index.html b/challenges/2016/Crypto/Another_Broken_box/index.html index 7a5f83c0..0996744d 100644 --- a/challenges/2016/Crypto/Another_Broken_box/index.html +++ b/challenges/2016/Crypto/Another_Broken_box/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2016/Crypto/Broken_Box/index.html b/challenges/2016/Crypto/Broken_Box/index.html index 3162e012..e2d5e7c2 100644 --- a/challenges/2016/Crypto/Broken_Box/index.html +++ b/challenges/2016/Crypto/Broken_Box/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2016/Crypto/Katy/index.html b/challenges/2016/Crypto/Katy/index.html index 57e2558a..72c93793 100644 --- a/challenges/2016/Crypto/Katy/index.html +++ b/challenges/2016/Crypto/Katy/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2016/Crypto/Killer_cipher/index.html b/challenges/2016/Crypto/Killer_cipher/index.html index 2e9439a6..85af6cb3 100644 --- a/challenges/2016/Crypto/Killer_cipher/index.html +++ b/challenges/2016/Crypto/Killer_cipher/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2016/Crypto/Neo/index.html b/challenges/2016/Crypto/Neo/index.html index 46db08ad..2e0c8433 100644 --- a/challenges/2016/Crypto/Neo/index.html +++ b/challenges/2016/Crypto/Neo/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2016/Crypto/Sleeping_Guard/index.html b/challenges/2016/Crypto/Sleeping_Guard/index.html index 58818555..8a86e443 100644 --- a/challenges/2016/Crypto/Sleeping_Guard/index.html +++ b/challenges/2016/Crypto/Sleeping_Guard/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2016/Crypto/Still_Broken_Box/index.html b/challenges/2016/Crypto/Still_Broken_Box/index.html index 8b20f177..c45a04ea 100644 --- a/challenges/2016/Crypto/Still_Broken_Box/index.html +++ b/challenges/2016/Crypto/Still_Broken_Box/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2016/Forensics/Clams_Dont_Dance/index.html b/challenges/2016/Forensics/Clams_Dont_Dance/index.html index 4f98e0e0..56bbb7e3 100644 --- a/challenges/2016/Forensics/Clams_Dont_Dance/index.html +++ b/challenges/2016/Forensics/Clams_Dont_Dance/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2016/Forensics/Kill/index.html b/challenges/2016/Forensics/Kill/index.html index 899237e8..3815719d 100644 --- a/challenges/2016/Forensics/Kill/index.html +++ b/challenges/2016/Forensics/Kill/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2016/Forensics/Watchword/index.html b/challenges/2016/Forensics/Watchword/index.html index 07e93003..951b6a89 100644 --- a/challenges/2016/Forensics/Watchword/index.html +++ b/challenges/2016/Forensics/Watchword/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2016/Forensics/Yaar_Haar_Fiddle_Dee_Dee/index.html b/challenges/2016/Forensics/Yaar_Haar_Fiddle_Dee_Dee/index.html index 66cdbb40..0b637d01 100644 --- a/challenges/2016/Forensics/Yaar_Haar_Fiddle_Dee_Dee/index.html +++ b/challenges/2016/Forensics/Yaar_Haar_Fiddle_Dee_Dee/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2016/Forensics/brainfun/index.html b/challenges/2016/Forensics/brainfun/index.html index b3bb321f..9a7b2d71 100644 --- a/challenges/2016/Forensics/brainfun/index.html +++ b/challenges/2016/Forensics/brainfun/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2016/Forensics/evidence.zip/index.html b/challenges/2016/Forensics/evidence.zip/index.html index 09ebb9eb..32ff39e6 100644 --- a/challenges/2016/Forensics/evidence.zip/index.html +++ b/challenges/2016/Forensics/evidence.zip/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2016/Forensics/pure_poetry/index.html b/challenges/2016/Forensics/pure_poetry/index.html index 4e135aaf..506bf39f 100644 --- a/challenges/2016/Forensics/pure_poetry/index.html +++ b/challenges/2016/Forensics/pure_poetry/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2016/Forensics/yaar_haar_2/index.html b/challenges/2016/Forensics/yaar_haar_2/index.html index 17bc50b3..3b1b2d03 100644 --- a/challenges/2016/Forensics/yaar_haar_2/index.html +++ b/challenges/2016/Forensics/yaar_haar_2/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2016/Misc/Fuzyll/index.html b/challenges/2016/Misc/Fuzyll/index.html index 8ade1a7e..48425760 100644 --- a/challenges/2016/Misc/Fuzyll/index.html +++ b/challenges/2016/Misc/Fuzyll/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2016/Misc/Music_To_My_Ears/index.html b/challenges/2016/Misc/Music_To_My_Ears/index.html index 5371b396..e038a16b 100644 --- a/challenges/2016/Misc/Music_To_My_Ears/index.html +++ b/challenges/2016/Misc/Music_To_My_Ears/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2016/Misc/coinslot/index.html b/challenges/2016/Misc/coinslot/index.html index 62d52f98..8d132b07 100644 --- a/challenges/2016/Misc/coinslot/index.html +++ b/challenges/2016/Misc/coinslot/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2016/Misc/regexpire/index.html b/challenges/2016/Misc/regexpire/index.html index a17fda8f..353ee570 100644 --- a/challenges/2016/Misc/regexpire/index.html +++ b/challenges/2016/Misc/regexpire/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2016/Pwn/Aul/index.html b/challenges/2016/Pwn/Aul/index.html index a6ebca4f..52042e95 100644 --- a/challenges/2016/Pwn/Aul/index.html +++ b/challenges/2016/Pwn/Aul/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2016/Pwn/CyberTronix64k/index.html b/challenges/2016/Pwn/CyberTronix64k/index.html index 8d34c072..a0668efb 100644 --- a/challenges/2016/Pwn/CyberTronix64k/index.html +++ b/challenges/2016/Pwn/CyberTronix64k/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2016/Pwn/Ed-Edd-Eddie/index.html b/challenges/2016/Pwn/Ed-Edd-Eddie/index.html index f5ef7acb..f1b00315 100644 --- a/challenges/2016/Pwn/Ed-Edd-Eddie/index.html +++ b/challenges/2016/Pwn/Ed-Edd-Eddie/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2016/Pwn/Hungman/index.html b/challenges/2016/Pwn/Hungman/index.html index 7ca5e4a2..30a444f9 100644 --- a/challenges/2016/Pwn/Hungman/index.html +++ b/challenges/2016/Pwn/Hungman/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2016/Pwn/Moms_Spaghetti/index.html b/challenges/2016/Pwn/Moms_Spaghetti/index.html index 95f02766..a4101d95 100644 --- a/challenges/2016/Pwn/Moms_Spaghetti/index.html +++ b/challenges/2016/Pwn/Moms_Spaghetti/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2016/Pwn/ReversePolish/index.html b/challenges/2016/Pwn/ReversePolish/index.html index 1a77235f..0a05f7f6 100644 --- a/challenges/2016/Pwn/ReversePolish/index.html +++ b/challenges/2016/Pwn/ReversePolish/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2016/Pwn/Tutorial/index.html b/challenges/2016/Pwn/Tutorial/index.html index 946022c7..6740083a 100644 --- a/challenges/2016/Pwn/Tutorial/index.html +++ b/challenges/2016/Pwn/Tutorial/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2016/Pwn/WarmUp/index.html b/challenges/2016/Pwn/WarmUp/index.html index 7753696c..8c67b0dc 100644 --- a/challenges/2016/Pwn/WarmUp/index.html +++ b/challenges/2016/Pwn/WarmUp/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2016/Pwn/detective/index.html b/challenges/2016/Pwn/detective/index.html index c0e4f1e3..abeab333 100644 --- a/challenges/2016/Pwn/detective/index.html +++ b/challenges/2016/Pwn/detective/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2016/Pwn/thimblerig/index.html b/challenges/2016/Pwn/thimblerig/index.html index 2c3982e3..bab67063 100644 --- a/challenges/2016/Pwn/thimblerig/index.html +++ b/challenges/2016/Pwn/thimblerig/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2016/Web/I_Got_Id/index.html b/challenges/2016/Web/I_Got_Id/index.html index 066a5c24..76136b71 100644 --- a/challenges/2016/Web/I_Got_Id/index.html +++ b/challenges/2016/Web/I_Got_Id/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2016/Web/MFW/index.html b/challenges/2016/Web/MFW/index.html index f6e39c5c..6decbedb 100644 --- a/challenges/2016/Web/MFW/index.html +++ b/challenges/2016/Web/MFW/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2016/Web/Seizure-Cipher/index.html b/challenges/2016/Web/Seizure-Cipher/index.html index 44e978b2..d143fb54 100644 --- a/challenges/2016/Web/Seizure-Cipher/index.html +++ b/challenges/2016/Web/Seizure-Cipher/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2016/Web/SugarCereal/index.html b/challenges/2016/Web/SugarCereal/index.html index 7d0a9eb8..2645007e 100644 --- a/challenges/2016/Web/SugarCereal/index.html +++ b/challenges/2016/Web/SugarCereal/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2016/Web/cloudb/index.html b/challenges/2016/Web/cloudb/index.html index 257e4613..cca7501b 100644 --- a/challenges/2016/Web/cloudb/index.html +++ b/challenges/2016/Web/cloudb/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2016/Web/linq_to_the_present/index.html b/challenges/2016/Web/linq_to_the_present/index.html index c2706ba3..fbf1f7ae 100644 --- a/challenges/2016/Web/linq_to_the_present/index.html +++ b/challenges/2016/Web/linq_to_the_present/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2016/Web/wtf.sh/index.html b/challenges/2016/Web/wtf.sh/index.html index ef70e298..8a73766e 100644 --- a/challenges/2016/Web/wtf.sh/index.html +++ b/challenges/2016/Web/wtf.sh/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2016/Web/wtf.sh2/index.html b/challenges/2016/Web/wtf.sh2/index.html index 2a145830..3a43bf6e 100644 --- a/challenges/2016/Web/wtf.sh2/index.html +++ b/challenges/2016/Web/wtf.sh2/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2016/reversing/CookieMath/index.html b/challenges/2016/reversing/CookieMath/index.html index 18bc1245..4fdc5998 100644 --- a/challenges/2016/reversing/CookieMath/index.html +++ b/challenges/2016/reversing/CookieMath/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2016/reversing/CyberTronix64k/index.html b/challenges/2016/reversing/CyberTronix64k/index.html index 15413354..4f1c874a 100644 --- a/challenges/2016/reversing/CyberTronix64k/index.html +++ b/challenges/2016/reversing/CyberTronix64k/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2016/reversing/Gametime/index.html b/challenges/2016/reversing/Gametime/index.html index a4a7649d..bf382d21 100644 --- a/challenges/2016/reversing/Gametime/index.html +++ b/challenges/2016/reversing/Gametime/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2016/reversing/Key/index.html b/challenges/2016/reversing/Key/index.html index 60df8aca..96546b91 100644 --- a/challenges/2016/reversing/Key/index.html +++ b/challenges/2016/reversing/Key/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2016/reversing/MixedSignals/index.html b/challenges/2016/reversing/MixedSignals/index.html index f77d0666..747b1673 100644 --- a/challenges/2016/reversing/MixedSignals/index.html +++ b/challenges/2016/reversing/MixedSignals/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2016/reversing/Palo-Alto/index.html b/challenges/2016/reversing/Palo-Alto/index.html index 1720d6a8..49eeb55f 100644 --- a/challenges/2016/reversing/Palo-Alto/index.html +++ b/challenges/2016/reversing/Palo-Alto/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2016/reversing/Rock/index.html b/challenges/2016/reversing/Rock/index.html index 013773f4..030a9549 100644 --- a/challenges/2016/reversing/Rock/index.html +++ b/challenges/2016/reversing/Rock/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2016/reversing/Tar-Tar-Binks/index.html b/challenges/2016/reversing/Tar-Tar-Binks/index.html index 10f0f0d1..49598211 100644 --- a/challenges/2016/reversing/Tar-Tar-Binks/index.html +++ b/challenges/2016/reversing/Tar-Tar-Binks/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2016/reversing/deedeedee/index.html b/challenges/2016/reversing/deedeedee/index.html index da2f308d..df8f025f 100644 --- a/challenges/2016/reversing/deedeedee/index.html +++ b/challenges/2016/reversing/deedeedee/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2016/reversing/gofaster/index.html b/challenges/2016/reversing/gofaster/index.html index 91ac788c..0db02a09 100644 --- a/challenges/2016/reversing/gofaster/index.html +++ b/challenges/2016/reversing/gofaster/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2016/reversing/ivninja/index.html b/challenges/2016/reversing/ivninja/index.html index 82de7eb9..827b2610 100644 --- a/challenges/2016/reversing/ivninja/index.html +++ b/challenges/2016/reversing/ivninja/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2016/reversing/lazurus/index.html b/challenges/2016/reversing/lazurus/index.html index ac84874d..11904e51 100644 --- a/challenges/2016/reversing/lazurus/index.html +++ b/challenges/2016/reversing/lazurus/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2016/reversing/supermonsterball/index.html b/challenges/2016/reversing/supermonsterball/index.html index 195dde01..373bd717 100644 --- a/challenges/2016/reversing/supermonsterball/index.html +++ b/challenges/2016/reversing/supermonsterball/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2017/Crypto/ECXOR/index.html b/challenges/2017/Crypto/ECXOR/index.html index 55382bed..4b9bd8c0 100644 --- a/challenges/2017/Crypto/ECXOR/index.html +++ b/challenges/2017/Crypto/ECXOR/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2017/Crypto/Lupin/index.html b/challenges/2017/Crypto/Lupin/index.html index dc0ec578..1c0c43f3 100644 --- a/challenges/2017/Crypto/Lupin/index.html +++ b/challenges/2017/Crypto/Lupin/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2017/Crypto/Side-channel/index.html b/challenges/2017/Crypto/Side-channel/index.html index e6cd6920..03501778 100644 --- a/challenges/2017/Crypto/Side-channel/index.html +++ b/challenges/2017/Crypto/Side-channel/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2017/Crypto/almost_xor/index.html b/challenges/2017/Crypto/almost_xor/index.html index d11d1a14..899535a4 100644 --- a/challenges/2017/Crypto/almost_xor/index.html +++ b/challenges/2017/Crypto/almost_xor/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2017/Crypto/another_xor/index.html b/challenges/2017/Crypto/another_xor/index.html index 9121fcdd..2bd134d3 100644 --- a/challenges/2017/Crypto/another_xor/index.html +++ b/challenges/2017/Crypto/another_xor/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2017/Crypto/baby_crypt/index.html b/challenges/2017/Crypto/baby_crypt/index.html index be1eb830..3d093893 100644 --- a/challenges/2017/Crypto/baby_crypt/index.html +++ b/challenges/2017/Crypto/baby_crypt/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2017/Forensics/best_router/index.html b/challenges/2017/Forensics/best_router/index.html index ae40ddbc..37adb0d4 100644 --- a/challenges/2017/Forensics/best_router/index.html +++ b/challenges/2017/Forensics/best_router/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2017/Forensics/missed_registration/index.html b/challenges/2017/Forensics/missed_registration/index.html index aebd91d1..bba53488 100644 --- a/challenges/2017/Forensics/missed_registration/index.html +++ b/challenges/2017/Forensics/missed_registration/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2017/Forensics/thoroughlyStripped/index.html b/challenges/2017/Forensics/thoroughlyStripped/index.html index ffc1c9c9..5b9b5fa4 100644 --- a/challenges/2017/Forensics/thoroughlyStripped/index.html +++ b/challenges/2017/Forensics/thoroughlyStripped/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2017/Misc/ETHERSNOOB/index.html b/challenges/2017/Misc/ETHERSNOOB/index.html index f782db0d..73341d4b 100644 --- a/challenges/2017/Misc/ETHERSNOOB/index.html +++ b/challenges/2017/Misc/ETHERSNOOB/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2017/Misc/cvv/index.html b/challenges/2017/Misc/cvv/index.html index 02fd122a..6fe5ddec 100644 --- a/challenges/2017/Misc/cvv/index.html +++ b/challenges/2017/Misc/cvv/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2017/Misc/ethersplay/index.html b/challenges/2017/Misc/ethersplay/index.html index bee83042..5c16d677 100644 --- a/challenges/2017/Misc/ethersplay/index.html +++ b/challenges/2017/Misc/ethersplay/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2017/Misc/serial/index.html b/challenges/2017/Misc/serial/index.html index 53b28c9c..cf1a6295 100644 --- a/challenges/2017/Misc/serial/index.html +++ b/challenges/2017/Misc/serial/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2017/Pwn/GlobalThermonuclearCyberwar/index.html b/challenges/2017/Pwn/GlobalThermonuclearCyberwar/index.html index 5fc7e6ad..8ae6670d 100644 --- a/challenges/2017/Pwn/GlobalThermonuclearCyberwar/index.html +++ b/challenges/2017/Pwn/GlobalThermonuclearCyberwar/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2017/Pwn/Humm_sCh-t/index.html b/challenges/2017/Pwn/Humm_sCh-t/index.html index 64840d66..817dd134 100644 --- a/challenges/2017/Pwn/Humm_sCh-t/index.html +++ b/challenges/2017/Pwn/Humm_sCh-t/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2017/Pwn/KWS2/index.html b/challenges/2017/Pwn/KWS2/index.html index eb1872f0..12c127e7 100644 --- a/challenges/2017/Pwn/KWS2/index.html +++ b/challenges/2017/Pwn/KWS2/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2017/Pwn/auir/index.html b/challenges/2017/Pwn/auir/index.html index 3369e266..40617c41 100644 --- a/challenges/2017/Pwn/auir/index.html +++ b/challenges/2017/Pwn/auir/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2017/Pwn/connectXor/index.html b/challenges/2017/Pwn/connectXor/index.html index 77a6c981..4e284d7c 100644 --- a/challenges/2017/Pwn/connectXor/index.html +++ b/challenges/2017/Pwn/connectXor/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2017/Pwn/exploitme/index.html b/challenges/2017/Pwn/exploitme/index.html index 13f18eae..c54a563a 100644 --- a/challenges/2017/Pwn/exploitme/index.html +++ b/challenges/2017/Pwn/exploitme/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2017/Pwn/firewall/index.html b/challenges/2017/Pwn/firewall/index.html index 95f57e22..04b48394 100644 --- a/challenges/2017/Pwn/firewall/index.html +++ b/challenges/2017/Pwn/firewall/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2017/Pwn/funtimejs/index.html b/challenges/2017/Pwn/funtimejs/index.html index f2dd10a4..3db67183 100644 --- a/challenges/2017/Pwn/funtimejs/index.html +++ b/challenges/2017/Pwn/funtimejs/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2017/Pwn/minesweeper/index.html b/challenges/2017/Pwn/minesweeper/index.html index 66d473cc..5b91843f 100644 --- a/challenges/2017/Pwn/minesweeper/index.html +++ b/challenges/2017/Pwn/minesweeper/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2017/Pwn/pilot/index.html b/challenges/2017/Pwn/pilot/index.html index 237ab9f5..f4d314b9 100644 --- a/challenges/2017/Pwn/pilot/index.html +++ b/challenges/2017/Pwn/pilot/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2017/Pwn/scv/index.html b/challenges/2017/Pwn/scv/index.html index 9eff0249..08f9d9e6 100644 --- a/challenges/2017/Pwn/scv/index.html +++ b/challenges/2017/Pwn/scv/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2017/Pwn/zone/index.html b/challenges/2017/Pwn/zone/index.html index cb8ae04c..ed0cb1a0 100644 --- a/challenges/2017/Pwn/zone/index.html +++ b/challenges/2017/Pwn/zone/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2017/Web/Gopherz2Basic/index.html b/challenges/2017/Web/Gopherz2Basic/index.html index 5b7e64c0..a0463886 100644 --- a/challenges/2017/Web/Gopherz2Basic/index.html +++ b/challenges/2017/Web/Gopherz2Basic/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2017/Web/Gopherz2NotSoBasic/index.html b/challenges/2017/Web/Gopherz2NotSoBasic/index.html index 5b5de2c9..abc7387a 100644 --- a/challenges/2017/Web/Gopherz2NotSoBasic/index.html +++ b/challenges/2017/Web/Gopherz2NotSoBasic/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2017/Web/csaw-kernel-challenge/index.html b/challenges/2017/Web/csaw-kernel-challenge/index.html index aa2c8176..963a7a7d 100644 --- a/challenges/2017/Web/csaw-kernel-challenge/index.html +++ b/challenges/2017/Web/csaw-kernel-challenge/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2017/Web/csaw-oauth2-chal/index.html b/challenges/2017/Web/csaw-oauth2-chal/index.html index 69e43f2d..93cc0914 100644 --- a/challenges/2017/Web/csaw-oauth2-chal/index.html +++ b/challenges/2017/Web/csaw-oauth2-chal/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2017/Web/littlequery/index.html b/challenges/2017/Web/littlequery/index.html index 142530f2..86d71c54 100644 --- a/challenges/2017/Web/littlequery/index.html +++ b/challenges/2017/Web/littlequery/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2017/Web/notmycupofcoffe/index.html b/challenges/2017/Web/notmycupofcoffe/index.html index 27553a71..8be8492d 100644 --- a/challenges/2017/Web/notmycupofcoffe/index.html +++ b/challenges/2017/Web/notmycupofcoffe/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2017/Web/orange/index.html b/challenges/2017/Web/orange/index.html index 6f1c97d9..4ad33744 100644 --- a/challenges/2017/Web/orange/index.html +++ b/challenges/2017/Web/orange/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2017/Web/orangev2/index.html b/challenges/2017/Web/orangev2/index.html index 5fc7652c..58e784a3 100644 --- a/challenges/2017/Web/orangev2/index.html +++ b/challenges/2017/Web/orangev2/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2017/Web/shia/index.html b/challenges/2017/Web/shia/index.html index db226727..67aa12ae 100644 --- a/challenges/2017/Web/shia/index.html +++ b/challenges/2017/Web/shia/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2017/reversing/48-bit_yeet_lab/index.html b/challenges/2017/reversing/48-bit_yeet_lab/index.html index 96484bc0..958f28c7 100644 --- a/challenges/2017/reversing/48-bit_yeet_lab/index.html +++ b/challenges/2017/reversing/48-bit_yeet_lab/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2017/reversing/DEFCON1/index.html b/challenges/2017/reversing/DEFCON1/index.html index 6b8a4e57..8a92424c 100644 --- a/challenges/2017/reversing/DEFCON1/index.html +++ b/challenges/2017/reversing/DEFCON1/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2017/reversing/PROPHECY/index.html b/challenges/2017/reversing/PROPHECY/index.html index 3cfbd543..068d8e72 100644 --- a/challenges/2017/reversing/PROPHECY/index.html +++ b/challenges/2017/reversing/PROPHECY/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2017/reversing/TablEZ/index.html b/challenges/2017/reversing/TablEZ/index.html index 6622a08a..18fd1d10 100644 --- a/challenges/2017/reversing/TablEZ/index.html +++ b/challenges/2017/reversing/TablEZ/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2017/reversing/bananascript/index.html b/challenges/2017/reversing/bananascript/index.html index bb3bc2f7..3e9f3743 100644 --- a/challenges/2017/reversing/bananascript/index.html +++ b/challenges/2017/reversing/bananascript/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2017/reversing/gopherz/index.html b/challenges/2017/reversing/gopherz/index.html index 999e7678..412bcea9 100644 --- a/challenges/2017/reversing/gopherz/index.html +++ b/challenges/2017/reversing/gopherz/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2017/reversing/grumpcheck/index.html b/challenges/2017/reversing/grumpcheck/index.html index 244e8349..1703a2d1 100644 --- a/challenges/2017/reversing/grumpcheck/index.html +++ b/challenges/2017/reversing/grumpcheck/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2017/reversing/rabbithole/index.html b/challenges/2017/reversing/rabbithole/index.html index 3fafb787..b4e407db 100644 --- a/challenges/2017/reversing/rabbithole/index.html +++ b/challenges/2017/reversing/rabbithole/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2017/reversing/realism/index.html b/challenges/2017/reversing/realism/index.html index 682559e0..e741e4f9 100644 --- a/challenges/2017/reversing/realism/index.html +++ b/challenges/2017/reversing/realism/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/challenges/2017/reversing/rusty_road/index.html b/challenges/2017/reversing/rusty_road/index.html index 0627cb4f..b46436b4 100644 --- a/challenges/2017/reversing/rusty_road/index.html +++ b/challenges/2017/reversing/rusty_road/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/cryptography/overview/index.html b/cryptography/overview/index.html index 851adc88..76f36487 100644 --- a/cryptography/overview/index.html +++ b/cryptography/overview/index.html @@ -3065,6 +3065,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/cryptography/what-are-block-ciphers/index.html b/cryptography/what-are-block-ciphers/index.html index 36a3a526..1ee03f4f 100644 --- a/cryptography/what-are-block-ciphers/index.html +++ b/cryptography/what-are-block-ciphers/index.html @@ -3172,6 +3172,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/cryptography/what-are-hashing-functions/index.html b/cryptography/what-are-hashing-functions/index.html index 6f38a711..a32d3b10 100644 --- a/cryptography/what-are-hashing-functions/index.html +++ b/cryptography/what-are-hashing-functions/index.html @@ -3076,6 +3076,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/cryptography/what-are-stream-ciphers/index.html b/cryptography/what-are-stream-ciphers/index.html index 7b2c5dec..e5221030 100644 --- a/cryptography/what-are-stream-ciphers/index.html +++ b/cryptography/what-are-stream-ciphers/index.html @@ -3133,6 +3133,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/cryptography/what-is-a-substitution-cipher/index.html b/cryptography/what-is-a-substitution-cipher/index.html index 69404b6d..23b49841 100644 --- a/cryptography/what-is-a-substitution-cipher/index.html +++ b/cryptography/what-is-a-substitution-cipher/index.html @@ -3019,6 +3019,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/cryptography/what-is-a-vigenere-cipher/index.html b/cryptography/what-is-a-vigenere-cipher/index.html index 405835a7..07de5faf 100644 --- a/cryptography/what-is-a-vigenere-cipher/index.html +++ b/cryptography/what-is-a-vigenere-cipher/index.html @@ -3067,6 +3067,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/cryptography/what-is-caesar-cipher-rot-13/index.html b/cryptography/what-is-caesar-cipher-rot-13/index.html index 3de54bf3..e9309876 100644 --- a/cryptography/what-is-caesar-cipher-rot-13/index.html +++ b/cryptography/what-is-caesar-cipher-rot-13/index.html @@ -3019,6 +3019,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/cryptography/what-is-rsa/index.html b/cryptography/what-is-rsa/index.html index 13c04c60..338386c1 100644 --- a/cryptography/what-is-rsa/index.html +++ b/cryptography/what-is-rsa/index.html @@ -3118,6 +3118,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/cryptography/what-is-xor/index.html b/cryptography/what-is-xor/index.html index 1b7f0d53..15ae2257 100644 --- a/cryptography/what-is-xor/index.html +++ b/cryptography/what-is-xor/index.html @@ -3109,6 +3109,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/faq/connecting-to-services/index.html b/faq/connecting-to-services/index.html new file mode 100644 index 00000000..9caa66c4 --- /dev/null +++ b/faq/connecting-to-services/index.html @@ -0,0 +1,3358 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + How to connect to services - CTF Handbook + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + Skip to content + + +
    +
    + +
    + + + + + + +
    + + +
    + +
    + + + + + + +
    +
    + + + +
    +
    +
    + + + + + +
    +
    +
    + + + +
    +
    +
    + + + +
    +
    +
    + + + +
    +
    + + + + + + + +

    How to connect to services

    +
    +

    Note

    +

    While service challenges are often connected to with netcat or PuTTY, solving them will sometimes require using a scripting language like Python. CTF players often use Python alongside pwntools.

    +

    You can run pwntools right in your browser by using repl.it.

    +
    +

    Using netcat

    +

    netcat usage

    +

    netcat is a networking utility found on macOS and linux operating systems and allows for easy connections to CTF challenges. Service challenges will commonly give you an address and a port to connect to. The syntax for connecting to a service challenge with netcat is nc <ip> <port>.

    +

    Using ConEmu

    +

    Windows users can connect to service challenges using ConEmu, which can be downloaded here. Connecting to service challenges with ConEmu is done by running nc <ip> <port>.

    + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    + + + +
    +
    +
    +
    + + + + + + + + + + \ No newline at end of file diff --git a/faq/i-need-a-server/index.html b/faq/i-need-a-server/index.html new file mode 100644 index 00000000..0cdbf414 --- /dev/null +++ b/faq/i-need-a-server/index.html @@ -0,0 +1,3353 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + I need a server - CTF Handbook + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + Skip to content + + +
    +
    + +
    + + + + + + +
    + + +
    + +
    + + + + + + +
    +
    + + + +
    +
    +
    + + + + + +
    +
    +
    + + + +
    +
    +
    + + + +
    +
    +
    + + + +
    +
    + + + + + + + +

    I need a server

    +

    Occasionally, certain kinds of exploits will require a server to connect back to. Some examples are connect back shellcode, cross site request forgery (CSRF), or blind cross site scripting (XSS).

    +

    I just a web server

    +

    If you just need a web server to host simple static websites or check access logs, we recommend using PythonAnywhere to host a simple web application. You can program a simple web application in popular Python web frameworks (e.g. Flask) and host it there for free.

    +

    I need a real server

    +

    If you need a real server (perhaps to run complex calculations or for shellcode to connect back to), we recommend DigitalOcean. DigitalOcean has a cheap $4-6/month plan for a small server that can be freely configured to do whatever you need.

    + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    + + + +
    +
    +
    +
    + + + + + + + + + + \ No newline at end of file diff --git a/faq/images/netcat.gif b/faq/images/netcat.gif new file mode 100644 index 00000000..0b3add4e Binary files /dev/null and b/faq/images/netcat.gif differ diff --git a/faq/recommended-software/index.html b/faq/recommended-software/index.html new file mode 100644 index 00000000..3904fcb7 --- /dev/null +++ b/faq/recommended-software/index.html @@ -0,0 +1,3539 @@ + + + + + + + + + + + + + + + + + + + + + + + + + Recommended Software - CTF Handbook + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + Skip to content + + +
    +
    + +
    + + + + + + +
    + + +
    + +
    + + + + + + +
    +
    + + + +
    +
    +
    + + + + + +
    +
    +
    + + + +
    +
    +
    + + + +
    +
    +
    + + + +
    +
    + + + + + + + +

    Recommended Software

    +

    Generally in cyber security competitions, it is up to you and your team +to determine what software to use. In some cases you may even end up +creating new tools to give you an edge! That being said, here are some +applications that we recommend for most competitors for most +competitions.

    +

    Disassemblers/Decompilers

    +
      +
    • +

      Ghidra

      +

      Ghidra is a disassembler and decompiler that is open source and free +to use. Released by the NSA, Ghidra is a capable tool and is the +recommended disassembler for most use cases. An alternative is IDA +Pro (a cyber security industry standard), however IDA Pro is not +free and licenses are very expensive.

      +
    • +
    • +

      Binary Ninja

      +

      Binary Ninja is a commercial disassembler (with a free demo +application) that provides an aesthetic and easy to use interface +for binary reverse engineering. It also has a Web-UI which can be +used freely. Binary Ninja's API and intermediate language make it +superior than other disassemblers for certain use cases.

      +
    • +
    +

    Debuggers

    +
      +
    • +

      Pwndbg for GDB

      +

      Pwndbg is a plugin for the GNU Debugger (gdb) which makes it easier +to dynamically reverse an application by stepping through its +execution. In order to use pwndbg you will first need to have gdb +installed via a Linux virtual machine or similar.

      +
    • +
    • +

      WinDbg

      +

      WinDbg is a debugger for Windows applications.

      +
    • +
    +

    Web Tools

    +
      +
    • +

      Burp Suite

      +

      Burp Suite is an HTTP proxy and set of tools which allow you to +view, edit and replay your HTTP requests. While Burp Suite is a +commercial tool, it offers a free version which is very capable and +usually all that's needed.

      +
    • +
    • +

      sqlmap

      +

      sqlmap is a penetration testing tool that automates hte process of +detecting and exploiting SQL injection flaws. It's open source and +freely available.

      +
    • +
    • +

      Google Chrome

      +

      Google Chrome is a web browser with a suite of developer tools and +extensions. These tools and extensions can be useful when +investigating a web application.

      +
    • +
    • +

      Wireshark

      +

      Wireshark is a PCAP analysis tool which allows you to analyze and +record network traffic.

      +
    • +
    +

    Virtualization

    +
      +
    • +

      VMware

      +

      VMware is a company that creates virtualization software that allows +you to run other operating systems within your existing operating +system. While their products are not generally free, their software +is best in class for virtualization.

      +

      VMWare Fusion, VMWare Workstation, and VMWare Player are three of +their virtualization products that can be used on your computer to +run other OS'es. VMWare +Player is free to use for +Windows and Linux.

      +
    • +
    • +

      VirtualBox

      +

      VirtualBox is open source virtualization software which allows you +to virtualize other operating systems. It's very similar to VMWare +products but free for all OS'es. It is generally slower than VMWare +but works well enough for most people.

      +
    • +
    +

    Programming

    +
      +
    • +

      Python

      +

      Python is an easy-to-learn, widely used programming language which +supports complex applications as well as small scripts. It has a +large community which provides thousands of useful packages. Python +is widely used in the cyber security industry and is generally the +recommended language to use in CTF competition.

      +
    • +
    • +

      pwntools

      +

      Pwntools is a Python package which makes interacting with processes +and networks easy. It is a recommended library for interacting with +binary exploitation and networking based CTF challenges.

      +
      +

      Note

      +

      You can run +pwntools right in +your browser by using repl.it. Create a new +Python repl and install the pwntools package. After that you'll +be able to use pwntools directly from your browser without having to +install anything.

      +
      +
    • +
    +

    Miscellaneous

    +
      +
    • +

      CyberChef

      +

      CyberChef is a simple web app for analysing and decoding data +without having to deal with complex tools or programming languages.

      +
    • +
    + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    + + + +
    +
    +
    +
    + + + + + + + + + + \ No newline at end of file diff --git a/forensics/overview/index.html b/forensics/overview/index.html index 4d6380af..547abced 100644 --- a/forensics/overview/index.html +++ b/forensics/overview/index.html @@ -3017,6 +3017,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/forensics/what-are-file-formats/index.html b/forensics/what-are-file-formats/index.html index 41a2d58a..7974a4e5 100644 --- a/forensics/what-are-file-formats/index.html +++ b/forensics/what-are-file-formats/index.html @@ -3091,6 +3091,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + @@ -3211,7 +3318,7 @@

    Example

    - February 20, 2024 + January 26, 2024 diff --git a/forensics/what-is-a-hex-editor/index.html b/forensics/what-is-a-hex-editor/index.html index 163bfcb3..1ae9c004 100644 --- a/forensics/what-is-a-hex-editor/index.html +++ b/forensics/what-is-a-hex-editor/index.html @@ -3058,6 +3058,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/forensics/what-is-disk-imaging/index.html b/forensics/what-is-disk-imaging/index.html index 2e9f7277..f70a53eb 100644 --- a/forensics/what-is-disk-imaging/index.html +++ b/forensics/what-is-disk-imaging/index.html @@ -3058,6 +3058,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/forensics/what-is-memory-forensics/index.html b/forensics/what-is-memory-forensics/index.html index 8d85cf82..c65e8c08 100644 --- a/forensics/what-is-memory-forensics/index.html +++ b/forensics/what-is-memory-forensics/index.html @@ -3100,6 +3100,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/forensics/what-is-metadata/index.html b/forensics/what-is-metadata/index.html index 12c23383..58dc8c2e 100644 --- a/forensics/what-is-metadata/index.html +++ b/forensics/what-is-metadata/index.html @@ -3127,6 +3127,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/forensics/what-is-stegonagraphy/index.html b/forensics/what-is-stegonagraphy/index.html index daf98be8..d86e6b96 100644 --- a/forensics/what-is-stegonagraphy/index.html +++ b/forensics/what-is-stegonagraphy/index.html @@ -3100,6 +3100,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/forensics/what-is-wireshark/index.html b/forensics/what-is-wireshark/index.html index f3634df4..c6cb840b 100644 --- a/forensics/what-is-wireshark/index.html +++ b/forensics/what-is-wireshark/index.html @@ -3091,6 +3091,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/index.html b/index.html index baac5173..e431465a 100644 --- a/index.html +++ b/index.html @@ -3052,6 +3052,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/reverse-engineering/overview/index.html b/reverse-engineering/overview/index.html index bf7a53fd..e3e52f1b 100644 --- a/reverse-engineering/overview/index.html +++ b/reverse-engineering/overview/index.html @@ -3017,6 +3017,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/reverse-engineering/what-are-decompilers/index.html b/reverse-engineering/what-are-decompilers/index.html index 08b5f9de..ce29a65a 100644 --- a/reverse-engineering/what-are-decompilers/index.html +++ b/reverse-engineering/what-are-decompilers/index.html @@ -3091,6 +3091,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/reverse-engineering/what-are-disassemblers/index.html b/reverse-engineering/what-are-disassemblers/index.html index 8964e752..fb8c3d72 100644 --- a/reverse-engineering/what-are-disassemblers/index.html +++ b/reverse-engineering/what-are-disassemblers/index.html @@ -3091,6 +3091,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/reverse-engineering/what-is-assembly-machine-code/index.html b/reverse-engineering/what-is-assembly-machine-code/index.html index bc32f3b0..d24c9dcb 100644 --- a/reverse-engineering/what-is-assembly-machine-code/index.html +++ b/reverse-engineering/what-is-assembly-machine-code/index.html @@ -3136,6 +3136,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/reverse-engineering/what-is-bytecode/index.html b/reverse-engineering/what-is-bytecode/index.html index 34098803..8678f184 100644 --- a/reverse-engineering/what-is-bytecode/index.html +++ b/reverse-engineering/what-is-bytecode/index.html @@ -3001,6 +3001,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/reverse-engineering/what-is-c/index.html b/reverse-engineering/what-is-c/index.html index 9f125b6c..f758b5ff 100644 --- a/reverse-engineering/what-is-c/index.html +++ b/reverse-engineering/what-is-c/index.html @@ -3127,6 +3127,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/reverse-engineering/what-is-gdb/index.html b/reverse-engineering/what-is-gdb/index.html index ff9c6546..c8e6e819 100644 --- a/reverse-engineering/what-is-gdb/index.html +++ b/reverse-engineering/what-is-gdb/index.html @@ -3256,6 +3256,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/search/search_index.json b/search/search_index.json index 3f1cb3a1..78028511 100644 --- a/search/search_index.json +++ b/search/search_index.json @@ -1 +1 @@ -{"config": {"lang": ["en"], "separator": "[\\s\\-]+", "pipeline": ["stopWordFilter"]}, "docs": [{"location": "", "title": "Capture The Flag 101", "text": ""}, {"location": "#overview", "title": "Overview", "text": "

    Capture the Flags, or CTFs, are computer security competitions.

    Teams of competitors (or just individuals) are pitted against each other in various challenges across multiple security disciplines, competing to earn the most points.

    CTFs are often the beginning of one's cyber security career due to their team building nature and competitive aspect. In addition, there isn't a lot of commitment required beyond a weekend.

    Info

    For information about ongoing CTFs, check out CTFTime.

    In this handbook you'll learn the basics\u2122 behind the methodologies and techniques needed to succeed in Capture the Flag competitions.

    "}, {"location": "binary-exploitation/address-space-layout-randomization/", "title": "Address Space Layout Randomization (ASLR)", "text": "

    Address Space Layout Randomization (or ASLR) is the randomization of the place in memory where the program, shared libraries, the stack, and the heap are. This makes can make it harder for an attacker to exploit a service, as knowledge about where the stack, heap, or libc can't be re-used between program launches. This is a partially effective way of preventing an attacker from jumping to, for example, libc without a leak.

    Typically, only the stack, heap, and shared libraries are ASLR enabled. It is still somewhat rare for the main program to have ASLR enabled, though it is being seen more frequently and is slowly becoming the default.

    "}, {"location": "binary-exploitation/buffer-overflow/", "title": "Buffer Overflow", "text": "

    A Buffer Overflow is a vulnerability in which data can be written which exceeds the allocated space, allowing an attacker to overwrite other data.

    "}, {"location": "binary-exploitation/buffer-overflow/#stack-buffer-overflow", "title": "Stack buffer overflow", "text": "

    The simplest and most common buffer overflow is one where the buffer is on the stack. Let's look at an example.

    #include <stdio.h>\n\nint main() {\n    int secret = 0xdeadbeef;\n    char name[100] = {0};\n    read(0, name, 0x100);\n    if (secret == 0x1337) {\n        puts(\"Wow! Here's a secret.\");\n    } else {\n        puts(\"I guess you're not cool enough to see my secret\");\n    }\n}\n

    There's a tiny mistake in this program which will allow us to see the secret. name is decimal 100 bytes, however we're reading in hex 100 bytes (=256 decimal bytes)! Let's see how we can use this to our advantage.

    If the compiler chose to layout the stack like this:

            0xffff006c: 0xf7f7f7f7  // Saved EIP\n        0xffff0068: 0xffff0100  // Saved EBP\n        0xffff0064: 0xdeadbeef  // secret\n...\n        0xffff0004: 0x0\nESP ->  0xffff0000: 0x0         // name\n

    let's look at what happens when we read in 0x100 bytes of 'A's.

    The first decimal 100 bytes are saved properly:

            0xffff006c: 0xf7f7f7f7  // Saved EIP\n        0xffff0068: 0xffff0100  // Saved EBP\n        0xffff0064: 0xdeadbeef  // secret\n...\n        0xffff0004: 0x41414141\nESP ->  0xffff0000: 0x41414141  // name\n

    However when the 101st byte is read in, we see an issue:

            0xffff006c: 0xf7f7f7f7  // Saved EIP\n        0xffff0068: 0xffff0100  // Saved EBP\n        0xffff0064: 0xdeadbe41  // secret\n...\n        0xffff0004: 0x41414141\nESP ->  0xffff0000: 0x41414141  // name\n

    The least significant byte of secret has been overwritten! If we follow the next 3 bytes to be read in, we'll see the entirety of secret is \"clobbered\" with our 'A's

            0xffff006c: 0xf7f7f7f7  // Saved EIP\n        0xffff0068: 0xffff0100  // Saved EBP\n        0xffff0064: 0x41414141  // secret\n...\n        0xffff0004: 0x41414141\nESP ->  0xffff0000: 0x41414141  // name\n

    The remaining 152 bytes would continue clobbering values up the stack.

    "}, {"location": "binary-exploitation/buffer-overflow/#passing-an-impossible-check", "title": "Passing an impossible check", "text": "

    How can we use this to pass the seemingly impossible check in the original program? Well, if we carefully line up our input so that the bytes that overwrite secret happen to be the bytes that represent 0x1337 in little-endian, we'll see the secret message.

    A small Python one-liner will work nicely: python -c \"print 'A'*100 + '\\x31\\x13\\x00\\x00'\"

    This will fill the name buffer with 100 'A's, then overwrite secret with the 32-bit little-endian encoding of 0x1337.

    "}, {"location": "binary-exploitation/buffer-overflow/#going-one-step-further", "title": "Going one step further", "text": "

    As discussed on the stack page, the instruction that the current function should jump to when it is done is also saved on the stack (denoted as \"Saved EIP\" in the above stack diagrams). If we can overwrite this, we can control where the program jumps after main finishes running, giving us the ability to control what the program does entirely.

    Usually, the end objective in binary exploitation is to get a shell (often called \"popping a shell\") on the remote computer. The shell provides us with an easy way to run anything we want on the target computer.

    Say there happens to be a nice function that does this defined somewhere else in the program that we normally can't get to:

    void give_shell() {\n    system(\"/bin/sh\");\n}\n

    Well with our buffer overflow knowledge, now we can! All we have to do is overwrite the saved EIP on the stack to the address where give_shell is. Then, when main returns, it will pop that address off of the stack and jump to it, running give_shell, and giving us our shell.

    Assuming give_shell is at 0x08048fd0, we could use something like this: python -c \"print 'A'*108 + '\\xd0\\x8f\\x04\\x08'\"

    We send 108 'A's to overwrite the 100 bytes that is allocated for name, the 4 bytes for secret, and the 4 bytes for the saved EBP. Then we simply send the little-endian form of give_shell's address, and we would get a shell!

    This idea is extended on in Return Oriented Programming

    "}, {"location": "binary-exploitation/heap-exploitation/", "title": "Heap Exploits", "text": ""}, {"location": "binary-exploitation/heap-exploitation/#overflow", "title": "Overflow", "text": "

    Much like a stack buffer overflow, a heap overflow is a vulnerability where more data than can fit in the allocated buffer is read in. This could lead to heap metadata corruption, or corruption of other heap objects, which could in turn provide new attack surface.

    "}, {"location": "binary-exploitation/heap-exploitation/#use-after-free-uaf", "title": "Use After Free (UAF)", "text": "

    Once free is called on an allocation, the allocator is free to re-allocate that chunk of memory in future calls to malloc if it so chooses. However if the program author isn't careful and uses the freed object later on, the contents may be corrupt (or even attacker controlled). This is called a use after free or UAF.

    "}, {"location": "binary-exploitation/heap-exploitation/#example", "title": "Example", "text": "
    #include <stdio.h>\n#include <stdlib.h>\n#include <unistd.h>\n#include <string.h>\n\ntypedef struct string {\n    unsigned length;\n    char *data;\n} string;\n\nint main() {\n    struct string* s = malloc(sizeof(string));\n    puts(\"Length:\");\n    scanf(\"%u\", &s->length);\n    s->data = malloc(s->length + 1);\n    memset(s->data, 0, s->length + 1);\n    puts(\"Data:\");\n    read(0, s->data, s->length);\n\n    free(s->data);\n    free(s);\n\n    char *s2 = malloc(16);\n    memset(s2, 0, 16);\n    puts(\"More data:\");\n    read(0, s2, 15);\n\n    // Now using s again, a UAF\n\n    puts(s->data);\n\n    return 0;\n}\n

    In this example, we have a string structure with a length and a pointer to the actual string data. We properly allocate, fill, and then free an instance of this structure. Then we make another allocation, fill it, and then improperly reference the freed string. Due to how glibc's allocator works, s2 will actually get the same memory as the original s allocation, which in turn gives us the ability to control the s->data pointer. This could be used to leak program data.

    "}, {"location": "binary-exploitation/heap-exploitation/#advanced-heap-exploitation", "title": "Advanced Heap Exploitation", "text": "

    Not only can the heap be exploited by the data in allocations, but exploits can also use the underlying mechanisms in malloc, free, etc. to exploit a program. This is beyond the scope of CTF 101, but here are a few recommended resources:

    "}, {"location": "binary-exploitation/no-execute/", "title": "No eXecute (NX Bit)", "text": "

    The No eXecute or the NX bit (also known as Data Execution Prevention or DEP) marks certain areas of the program as not executable, meaning that stored input or data cannot be executed as code. This is significant because it prevents attackers from being able to jump to custom shellcode that they've stored on the stack or in a global variable.

    "}, {"location": "binary-exploitation/overview/", "title": "Overview", "text": ""}, {"location": "binary-exploitation/overview/#binary-exploitation", "title": "Binary Exploitation", "text": "

    Binaries, or executables, are machine code for a computer to execute. For the most part, the binaries that you will face in CTFs are Linux ELF files or the occasional windows executable. Binary Exploitation is a broad topic within Cyber Security which really comes down to finding a vulnerability in the program and exploiting it to gain control of a shell or modifying the program's functions.

    Common topics addressed by Binary Exploitation or 'pwn' challenges include:

    "}, {"location": "binary-exploitation/relocation-read-only/", "title": "Relocation Read-Only (RELRO)", "text": "

    Relocation Read-Only (or RELRO) is a security measure which makes some binary sections read-only.

    There are two RELRO \"modes\": partial and full.

    "}, {"location": "binary-exploitation/relocation-read-only/#partial-relro", "title": "Partial RELRO", "text": "

    Partial RELRO is the default setting in GCC, and nearly all binaries you will see have at least partial RELRO.

    From an attackers point-of-view, partial RELRO makes almost no difference, other than it forces the GOT to come before the BSS in memory, eliminating the risk of a buffer overflows on a global variable overwriting GOT entries.

    "}, {"location": "binary-exploitation/relocation-read-only/#full-relro", "title": "Full RELRO", "text": "

    Full RELRO makes the entire GOT read-only which removes the ability to perform a \"GOT overwrite\" attack, where the GOT address of a function is overwritten with the location of another function or a ROP gadget an attacker wants to run.

    Full RELRO is not a default compiler setting as it can greatly increase program startup time since all symbols must be resolved before the program is started. In large programs with thousands of symbols that need to be linked, this could cause a noticable delay in startup time.

    "}, {"location": "binary-exploitation/return-oriented-programming/", "title": "Return Oriented Programming", "text": "

    Return Oriented Programming (or ROP) is the idea of chaining together small snippets of assembly with stack control to cause the program to do more complex things.

    As we saw in buffer overflows, having stack control can be very powerful since it allows us to overwrite saved instruction pointers, giving us control over what the program does next. Most programs don't have a convenient give_shell function however, so we need to find a way to manually invoke system or another exec function to get us our shell.

    "}, {"location": "binary-exploitation/return-oriented-programming/#32-bit", "title": "32 bit", "text": "

    Imagine we have a program similar to the following:

    #include <stdio.h>\n#include <stdlib.h>\n\nchar name[32];\n\nint main() {\n    printf(\"What's your name? \");\n    read(0, name, 32);\n\n    printf(\"Hi %s\\n\", name);\n\n    printf(\"The time is currently \");\n    system(\"/bin/date\");\n\n    char echo[100];\n    printf(\"What do you want me to echo back? \");\n    read(0, echo, 1000);\n    puts(echo);\n\n    return 0;\n}\n

    We obviously have a stack buffer overflow on the echo variable which can give us EIP control when main returns. But we don't have a give_shell function! So what can we do?

    We can call system with an argument we control! Since arguments are passed in on the stack in 32-bit Linux programs (see calling conventions), if we have stack control, we have argument control.

    When main returns, we want our stack to look like something had normally called system. Recall what is on the stack after a function has been called:

            ...                                 // More arguments\n        0xffff0008: 0x00000002              // Argument 2\n        0xffff0004: 0x00000001              // Argument 1\nESP ->  0xffff0000: 0x080484d0              // Return address\n

    So main's stack frame needs to look like this:

            0xffff0008: 0xdeadbeef              // system argument 1\n        0xffff0004: 0xdeadbeef              // return address for system\nESP ->  0xffff0000: 0x08048450              // return address for main (system's PLT entry)\n

    Then when main returns, it will jump into system's PLT entry and the stack will appear just like system had been called normally for the first time.

    Note: we don't care about the return address system will return to because we will have already gotten our shell by then!

    "}, {"location": "binary-exploitation/return-oriented-programming/#arguments", "title": "Arguments", "text": "

    This is a good start, but we need to pass an argument to system for anything to happen. As mentioned in the page on ASLR, the stack and dynamic libraries \"move around\" each time a program is run, which means we can't easily use data on the stack or a string in libc for our argument. In this case however, we have a very convenient name global which will be at a known location in the binary (in the BSS segment).

    "}, {"location": "binary-exploitation/return-oriented-programming/#putting-it-together", "title": "Putting it together", "text": "

    Our exploit will need to do the following:

    1. Enter \"sh\" or another command to run as name
    2. Fill the stack with
      1. Garbage up to the saved EIP
      2. The address of system's PLT entry
      3. A fake return address for system to jump to when it's done
      4. The address of the name global to act as the first argument to system
    "}, {"location": "binary-exploitation/return-oriented-programming/#64-bit", "title": "64 bit", "text": "

    In 64-bit binaries we have to work a bit harder to pass arguments to functions. The basic idea of overwriting the saved RIP is the same, but as discussed in calling conventions, arguments are passed in registers in 64-bit programs. In the case of running system, this means we will need to find a way to control the RDI register.

    To do this, we'll use small snippets of assembly in the binary, called \"gadgets.\" These gadgets usually pop one or more registers off of the stack, and then call ret, which allows us to chain them together by making a large fake call stack.

    For example, if we needed control of both RDI and RSI, we might find two gadgets in our program that look like this (using a tool like rp++ or ROPgadget):

    0x400c01: pop rdi; ret\n0x400c03: pop rsi; pop r15; ret\n

    We can setup a fake call stack with these gadets to sequentially execute them, poping values we control into registers, and then end with a jump to system.

    "}, {"location": "binary-exploitation/return-oriented-programming/#example", "title": "Example", "text": "
            0xffff0028: 0x400d00            // where we want the rsi gadget's ret to jump to now that rdi and rsi are controlled\n        0xffff0020: 0x1337beef          // value we want in r15 (probably garbage)\n        0xffff0018: 0x1337beef          // value we want in rsi\n        0xffff0010: 0x400c03            // address that the rdi gadget's ret will return to - the pop rsi gadget\n        0xffff0008: 0xdeadbeef          // value to be popped into rdi\nRSP ->  0xffff0000: 0x400c01            // address of rdi gadget\n

    Stepping through this one instruction at a time, main returns, jumping to our pop rdi gadget:

    RIP = 0x400c01 (pop rdi)\nRDI = UNKNOWN\nRSI = UNKNOWN\n\n        0xffff0028: 0x400d00            // where we want the rsi gadget's ret to jump to now that rdi and rsi are controlled\n        0xffff0020: 0x1337beef          // value we want in r15 (probably garbage)\n        0xffff0018: 0x1337beef          // value we want in rsi\n        0xffff0010: 0x400c03            // address that the rdi gadget's ret will return to - the pop rsi gadget\nRSP ->  0xffff0008: 0xdeadbeef          // value to be popped into rdi\n

    pop rdi is then executed, popping the top of the stack into RDI:

    RIP = 0x400c02 (ret)\nRDI = 0xdeadbeef\nRSI = UNKNOWN\n\n        0xffff0028: 0x400d00            // where we want the rsi gadget's ret to jump to now that rdi and rsi are controlled\n        0xffff0020: 0x1337beef          // value we want in r15 (probably garbage)\n        0xffff0018: 0x1337beef          // value we want in rsi\nRSP ->  0xffff0010: 0x400c03            // address that the rdi gadget's ret will return to - the pop rsi gadget\n

    The RDI gadget then rets into our RSI gadget:

    RIP = 0x400c03 (pop rsi)\nRDI = 0xdeadbeef\nRSI = UNKNOWN\n\n        0xffff0028: 0x400d00            // where we want the rsi gadget's ret to jump to now that rdi and rsi are controlled\n        0xffff0020: 0x1337beef          // value we want in r15 (probably garbage)\nRSP ->  0xffff0018: 0x1337beef          // value we want in rsi\n

    RSI and R15 are popped:

    RIP = 0x400c05 (ret)\nRDI = 0xdeadbeef\nRSI = 0x1337beef\n\nRSP ->  0xffff0028: 0x400d00            // where we want the rsi gadget's ret to jump to now that rdi and rsi are controlled\n

    And finally, the RSI gadget rets, jumping to whatever function we want, but now with RDI and RSI set to values we control.

    "}, {"location": "binary-exploitation/stack-canaries/", "title": "Stack Canaries", "text": "

    Stack Canaries are a secret value placed on the stack which changes every time the program is started. Prior to a function return, the stack canary is checked and if it appears to be modified, the program exits immeadiately.

    "}, {"location": "binary-exploitation/stack-canaries/#bypassing-stack-canaries", "title": "Bypassing Stack Canaries", "text": "

    Stack Canaries seem like a clear cut way to mitigate any stack smashing as it is fairly impossible to just guess a random 64-bit value. However, leaking the address and bruteforcing the canary are two methods which would allow us to get through the canary check.

    "}, {"location": "binary-exploitation/stack-canaries/#stack-canary-leaking", "title": "Stack Canary Leaking", "text": "

    If we can read the data in the stack canary, we can send it back to the program later because the canary stays the same throughout execution. However Linux makes this slightly tricky by making the first byte of the stack canary a NULL, meaning that string functions will stop when they hit it. A method around this would be to partially overwrite and then put the NULL back or find a way to leak bytes at an arbitrary stack offset.

    A few situations where you might be able to leak a canary:

    "}, {"location": "binary-exploitation/stack-canaries/#bruteforcing-a-stack-canary", "title": "Bruteforcing a Stack Canary", "text": "

    The canary is determined when the program starts up for the first time which means that if the program forks, it keeps the same stack cookie in the child process. This means that if the input that can overwrite the canary is sent to the child, we can use whether it crashes as an oracle and brute-force 1 byte at a time!

    This method can be used on fork-and-accept servers where connections are spun off to child processes, but only under certain conditions such as when the input accepted by the program does not append a NULL byte (read or recv).

    Buffer (N Bytes) ?? ?? ?? ?? ?? ?? ?? ?? RBP RIP

    Fill the buffer N Bytes + 0x00 results in no crash

    Buffer (N Bytes) 00 ?? ?? ?? ?? ?? ?? ?? RBP RIP

    Fill the buffer N Bytes + 0x00 + 0x00 results in a crash

    N Bytes + 0x00 + 0x01 results in a crash

    N Bytes + 0x00 + 0x02 results in a crash

    ...

    N Bytes + 0x00 + 0x51 results in no crash

    Buffer (N Bytes) 00 51 ?? ?? ?? ?? ?? ?? RBP RIP

    Repeat this bruteforcing process for 6 more bytes...

    Buffer (N Bytes) 00 51 FE 0A 31 D2 7B 3C RBP RIP

    Now that we have the stack cookie, we can overwrite the RIP register and take control of the program!

    "}, {"location": "binary-exploitation/what-are-buffers/", "title": "Buffers", "text": "

    A buffer is any allocated space in memory where data (often user input) can be stored. For example, in the following C program name would be considered a stack buffer:

    #include <stdio.h>\n\nint main() {\n    char name[64] = {0};\n    read(0, name, 63);\n    printf(\"Hello %s\", name);\n    return 0;\n}\n

    Buffers could also be global variables:

    #include <stdio.h>\n\nchar name[64] = {0};\n\nint main() {\n    read(0, name, 63);\n    printf(\"Hello %s\", name);\n    return 0;\n}\n

    Or dynamically allocated on the heap:

    #include <stdio.h>\n#include <stdlib.h>\n\nint main() {\n    char *name = malloc(64);\n    memset(name, 0, 64);\n    read(0, name, 63);\n    printf(\"Hello %s\", name);\n    return 0;\n}\n
    "}, {"location": "binary-exploitation/what-are-buffers/#exploits", "title": "Exploits", "text": "

    Given that buffers commonly hold user input, mistakes when writing to them could result in attacker controlled data being written outside of the buffer's space. See the page on buffer overflows for more.

    "}, {"location": "binary-exploitation/what-are-calling-conventions/", "title": "Calling Conventions", "text": "

    To be able to call functions, there needs to be an agreed-upon way to pass arguments. If a program is entirely self-contained in a binary, the compiler would be free to decide the calling convention. However in reality, shared libraries are used so that common code (e.g. libc) can be stored once and dynamically linked in to programs that need it, reducing program size.

    In Linux binaries, there are really only two commonly used calling conventions: cdecl for 32-bit binaries, and SysV for 64-bit

    "}, {"location": "binary-exploitation/what-are-calling-conventions/#cdecl", "title": "cdecl", "text": "

    In 32-bit binaries on Linux, function arguments are passed in on the stack in reverse order. A function like this:

    int add(int a, int b, int c) {\n    return a + b + c;\n}\n

    would be invoked by pushing c, then b, then a.

    "}, {"location": "binary-exploitation/what-are-calling-conventions/#sysv", "title": "SysV", "text": "

    For 64-bit binaries, function arguments are first passed in certain registers:

    1. RDI
    2. RSI
    3. RDX
    4. RCX
    5. R8
    6. R9

    then any leftover arguments are pushed onto the stack in reverse order, as in cdecl.

    "}, {"location": "binary-exploitation/what-are-calling-conventions/#other-conventions", "title": "Other Conventions", "text": "

    Any method of passing arguments could be used as long as the compiler is aware of what the convention is. As a result, there have been many calling conventions in the past that aren't used frequently anymore. See Wikipedia for a comprehensive list.

    "}, {"location": "binary-exploitation/what-are-registers/", "title": "Registers", "text": "

    A register is a location within the processor that is able to store data, much like RAM. Unlike RAM however, accesses to registers are effectively instantaneous, whereas reads from main memory can take hundreds of CPU cycles to return.

    Registers can hold any value: addresses (pointers), results from mathematical operations, characters, etc. Some registers are reserved however, meaning they have a special purpose and are not \"general purpose registers\" (GPRs). On x86, the only 2 reserved registers are rip and rsp which hold the address of the next instruction to execute and the address of the stack respectively.

    On x86, the same register can have different sized accesses for backwards compatability. For example, the rax register is the full 64-bit register, eax is the low 32 bits of rax, ax is the low 16 bits, al is the low 8 bits, and ah is the high 8 bits of ax (bits 8-16 of rax).

    "}, {"location": "binary-exploitation/what-is-a-format-string-vulnerability/", "title": "Format String Vulnerability", "text": "

    A format string vulnerability is a bug where user input is passed as the format argument to printf, scanf, or another function in that family.

    The format argument has many different specifies which could allow an attacker to leak data if they control the format argument to printf. Since printf and similar are variadic functions, they will continue popping data off of the stack according to the format.

    For example, if we can make the format argument \"%x.%x.%x.%x\", printf will pop off four stack values and print them in hexadecimal, potentially leaking sensitive information.

    printf can also index to an arbitrary \"argument\" with the following syntax: \"%n$x\" (where n is the decimal index of the argument you want).

    While these bugs are powerful, they're very rare nowadays, as all modern compilers warn when printf is called with a non-constant string.

    "}, {"location": "binary-exploitation/what-is-a-format-string-vulnerability/#example", "title": "Example", "text": "
    #include <stdio.h>\n#include <unistd.h>\n\nint main() {\n    int secret_num = 0x8badf00d;\n\n    char name[64] = {0};\n    read(0, name, 64);\n    printf(\"Hello \");\n    printf(name);\n    printf(\"! You'll never get my secret!\\n\");\n    return 0;\n}\n

    Due to how GCC decided to lay out the stack, secret_num is actually at a lower address on the stack than name, so we only have to go to the 7th \"argument\" in printf to leak the secret:

    $ ./fmt_string\n%7$llx\nHello 8badf00d3ea43eef\n! You'll never get my secret!\n
    "}, {"location": "binary-exploitation/what-is-binary-security/", "title": "Binary Security", "text": "

    Binary Security is using tools and methods in order to secure programs from being manipulated and exploited. This tools are not infallible, but when used together and implemented properly, they can raise the difficulty of exploitation greatly.

    Some methods covered include:

    "}, {"location": "binary-exploitation/what-is-the-got/", "title": "GOT", "text": "

    The Global Offset Table (or GOT) is a section inside of programs that holds addresses of functions that are dynamically linked. As mentioned in the page on calling conventions, most programs don't include every function they use to reduce binary size. Instead, common functions (like those in libc) are \"linked\" into the program so they can be saved once on disk and reused by every program.

    Unless a program is marked full RELRO, the resolution of function to address in dynamic library is done lazily. All dynamic libraries are loaded into memory along with the main program at launch, however functions are not mapped to their actual code until they're first called. For example, in the following C snippet puts won't be resolved to an address in libc until after it has been called once:

    int main() {\n    puts(\"Hi there!\");\n    puts(\"Ok bye now.\");\n    return 0;\n}\n

    To avoid searching through shared libraries each time a function is called, the result of the lookup is saved into the GOT so future function calls \"short circuit\" straight to their implementation bypassing the dynamic resolver.

    This has two important implications:

    1. The GOT contains pointers to libraries which move around due to ASLR
    2. The GOT is writable

    These two facts will become very useful to use in Return Oriented Programming

    "}, {"location": "binary-exploitation/what-is-the-got/#plt", "title": "PLT", "text": "

    Before a functions address has been resolved, the GOT points to an entry in the Procedure Linkage Table (PLT). This is a small \"stub\" function which is responsible for calling the dynamic linker with (effectively) the name of the function that should be resolved.

    "}, {"location": "binary-exploitation/what-is-the-heap/", "title": "The Heap", "text": "

    The heap is a place in memory which a program can use to dynamically create objects. Creating objects on the heap has some advantages compared to using the stack:

    There are also some disadvantages however:

    "}, {"location": "binary-exploitation/what-is-the-heap/#using-the-heap", "title": "Using the heap", "text": "

    In C, there are a number of functions used to interact with the heap, but we're going to focus on the two core ones:

    Let's see how these could be used in a program:

    #include <stdio.h>\n#include <stdlib.h>\n#include <unistd.h>\n\nint main() {\n    unsigned alloc_size = 0;\n    char *stuff;\n\n    printf(\"Number of bytes? \");\n    scanf(\"%u\", &alloc_size);\n\n    stuff = malloc(alloc_size + 1);\n    memset(0, stuff, alloc_size + 1);\n\n    read(0, stuff, alloc_size);\n\n    printf(\"You wrote: %s\", stuff);\n\n    free(stuff);\n\n    return 0;\n}\n

    This program reads in a size from the user, creates an allocation of that size on the heap, reads in that many bytes, then prints it back out to the user.

    "}, {"location": "binary-exploitation/what-is-the-stack/", "title": "The Stack", "text": "

    In computer architecture, the stack is a hardware manifestation of the stack data structure (a Last In, First Out queue).

    In x86, the stack is simply an area in RAM that was chosen to be the stack - there is no special hardware to store stack contents. The esp/rsp register holds the address in memory where the bottom of the stack resides. When something is pushed to the stack, esp decrements by 4 (or 8 on 64-bit x86), and the value that was pushed is stored at that location in memory. Likewise, when a pop instruction is executed, the value at esp is retrieved (i.e. esp is dereferenced), and esp is then incremented by 4 (or 8).

    N.B. The stack \"grows\" down to lower memory addresses!

    Conventionally, ebp/rbp contains the address of the top of the current stack frame, and so sometimes local variables are referenced as an offset relative to ebp rather than an offset to esp. A stack frame is essentially just the space used on the stack by a given function.

    "}, {"location": "binary-exploitation/what-is-the-stack/#uses", "title": "Uses", "text": "

    The stack is primarily used for a few things:

    "}, {"location": "binary-exploitation/what-is-the-stack/#example", "title": "Example", "text": "

    Let's see what the stack looks like right after say_hi has been called in this 32-bit x86 C program:

    #include <stdio.h>\n\nvoid say_hi(const char * name) {\n    printf(\"Hello %s!\\n\", name);\n}\n\nint main(int argc, char ** argv) {\n    char * name;\n    if (argc != 2) {\n        return 1;\n    }\n    name = argv[1];\n    say_hi(name);\n    return 0;\n}\n

    And the relevant assembly:

    0804840b <say_hi>:\n 804840b:   55                      push   ebp\n 804840c:   89 e5                   mov    ebp,esp\n 804840e:   83 ec 08                sub    esp,0x8\n 8048411:   83 ec 08                sub    esp,0x8\n 8048414:   ff 75 08                push   DWORD PTR [ebp+0x8]\n 8048417:   68 f0 84 04 08          push   0x80484f0\n 804841c:   e8 bf fe ff ff          call   80482e0 <printf@plt>\n 8048421:   83 c4 10                add    esp,0x10\n 8048424:   90                      nop\n 8048425:   c9                      leave\n 8048426:   c3                      ret\n\n08048427 <main>:\n 8048427:   8d 4c 24 04             lea    ecx,[esp+0x4]\n 804842b:   83 e4 f0                and    esp,0xfffffff0\n 804842e:   ff 71 fc                push   DWORD PTR [ecx-0x4]\n 8048431:   55                      push   ebp\n 8048432:   89 e5                   mov    ebp,esp\n 8048434:   51                      push   ecx\n 8048435:   83 ec 14                sub    esp,0x14\n 8048438:   89 c8                   mov    eax,ecx\n 804843a:   83 38 02                cmp    DWORD PTR [eax],0x2\n 804843d:   74 07                   je     8048446 <main+0x1f>\n 804843f:   b8 01 00 00 00          mov    eax,0x1\n 8048444:   eb 1c                   jmp    8048462 <main+0x3b>\n 8048446:   8b 40 04                mov    eax,DWORD PTR [eax+0x4]\n 8048449:   8b 40 04                mov    eax,DWORD PTR [eax+0x4]\n 804844c:   89 45 f4                mov    DWORD PTR [ebp-0xc],eax\n 804844f:   83 ec 0c                sub    esp,0xc\n 8048452:   ff 75 f4                push   DWORD PTR [ebp-0xc]\n 8048455:   e8 b1 ff ff ff          call   804840b <say_hi>\n 804845a:   83 c4 10                add    esp,0x10\n 804845d:   b8 00 00 00 00          mov    eax,0x0\n 8048462:   8b 4d fc                mov    ecx,DWORD PTR [ebp-0x4]\n 8048465:   c9                      leave\n 8048466:   8d 61 fc                lea    esp,[ecx-0x4]\n 8048469:   c3                      ret\n

    Skipping over the bulk of main, you'll see that at 0x8048452 main's name local is pushed to the stack because it's the first argument to say_hi. Then, a call instruction is executed. call instructions first push the current instruction pointer to the stack, then jump to their destination. So when the processor begins executing say_hi at 0x0804840b, the stack looks like this:

    EIP = 0x0804840b (push ebp)\nESP = 0xffff0000\nEBP = 0xffff002c\n\n        0xffff0004: 0xffffa0a0              // say_hi argument 1\nESP ->  0xffff0000: 0x0804845a              // Return address for say_hi\n

    The first thing say_hi does is save the current ebp so that when it returns, ebp is back where main expects it to be. The stack now looks like this:

    EIP = 0x0804840c (mov ebp, esp)\nESP = 0xfffefffc\nEBP = 0xffff002c\n\n        0xffff0004: 0xffffa0a0              // say_hi argument 1\n        0xffff0000: 0x0804845a              // Return address for say_hi\nESP ->  0xfffefffc: 0xffff002c              // Saved EBP\n

    Again, note how esp gets smaller when values are pushed to the stack.

    Next, the current esp is saved into ebp, marking the top of the new stack frame.

    EIP = 0x0804840e (sub esp, 0x8)\nESP = 0xfffefffc\nEBP = 0xfffefffc\n\n            0xffff0004: 0xffffa0a0              // say_hi argument 1\n            0xffff0000: 0x0804845a              // Return address for say_hi\nESP, EBP -> 0xfffefffc: 0xffff002c              // Saved EBP\n

    Then, the stack is \"grown\" to accommodate local variables inside say_hi.

    EIP = 0x08048414 (push [ebp + 0x8])\nESP = 0xfffeffec\nEBP = 0xfffefffc\n\n        0xffff0004: 0xffffa0a0              // say_hi argument 1\n        0xffff0000: 0x0804845a              // Return address for say_hi\nEBP ->  0xfffefffc: 0xffff002c              // Saved EBP\n        0xfffefff8: UNDEFINED\n        0xfffefff4: UNDEFINED\n        0xfffefff0: UNDEFINED\nESP ->  0xfffefffc: UNDEFINED\n

    NOTE: stack space is not implictly cleared!

    Now, the 2 arguments to printf are pushed in reverse order.

    EIP = 0x0804841c (call printf@plt)\nESP = 0xfffeffe4\nEBP = 0xfffefffc\n\n        0xffff0004: 0xffffa0a0              // say_hi argument 1\n        0xffff0000: 0x0804845a              // Return address for say_hi\nEBP ->  0xfffefffc: 0xffff002c              // Saved EBP\n        0xfffefff8: UNDEFINED\n        0xfffefff4: UNDEFINED\n        0xfffefff0: UNDEFINED\n        0xfffeffec: UNDEFINED\n        0xfffeffe8: 0xffffa0a0              // printf argument 2\nESP ->  0xfffeffe4: 0x080484f0              // printf argument 1\n

    Finally, printf is called, which pushes the address of the next instruction to execute.

    EIP = 0x080482e0\nESP = 0xfffeffe4\nEBP = 0xfffefffc\n\n        0xffff0004: 0xffffa0a0              // say_hi argument 1\n        0xffff0000: 0x0804845a              // Return address for say_hi\nEBP ->  0xfffefffc: 0xffff002c              // Saved EBP\n        0xfffefff8: UNDEFINED\n        0xfffefff4: UNDEFINED\n        0xfffefff0: UNDEFINED\n        0xfffeffec: UNDEFINED\n        0xfffeffe8: 0xffffa0a0              // printf argument 2\n        0xfffeffe4: 0x080484f0              // printf argument 1\nESP ->  0xfffeffe0: 0x08048421              // Return address for printf\n

    Once printf has returned, the leave instruction moves ebp into esp, and pops the saved EBP.

    EIP = 0x08048426 (ret)\nESP = 0xfffefffc\nEBP = 0xffff002c\n\n        0xffff0004: 0xffffa0a0              // say_hi argument 1\nESP ->  0xffff0000: 0x0804845a              // Return address for say_hi\n

    And finally, ret pops the saved instruction pointer into eip which causes the program to return to main with the same esp, ebp, and stack contents as when say_hi was initially called.

    EIP = 0x0804845a (add esp, 0x10)\nESP = 0xffff0000\nEBP = 0xffff002c\n\nESP ->  0xffff0004: 0xffffa0a0              // say_hi argument 1\n
    "}, {"location": "cryptography/overview/", "title": "Overview", "text": ""}, {"location": "cryptography/overview/#cryptography", "title": "Cryptography", "text": "

    Cryptography is the reason we can use banking apps, transmit sensitive information over the web, and in general protect our privacy. However, a large part of CTFs is breaking widely used encryption schemes which are improperly implemented. The math may seem daunting, but more often than not, a simple understanding of the underlying principles will allow you to find flaws and crack the code.

    The word \u201ccryptography\u201d technically means the art of writing codes. When it comes to digital forensics, it\u2019s a method you can use to understand how data is constructed for your analysis.

    "}, {"location": "cryptography/overview/#what-is-cryptography-used-for", "title": "What is cryptography used for?", "text": "

    Uses in every day software

    Malicious uses

    "}, {"location": "cryptography/overview/#topics", "title": "Topics", "text": ""}, {"location": "cryptography/what-are-block-ciphers/", "title": "Block Ciphers", "text": "

    A Block Cipher is an algorithm which is used in conjunction with a cryptosystem in order to package a message into evenly distributed 'blocks' which are encrypted one at a time.

    "}, {"location": "cryptography/what-are-block-ciphers/#definitions", "title": "Definitions", "text": ""}, {"location": "cryptography/what-are-block-ciphers/#common-block-ciphers", "title": "Common Block Ciphers", "text": "Mode Formulas Ciphertext ECB Y~i~ = F(PlainText~i~, Key) Y~i~ CBC Y~i~ = PlainText~i~ XOR Ciphertext~i-1~ F(Y, key); Ciphertext~0~ = IV PCBC Y~i~ = PlainText~i~ XOR (Ciphertext~i-1~ XOR PlainText~i-1~) F(Y, key); Ciphertext~0~ = IV CFB Y~i~ = Ciphertext~i-1~ Plaintext XOR F(Y, key); Ciphertext~0~ = IV OFB Y~i~ = F(Key, I~i-1~);Y~0~=IV Plaintext XOR Y~i~ CTR Y~i~ = F(Key, IV + g(i));IV = token(); Plaintext XOR Y~i~

    Note

    In this case ~i~ represents an index over the # of blocks in the plaintext. F() and g() represent the function used to convert plaintext into ciphertext.

    "}, {"location": "cryptography/what-are-block-ciphers/#electronic-codebook-ecb", "title": "Electronic Codebook (ECB)", "text": "

    ECB is the most basic block cipher, it simply chunks up plaintext into blocks and independently encrypts those blocks and chains them all into a ciphertext.

    "}, {"location": "cryptography/what-are-block-ciphers/#flaws", "title": "Flaws", "text": "

    Because ECB independently encrypts the blocks, patterns in data can still be seen clearly, as shown in the CBC Penguin image below.

    Original Image ECB Image Other Block Cipher Modes"}, {"location": "cryptography/what-are-block-ciphers/#cipher-block-chaining-cbc", "title": "Cipher Block Chaining (CBC)", "text": "

    CBC is an improvement upon ECB where an Initialization Vector is used in order to add randomness. The encrypted previous block is used as the IV for each sequential block meaning that the encryption process cannot be parallelized. CBC has been declining in popularity due to a variety of

    Note

    Even though the encryption process cannot be parallelized, the decryption process can be parallelized. If the wrong IV is used for decryption it will only affect the first block as the decryption of all other blocks depends on the ciphertext not the plaintext.

    "}, {"location": "cryptography/what-are-block-ciphers/#propogating-cipher-block-chaining-pcbc", "title": "Propogating Cipher Block Chaining (PCBC)", "text": "

    PCBC is a less used cipher which modifies CBC so that decryption is also not parallelizable. It also cannot be decrypted from any point as changes made during the decryption and encryption process \"propogate\" throughout the blocks, meaning that both the plaintext and ciphertext are used when encrypting or decrypting as seen in the images below.

    "}, {"location": "cryptography/what-are-block-ciphers/#counter-ctr", "title": "Counter (CTR)", "text": "

    Note

    Counter is also known as CM, integer counter mode (ICM), and segmented integer counter (SIC)

    CTR mode makes the block cipher similar to a stream cipher and it functions by adding a counter with each block in combination with a nonce and key to XOR the plaintext to produce the ciphertext. Similarly, the decryption process is the exact same except instead of XORing the plaintext, the ciphertext is XORed. This means that the process is parallelizable for both encryption and decryption and you can begin from anywhere as the counter for any block can be deduced easily.

    "}, {"location": "cryptography/what-are-block-ciphers/#security-considerations", "title": "Security Considerations", "text": "

    If the nonce chosen is non-random, it is important to concatonate the nonce with the counter (high 64 bits to the nonce, low 64 bits to the counter) as adding or XORing the nonce with the counter would break security as an attacker can cause a collisions with the nonce and counter. An attacker with access to providing a plaintext, nonce and counter can then decrypt a block by using the ciphertext as seen in the decryption image.

    "}, {"location": "cryptography/what-are-block-ciphers/#padding-oracle-attack", "title": "Padding Oracle Attack", "text": "

    A Padding Oracle Attack sounds complex, but essentially means abusing a block cipher by changing the length of input and being able to determine the plaintext.

    "}, {"location": "cryptography/what-are-block-ciphers/#requirements", "title": "Requirements", "text": ""}, {"location": "cryptography/what-are-block-ciphers/#execution", "title": "Execution", "text": "
    1. If we have two blocks of ciphertext, C~1~ and C~2~, we can get the plaintext P~2~
    2. Since we know that CBC decryptionis dependent on the prior ciphertext, if we change the last byte of C~1~ we can see if C~2~ has correct padding
    3. If it is correctly padded we know that the last byte of the plaintext
    4. If not, we can increase our byte by one and repeat until we have a successful padding
    5. We then repeat this for all successive bytes following C~1~ and if the block is 16 bytes we can expect a maximum of 4080 attempts which is trivial
    "}, {"location": "cryptography/what-are-hashing-functions/", "title": "Hashing Functions", "text": "

    Hashing functions are one way functions which theoretically provide a unique output for every input. MD5, SHA-1, and other hashes which were considered secure are now found to have collisions or two different pieces of data which produce the same supposed unique output.

    "}, {"location": "cryptography/what-are-hashing-functions/#string-hashing", "title": "String Hashing", "text": "

    A string hash is a number or string generated using an algorithm that runs on text or data.

    The idea is that each hash should be unique to the text or data (although sometimes it isn\u2019t). For example, the hash for \u201cdog\u201d should be different from other hashes.

    You can use command line tools tools or online resources such as this one. Example: $ echo -n password | md5 5f4dcc3b5aa765d61d8327deb882cf99 Here, \u201cpassword\u201d is hashed with different hashing algorithms:

    Generally, when verifying a hash visually, you can simply look at the first and last four characters of the string.

    "}, {"location": "cryptography/what-are-hashing-functions/#file-hashing", "title": "File Hashing", "text": "

    A file hash is a number or string generated using an algorithm that is run on text or data. The premise is that it should be unique to the text or data. If the file or text changes in any way, the hash will change.

    What is it used for? - File and data identification - Password/certificate storage comparison

    How can we determine the hash of a file? You can use the md5sum command (or similar).

    $ md5sum samplefile.txt\n3b85ec9ab2984b91070128be6aae25eb samplefile.txt\n
    "}, {"location": "cryptography/what-are-hashing-functions/#hash-collisions", "title": "Hash Collisions", "text": "

    A collision is when two pieces of data or text have the same cryptographic hash. This is very rare.

    What\u2019s significant about collisions is that they can be used to crack password hashes. Passwords are usually stored as hashes on a computer, since it\u2019s hard to get the passwords from hashes.

    If you bruteforce by trying every possible piece of text or data, eventually you\u2019ll find something with the same hash. Enter it, and the computer accepts it as if you entered the actual password.

    Two different files on the same hard drive with the same cryptographic hash can be very interesting.

    \u201cIt\u2019s now well-known that the cryptographic hash function MD5 has been broken,\u201d said Peter Selinger of Dalhousie University. \u201cIn March 2005, Xiaoyun Wang and Hongbo Yu of Shandong University in China published an article in which they described an algorithm that can find two different sequences of 128 bytes with the same MD5 hash.\u201d

    For example, he cited this famous pair:

    and

    Each of these blocks has MD5 hash 79054025255fb1a26e4bc422aef54eb4.

    Selinger said that \u201cthe algorithm of Wang and Yu can be used to create files of arbitrary length that have identical MD5 hashes, and that differ only in 128 bytes somewhere in the middle of the file. Several people have used this technique to create pairs of interesting files with identical MD5 hashes.\u201d

    Ben Laurie has a nice website that visualizes this MD5 collision. For a non-technical, though slightly outdated, introduction to hash functions, see Steve Friedl\u2019s Illustrated Guide. And here\u2019s a good article from DFI News that explores the same topic.

    "}, {"location": "cryptography/what-are-stream-ciphers/", "title": "Stream Ciphers", "text": "

    A Stream Cipher is used for symmetric key cryptography, or when the same key is used to encrypt and decrypt data. Stream Ciphers encrypt pseudorandom sequences with bits of plaintext in order to generate ciphertext, usually with XOR. A good way to think about Stream Ciphers is to think of them as generating one-time pads from a given state.

    "}, {"location": "cryptography/what-are-stream-ciphers/#definitions", "title": "Definitions", "text": ""}, {"location": "cryptography/what-are-stream-ciphers/#one-time-pads", "title": "One Time Pads", "text": "

    A one time pad is an encryption mechanism whereby the entire plaintext is XOR'd with a random sequence of numbers in order to generate a random ciphertext. The advantage of the one time pad is that it offers an immense amount of security BUT in order for it to be useful, the randomly generated key must be distributed on a separate secure channel, meaning that one time pads have little use in modern day cryptographic applications on the internet. Stream ciphers extend upon this idea by using a key, usually 128 bit in length, in order to seed a pseudorandom keystream which is used to encrypt the text.

    "}, {"location": "cryptography/what-are-stream-ciphers/#types-of-stream-ciphers", "title": "Types of Stream Ciphers", "text": ""}, {"location": "cryptography/what-are-stream-ciphers/#synchronous-stream-ciphers", "title": "Synchronous Stream Ciphers", "text": "

    A Synchronous Stream Cipher generates a keystream based on internal states not related to the plaintext or ciphertext. This means that the stream is generated pseudorandomly outside of the context of what is being encrypted. A binary additive stream cipher is the term used for a stream cipher which XOR's the bits with the bits of the plaintext. Encryption and decryption require that the synchronus state cipher be in the same state, otherwise the message cannot be decrypted.

    "}, {"location": "cryptography/what-are-stream-ciphers/#self-synchronizing-stream-ciphers", "title": "Self-synchronizing Stream Ciphers", "text": "

    A Self-synchronizing Stream Cipher, also known as an asynchronous stream cipher or ciphertext autokey (CTAK), is a stream cipher which uses the previous N digits in order to compute the keystream used for the next N characters.

    Note

    Seems a lot like block ciphers doesn't it? That's because block cipher feedback mode (CFB) is an example of a self-synchronizing stream ciphers.

    "}, {"location": "cryptography/what-are-stream-ciphers/#stream-cipher-vulnerabilities", "title": "Stream Cipher Vulnerabilities", "text": ""}, {"location": "cryptography/what-are-stream-ciphers/#key-reuse", "title": "Key Reuse", "text": "

    The key tenet of using stream ciphers securely is to NEVER repeat key use because of the communative property of XOR. If C~1~ and C~2~ have been XOR'd with a key K, retrieving that key K is trivial because C~1~ XOR C~2~ = P~1~ XOR P~2~ and having an english language based XOR means that cryptoanalysis tools such as a character frequency analysis will work well due to the low entropy of the english language.

    "}, {"location": "cryptography/what-are-stream-ciphers/#bit-flipping-attack", "title": "Bit-flipping Attack", "text": "

    Another key tenet of using stream ciphers securely is considering that just because a message has been decrypted, it does not mean the message has not been tampered with. Because decryption is based on state, if an attacker knows the layout of the plaintext, a Man in the Middle (MITM) attack can flip a bit during transit altering the underlying ciphertext. If a ciphertext decrypts to 'Transfer $1000', then a middleman can flip a single bit in order for the ciphertext to decrypt to 'Transfer $9000' because changing a single character in the ciphertext does not affect the state in a synchronus stream cipher.

    "}, {"location": "cryptography/what-is-a-substitution-cipher/", "title": "Substitution Cipher", "text": "

    A Substitution Cipher is system of encryption where different symobls substitute a normal alphabet.

    "}, {"location": "cryptography/what-is-a-vigenere-cipher/", "title": "Vigenere Cipher", "text": "

    A Vigenere Cipher is an extended Caesar Cipher where a message is encrypted using various Caesar shifted alphabets.

    The following table can be used to encode a message:

    "}, {"location": "cryptography/what-is-a-vigenere-cipher/#encryption", "title": "Encryption", "text": "

    For example, encrypting the text SUPERSECRET with CODE would follow this process:

    1. CODE gets padded to the length of SUPERSECRET so the key becomes CODECODECOD
    2. For each letter in SUPERSECRET we use the table to get the Alphabet to use, in this instance row C and column S
    3. The ciphertext's first letter then becomes U
    4. We eventually get UISITGHGTSW
    "}, {"location": "cryptography/what-is-a-vigenere-cipher/#decryption", "title": "Decryption", "text": "
    1. Go to the row of the key, in this case C
    2. Find the letter of the cipher text in this row, in this case U
    3. The column is the first letter of the decrypted ciphertext, so we get S
    4. After repeating this process we get back to SUPERSECRET
    "}, {"location": "cryptography/what-is-caesar-cipher-rot-13/", "title": "Caesar Cipher/ROT 13", "text": "

    The Caesar Cipher or Caesar Shift is a cipher which uses the alphabet in order to encode texts.

    CAESAR encoded with a shift of 8 is KIMAIZ so ABCDEFGHIJKLMNOPQRSTUVWXYZ becomes IJKLMNOPQRSTUVWXYZABCDEFGH

    ROT13 is the same thing but a fixed shift of 13, this is a trivial cipher to bruteforce because there are only 25 shifts.

    "}, {"location": "cryptography/what-is-rsa/", "title": "RSA", "text": "

    RSA, which is an abbreviation of the author's names (Rivest\u2013Shamir\u2013Adleman), is a cryptosystem which allows for asymmetric encryption. Asymmetric cryptosystems are alos commonly referred to as Public Key Cryptography where a public key is used to encrypt data and only a secret, private key can be used to decrypt the data.

    "}, {"location": "cryptography/what-is-rsa/#definitions", "title": "Definitions", "text": ""}, {"location": "cryptography/what-is-rsa/#what-makes-rsa-viable", "title": "What makes RSA viable?", "text": "

    If public n, public e, private d are all very large numbers and a message m holds true for 0 < m < n, then we can say:

    (m^e^)^d^ \u2261 m (mod n)

    Note

    The triple equals sign in this case refers to modular congruence which in this case means that there exists an integer k such that (m^e^)^d^ = kn + m

    RSA is viable because it is incredibly hard to find d even with m, n, and e because factoring large numbers is an arduous process.

    "}, {"location": "cryptography/what-is-rsa/#implementation", "title": "Implementation", "text": "

    RSA follows 4 steps to be implemented: 1. Key Generation 2. Encryption 3. Decryption

    "}, {"location": "cryptography/what-is-rsa/#key-generation", "title": "Key Generation", "text": "

    We are going to follow along Wikipedia's small numbers example in order to make this idea a bit easier to understand.

    Note

    In This example we are using Carmichael's totient function where \u03bb(n) = lcm(\u03bb(p), \u03bb(q)), but Euler's totient function is perfectly valid to use with RSA. Euler's totient is \u03c6(n) = (p \u2212 1)(q \u2212 1)

    1. Choose two prime numbers such as:
    2. Find n:
    3. Calculate \u03bb(n) = lcm(p-1, q-1)

    4. Choose a public exponent such that 1 < e < \u03bb(n) and is coprime (not a factor of) \u03bb(n). The standard is most cases is 65537, but we will be using:

    5. Calculate d as the modular multiplicative inverse or in english find d such that: d x e mod \u03bb(n) = 1

    Now we have a public key of (3233, 17) and a private key of (3233, 413)

    "}, {"location": "cryptography/what-is-rsa/#encryption", "title": "Encryption", "text": "

    With the public key, m can be encrypted trivially

    The ciphertext is equal to m^e^ mod n or:

    c = m^17^ mod 3233

    "}, {"location": "cryptography/what-is-rsa/#decryption", "title": "Decryption", "text": "

    With the private key, m can be decrypted trivially as well

    The plaintext is equal to c^d^ mod n or:

    m = c^413^ mod 3233

    "}, {"location": "cryptography/what-is-rsa/#exploitation", "title": "Exploitation", "text": "

    From the RsaCtfTool README

    Attacks:

    "}, {"location": "cryptography/what-is-xor/", "title": "XOR", "text": ""}, {"location": "cryptography/what-is-xor/#data-representation", "title": "Data Representation", "text": "

    Data can be represented in different bases, an 'A' needs to be a numerical representation of Base 2 or binary so computers can understand them

    "}, {"location": "cryptography/what-is-xor/#xor-basics", "title": "XOR Basics", "text": "

    An XOR or eXclusive OR is a bitwise operation indicated by ^ and shown by the following truth table:

    A B A ^ B 0 0 0 0 1 1 1 0 1 1 1 0

    So what XOR'ing bytes in the action 0xA0 ^ 0x2C translates to is:

    1 0 1 0 0 0 0 0 0 0 1 0 1 1 0 0 1 0 0 0 1 1 0 0

    0b10001100 is equivelent to 0x8C, a cool property of XOR is that it is reversable meaning 0x8C ^ 0x2C = 0xA0 and 0x8C ^ 0xA0 = 0x2C

    "}, {"location": "cryptography/what-is-xor/#what-does-this-have-to-do-with-ctf", "title": "What does this have to do with CTF?", "text": "

    XOR is a cheap way to encrypt data with a password. Any data can be encrypted using XOR as shown in this Python example:

    >>> data = 'CAPTURETHEFLAG'\n>>> key = 'A'\n>>> encrypted = ''.join([chr(ord(x) ^ ord(key)) for x in data])\n>>> encrypted\n'\\x02\\x00\\x11\\x15\\x14\\x13\\x04\\x15\\t\\x04\\x07\\r\\x00\\x06'\n>>> decrypted = ''.join([chr(ord(x) ^ ord(key)) for x in encrypted])\n>>> decrypted\n'CAPTURETHEFLAG'\n

    This can be extended using a multibyte key by iterating in parallel with the data.

    "}, {"location": "cryptography/what-is-xor/#exploiting-xor-encryption", "title": "Exploiting XOR Encryption", "text": ""}, {"location": "cryptography/what-is-xor/#single-byte-xor-encryption", "title": "Single Byte XOR Encryption", "text": "

    Single Byte XOR Encryption is trivial to bruteforce as there are only 255 key combinations to try.

    "}, {"location": "cryptography/what-is-xor/#multibyte-xor-encryption", "title": "Multibyte XOR Encryption", "text": "

    Multibyte XOR gets exponentially harder the longer the key, but if the encrypted text is long enough, character frequency analysis is a viable method to find the key. Character Frequency Analysis means that we split the cipher text into groups based on the number of characters in the key. These groups then are bruteforced using the idea that some letters appear more frequently in the english alphabet than others.

    "}, {"location": "forensics/overview/", "title": "Forensics", "text": "

    Forensics is the art of recovering the digital trail left on a computer. There are plenty of methods to find data which is seemingly deleted, not stored, or worse, covertly recorded.

    An important part of forensics is having the right tools, as well as being familiar with the following topics:

    "}, {"location": "forensics/what-are-file-formats/", "title": "File Formats", "text": "

    File Extensions are not the sole way to identify the type of a file, files have certain leading bytes called file signatures which allow programs to parse the data in a consistent manner. Files can also contain additional \"hidden\" data called metadata which can be useful in finding out information about the context of a file's data.

    "}, {"location": "forensics/what-are-file-formats/#file-signatures", "title": "File Signatures", "text": "

    File signatures (also known as File Magic Numbers) are bytes within a file used to identify the format of the file. Generally they\u2019re 2-4 bytes long, found at the beginning of a file.

    "}, {"location": "forensics/what-are-file-formats/#what-is-it-used-for", "title": "What is it used for?", "text": "

    Files can sometimes come without an extension, or with incorrect ones. We use file signature analysis to identify the format (file type) of the file. Programs need to know the file type in order to open it properly.

    "}, {"location": "forensics/what-are-file-formats/#how-do-you-find-the-file-signature", "title": "How do you find the file signature?", "text": "

    You need to be able to look at the binary data that constitutes the file you\u2019re examining. To do this, you\u2019ll use a hexadecimal editor. Once you find the file signature, you can check it against file signature repositories such as Gary Kessler\u2019s.

    "}, {"location": "forensics/what-are-file-formats/#example", "title": "Example", "text": "

    The file above, when opened in a Hex Editor, begins with the bytes FFD8FFE0 00104A46 494600 or in ASCII \u02c7\u00ff\u02c7\u2021 JFIF where \\x00 and \\x10 lack symbols.

    Searching in Gary Kessler\u2019s database shows that this file signature belongs to a JPEG/JFIF graphics file, exactly what we suspect.

    "}, {"location": "forensics/what-is-a-hex-editor/", "title": "Hex Editor", "text": "

    A hexadecimal (hex) editor (also called a binary file editor or byte editor) is a computer program you can use to manipulate the fundamental binary data that constitutes a computer file. The name \u201chex\u201d comes from \u201chexadecimal,\u201d a standard numerical format for representing binary data. A typical computer file occupies multiple areas on the platter(s) of a disk drive, whose contents are combined to form the file. Hex editors that are designed to parse and edit sector data from the physical segments of floppy or hard disks are sometimes called sector editors or disk editors. A hex editor is used to see or edit the raw, exact contents of a file. Hex editors may used to correct data corrupted by a system or application. A list of editors can be found on the forensics Wiki. You can download one and install it on your system.

    "}, {"location": "forensics/what-is-a-hex-editor/#example", "title": "Example", "text": "

    Open fileA.jpg in a hex editor. (Most Hex editors have either a \u201cFile > Open\u201d option or a simple drag and drop.)

    When you open fileA.jpg in your hex editor, you should see something similar to this:

    Your hex editor should also have a \u201cgo to\u201d or \u201cfind\u201d feature so you can jump to a specific byte.

    "}, {"location": "forensics/what-is-disk-imaging/", "title": "Disk Imaging", "text": "

    A forensic image is an electronic copy of a drive (e.g. a hard drive, USB, etc.). It\u2019s a bit-by-\u00adbit or bitstream file that\u2019s an exact, unaltered copy of the media being duplicated.

    Wikipedia said that the most straight\u00adforward disk imaging method is to read a disk from start to finish and write the data to a forensics image format. \u201cThis can be a time-consuming process, especially for disks with a large capacity,\u201d Wikipedia said.

    To prevent write access to the disk, you can use a write blocker. It\u2019s also common to calculate a cryptographic hash of the entire disk when imaging it. \u201cCommonly-used cryptographic hashes are MD5, SHA1 and/or SHA256,\u201d said Wikipedia. \u201cBy recalculating the integrity hash at a later time, one can determine if the data in the disk image has been changed. This by itself provides no protection against intentional tampering, but it can indicate that the data was altered, e.g. due to corruption.\u201d

    Why image a disk? Forensic imaging: - Prevents tampering with the original data\u00ad evidence - Allows you to play around with the copy, without worrying about messing up the original

    "}, {"location": "forensics/what-is-disk-imaging/#forensic-image-extraction-exmple", "title": "Forensic Image Extraction Exmple", "text": "

    This example uses the tool AccessData FTK Imager.

    Step 1: Go to File > Create Disk Image

    Step 2: Select Physical Drive, because the USB or hard drive you\u2019re imaging is a physical device or drive.

    Step 3: Select the drive you\u2019re imaging. The 1000 GB is my computer hard drive; the 128 MB is the USB that I want to image.

    Step 4: Add a new image destination

    Step 5: Select whichever image type you want. Choose Raw (dd) if you\u2019re a beginner, since it\u2019s the most common type

    Step 6: Fill in all the evidence information

    Step 7: Choose where you want to store it

    Step 8: The image destination has been added. Now you can start the image extraction

    Step 9: Wait for the image to be extracted

    Step 10: This is the completed extraction

    Step 11: Add the image you just created so that you can view it

    Step 12: This time, choose image file, since that\u2019s what you just created

    Step 13: Enter the path of the image you just created

    Step 14: View the image.

    1. Evidence tree Structure of the drive image
    2. File list List of all the files in the drive image folder
    3. Properties Properties of the file/folder being examined
    4. Hex viewer View of the drive/folders/files in hexadecimal

    Step 15: To view files in the USB, go to Partition 1 > [USB name] > [root] in the Evidence Tree and look in the File List

    Step 16: Selecting fileA, fileB, fileC, or fileD gives us some properties of the files & a preview of each photo

    Step 17: Extract files of interest for further analysis by selecting, right-clicking and choosing Export Files

    "}, {"location": "forensics/what-is-memory-forensics/", "title": "Memory Forensics", "text": "

    There are plenty of traces of someone's activity on a computer, but perhaps some of the most valuble information can be found within memory dumps, that is images taken of RAM. These dumps of data are often very large, but can be analyzed using a tool called Volatility

    "}, {"location": "forensics/what-is-memory-forensics/#volatility-basics", "title": "Volatility Basics", "text": "

    Memory forensics isn't all that complicated, the hardest part would be using your toolset correctly. A good workflow is as follows:

    1. Run strings for clues
    2. Identify the image profile (which OS, version, etc.)
    3. Dump processes and look for suspicious processes
    4. Dump data related interesting processes
    5. View data in a format relating to the process (Word: docx, Notepad: txt, Photoshop: psd, etc.)
    "}, {"location": "forensics/what-is-memory-forensics/#profile-identification", "title": "Profile Identification", "text": "

    In order to properly use Volatility you must supply a profile with --profile=PROFILE, therefore before any sleuthing, you need to determine the profile using imageinfo:

    $ python vol.py -f ~/image.raw imageinfo\nVolatility Foundation Volatility Framework 2.4\nDetermining profile based on KDBG search...\n\n          Suggested Profile(s) : Win7SP0x64, Win7SP1x64, Win2008R2SP0x64, Win2008R2SP1x64\n                     AS Layer1 : AMD64PagedMemory (Kernel AS)\n                     AS Layer2 : FileAddressSpace (/Users/Michael/Desktop/win7_trial_64bit.raw)\n                      PAE type : PAE\n                           DTB : 0x187000L\n                          KDBG : 0xf80002803070\n          Number of Processors : 1\n     Image Type (Service Pack) : 0\n                KPCR for CPU 0 : 0xfffff80002804d00L\n             KUSER_SHARED_DATA : 0xfffff78000000000L\n           Image date and time : 2012-02-22 11:29:02 UTC+0000\n     Image local date and time : 2012-02-22 03:29:02 -0800\n
    "}, {"location": "forensics/what-is-memory-forensics/#dump-processes", "title": "Dump Processes", "text": "

    In order to view processes, the pslist or pstree or psscan command can be used.

    $ python vol.py -f ~/image.raw pslist --profile=Win7SP0x64 pstree\nVolatility Foundation Volatility Framework 2.5\nOffset(V)          Name                    PID   PPID   Thds     Hnds   Sess  Wow64 Start                          Exit\n------------------ -------------------- ------ ------ ------ -------- ------ ------ ------------------------------ ------------------------------\n0xffffa0ee12532180 System                    4      0    108        0 ------      0 2018-04-22 20:02:33 UTC+0000\n0xffffa0ee1389d040 smss.exe                232      4      3        0 ------      0 2018-04-22 20:02:33 UTC+0000\n...\n0xffffa0ee128c6780 VBoxTray.exe           3324   1123     10        0      1      0 2018-04-22 20:02:55 UTC+0000\n0xffffa0ee14108780 OneDrive.exe           1422   1123     10        0      1      1 2018-04-22 20:02:55 UTC+0000\n0xffffa0ee14ade080 svchost.exe             228    121      1        0      1      0 2018-04-22 20:14:43 UTC+0000\n0xffffa0ee1122b080 notepad.exe            2019   1123      1        0      1      0 2018-04-22 20:14:49 UTC+0000\n
    "}, {"location": "forensics/what-is-memory-forensics/#process-memory-dump", "title": "Process Memory Dump", "text": "

    Dumping the memory of a process can prove to be fruitful, say we want to dump the data from notepad.exe:

    $ python vol.py -f ~/image.raw --profile=Win7SP0x64 memdump -p 2019 -D dump/\nVolatility Foundation Volatility Framework 2.4\n************************************************************************\nWriting System [     2019] to 2019.dmp\n\n$ ls -alh dump/2019.dmp\n-rw-r--r--  1 user  staff   111M Apr 22 20:47 dump/2019.dmp\n
    "}, {"location": "forensics/what-is-memory-forensics/#other-useful-commands", "title": "Other Useful Commands", "text": "

    There are plenty of commands that Volatility offers but some highlights include:

    "}, {"location": "forensics/what-is-metadata/", "title": "Metadata", "text": "

    Metadata is data about data. Different types of files have different metadata. The metadata on a photo could include dates, camera information, GPS location, comments, etc. For music, it could include the title, author, track number and album.

    "}, {"location": "forensics/what-is-metadata/#what-kind-of-file-metadata-is-useful", "title": "What kind of file metadata is useful?", "text": "

    Potentially, any file metadata you can find could be useful.

    "}, {"location": "forensics/what-is-metadata/#how-do-i-find-it", "title": "How do I find it?", "text": "

    Note

    EXIF Data is metadata attached to photos which can include location, time, and device information.

    One of our favorite tools is exiftool, which displays metadata for an input file, including: - File size - Dimensions (width and height) - File type - Programs used to create (e.g. Photoshop) - OS used to create (e.g. Apple)

    Run command line: exiftool(-k).exe [filename] and you should see something like this:

    "}, {"location": "forensics/what-is-metadata/#example", "title": "Example", "text": "

    Let's take a look at File A's metadata with exiftool:

    File type

    Image description

    Make and camera info

    GPS Latitude/Longitude

    "}, {"location": "forensics/what-is-metadata/#timestamps", "title": "Timestamps", "text": "

    Timestamps are data that indicate the time of certain events (MAC): - Modification \u2013 when a file was modified - Access \u2013 when a file or entries were read or accessed - Creation \u2013 when files or entries were created

    "}, {"location": "forensics/what-is-metadata/#types-of-timestamps", "title": "Types of timestamps", "text": ""}, {"location": "forensics/what-is-metadata/#why-do-we-care", "title": "Why do we care?", "text": "

    Certain events such as creating, moving, copying, opening, editing, etc. might affect the MAC times. If the MAC timestamps can be attained, a timeline of events could be created.

    "}, {"location": "forensics/what-is-metadata/#timeline-patterns", "title": "Timeline Patterns", "text": "

    There are plenty more patterns than the ones introduced below, but these are the basics you should start with to get a good understanding of how it works, and to complete this challenge.

    "}, {"location": "forensics/what-is-metadata/#examples", "title": "Examples", "text": "

    We know that the BMP files fileA and fileD are the same, but that the JPEG files fileB and fileC are different somehow. So how can we find out what went on with these files?

    By using time stamp information from the file system, we can learn that the BMP fileD was the original file, with fileA being a copy of the original. Afterward, fileB was created by modifying fileB, and fileC was created by modifying fileA in a different way.

    Follow along as we demonstrate.

    We\u2019ll start by analyzing images in AccessData FTK Imager, where there\u2019s a Properties window that shows you some information about the file or folder you\u2019ve selected.

    Here are the extracted MAC times for fileA, fileB, fileC and fileD: Note, AccessData FTK Imager assumes that the file times on the drive are in UTC (Universal Coordinated Time). I subtracted four hours, since the USB was set up in Eastern Standard Time. This isn\u2019t necessary, but it helps me understand the times a bit better.

    Highlight timestamps that are the same, if timestamps are off by a few seconds, they should be counted as the same. This lets you see a clear difference between different timestamps. Then, highlight oldest to newest to help put them in order.

    Identify timestamp patterns.

    "}, {"location": "forensics/what-is-stegonagraphy/", "title": "Steganography", "text": "

    Steganography is the practice of hiding data in plain sight. Steganography is often embedded in images or audio.

    You could send a picture of a cat to a friend and hide text inside. Looking at the image, there\u2019s nothing to make anyone think there\u2019s a message hidden inside it.

    You could also hide a second image inside the first.

    "}, {"location": "forensics/what-is-stegonagraphy/#steganography-detection", "title": "Steganography Detection", "text": "

    So we can hide text and an image, how do we find out if there is hidden data?

    FileA and FileD appear the same, but they\u2019re different. Also, FileD was modified after it was copied, so it\u2019s possible there might be steganography in it.

    FileB and FileC don\u2019t appear to have been modified after being created. That doesn\u2019t rule out the possibility that there\u2019s steganography in them, but you\u2019re more likely to find it in fileD. This brings up two questions:

    1. Can we determine that there is steganography in fileD?
    2. If there is, what was hidden in it?
    "}, {"location": "forensics/what-is-stegonagraphy/#lsb-steganography", "title": "LSB Steganography", "text": "

    File are made of bytes. Each byte is composed of eight bits.

    Changing the least-significant bit (LSB) doesn\u2019t change the value very much.

    So we can modify the LSB without changing the file noticeably. By doing so, we can hide a message inside.

    "}, {"location": "forensics/what-is-stegonagraphy/#lsb-steganography-in-images", "title": "LSB Steganography in Images", "text": "

    LSB Steganography or Least Significant Bit Steganography is a method of Steganography where data is recorded in the lowest bit of a byte.

    Say an image has a pixel with an RGB value of (255, 255, 255), the bits of those RGB values will look like

    1 1 1 1 1 1 1 1

    By modifying the lowest, or least significant, bit, we can use the 1 bit space across every RGB value for every pixel to construct a message.

    1 1 1 1 1 1 1 0

    The reason steganography is hard to detect by sight is because a 1 bit difference in color is insignificant as seen below.

    "}, {"location": "forensics/what-is-stegonagraphy/#example", "title": "Example", "text": "

    Let\u2019s say we have an image, and part of it contains the following binary:

    And let\u2019s say we want to hide the character y inside.

    First, we need to convert the hidden message to binary.

    Now we take each bit from the hidden message and replace the LSB of the corresponding byte with it.

    And again:

    And again:

    And again:

    And again:

    And again:

    And again:

    And once more:

    Decoding LSB steganography is exactly the same as encoding, but in reverse. For each byte, grab the LSB and add it to your decoded message. Once you\u2019ve gone through each byte, convert all the LSBs you grabbed into text or a file. (You can use your file signature knowledge here!)

    "}, {"location": "forensics/what-is-stegonagraphy/#what-other-types-of-steganography-are-there", "title": "What other types of steganography are there?", "text": "

    Steganography is hard for the defense side, because there\u2019s practically an infinite number of ways it could be carried out. Here are a few examples: - LSB steganography: different bits, different bit combinations - Encode in every certain number of bytes - Use a password - Hide in different places - Use encryption on top of steganography

    "}, {"location": "forensics/what-is-wireshark/", "title": "Wireshark", "text": "

    Note from our infrastructure team

    \"Wireshark saved me hours on my last tax return! - David\"

    \"[Wireshark] is great for ruining your weekend and fixing pesky networking problems!\" - Max\"

    \"Wireshark is the powerhouse of the cell. - Joe\"

    \"Does this cable do anything? - Ayyaz\"

    Wireshark is a network protocol analyzer which is often used in CTF challenges to look at recorded network traffic. Wireshark uses a filetype called PCAP to record traffic. PCAPs are often distributed in CTF challenges to provide recorded traffic history.

    "}, {"location": "forensics/what-is-wireshark/#interface", "title": "Interface", "text": "

    Upon opening Wireshark, you are greeted with the option to open a PCAP or begin capturing network traffic on your device.

    The network traffic displayed initially shows the packets in order of which they were captured. You can filter packets by protocol, source IP address, destination IP address, length, etc.

    In order to apply filters, simply enter the constraining factor, for example 'http', in the display filter bar.

    Filters can be chained together using '&&' notation. In order to filter by IP, ensure a double equals '==' is used.

    The most pertinent part of a packet is its data payload and protocol information.

    "}, {"location": "forensics/what-is-wireshark/#decrypting-ssl-traffic", "title": "Decrypting SSL Traffic", "text": "

    By default, Wireshark cannot decrypt SSL traffic on your device unless you grant it specific certificates.

    "}, {"location": "forensics/what-is-wireshark/#high-level-ssl-handshake-overview", "title": "High Level SSL Handshake Overview", "text": "

    In order for a network session to be encrypted properly, the client and server must share a common secret for which they can use to encrypt and decrypt data without someone in the middle being able to guess. The SSL Handshake loosely follows this format:

    1. The client sends a list of available cipher suites it can use along with a random set of bytes referred to as client_random
    2. The server sends back the cipher suite that will be used, such as TLS_DHE_RSA_WITH_AES_128_CBC_SHA, along with a random set of bytes referred to as server_random
    3. The client generates a pre-master secret, encrypts it, then sends it to the server.
    4. The server and client then generate a common master secret using the selected cipher suite
    5. The client and server begin communicating using this common secret
    "}, {"location": "forensics/what-is-wireshark/#decryption-requirements", "title": "Decryption Requirements", "text": "

    There are several ways to be able to decrypt traffic.

    "}, {"location": "reverse-engineering/overview/", "title": "Overview", "text": ""}, {"location": "reverse-engineering/overview/#reverse-engineering", "title": "Reverse Engineering", "text": "

    Reverse Engineering in a CTF is typically the process of taking a compiled (machine code, bytecode) program and converting it back into a more human readable format.

    Very often the goal of a reverse engineering challenge is to understand the functionality of a given program such that you can identify deeper issues.

    "}, {"location": "reverse-engineering/what-are-decompilers/", "title": "Decompilers", "text": "

    Decompilers do the impossible and reverse compiled code back into psuedocode/code.

    IDA offers HexRays, which translates machine code into a higher language pseudocode.

    "}, {"location": "reverse-engineering/what-are-decompilers/#example-workflow", "title": "Example Workflow", "text": "

    Let's say we are disassembling a program which has the source code:

    #include <stdio.h>\n\nvoid printSpacer(int num){\n    for(int i = 0; i < num; ++i){\n        printf(\"-\");\n    }\n    printf(\"\\n\");\n}\n\nint main()\n{\n    char* string = \"Hello, World!\";\n    for(int i = 0; i < 13; ++i){\n        printf(\"%c\", string[i]);\n        for(int j = i+1; j < 13; j++){\n            printf(\"%c\", string[j]);\n        }\n        printf(\"\\n\");\n        printSpacer(13 - i);\n    }\n    return 0;\n}\n

    And creates an output of:

    Hello, World!\n-------------\nello, World!\n------------\nllo, World!\n-----------\nlo, World!\n----------\no, World!\n---------\n, World!\n--------\n World!\n-------\nWorld!\n------\norld!\n-----\nrld!\n----\nld!\n---\nd!\n--\n!\n-\n

    If we are given a binary compiled from that source and we want to figure out how the source looks, we can use a decompiler to get c pseudocode which we can then use to reconstruct the function. The sample decompilation can look like:

    printSpacer:\nint __fastcall printSpacer(int a1)\n{\n  int i; // [rsp+8h] [rbp-8h]\n\n  for ( i = 0; i < a1; ++i )\n    printf(\"-\");\n  return printf(\"\\n\");\n}\n\nmain:\nint __cdecl main(int argc, const char **argv, const char **envp)\n{\n  int v4; // [rsp+18h] [rbp-18h]\n  signed int i; // [rsp+1Ch] [rbp-14h]\n\n  for ( i = 0; i < 13; ++i )\n  {\n    v4 = i + 1;\n    printf(\"%c\", (unsigned int)aHelloWorld[i], envp);\n    while ( v4 < 13 )\n      printf(\"%c\", (unsigned int)aHelloWorld[v4++]);\n    printf(\"\\n\");\n    printSpacer(13 - i);\n  }\n  return 0;\n}\n

    A good method of getting a good representation of the source is to convert the decompilation into Python since Python is basically psuedocode that runs. Starting with main often allows you to gain a good overview of what the program is doing and will help you translate the other functions.

    "}, {"location": "reverse-engineering/what-are-decompilers/#main", "title": "Main", "text": "

    We know we will start with a main function and some variables, if you trace the execution of the variables, you can oftentimes determine the variable type. Because i is being used as an index, we know its an int, and because v4 used as one later on, it too is an index. We can also see that we have a variable aHelloWorld being printed with \"%c\", we can determine it represents the 'Hello, World!' string. Lets define all these variables in our Python main function:

    def main():\n    string = \"Hello, World!\"\n    i = 0\n    v4 = 0\n    for i in range(0, 13):\n        v4 = i + 1\n        print(string[i], end='')\n        while v4 < 13:\n            print(string[v4], end='')\n            v4 += 1\n        print()\n        printSpacer(13-i)\n
    "}, {"location": "reverse-engineering/what-are-decompilers/#printspacer-function", "title": "printSpacer Function", "text": "

    Now we can see that printSpacer is clearly being fed an int value. Translating it into python shouldn't be too hard.

    def printSpacer(number):\n    i = 0\n    for i in range(0, number):\n        print(\"-\", end='')\n    print()\n
    "}, {"location": "reverse-engineering/what-are-decompilers/#results", "title": "Results", "text": "

    Running main() gives us:

    Hello, World!\n-------------\nello, World!\n------------\nllo, World!\n-----------\nlo, World!\n----------\no, World!\n---------\n, World!\n--------\n World!\n-------\nWorld!\n------\norld!\n-----\nrld!\n----\nld!\n---\nd!\n--\n!\n-\n
    "}, {"location": "reverse-engineering/what-are-disassemblers/", "title": "Disassemblers", "text": "

    A disassembler is a tool which breaks down a compiled program into machine code.

    "}, {"location": "reverse-engineering/what-are-disassemblers/#list-of-disassemblers", "title": "List of Disassemblers", "text": ""}, {"location": "reverse-engineering/what-are-disassemblers/#ida", "title": "IDA", "text": "

    The Interactive Disassembler (IDA) is the industry standard for binary disassembly. IDA is capable of disassembling \"virtually any popular file format\". This makes it very useful to security researchers and CTF players who often need to analyze obscure files without knowing what they are or where they came from. IDA also features the industry leading Hex Rays decompiler which can convert assembly code back into a pseudo code like format.

    IDA also has a plugin interface which has been used to create some successful plugins that can make reverse engineering easier:

    "}, {"location": "reverse-engineering/what-are-disassemblers/#binary-ninja", "title": "Binary Ninja", "text": "

    Binary Ninja is an up and coming disassembler that attempts to bring a new, more programmatic approach to reverse engineering. Binary Ninja brings an improved plugin API and modern features to reverse engineering. While it's less popular or as old as IDA, Binary Ninja (often called binja) is quickly gaining ground and has a small community of dedicated users and followers.

    Binja also has some community contributed plugins which are collected here: https://github.com/Vector35/community-plugins

    "}, {"location": "reverse-engineering/what-are-disassemblers/#gdb", "title": "gdb", "text": "

    The GNU Debugger is a free and open source debugger which also disassembles programs. It's capable as a disassembler, but most notably it is used by CTF players for its debugging and dynamic analysis capabailities.

    gdb is often used in tandom with enhancement scripts like peda, pwndbg, and GEF

    "}, {"location": "reverse-engineering/what-is-assembly-machine-code/", "title": "Assembly/Machine Code", "text": "

    Machine Code or Assembly is code which has been formatted for direct execution by a CPU. Machine Code is the reason why readable programming languages like C, when compiled, cannot be reversed into source code (well Decompilers can sort of, but more on that later).

    "}, {"location": "reverse-engineering/what-is-assembly-machine-code/#from-source-to-compilation", "title": "From Source to Compilation", "text": "

    Godbolt shows the differences in machine code generated by various compilers.

    For example, if we have a simple C++ function:

    #include <unistd.h>\n#include <stdio.h>\n#include <stdlib.h>\n\nint main() {\n    char c;\n    int fd = syscall(2, \"/etc/passwd\", 0);\n    while (syscall(0, fd, &c, 1)) {\n        putchar(c);\n    }\n}\n

    We can see the compilation results in some verbose instructions for the CPU:

    .LC0:\n  .string \"/etc/passwd\"\nmain:\n  push rbp\n  mov rbp, rsp\n  sub rsp, 16\n  mov edx, 0\n  mov esi, OFFSET FLAT:.LC0\n  mov edi, 2\n  mov eax, 0\n  call syscall\n  mov DWORD PTR [rbp-4], eax\n.L3:\n  lea rdx, [rbp-5]\n  mov eax, DWORD PTR [rbp-4]\n  mov ecx, 1\n  mov esi, eax\n  mov edi, 0\n  mov eax, 0\n  call syscall\n  test rax, rax\n  setne al\n  test al, al\n  je .L2\n  movzx eax, BYTE PTR [rbp-5]\n  movsx eax, al\n  mov edi, eax\n  call putchar\n  jmp .L3\n.L2:\n  mov eax, 0\n  leave\n  ret\n

    This is a one way process for compiled languages as there is no way to generate source from machine code. While the machine code may seem unintelligible, the extremely basic functions can be interpreted with some practice.

    "}, {"location": "reverse-engineering/what-is-assembly-machine-code/#x86-64", "title": "x86-64", "text": "

    x86-64 or amd64 or i64 is a 64-bit Complex Instruction Set Computing (CISC) architecture. This basically means that the registers used for this architecture extend an extra 32-bits on Intel's x86 architecture. CISC means that a single instruction can do a bunch of different things at once, such as memory accesses, register reads, etc. It is also a variable-length instruction set, which means different instructions can be different sizes ranging from 1 to 16 bytes long. And finally x86-64 allows for multi-sized register access, which means that you can access certain parts of a register which are different sizes.

    "}, {"location": "reverse-engineering/what-is-assembly-machine-code/#x86-64-registers", "title": "x86-64 Registers", "text": "

    x86-64 registers behave similarly to other architectures. A key component of x86-64 registers is multi-sized access which means the register RAX can have its lower 32 bits accessed with EAX. The next lower 16 bits can be accessed with AX and the lowest 8 bits can be accessed with AL which allows for the compiler to make optimizations which boost program execution.

    x86-64 has plenty of registers to use, including rax, rbx, rcx, rdx, rdi, rsi, rsp, rip, r8-r15, and more! But some registers serve special purposes.

    The special registers include: - RIP: the instruction pointer - RSP: the stack pointer - RBP: the base pointer

    "}, {"location": "reverse-engineering/what-is-assembly-machine-code/#instructions", "title": "Instructions", "text": "

    An instruction represents a single operation for the CPU to perform.

    There are different types of instructions including:

    Because x86-64 is a CISC architecture, instructions can be quite complex for machine code, such as repne scasb which repeats up to ECX times over memory at EDI looking for a NULL byte (0x00), decrementing ECX each byte (essentially strlen() in a single instruction!).

    It is important to remember that an instruction really is just memory; this idea will become useful with Return Oriented Programming or ROP.

    Note

    Instructions, numbers, strings, everything are always represented in hex!

    add rax, rbx\nmov rax, 0xdeadbeef\nmov rax, [0xdeadbeef] == 67 48 8b 05 ef be ad de\n\"Hello\" == 48 65 6c 6c 6f\n== 48 01 d8\n== 48 c7 c0 ef be ad de\n
    "}, {"location": "reverse-engineering/what-is-assembly-machine-code/#execution", "title": "Execution", "text": "

    What should the CPU execute? This is determined by the RIP register where IP means instruction pointer. Execution follows the pattern: fetch the instruction at the address in RIP, decode it, run it.

    "}, {"location": "reverse-engineering/what-is-assembly-machine-code/#examples", "title": "Examples", "text": "
    1. mov rax, 0xdeadbeef

    Here the operation mov is moving the \"immediate\" 0xdeadbeef into the register RAX

    1. mov rax, [0xdeadbeef + rbx * 4]

    Here the operation mov is moving the data at the address of [0xdeadbeef + RBX*4] into the register RAX. When brackets are used, you can think of the program as getting the content from that effective address.

    "}, {"location": "reverse-engineering/what-is-assembly-machine-code/#example-execution", "title": "Example Execution", "text": "
    -> 0x0804000: mov eax, 0xdeadbeef            Register Values:\n   0x0804005: mov ebx, 0x1234                RIP = 0x0804000\n   0x080400a: add, rax, rbx                  RAX = 0x0\n   0x080400d: inc rbx                        RBX = 0x0\n   0x0804010: sub rax, rbx                   RCX = 0x0\n   0x0804013: mov rcx, rax                   RDX = 0x0\n
       0x0804000: mov eax, 0xdeadbeef            Register Values:\n-> 0x0804005: mov ebx, 0x1234                RIP = 0x0804005\n   0x080400a: add, rax, rbx                  RAX = 0xdeadbeef\n   0x080400d: inc rbx                        RBX = 0x0\n   0x0804010: sub rax, rbx                   RCX = 0x0\n   0x0804013: mov rcx, rax                   RDX = 0x0\n
       0x0804000: mov eax, 0xdeadbeef            Register Values:\n   0x0804005: mov ebx, 0x1234                RIP = 0x080400a\n-> 0x080400a: add, rax, rbx                  RAX = 0xdeadbeef\n   0x080400d: inc rbx                        RBX = 0x1234\n   0x0804010: sub rax, rbx                   RCX = 0x0\n   0x0804013: mov rcx, rax                   RDX = 0x0\n
       0x0804000: mov eax, 0xdeadbeef            Register Values:\n   0x0804005: mov ebx, 0x1234                RIP = 0x080400d\n   0x080400a: add, rax, rbx                  RAX = 0xdeadd123\n-> 0x080400d: inc rbx                        RBX = 0x1234\n   0x0804010: sub rax, rbx                   RCX = 0x0\n   0x0804013: mov rcx, rax                   RDX = 0x0\n
       0x0804000: mov eax, 0xdeadbeef            Register Values:\n   0x0804005: mov ebx, 0x1234                RIP = 0x0804010\n   0x080400a: add, rax, rbx                  RAX = 0xdeadd123\n   0x080400d: inc rbx                        RBX = 0x1235\n-> 0x0804010: sub rax, rbx                   RCX = 0x0\n   0x0804013: mov rcx, rax                   RDX = 0x0\n
       0x0804000: mov eax, 0xdeadbeef            Register Values:\n   0x0804005: mov ebx, 0x1234                RIP = 0x0804013\n   0x080400a: add, rax, rbx                  RAX = 0xdeadbeee\n   0x080400d: inc rbx                        RBX = 0x1235\n   0x0804010: sub rax, rbx                   RCX = 0x0\n-> 0x0804013: mov rcx, rax                   RDX = 0x0\n
       0x0804000: mov eax, 0xdeadbeef            Register Values:\n   0x0804005: mov ebx, 0x1234                RIP = 0x0804005\n   0x080400a: add, rax, rbx                  RAX = 0xdeadbeee\n   0x080400d: inc rbx                        RBX = 0x1235\n   0x0804010: sub rax, rbx                   RCX = 0xdeadbeee\n   0x0804013: mov rcx, rax                   RDX = 0x0\n
    "}, {"location": "reverse-engineering/what-is-assembly-machine-code/#control-flow", "title": "Control Flow", "text": "

    How can we express conditionals in x86-64? We use conditional jumps such as:

    They jump if their condition is true, and just go to the next instruction otherwise. These conditionals are checking EFLAGS, which are special registers which store flags on certain instructions such as add rax, rbx which sets the o (overflow) flag if the sum is greater than a 64-bit register can hold, and wraps around. You can jump based on that with a jo instruction. The most important thing to remember is the cmp instruction:

    cmp rax, rbx\njle error\n
    This assembly jumps if RAX <= RBX

    "}, {"location": "reverse-engineering/what-is-assembly-machine-code/#addresses", "title": "Addresses", "text": "

    Memory acts similarly to a big array where the indices of this \"array\" are memory addresses. Remember from earlier:

    mov rax, [0xdeadbeef]

    The square brackets mean \"get the data at this address\". This is analogous to the C/C++ syntax: rax = *0xdeadbeef;

    "}, {"location": "reverse-engineering/what-is-bytecode/", "title": "What is bytecode", "text": ""}, {"location": "reverse-engineering/what-is-c/", "title": "The C Programming Language", "text": ""}, {"location": "reverse-engineering/what-is-c/#history", "title": "History", "text": "

    The C programming language was written by Dennis Ritchie in the 1970s while he was working at Bell Labs. It was first used to reimplement the Unix operating system which was purely written in assembly language. At first, the Unix developers were considering using a language called \"B\" but because B wasn't optimized for the target computer, the C language was created.

    Note

    C is the letter and the programming language after B!

    C was designed to be close to assembly and is still widely used in lower level programming where speed and control are needed (operating systems, embedded systems). C was also very influential to other programming languages used today. Notable languages include C++, Objective-C, Golang, Java, JavaScript, PHP, Python, and Rust.

    "}, {"location": "reverse-engineering/what-is-c/#hello-world", "title": "Hello World", "text": "

    C is an ancestor of many other programming languages and if you are familiar with programming, it's likely that C will be at least somewhat familiar.

    #include <stdio.h>\nint main()\n{\n   printf(\"Hello, World!\");\n   return 0;\n}\n
    "}, {"location": "reverse-engineering/what-is-c/#today", "title": "Today", "text": "

    Today C is widely used either as a low level programming language or is the base language that other programming languages are implemented in.

    While it can be difficult to see, the C language compiles down directly into machine code. The compiler is programmed to process the provided C code and emit assembly that's targetted to whatever operating system and architecture the compiler is set to use.

    Some common compilers include:

    A good way to explore this relationship is to use this online GCC Explorer from Matt Godbolt.

    In regards to CTF, many reverse engineering and exploitation CTF challenges are written in C because the language compiles down directly to assembly and there are little to no safeguards in the language. This means developers must manually handle both. Of course, this can lead to mistakes which can sometimes lead to security issues.

    Note

    Other higher level langauges like Python manage memory and garbage collection for you. Google Golang was inspired by C, but adds in functionality like garbage collection and memory safety.

    There are some examples of famously vulnerable functions in C which are still available and can still result in vulnerabilities:

    "}, {"location": "reverse-engineering/what-is-c/#types", "title": "Types", "text": "

    C has four basic types:

    "}, {"location": "reverse-engineering/what-is-c/#pointers", "title": "Pointers", "text": "

    C uses an idea known as pointers. A pointer is a variable which contains the address of another variable.

    To understand this idea we should first understand that memory is laid out in terms of addresses and data gets stored at these addresses.

    Take the following example of defining an integer in C:

    int x = 4;\n

    To the programmer this is the variable x receiving the value of 4. The computer stores this value in some location in memory. For example we can say that address 0x1000 now holds the value 4. The computer knows to directly access the memory and retrieve the value 4 whenever the programmer tries to use the x variable. If we were to say x + 4, the computer would give you 8 instead of 0x1004.

    But in C we can retrieve the memory address being used to hold the 4 value (i.e. 0x1000) by using the & character and using * to create an \"integer pointer\" type.

    int* y = &x;\n

    The y variable will store the address pointed to by the xvariable (0x1000).

    Note

    The * character allows us to declare pointer variables but also allows us to access the value stored at a pointer. For example, entering *y allows us to access the 4 value instead of 0x1000.

    Whenever we use the y variable we are using the memory address, but if we use the x variable we use the value stored at the memory address.

    "}, {"location": "reverse-engineering/what-is-c/#arrays", "title": "Arrays", "text": "

    Arrays are a grouping of objects of the same type. They are typically created with the following syntax:

    type arrayName [ arraySize ];\n

    To initialize values in the array we can do:

    int integers[ 10 ] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};\n

    Arrays allow programmers to group data into logical containers.

    To access the individual elements of an array we access the contents by their \"index\". Most programming langauges today start counting from 0. So to take our previous example:

    int integers[ 10 ] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};\n/*     indexes        0  1  2  3  4  5  6  7  8   9\n

    To access the value 6 we would use index 5:

    integers[5];\n
    "}, {"location": "reverse-engineering/what-is-c/#how-do-arrays-work", "title": "How do arrays work?", "text": "

    Arrays are a clever combination of multiplication, pointers, and programming.

    Because the computer knows the data type used for every element in the array, the computer needs to simply multiply the size of the data type by the index you are looking for and then add this value to the address of the beginning of the array.

    For example if we know that the base address of an array is 1000 and we know that each integer takes 8 bytes, we know that if we have 8 integers right next to each other, we can get the integer at the 4th index with the following math:

    1000 + (4 * 8) =  1032\n
    array [ 1   , 2   , 3   , 4   , 5   , 6   , 7   , 8   ]\nindex   0     1     2     3     4     5     6     7\naddrs  1000  1008  1016  1024  1032  1040  1048  1056\n
    "}, {"location": "reverse-engineering/what-is-c/#memory-management", "title": "Memory Management", "text": ""}, {"location": "reverse-engineering/what-is-gdb/", "title": "The GNU Debugger (GDB)", "text": "

    The GNU Debugger or GDB is a powerful debugger which allows for step-by-step execution of a program. It can be used to trace program execution and is an important part of any reverse engineering toolkit.

    "}, {"location": "reverse-engineering/what-is-gdb/#vanilla-gdb", "title": "Vanilla GDB", "text": "

    GDB without any modifications is unintuitive and obscures a lot of useful information. The plug-in pwndb solves a lot of these problems and makes for a much more pleasant experience. But if you are constrained and have to use vanilla gdb, here are several things to make your life easier.

    "}, {"location": "reverse-engineering/what-is-gdb/#starting-gdb", "title": "Starting GDB", "text": "

    To execute GBD and attach it to a program simply run gdb [program]

    "}, {"location": "reverse-engineering/what-is-gdb/#disassembly", "title": "Disassembly", "text": "

    (gdb) disassemble [address/symbol] will display the disassembly for that function/frame

    GDB will autocomplete functions, so saying (gdb) disas main suffices if you'd like to see the disassembly of main

    "}, {"location": "reverse-engineering/what-is-gdb/#view-disassembly-during-execution", "title": "View Disassembly During Execution", "text": "

    Another handy thing to see while stepping through a program is the disassembly of nearby instructions:

    (gdb) display/[# of instructions]i $pc [\u00b1 offset]

    "}, {"location": "reverse-engineering/what-is-gdb/#example-usage", "title": "Example Usage", "text": "

    (gdb) display/10i $pc - 0x5

    This command will show 10 instructions on screen with an offset from the next instruction of 5, giving us this display:

       0x8048535 <main+6>:  lock pushl -0x4(%ecx)\n   0x8048539 <main+10>: push   %ebp\n=> 0x804853a <main+11>: mov    %esp,%ebp\n   0x804853c <main+13>: push   %ecx\n   0x804853d <main+14>: sub    $0x14,%esp\n   0x8048540 <main+17>: sub    $0xc,%esp\n   0x8048543 <main+20>: push   $0x400\n   0x8048548 <main+25>: call   0x80483a0 <malloc@plt>\n   0x804854d <main+30>: add    $0x10,%esp\n   0x8048550 <main+33>: sub    $0xc,%esp\n
    "}, {"location": "reverse-engineering/what-is-gdb/#deleting-views", "title": "Deleting Views", "text": "

    If for whatever reason, a view no long suits your needs simply call (gdb) info display which will give you a list of active displays:

    Auto-display expressions now in effect:\nNum Enb Expression\n1:   y  /10bi $pc-0x5\n

    Then simply execute (gdb) delete display 1 and your execution will resume without the display.

    "}, {"location": "reverse-engineering/what-is-gdb/#registers", "title": "Registers", "text": "

    In order to view the state of registers with vanilla gdb, you need to run the command info registers which will display the state of all the registers:

    eax            0xf77a6ddc   -142971428\necx            0xffe06b10   -2069744\nedx            0xffe06b34   -2069708\nebx            0x0  0\nesp            0xffe06af8   0xffe06af8\nebp            0x0  0x0\nesi            0xf77a5000   -142979072\nedi            0xf77a5000   -142979072\neip            0x804853a    0x804853a <main+11>\neflags         0x286    [ PF SF IF ]\ncs             0x23 35\nss             0x2b 43\nds             0x2b 43\nes             0x2b 43\nfs             0x0  0\ngs             0x63 99\n

    If you simply would like to see the contents of a single register, the notation x/x $[register] where:

    "}, {"location": "reverse-engineering/what-is-gdb/#pwndbg", "title": "Pwndbg", "text": "

    These commands work with vanilla gdb as well.

    "}, {"location": "reverse-engineering/what-is-gdb/#setting-breakpoints", "title": "Setting Breakpoints", "text": "

    Setting breakpoints in GDB uses the format b*[Address/Symbol]

    "}, {"location": "reverse-engineering/what-is-gdb/#example-usage_1", "title": "Example Usage", "text": ""}, {"location": "reverse-engineering/what-is-gdb/#deleting-breakpoints", "title": "Deleting Breakpoints", "text": "

    As before, in order to delete a view, you can list the available breakpoints using (gdb) info breakpoints (don't forget about GDB's autocomplete, you don't always need to type out every command!) which will display all breakpoints:

    Num     Type           Disp Enb Address    What\n1       breakpoint     keep y   0x0804852f <main>\n3       breakpoint     keep y   0x0804864d <__libc_csu_init+61>\n

    Then simply execute (gdb) delete 1

    Note

    GDB creates breakpoints chronologically and does NOT reuse numbers.

    "}, {"location": "reverse-engineering/what-is-gdb/#stepping", "title": "Stepping", "text": "

    What good is a debugger if you can't control where you are going? In order to begin execution of a program, use the command r [arguments] similar to how if you ran it with dot-slash notation you would execute it ./program [arguments]. In this case the program will run normally and if no breakpoints are set, you will execute normally. If you have breakpoints set, you will stop at that instruction.

    "}, {"location": "reverse-engineering/what-is-gdb/#examining", "title": "Examining", "text": "

    Examining data in GDB is also very useful for seeing how the program is affecting data. The notation may seem complex at first, but it is flexible and provides powerful functionality.

    (gdb) x/[#][size][format] [Address/Symbol/Register][\u00b1 offset]

    "}, {"location": "reverse-engineering/what-is-gdb/#example-usage_2", "title": "Example Usage", "text": ""}, {"location": "reverse-engineering/what-is-gdb/#forking", "title": "Forking", "text": "

    If the program happens to be an accept-and-fork server, gdb will have issues following the child or parent processes. In order to specify how you want gdb to function you can use the command set follow-fork-mode [on/off]

    "}, {"location": "reverse-engineering/what-is-gdb/#setting-data", "title": "Setting Data", "text": "

    If you would like to set data at any point, it is possible using the command set [Address/Register]=[Hex Data]

    "}, {"location": "reverse-engineering/what-is-gdb/#example-usage_3", "title": "Example Usage", "text": ""}, {"location": "reverse-engineering/what-is-gdb/#process-mapping", "title": "Process Mapping", "text": "

    A handy way to find the process's mapped address spaces is to use info proc map:

    Mapped address spaces:\n\n    Start Addr   End Addr       Size     Offset objfile\n     0x8048000  0x8049000     0x1000        0x0 /directory/program\n     0x8049000  0x804a000     0x1000        0x0 /directory/program\n     0x804a000  0x804b000     0x1000     0x1000 /directory/program\n    0xf75cb000 0xf75cc000     0x1000        0x0\n    0xf75cc000 0xf7779000   0x1ad000        0x0 /lib32/libc-2.23.so\n    0xf7779000 0xf777b000     0x2000   0x1ac000 /lib32/libc-2.23.so\n    0xf777b000 0xf777c000     0x1000   0x1ae000 /lib32/libc-2.23.so\n    0xf777c000 0xf7780000     0x4000        0x0\n    0xf778b000 0xf778d000     0x2000        0x0 [vvar]\n    0xf778d000 0xf778f000     0x2000        0x0 [vdso]\n    0xf778f000 0xf77b1000    0x22000        0x0 /lib32/ld-2.23.so\n    0xf77b1000 0xf77b2000     0x1000        0x0\n    0xf77b2000 0xf77b3000     0x1000    0x22000 /lib32/ld-2.23.so\n    0xf77b3000 0xf77b4000     0x1000    0x23000 /lib32/ld-2.23.so\n    0xffc59000 0xffc7a000    0x21000        0x0 [stack]\n

    This will show you where the stack, heap (if there is one), and libc are located.

    "}, {"location": "reverse-engineering/what-is-gdb/#attaching-processes", "title": "Attaching Processes", "text": "

    Another useful feature of GDB is to attach to processes which are already running. Simply launch gdb using gdb, then find the process id of the program you would like to attach to an execute attach [pid].

    "}, {"location": "web-exploitation/overview/", "title": "Overview", "text": ""}, {"location": "web-exploitation/overview/#web-exploitation", "title": "Web Exploitation", "text": "

    Websites all around the world are programmed using various programming languages. While there are specific vulnerabilities in each programming langage that the developer should be aware of, there are issues fundamental to the internet that can show up regardless of the chosen language or framework.

    These vulnerabilities often show up in CTFs as web security challenges where the user needs to exploit a bug to gain some kind of higher level privelege.

    Common vulnerabilities to see in CTF challenges:

    "}, {"location": "web-exploitation/command-injection/what-is-command-injection/", "title": "Command Injection", "text": "

    Command Injection is a vulnerability that allows an attacker to submit system commands to a computer running a website. This happens when the application fails to encode user input that goes into a system shell. It is very common to see this vulnerability when a developer uses the system() command or its equivalent in the programming language of the application.

    import os\n\ndomain = user_input() # ctf101.org\n\nos.system('ping ' + domain)\n

    The above code when used normally will ping the ctf101.org domain.

    But consider what would happen if the user_input() function returned different data?

    import os\n\ndomain = user_input() # ; ls\n\nos.system('ping ' + domain)\n

    Because of the additional semicolon, the os.system() function is instructed to run two commands.

    It looks to the program as:

    ping ; ls\n

    Note

    The semicolon terminates a command in bash and allows you to put another command after it.

    Because the ping command is being terminated and the ls command is being added on, the ls command will be run in addition to the empty ping command!

    This is the core concept behind command injection. The ls command could of course be switched with another command (e.g. wget, curl, bash, etc.)

    Command injection is a very common means of privelege escalation within web applications and applications that interface with system commands. Many kinds of home routers take user input and directly append it to a system command. For this reason, many of those home router models are vulnerable to command injection.

    "}, {"location": "web-exploitation/command-injection/what-is-command-injection/#example-payloads", "title": "Example Payloads", "text": ""}, {"location": "web-exploitation/command-injection/what-is-command-injection/#related-challenges", "title": "Related Challenges", "text": ""}, {"location": "web-exploitation/cross-site-request-forgery/what-is-cross-site-request-forgery/", "title": "Cross Site Request Forgery (CSRF)", "text": "

    A Cross Site Request Forgery or CSRF Attack, pronounced see surf, is an attack on an authenticated user which uses a state session in order to perform state changing attacks like a purchase, a transfer of funds, or a change of email address.

    The entire premise of CSRF is based on session hijacking, usually by injecting malicious elements within a webpage through an <img> tag or an <iframe> where references to external resources are unverified.

    "}, {"location": "web-exploitation/cross-site-request-forgery/what-is-cross-site-request-forgery/#using-csrf", "title": "Using CSRF", "text": "

    GET requests are often used by websites to get user input. Say a user signs in to an banking site which assigns their browser a cookie which keeps them logged in. If they transfer some money, the URL that is sent to the server might have the pattern:

    http://securibank.com/transfer.do?acct=[RECEPIENT]&amount=[DOLLARS]

    Knowing this format, an attacker can send an email with a hyperlink to be clicked on or they can include an image tag of 0 by 0 pixels which will automatically be requested by the browser such as:

    <img src=\"http://securibank.com/transfer.do?acct=[RECEPIENT]&amount=[DOLLARS]\" width=\"0\" height=\"0\" border=\"0\">

    "}, {"location": "web-exploitation/cross-site-scripting/what-is-cross-site-scripting/", "title": "Cross Site Scripting (XSS)", "text": "

    Cross Site Scripting or XSS is a vulnerability where on user of an application can send JavaScript that is executed by the browser of another user of the same application.

    This is a vulnerability because JavaScript has a high degree of control over a user's web browser.

    For example JavaScript has the ability to:

    By combining all of these abilities, XSS can maliciously use JavaScript to extract user's cookies and send them to an attacker controlled server. XSS can also modify the DOM to phish users for their passwords. This only scratches the surface of what XSS can be used to do.

    XSS is typically broken down into three categories:

    "}, {"location": "web-exploitation/cross-site-scripting/what-is-cross-site-scripting/#reflected-xss", "title": "Reflected XSS", "text": "

    Reflected XSS is when an XSS exploit is provided through a URL paramater.

    For example:

    https://ctf101.org?data=<script>alert(1)</script>\n

    You can see the XSS exploit provided in the data GET parameter. If the application is vulnerable to reflected XSS, the application will take this data parameter value and inject it into the DOM.

    For example:

    <html>\n    <body>\n        <script>alert(1)</script>\n    </body>\n</html>\n

    Depending on where the exploit gets injected, it may need to be constructed differently.

    Also, the exploit payload can change to fit whatever the attacker needs it to do. Whether that is to extract cookies and submit it to an external server, or to simply modify the page to deface it.

    One of the deficiencies of reflected XSS however is that it requires the victim to access the vulnerable page from an attacker controlled resource. Notice that if the data paramter, wasn't provided the exploit wouldn't work.

    In many situations, reflected XSS is detected by the browser because it is very simple for a browser to detect malicous XSS payloads in URLs.

    "}, {"location": "web-exploitation/cross-site-scripting/what-is-cross-site-scripting/#stored-xss", "title": "Stored XSS", "text": "

    Stored XSS is different from reflected XSS in one key way. In reflected XSS, the exploit is provided through a GET parameter. But in stored XSS, the exploit is provided from the website itself.

    Imagine a website that allows users to post comments. If a user can submit an XSS payload as a comment, and then have others view that malicious comment, it would be an example of stored XSS.

    The reason being that the web site itself is serving up the XSS payload to other users. This makes it very difficult to detect from the browser's perspective and no browser is capable of generically preventing stored XSS from exploiting a user.

    "}, {"location": "web-exploitation/cross-site-scripting/what-is-cross-site-scripting/#dom-xss", "title": "DOM XSS", "text": "

    DOM XSS is XSS that is due to the browser itself injecting an XSS payload into the DOM. While the server itself may properly prevent XSS, it's possible that the client side scripts may accidentally take a payload and insert it into the DOM and cause the payload to trigger.

    The server itself is not to blame, but the client side JavaScript files are causing the issue.

    "}, {"location": "web-exploitation/directory-traversal/what-is-directory-traversal/", "title": "Directory Traversal", "text": "

    Directory Traversal is a vulnerability where an application takes in user input and uses it in a directory path.

    Any kind of path controlled by user input that isn't properly sanitized or properly sandboxed could be vulnerable to directory traversal.

    For example, consider an application that allows the user to choose what page to load from a GET parameter.

    <?php\n    $page = $_GET['page']; // index.php\n    include(\"/var/www/html/\" . $page);\n?>\n

    Under normal operation the page would be index.php. But what if a malicious user gave in something different?

    <?php\n    $page = $_GET['page']; // ../../../../../../../../etc/passwd\n    include(\"/var/www/html/\" . $page);\n?>\n

    Here the user is submitting ../../../../../../../../etc/passwd.

    This will result in the PHP interpreter leaving the directory that it is coded to look in ('/var/www/html') and instead be forced up to the root folder.

    include(\"/var/www/html/../../../../../../../../etc/passwd\");\n

    Ultimately this will become /etc/passwd because the computer will not go a directory above its top directory.

    Thus the application will load the /etc/passwd file and emit it to the user like so:

    root:x:0:0:root:/root:/bin/bash\ndaemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin\nbin:x:2:2:bin:/bin:/usr/sbin/nologin\nsys:x:3:3:sys:/dev:/usr/sbin/nologin\nsync:x:4:65534:sync:/bin:/bin/sync\ngames:x:5:60:games:/usr/games:/usr/sbin/nologin\nman:x:6:12:man:/var/cache/man:/usr/sbin/nologin\nlp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin\nmail:x:8:8:mail:/var/mail:/usr/sbin/nologin\nnews:x:9:9:news:/var/spool/news:/usr/sbin/nologin\nuucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin\nproxy:x:13:13:proxy:/bin:/usr/sbin/nologin\nwww-data:x:33:33:www-data:/var/www:/usr/sbin/nologin\nbackup:x:34:34:backup:/var/backups:/usr/sbin/nologin\nlist:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin\nirc:x:39:39:ircd:/var/run/ircd:/usr/sbin/nologin\ngnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/usr/sbin/nologin\nnobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin\nsystemd-timesync:x:100:102:systemd Time Synchronization,,,:/run/systemd:/bin/false\nsystemd-network:x:101:103:systemd Network Management,,,:/run/systemd/netif:/bin/false\nsystemd-resolve:x:102:104:systemd Resolver,,,:/run/systemd/resolve:/bin/false\nsystemd-bus-proxy:x:103:105:systemd Bus Proxy,,,:/run/systemd:/bin/false\n_apt:x:104:65534::/nonexistent:/bin/false\n

    This same concept can be applied to applications where some input is taken from a user and then used to access a file or path or similar. This vulnerability very often can be used to leak sensitive data or extract application source code to find other vulnerabilities.

    "}, {"location": "web-exploitation/php/what-is-php/", "title": "PHP", "text": "

    PHP is one of the most used languages for back-end web development and therefore it has become a target by hackers. PHP is a language which makes it painful to be secure for most instances, making it every hacker's dream target.

    "}, {"location": "web-exploitation/php/what-is-php/#overview", "title": "Overview", "text": "

    PHP is a C-like language which uses tags enclosed by <?php ... ?> (sometimes just <? ... ?>). It is inlined into HTML. A word of advice is to keep the php docs open because function names are strange due to the fact that the length of function name is used to be the key in PHP's internal dictionary, so function names were shortened/lengthened to make the lookup faster. Other things include:

    "}, {"location": "web-exploitation/php/what-is-php/#example", "title": "Example", "text": "
    <?php\n    if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['email']) && isset($_POST['password'])) {\n        $db = new mysqli('127.0.0.1', 'cs3284', 'cs3284', 'logmein');\n        $email = $_POST['email'];\n        $password = sha1($_POST['password']);\n        $res = $db->query(\"SELECT * FROM users WHERE email = '$email' AND password = '$password'\");\n        if ($row = $res->fetch_assoc()) {\n            $_SESSION['id'] = $row['id'];\n            header('Location: index.php');\n            die();\n        }\n   }\n?>\n<html>...\n

    This example PHP simply checks the POST data for an email and password. If the password is equal to the hashed password in the database, the use is logged in and redirected to the index page.

    The line email = '$email' uses automatic string interpolation in order to convert $email into a string to compare with the database.

    "}, {"location": "web-exploitation/php/what-is-php/#type-juggling", "title": "Type Juggling", "text": "

    PHP will do just about anything to match with a loose comparison (\\=\\=) which means things can be 'equal' (\\=\\=) or really equal (\\=\\=\\=). The implicit integer parsing to strings is the root cause of a lot of issues in PHP.

    "}, {"location": "web-exploitation/php/what-is-php/#type-comparison-table", "title": "Type Comparison Table", "text": ""}, {"location": "web-exploitation/php/what-is-php/#comparisons-of-x-with-php-functions", "title": "Comparisons of $x with PHP Functions", "text": "Expression gettype() empty() is_null() isset() boolean: if($x) $x = \"\"; string TRUE FALSE TRUE FALSE $x = null; NULL TRUE TRUE FALSE FALSE var $x; NULL TRUE TRUE FALSE FALSE $x is undefined NULL TRUE TRUE FALSE FALSE $x = array(); array TRUE FALSE TRUE FALSE $x = array('a', 'b'); array FALSE FALSE TRUE TRUE $x = false; boolean TRUE FALSE TRUE FALSE $x = true; boolean FALSE FALSE TRUE TRUE $x = 1; integer FALSE FALSE TRUE TRUE $x = 42; integer FALSE FALSE TRUE TRUE $x = 0; integer TRUE FALSE TRUE FALSE $x = -1; integer FALSE FALSE TRUE TRUE $x = \"1\"; string FALSE FALSE TRUE TRUE $x = \"0\"; string TRUE FALSE TRUE FALSE $x = \"-1\"; string FALSE FALSE TRUE TRUE $x = \"php\"; string FALSE FALSE TRUE TRUE $x = \"true\"; string FALSE FALSE TRUE TRUE $x = \"false\"; string FALSE FALSE TRUE TRUE"}, {"location": "web-exploitation/php/what-is-php/#comparisons", "title": "\"==\" Comparisons", "text": "TRUE FALSE 1 0 -1 \"1\" \"0\" \"-1\" NULL array() \"php\" \"\" TRUE ==TRUE== FALSE ==TRUE== FALSE ==TRUE== ==TRUE== FALSE ==TRUE== FALSE FALSE ==TRUE== FALSE FALSE FALSE ==TRUE== FALSE ==TRUE== FALSE FALSE ==TRUE== FALSE ==TRUE== ==TRUE== FALSE ==TRUE== 1 ==TRUE== FALSE ==TRUE== FALSE FALSE ==TRUE== FALSE FALSE FALSE FALSE FALSE FALSE 0 FALSE ==TRUE== FALSE ==TRUE== FALSE FALSE ==TRUE== FALSE ==TRUE== FALSE ==TRUE== ==TRUE== -1 ==TRUE== FALSE FALSE FALSE ==TRUE== FALSE FALSE ==TRUE== FALSE FALSE FALSE FALSE \"1\" ==TRUE== FALSE ==TRUE== FALSE FALSE ==TRUE== FALSE FALSE FALSE FALSE FALSE FALSE \"0\" FALSE ==TRUE== FALSE ==TRUE== FALSE FALSE ==TRUE== FALSE FALSE FALSE FALSE FALSE \"-1\" ==TRUE== FALSE FALSE FALSE ==TRUE== FALSE FALSE ==TRUE== FALSE FALSE FALSE FALSE NULL FALSE ==TRUE== FALSE ==TRUE== FALSE FALSE FALSE FALSE ==TRUE== ==TRUE== FALSE ==TRUE== array() FALSE ==TRUE== FALSE FALSE FALSE FALSE FALSE FALSE ==TRUE== ==TRUE== FALSE FALSE \"php\" ==TRUE== FALSE FALSE ==TRUE== FALSE FALSE FALSE FALSE FALSE FALSE ==TRUE== FALSE \"\" FALSE ==TRUE== FALSE ==TRUE== FALSE FALSE FALSE FALSE ==TRUE== FALSE FALSE ==TRUE=="}, {"location": "web-exploitation/php/what-is-php/#comparisons_1", "title": "\"===\" Comparisons", "text": "TRUE FALSE 1 0 -1 \"1\" \"0\" \"-1\" NULL array() \"php\" \"\" TRUE ==TRUE== FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE ==TRUE== FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE 1 FALSE FALSE ==TRUE== FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE 0 FALSE FALSE FALSE ==TRUE== FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE -1 FALSE FALSE FALSE FALSE ==TRUE== FALSE FALSE FALSE FALSE FALSE FALSE FALSE \"1\" FALSE FALSE FALSE FALSE FALSE ==TRUE== FALSE FALSE FALSE FALSE FALSE FALSE \"0\" FALSE FALSE FALSE FALSE FALSE FALSE ==TRUE== FALSE FALSE FALSE FALSE FALSE \"-1\" FALSE FALSE FALSE FALSE FALSE FALSE FALSE ==TRUE== FALSE FALSE FALSE FALSE NULL FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE ==TRUE== FALSE FALSE FALSE array() FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE ==TRUE== FALSE FALSE \"php\" FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE ==TRUE== FALSE \"\" FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE ==TRUE=="}, {"location": "web-exploitation/php/what-is-php/#file-inclusion", "title": "File Inclusion", "text": "

    PHP has multiple ways to include other source files such as require, require_once and include. These can take a dynamic string such as require $_GET['page'] . \".php\"; which is usually seen in templating.

    "}, {"location": "web-exploitation/php/what-is-php/#php-stream-filters", "title": "PHP Stream Filters", "text": "

    PHP has its own URL scheme: php://... and its main purpose is to filter output automatically. It can automatically remove certain HTML tags and can base64 encode as well.

    "}, {"location": "web-exploitation/php/what-is-php/#example_1", "title": "Example", "text": "
    $fp = fopen('php://output', 'w');\nstream_filter_append(\n       $fp,\n       'string.strip_tags',\n       STREAM_FILTER_WRITE,\n       array('b','i','u'));\nfwrite($fp, \"<b>bolded text</b> enlarged to a <h1>level 1 heading</h1>\\n\");\n/* <b>bolded text</b> enlarged to a level 1 heading */\n
    "}, {"location": "web-exploitation/php/what-is-php/#exploitation", "title": "Exploitation", "text": "

    These filters can also be used on input such as:

    "}, {"location": "web-exploitation/server-side-request-forgery/what-is-server-side-request-forgery/", "title": "Server Side Request Forgery (SSRF)", "text": "

    Server Side Request Forgery or SSRF is where an attacker is able to cause a web application to send a request that the attacker defines.

    For example, say there is a website that lets you take a screenshot of any site on the internet.

    Under normal usage a user might ask it to take a screenshot of a page like Google, or The New York Times. But what if a user does something more nefarious? What if they asked the site to take a picture of http://localhost ? Or perhaps tries to access something more useful like http://localhost/server-status ?

    Note

    127.0.0.1 (also known as localhost or loopback) represents the computer itself. Accessing localhost means you are accessing the computer's own internal network. Developers often use localhost as a way to access the services they have running on their own computers.

    Depending on what the response from the site is the attacker may be able to gain additional information about what's running on the computer itself.

    In addition, the requests originating from the server would come from the server's IP not the attackers IP. Because of that, it is possible that the attacker might be able to access internal resources that he wouldn't normally be able to access.

    Another usage for SSRF is to create a simple port scanner to scan the internal network looking for internal services.

    "}, {"location": "web-exploitation/sql-injection/what-is-sql-injection/", "title": "SQL Injection", "text": "

    SQL Injection is a vulnerability where an application takes input from a user and doesn't vaildate that the user's input doesn't contain additional SQL.

    <?php\n    $username = $_GET['username']; // kchung\n    $result = mysql_query(\"SELECT * FROM users WHERE username='$username'\");\n?>\n

    If we look at the $username variable, under normal operation we might expect the username parameter to be a real username (e.g. kchung).

    But a malicious user might submit different kind of data. For example, consider if the input was '?

    The application would crash because the resulting SQL query is incorrect.

    SELECT * FROM users WHERE username='''\n

    Note

    Notice the extra single quote at the end.

    With the knowledge that a single quote will cause an error in the application we can expand a little more on SQL Injection.

    What if our input was ' OR 1=1?

    SELECT * FROM users WHERE username='' OR 1=1\n

    1 is indeed equal to 1. This equates to true in SQL. If we reinterpret this the SQL statement is really saying

    SELECT * FROM users WHERE username='' OR true\n

    This will return every row in the table because each row that exists must be true.

    We can also inject comments and termination characters like -- or /* or ;. This allows you to terminate SQL queries after your injected statements. For example '-- is a common SQL injection payload.

    SELECT * FROM users WHERE username=''-- '\n

    This payload sets the username parameter to an empty string to break out of the query and then adds a comment (--) that effectively hides the second single quote.

    Using this technique of adding SQL statements to an existing query we can force databases to return data that it was not meant to return.

    "}]} \ No newline at end of file +{"config": {"lang": ["en"], "separator": "[\\s\\-]+", "pipeline": ["stopWordFilter"]}, "docs": [{"location": "", "title": "Capture The Flag 101", "text": ""}, {"location": "#overview", "title": "Overview", "text": "

    Capture the Flags, or CTFs, are computer security competitions.

    Teams of competitors (or just individuals) are pitted against each other in various challenges across multiple security disciplines, competing to earn the most points.

    CTFs are often the beginning of one's cyber security career due to their team building nature and competitive aspect. In addition, there isn't a lot of commitment required beyond a weekend.

    Info

    For information about ongoing CTFs, check out CTFTime.

    In this handbook you'll learn the basics\u2122 behind the methodologies and techniques needed to succeed in Capture the Flag competitions.

    "}, {"location": "binary-exploitation/address-space-layout-randomization/", "title": "Address Space Layout Randomization (ASLR)", "text": "

    Address Space Layout Randomization (or ASLR) is the randomization of the place in memory where the program, shared libraries, the stack, and the heap are. This makes can make it harder for an attacker to exploit a service, as knowledge about where the stack, heap, or libc can't be re-used between program launches. This is a partially effective way of preventing an attacker from jumping to, for example, libc without a leak.

    Typically, only the stack, heap, and shared libraries are ASLR enabled. It is still somewhat rare for the main program to have ASLR enabled, though it is being seen more frequently and is slowly becoming the default.

    "}, {"location": "binary-exploitation/buffer-overflow/", "title": "Buffer Overflow", "text": "

    A Buffer Overflow is a vulnerability in which data can be written which exceeds the allocated space, allowing an attacker to overwrite other data.

    "}, {"location": "binary-exploitation/buffer-overflow/#stack-buffer-overflow", "title": "Stack buffer overflow", "text": "

    The simplest and most common buffer overflow is one where the buffer is on the stack. Let's look at an example.

    #include <stdio.h>\n\nint main() {\n    int secret = 0xdeadbeef;\n    char name[100] = {0};\n    read(0, name, 0x100);\n    if (secret == 0x1337) {\n        puts(\"Wow! Here's a secret.\");\n    } else {\n        puts(\"I guess you're not cool enough to see my secret\");\n    }\n}\n

    There's a tiny mistake in this program which will allow us to see the secret. name is decimal 100 bytes, however we're reading in hex 100 bytes (=256 decimal bytes)! Let's see how we can use this to our advantage.

    If the compiler chose to layout the stack like this:

            0xffff006c: 0xf7f7f7f7  // Saved EIP\n        0xffff0068: 0xffff0100  // Saved EBP\n        0xffff0064: 0xdeadbeef  // secret\n...\n        0xffff0004: 0x0\nESP ->  0xffff0000: 0x0         // name\n

    let's look at what happens when we read in 0x100 bytes of 'A's.

    The first decimal 100 bytes are saved properly:

            0xffff006c: 0xf7f7f7f7  // Saved EIP\n        0xffff0068: 0xffff0100  // Saved EBP\n        0xffff0064: 0xdeadbeef  // secret\n...\n        0xffff0004: 0x41414141\nESP ->  0xffff0000: 0x41414141  // name\n

    However when the 101st byte is read in, we see an issue:

            0xffff006c: 0xf7f7f7f7  // Saved EIP\n        0xffff0068: 0xffff0100  // Saved EBP\n        0xffff0064: 0xdeadbe41  // secret\n...\n        0xffff0004: 0x41414141\nESP ->  0xffff0000: 0x41414141  // name\n

    The least significant byte of secret has been overwritten! If we follow the next 3 bytes to be read in, we'll see the entirety of secret is \"clobbered\" with our 'A's

            0xffff006c: 0xf7f7f7f7  // Saved EIP\n        0xffff0068: 0xffff0100  // Saved EBP\n        0xffff0064: 0x41414141  // secret\n...\n        0xffff0004: 0x41414141\nESP ->  0xffff0000: 0x41414141  // name\n

    The remaining 152 bytes would continue clobbering values up the stack.

    "}, {"location": "binary-exploitation/buffer-overflow/#passing-an-impossible-check", "title": "Passing an impossible check", "text": "

    How can we use this to pass the seemingly impossible check in the original program? Well, if we carefully line up our input so that the bytes that overwrite secret happen to be the bytes that represent 0x1337 in little-endian, we'll see the secret message.

    A small Python one-liner will work nicely: python -c \"print 'A'*100 + '\\x31\\x13\\x00\\x00'\"

    This will fill the name buffer with 100 'A's, then overwrite secret with the 32-bit little-endian encoding of 0x1337.

    "}, {"location": "binary-exploitation/buffer-overflow/#going-one-step-further", "title": "Going one step further", "text": "

    As discussed on the stack page, the instruction that the current function should jump to when it is done is also saved on the stack (denoted as \"Saved EIP\" in the above stack diagrams). If we can overwrite this, we can control where the program jumps after main finishes running, giving us the ability to control what the program does entirely.

    Usually, the end objective in binary exploitation is to get a shell (often called \"popping a shell\") on the remote computer. The shell provides us with an easy way to run anything we want on the target computer.

    Say there happens to be a nice function that does this defined somewhere else in the program that we normally can't get to:

    void give_shell() {\n    system(\"/bin/sh\");\n}\n

    Well with our buffer overflow knowledge, now we can! All we have to do is overwrite the saved EIP on the stack to the address where give_shell is. Then, when main returns, it will pop that address off of the stack and jump to it, running give_shell, and giving us our shell.

    Assuming give_shell is at 0x08048fd0, we could use something like this: python -c \"print 'A'*108 + '\\xd0\\x8f\\x04\\x08'\"

    We send 108 'A's to overwrite the 100 bytes that is allocated for name, the 4 bytes for secret, and the 4 bytes for the saved EBP. Then we simply send the little-endian form of give_shell's address, and we would get a shell!

    This idea is extended on in Return Oriented Programming

    "}, {"location": "binary-exploitation/heap-exploitation/", "title": "Heap Exploits", "text": ""}, {"location": "binary-exploitation/heap-exploitation/#overflow", "title": "Overflow", "text": "

    Much like a stack buffer overflow, a heap overflow is a vulnerability where more data than can fit in the allocated buffer is read in. This could lead to heap metadata corruption, or corruption of other heap objects, which could in turn provide new attack surface.

    "}, {"location": "binary-exploitation/heap-exploitation/#use-after-free-uaf", "title": "Use After Free (UAF)", "text": "

    Once free is called on an allocation, the allocator is free to re-allocate that chunk of memory in future calls to malloc if it so chooses. However if the program author isn't careful and uses the freed object later on, the contents may be corrupt (or even attacker controlled). This is called a use after free or UAF.

    "}, {"location": "binary-exploitation/heap-exploitation/#example", "title": "Example", "text": "
    #include <stdio.h>\n#include <stdlib.h>\n#include <unistd.h>\n#include <string.h>\n\ntypedef struct string {\n    unsigned length;\n    char *data;\n} string;\n\nint main() {\n    struct string* s = malloc(sizeof(string));\n    puts(\"Length:\");\n    scanf(\"%u\", &s->length);\n    s->data = malloc(s->length + 1);\n    memset(s->data, 0, s->length + 1);\n    puts(\"Data:\");\n    read(0, s->data, s->length);\n\n    free(s->data);\n    free(s);\n\n    char *s2 = malloc(16);\n    memset(s2, 0, 16);\n    puts(\"More data:\");\n    read(0, s2, 15);\n\n    // Now using s again, a UAF\n\n    puts(s->data);\n\n    return 0;\n}\n

    In this example, we have a string structure with a length and a pointer to the actual string data. We properly allocate, fill, and then free an instance of this structure. Then we make another allocation, fill it, and then improperly reference the freed string. Due to how glibc's allocator works, s2 will actually get the same memory as the original s allocation, which in turn gives us the ability to control the s->data pointer. This could be used to leak program data.

    "}, {"location": "binary-exploitation/heap-exploitation/#advanced-heap-exploitation", "title": "Advanced Heap Exploitation", "text": "

    Not only can the heap be exploited by the data in allocations, but exploits can also use the underlying mechanisms in malloc, free, etc. to exploit a program. This is beyond the scope of CTF 101, but here are a few recommended resources:

    "}, {"location": "binary-exploitation/no-execute/", "title": "No eXecute (NX Bit)", "text": "

    The No eXecute or the NX bit (also known as Data Execution Prevention or DEP) marks certain areas of the program as not executable, meaning that stored input or data cannot be executed as code. This is significant because it prevents attackers from being able to jump to custom shellcode that they've stored on the stack or in a global variable.

    "}, {"location": "binary-exploitation/overview/", "title": "Overview", "text": ""}, {"location": "binary-exploitation/overview/#binary-exploitation", "title": "Binary Exploitation", "text": "

    Binaries, or executables, are machine code for a computer to execute. For the most part, the binaries that you will face in CTFs are Linux ELF files or the occasional windows executable. Binary Exploitation is a broad topic within Cyber Security which really comes down to finding a vulnerability in the program and exploiting it to gain control of a shell or modifying the program's functions.

    Common topics addressed by Binary Exploitation or 'pwn' challenges include:

    "}, {"location": "binary-exploitation/relocation-read-only/", "title": "Relocation Read-Only (RELRO)", "text": "

    Relocation Read-Only (or RELRO) is a security measure which makes some binary sections read-only.

    There are two RELRO \"modes\": partial and full.

    "}, {"location": "binary-exploitation/relocation-read-only/#partial-relro", "title": "Partial RELRO", "text": "

    Partial RELRO is the default setting in GCC, and nearly all binaries you will see have at least partial RELRO.

    From an attackers point-of-view, partial RELRO makes almost no difference, other than it forces the GOT to come before the BSS in memory, eliminating the risk of a buffer overflows on a global variable overwriting GOT entries.

    "}, {"location": "binary-exploitation/relocation-read-only/#full-relro", "title": "Full RELRO", "text": "

    Full RELRO makes the entire GOT read-only which removes the ability to perform a \"GOT overwrite\" attack, where the GOT address of a function is overwritten with the location of another function or a ROP gadget an attacker wants to run.

    Full RELRO is not a default compiler setting as it can greatly increase program startup time since all symbols must be resolved before the program is started. In large programs with thousands of symbols that need to be linked, this could cause a noticable delay in startup time.

    "}, {"location": "binary-exploitation/return-oriented-programming/", "title": "Return Oriented Programming", "text": "

    Return Oriented Programming (or ROP) is the idea of chaining together small snippets of assembly with stack control to cause the program to do more complex things.

    As we saw in buffer overflows, having stack control can be very powerful since it allows us to overwrite saved instruction pointers, giving us control over what the program does next. Most programs don't have a convenient give_shell function however, so we need to find a way to manually invoke system or another exec function to get us our shell.

    "}, {"location": "binary-exploitation/return-oriented-programming/#32-bit", "title": "32 bit", "text": "

    Imagine we have a program similar to the following:

    #include <stdio.h>\n#include <stdlib.h>\n\nchar name[32];\n\nint main() {\n    printf(\"What's your name? \");\n    read(0, name, 32);\n\n    printf(\"Hi %s\\n\", name);\n\n    printf(\"The time is currently \");\n    system(\"/bin/date\");\n\n    char echo[100];\n    printf(\"What do you want me to echo back? \");\n    read(0, echo, 1000);\n    puts(echo);\n\n    return 0;\n}\n

    We obviously have a stack buffer overflow on the echo variable which can give us EIP control when main returns. But we don't have a give_shell function! So what can we do?

    We can call system with an argument we control! Since arguments are passed in on the stack in 32-bit Linux programs (see calling conventions), if we have stack control, we have argument control.

    When main returns, we want our stack to look like something had normally called system. Recall what is on the stack after a function has been called:

            ...                                 // More arguments\n        0xffff0008: 0x00000002              // Argument 2\n        0xffff0004: 0x00000001              // Argument 1\nESP ->  0xffff0000: 0x080484d0              // Return address\n

    So main's stack frame needs to look like this:

            0xffff0008: 0xdeadbeef              // system argument 1\n        0xffff0004: 0xdeadbeef              // return address for system\nESP ->  0xffff0000: 0x08048450              // return address for main (system's PLT entry)\n

    Then when main returns, it will jump into system's PLT entry and the stack will appear just like system had been called normally for the first time.

    Note: we don't care about the return address system will return to because we will have already gotten our shell by then!

    "}, {"location": "binary-exploitation/return-oriented-programming/#arguments", "title": "Arguments", "text": "

    This is a good start, but we need to pass an argument to system for anything to happen. As mentioned in the page on ASLR, the stack and dynamic libraries \"move around\" each time a program is run, which means we can't easily use data on the stack or a string in libc for our argument. In this case however, we have a very convenient name global which will be at a known location in the binary (in the BSS segment).

    "}, {"location": "binary-exploitation/return-oriented-programming/#putting-it-together", "title": "Putting it together", "text": "

    Our exploit will need to do the following:

    1. Enter \"sh\" or another command to run as name
    2. Fill the stack with
      1. Garbage up to the saved EIP
      2. The address of system's PLT entry
      3. A fake return address for system to jump to when it's done
      4. The address of the name global to act as the first argument to system
    "}, {"location": "binary-exploitation/return-oriented-programming/#64-bit", "title": "64 bit", "text": "

    In 64-bit binaries we have to work a bit harder to pass arguments to functions. The basic idea of overwriting the saved RIP is the same, but as discussed in calling conventions, arguments are passed in registers in 64-bit programs. In the case of running system, this means we will need to find a way to control the RDI register.

    To do this, we'll use small snippets of assembly in the binary, called \"gadgets.\" These gadgets usually pop one or more registers off of the stack, and then call ret, which allows us to chain them together by making a large fake call stack.

    For example, if we needed control of both RDI and RSI, we might find two gadgets in our program that look like this (using a tool like rp++ or ROPgadget):

    0x400c01: pop rdi; ret\n0x400c03: pop rsi; pop r15; ret\n

    We can setup a fake call stack with these gadets to sequentially execute them, poping values we control into registers, and then end with a jump to system.

    "}, {"location": "binary-exploitation/return-oriented-programming/#example", "title": "Example", "text": "
            0xffff0028: 0x400d00            // where we want the rsi gadget's ret to jump to now that rdi and rsi are controlled\n        0xffff0020: 0x1337beef          // value we want in r15 (probably garbage)\n        0xffff0018: 0x1337beef          // value we want in rsi\n        0xffff0010: 0x400c03            // address that the rdi gadget's ret will return to - the pop rsi gadget\n        0xffff0008: 0xdeadbeef          // value to be popped into rdi\nRSP ->  0xffff0000: 0x400c01            // address of rdi gadget\n

    Stepping through this one instruction at a time, main returns, jumping to our pop rdi gadget:

    RIP = 0x400c01 (pop rdi)\nRDI = UNKNOWN\nRSI = UNKNOWN\n\n        0xffff0028: 0x400d00            // where we want the rsi gadget's ret to jump to now that rdi and rsi are controlled\n        0xffff0020: 0x1337beef          // value we want in r15 (probably garbage)\n        0xffff0018: 0x1337beef          // value we want in rsi\n        0xffff0010: 0x400c03            // address that the rdi gadget's ret will return to - the pop rsi gadget\nRSP ->  0xffff0008: 0xdeadbeef          // value to be popped into rdi\n

    pop rdi is then executed, popping the top of the stack into RDI:

    RIP = 0x400c02 (ret)\nRDI = 0xdeadbeef\nRSI = UNKNOWN\n\n        0xffff0028: 0x400d00            // where we want the rsi gadget's ret to jump to now that rdi and rsi are controlled\n        0xffff0020: 0x1337beef          // value we want in r15 (probably garbage)\n        0xffff0018: 0x1337beef          // value we want in rsi\nRSP ->  0xffff0010: 0x400c03            // address that the rdi gadget's ret will return to - the pop rsi gadget\n

    The RDI gadget then rets into our RSI gadget:

    RIP = 0x400c03 (pop rsi)\nRDI = 0xdeadbeef\nRSI = UNKNOWN\n\n        0xffff0028: 0x400d00            // where we want the rsi gadget's ret to jump to now that rdi and rsi are controlled\n        0xffff0020: 0x1337beef          // value we want in r15 (probably garbage)\nRSP ->  0xffff0018: 0x1337beef          // value we want in rsi\n

    RSI and R15 are popped:

    RIP = 0x400c05 (ret)\nRDI = 0xdeadbeef\nRSI = 0x1337beef\n\nRSP ->  0xffff0028: 0x400d00            // where we want the rsi gadget's ret to jump to now that rdi and rsi are controlled\n

    And finally, the RSI gadget rets, jumping to whatever function we want, but now with RDI and RSI set to values we control.

    "}, {"location": "binary-exploitation/stack-canaries/", "title": "Stack Canaries", "text": "

    Stack Canaries are a secret value placed on the stack which changes every time the program is started. Prior to a function return, the stack canary is checked and if it appears to be modified, the program exits immeadiately.

    "}, {"location": "binary-exploitation/stack-canaries/#bypassing-stack-canaries", "title": "Bypassing Stack Canaries", "text": "

    Stack Canaries seem like a clear cut way to mitigate any stack smashing as it is fairly impossible to just guess a random 64-bit value. However, leaking the address and bruteforcing the canary are two methods which would allow us to get through the canary check.

    "}, {"location": "binary-exploitation/stack-canaries/#stack-canary-leaking", "title": "Stack Canary Leaking", "text": "

    If we can read the data in the stack canary, we can send it back to the program later because the canary stays the same throughout execution. However Linux makes this slightly tricky by making the first byte of the stack canary a NULL, meaning that string functions will stop when they hit it. A method around this would be to partially overwrite and then put the NULL back or find a way to leak bytes at an arbitrary stack offset.

    A few situations where you might be able to leak a canary:

    "}, {"location": "binary-exploitation/stack-canaries/#bruteforcing-a-stack-canary", "title": "Bruteforcing a Stack Canary", "text": "

    The canary is determined when the program starts up for the first time which means that if the program forks, it keeps the same stack cookie in the child process. This means that if the input that can overwrite the canary is sent to the child, we can use whether it crashes as an oracle and brute-force 1 byte at a time!

    This method can be used on fork-and-accept servers where connections are spun off to child processes, but only under certain conditions such as when the input accepted by the program does not append a NULL byte (read or recv).

    Buffer (N Bytes) ?? ?? ?? ?? ?? ?? ?? ?? RBP RIP

    Fill the buffer N Bytes + 0x00 results in no crash

    Buffer (N Bytes) 00 ?? ?? ?? ?? ?? ?? ?? RBP RIP

    Fill the buffer N Bytes + 0x00 + 0x00 results in a crash

    N Bytes + 0x00 + 0x01 results in a crash

    N Bytes + 0x00 + 0x02 results in a crash

    ...

    N Bytes + 0x00 + 0x51 results in no crash

    Buffer (N Bytes) 00 51 ?? ?? ?? ?? ?? ?? RBP RIP

    Repeat this bruteforcing process for 6 more bytes...

    Buffer (N Bytes) 00 51 FE 0A 31 D2 7B 3C RBP RIP

    Now that we have the stack cookie, we can overwrite the RIP register and take control of the program!

    "}, {"location": "binary-exploitation/what-are-buffers/", "title": "Buffers", "text": "

    A buffer is any allocated space in memory where data (often user input) can be stored. For example, in the following C program name would be considered a stack buffer:

    #include <stdio.h>\n\nint main() {\n    char name[64] = {0};\n    read(0, name, 63);\n    printf(\"Hello %s\", name);\n    return 0;\n}\n

    Buffers could also be global variables:

    #include <stdio.h>\n\nchar name[64] = {0};\n\nint main() {\n    read(0, name, 63);\n    printf(\"Hello %s\", name);\n    return 0;\n}\n

    Or dynamically allocated on the heap:

    #include <stdio.h>\n#include <stdlib.h>\n\nint main() {\n    char *name = malloc(64);\n    memset(name, 0, 64);\n    read(0, name, 63);\n    printf(\"Hello %s\", name);\n    return 0;\n}\n
    "}, {"location": "binary-exploitation/what-are-buffers/#exploits", "title": "Exploits", "text": "

    Given that buffers commonly hold user input, mistakes when writing to them could result in attacker controlled data being written outside of the buffer's space. See the page on buffer overflows for more.

    "}, {"location": "binary-exploitation/what-are-calling-conventions/", "title": "Calling Conventions", "text": "

    To be able to call functions, there needs to be an agreed-upon way to pass arguments. If a program is entirely self-contained in a binary, the compiler would be free to decide the calling convention. However in reality, shared libraries are used so that common code (e.g. libc) can be stored once and dynamically linked in to programs that need it, reducing program size.

    In Linux binaries, there are really only two commonly used calling conventions: cdecl for 32-bit binaries, and SysV for 64-bit

    "}, {"location": "binary-exploitation/what-are-calling-conventions/#cdecl", "title": "cdecl", "text": "

    In 32-bit binaries on Linux, function arguments are passed in on the stack in reverse order. A function like this:

    int add(int a, int b, int c) {\n    return a + b + c;\n}\n

    would be invoked by pushing c, then b, then a.

    "}, {"location": "binary-exploitation/what-are-calling-conventions/#sysv", "title": "SysV", "text": "

    For 64-bit binaries, function arguments are first passed in certain registers:

    1. RDI
    2. RSI
    3. RDX
    4. RCX
    5. R8
    6. R9

    then any leftover arguments are pushed onto the stack in reverse order, as in cdecl.

    "}, {"location": "binary-exploitation/what-are-calling-conventions/#other-conventions", "title": "Other Conventions", "text": "

    Any method of passing arguments could be used as long as the compiler is aware of what the convention is. As a result, there have been many calling conventions in the past that aren't used frequently anymore. See Wikipedia for a comprehensive list.

    "}, {"location": "binary-exploitation/what-are-registers/", "title": "Registers", "text": "

    A register is a location within the processor that is able to store data, much like RAM. Unlike RAM however, accesses to registers are effectively instantaneous, whereas reads from main memory can take hundreds of CPU cycles to return.

    Registers can hold any value: addresses (pointers), results from mathematical operations, characters, etc. Some registers are reserved however, meaning they have a special purpose and are not \"general purpose registers\" (GPRs). On x86, the only 2 reserved registers are rip and rsp which hold the address of the next instruction to execute and the address of the stack respectively.

    On x86, the same register can have different sized accesses for backwards compatability. For example, the rax register is the full 64-bit register, eax is the low 32 bits of rax, ax is the low 16 bits, al is the low 8 bits, and ah is the high 8 bits of ax (bits 8-16 of rax).

    "}, {"location": "binary-exploitation/what-is-a-format-string-vulnerability/", "title": "Format String Vulnerability", "text": "

    A format string vulnerability is a bug where user input is passed as the format argument to printf, scanf, or another function in that family.

    The format argument has many different specifies which could allow an attacker to leak data if they control the format argument to printf. Since printf and similar are variadic functions, they will continue popping data off of the stack according to the format.

    For example, if we can make the format argument \"%x.%x.%x.%x\", printf will pop off four stack values and print them in hexadecimal, potentially leaking sensitive information.

    printf can also index to an arbitrary \"argument\" with the following syntax: \"%n$x\" (where n is the decimal index of the argument you want).

    While these bugs are powerful, they're very rare nowadays, as all modern compilers warn when printf is called with a non-constant string.

    "}, {"location": "binary-exploitation/what-is-a-format-string-vulnerability/#example", "title": "Example", "text": "
    #include <stdio.h>\n#include <unistd.h>\n\nint main() {\n    int secret_num = 0x8badf00d;\n\n    char name[64] = {0};\n    read(0, name, 64);\n    printf(\"Hello \");\n    printf(name);\n    printf(\"! You'll never get my secret!\\n\");\n    return 0;\n}\n

    Due to how GCC decided to lay out the stack, secret_num is actually at a lower address on the stack than name, so we only have to go to the 7th \"argument\" in printf to leak the secret:

    $ ./fmt_string\n%7$llx\nHello 8badf00d3ea43eef\n! You'll never get my secret!\n
    "}, {"location": "binary-exploitation/what-is-binary-security/", "title": "Binary Security", "text": "

    Binary Security is using tools and methods in order to secure programs from being manipulated and exploited. This tools are not infallible, but when used together and implemented properly, they can raise the difficulty of exploitation greatly.

    Some methods covered include:

    "}, {"location": "binary-exploitation/what-is-the-got/", "title": "GOT", "text": "

    The Global Offset Table (or GOT) is a section inside of programs that holds addresses of functions that are dynamically linked. As mentioned in the page on calling conventions, most programs don't include every function they use to reduce binary size. Instead, common functions (like those in libc) are \"linked\" into the program so they can be saved once on disk and reused by every program.

    Unless a program is marked full RELRO, the resolution of function to address in dynamic library is done lazily. All dynamic libraries are loaded into memory along with the main program at launch, however functions are not mapped to their actual code until they're first called. For example, in the following C snippet puts won't be resolved to an address in libc until after it has been called once:

    int main() {\n    puts(\"Hi there!\");\n    puts(\"Ok bye now.\");\n    return 0;\n}\n

    To avoid searching through shared libraries each time a function is called, the result of the lookup is saved into the GOT so future function calls \"short circuit\" straight to their implementation bypassing the dynamic resolver.

    This has two important implications:

    1. The GOT contains pointers to libraries which move around due to ASLR
    2. The GOT is writable

    These two facts will become very useful to use in Return Oriented Programming

    "}, {"location": "binary-exploitation/what-is-the-got/#plt", "title": "PLT", "text": "

    Before a functions address has been resolved, the GOT points to an entry in the Procedure Linkage Table (PLT). This is a small \"stub\" function which is responsible for calling the dynamic linker with (effectively) the name of the function that should be resolved.

    "}, {"location": "binary-exploitation/what-is-the-heap/", "title": "The Heap", "text": "

    The heap is a place in memory which a program can use to dynamically create objects. Creating objects on the heap has some advantages compared to using the stack:

    There are also some disadvantages however:

    "}, {"location": "binary-exploitation/what-is-the-heap/#using-the-heap", "title": "Using the heap", "text": "

    In C, there are a number of functions used to interact with the heap, but we're going to focus on the two core ones:

    Let's see how these could be used in a program:

    #include <stdio.h>\n#include <stdlib.h>\n#include <unistd.h>\n\nint main() {\n    unsigned alloc_size = 0;\n    char *stuff;\n\n    printf(\"Number of bytes? \");\n    scanf(\"%u\", &alloc_size);\n\n    stuff = malloc(alloc_size + 1);\n    memset(0, stuff, alloc_size + 1);\n\n    read(0, stuff, alloc_size);\n\n    printf(\"You wrote: %s\", stuff);\n\n    free(stuff);\n\n    return 0;\n}\n

    This program reads in a size from the user, creates an allocation of that size on the heap, reads in that many bytes, then prints it back out to the user.

    "}, {"location": "binary-exploitation/what-is-the-stack/", "title": "The Stack", "text": "

    In computer architecture, the stack is a hardware manifestation of the stack data structure (a Last In, First Out queue).

    In x86, the stack is simply an area in RAM that was chosen to be the stack - there is no special hardware to store stack contents. The esp/rsp register holds the address in memory where the bottom of the stack resides. When something is pushed to the stack, esp decrements by 4 (or 8 on 64-bit x86), and the value that was pushed is stored at that location in memory. Likewise, when a pop instruction is executed, the value at esp is retrieved (i.e. esp is dereferenced), and esp is then incremented by 4 (or 8).

    N.B. The stack \"grows\" down to lower memory addresses!

    Conventionally, ebp/rbp contains the address of the top of the current stack frame, and so sometimes local variables are referenced as an offset relative to ebp rather than an offset to esp. A stack frame is essentially just the space used on the stack by a given function.

    "}, {"location": "binary-exploitation/what-is-the-stack/#uses", "title": "Uses", "text": "

    The stack is primarily used for a few things:

    "}, {"location": "binary-exploitation/what-is-the-stack/#example", "title": "Example", "text": "

    Let's see what the stack looks like right after say_hi has been called in this 32-bit x86 C program:

    #include <stdio.h>\n\nvoid say_hi(const char * name) {\n    printf(\"Hello %s!\\n\", name);\n}\n\nint main(int argc, char ** argv) {\n    char * name;\n    if (argc != 2) {\n        return 1;\n    }\n    name = argv[1];\n    say_hi(name);\n    return 0;\n}\n

    And the relevant assembly:

    0804840b <say_hi>:\n 804840b:   55                      push   ebp\n 804840c:   89 e5                   mov    ebp,esp\n 804840e:   83 ec 08                sub    esp,0x8\n 8048411:   83 ec 08                sub    esp,0x8\n 8048414:   ff 75 08                push   DWORD PTR [ebp+0x8]\n 8048417:   68 f0 84 04 08          push   0x80484f0\n 804841c:   e8 bf fe ff ff          call   80482e0 <printf@plt>\n 8048421:   83 c4 10                add    esp,0x10\n 8048424:   90                      nop\n 8048425:   c9                      leave\n 8048426:   c3                      ret\n\n08048427 <main>:\n 8048427:   8d 4c 24 04             lea    ecx,[esp+0x4]\n 804842b:   83 e4 f0                and    esp,0xfffffff0\n 804842e:   ff 71 fc                push   DWORD PTR [ecx-0x4]\n 8048431:   55                      push   ebp\n 8048432:   89 e5                   mov    ebp,esp\n 8048434:   51                      push   ecx\n 8048435:   83 ec 14                sub    esp,0x14\n 8048438:   89 c8                   mov    eax,ecx\n 804843a:   83 38 02                cmp    DWORD PTR [eax],0x2\n 804843d:   74 07                   je     8048446 <main+0x1f>\n 804843f:   b8 01 00 00 00          mov    eax,0x1\n 8048444:   eb 1c                   jmp    8048462 <main+0x3b>\n 8048446:   8b 40 04                mov    eax,DWORD PTR [eax+0x4]\n 8048449:   8b 40 04                mov    eax,DWORD PTR [eax+0x4]\n 804844c:   89 45 f4                mov    DWORD PTR [ebp-0xc],eax\n 804844f:   83 ec 0c                sub    esp,0xc\n 8048452:   ff 75 f4                push   DWORD PTR [ebp-0xc]\n 8048455:   e8 b1 ff ff ff          call   804840b <say_hi>\n 804845a:   83 c4 10                add    esp,0x10\n 804845d:   b8 00 00 00 00          mov    eax,0x0\n 8048462:   8b 4d fc                mov    ecx,DWORD PTR [ebp-0x4]\n 8048465:   c9                      leave\n 8048466:   8d 61 fc                lea    esp,[ecx-0x4]\n 8048469:   c3                      ret\n

    Skipping over the bulk of main, you'll see that at 0x8048452 main's name local is pushed to the stack because it's the first argument to say_hi. Then, a call instruction is executed. call instructions first push the current instruction pointer to the stack, then jump to their destination. So when the processor begins executing say_hi at 0x0804840b, the stack looks like this:

    EIP = 0x0804840b (push ebp)\nESP = 0xffff0000\nEBP = 0xffff002c\n\n        0xffff0004: 0xffffa0a0              // say_hi argument 1\nESP ->  0xffff0000: 0x0804845a              // Return address for say_hi\n

    The first thing say_hi does is save the current ebp so that when it returns, ebp is back where main expects it to be. The stack now looks like this:

    EIP = 0x0804840c (mov ebp, esp)\nESP = 0xfffefffc\nEBP = 0xffff002c\n\n        0xffff0004: 0xffffa0a0              // say_hi argument 1\n        0xffff0000: 0x0804845a              // Return address for say_hi\nESP ->  0xfffefffc: 0xffff002c              // Saved EBP\n

    Again, note how esp gets smaller when values are pushed to the stack.

    Next, the current esp is saved into ebp, marking the top of the new stack frame.

    EIP = 0x0804840e (sub esp, 0x8)\nESP = 0xfffefffc\nEBP = 0xfffefffc\n\n            0xffff0004: 0xffffa0a0              // say_hi argument 1\n            0xffff0000: 0x0804845a              // Return address for say_hi\nESP, EBP -> 0xfffefffc: 0xffff002c              // Saved EBP\n

    Then, the stack is \"grown\" to accommodate local variables inside say_hi.

    EIP = 0x08048414 (push [ebp + 0x8])\nESP = 0xfffeffec\nEBP = 0xfffefffc\n\n        0xffff0004: 0xffffa0a0              // say_hi argument 1\n        0xffff0000: 0x0804845a              // Return address for say_hi\nEBP ->  0xfffefffc: 0xffff002c              // Saved EBP\n        0xfffefff8: UNDEFINED\n        0xfffefff4: UNDEFINED\n        0xfffefff0: UNDEFINED\nESP ->  0xfffefffc: UNDEFINED\n

    NOTE: stack space is not implictly cleared!

    Now, the 2 arguments to printf are pushed in reverse order.

    EIP = 0x0804841c (call printf@plt)\nESP = 0xfffeffe4\nEBP = 0xfffefffc\n\n        0xffff0004: 0xffffa0a0              // say_hi argument 1\n        0xffff0000: 0x0804845a              // Return address for say_hi\nEBP ->  0xfffefffc: 0xffff002c              // Saved EBP\n        0xfffefff8: UNDEFINED\n        0xfffefff4: UNDEFINED\n        0xfffefff0: UNDEFINED\n        0xfffeffec: UNDEFINED\n        0xfffeffe8: 0xffffa0a0              // printf argument 2\nESP ->  0xfffeffe4: 0x080484f0              // printf argument 1\n

    Finally, printf is called, which pushes the address of the next instruction to execute.

    EIP = 0x080482e0\nESP = 0xfffeffe4\nEBP = 0xfffefffc\n\n        0xffff0004: 0xffffa0a0              // say_hi argument 1\n        0xffff0000: 0x0804845a              // Return address for say_hi\nEBP ->  0xfffefffc: 0xffff002c              // Saved EBP\n        0xfffefff8: UNDEFINED\n        0xfffefff4: UNDEFINED\n        0xfffefff0: UNDEFINED\n        0xfffeffec: UNDEFINED\n        0xfffeffe8: 0xffffa0a0              // printf argument 2\n        0xfffeffe4: 0x080484f0              // printf argument 1\nESP ->  0xfffeffe0: 0x08048421              // Return address for printf\n

    Once printf has returned, the leave instruction moves ebp into esp, and pops the saved EBP.

    EIP = 0x08048426 (ret)\nESP = 0xfffefffc\nEBP = 0xffff002c\n\n        0xffff0004: 0xffffa0a0              // say_hi argument 1\nESP ->  0xffff0000: 0x0804845a              // Return address for say_hi\n

    And finally, ret pops the saved instruction pointer into eip which causes the program to return to main with the same esp, ebp, and stack contents as when say_hi was initially called.

    EIP = 0x0804845a (add esp, 0x10)\nESP = 0xffff0000\nEBP = 0xffff002c\n\nESP ->  0xffff0004: 0xffffa0a0              // say_hi argument 1\n
    "}, {"location": "cryptography/overview/", "title": "Overview", "text": ""}, {"location": "cryptography/overview/#cryptography", "title": "Cryptography", "text": "

    Cryptography is the reason we can use banking apps, transmit sensitive information over the web, and in general protect our privacy. However, a large part of CTFs is breaking widely used encryption schemes which are improperly implemented. The math may seem daunting, but more often than not, a simple understanding of the underlying principles will allow you to find flaws and crack the code.

    The word \u201ccryptography\u201d technically means the art of writing codes. When it comes to digital forensics, it\u2019s a method you can use to understand how data is constructed for your analysis.

    "}, {"location": "cryptography/overview/#what-is-cryptography-used-for", "title": "What is cryptography used for?", "text": "

    Uses in every day software

    Malicious uses

    "}, {"location": "cryptography/overview/#topics", "title": "Topics", "text": ""}, {"location": "cryptography/what-are-block-ciphers/", "title": "Block Ciphers", "text": "

    A Block Cipher is an algorithm which is used in conjunction with a cryptosystem in order to package a message into evenly distributed 'blocks' which are encrypted one at a time.

    "}, {"location": "cryptography/what-are-block-ciphers/#definitions", "title": "Definitions", "text": ""}, {"location": "cryptography/what-are-block-ciphers/#common-block-ciphers", "title": "Common Block Ciphers", "text": "Mode Formulas Ciphertext ECB Y~i~ = F(PlainText~i~, Key) Y~i~ CBC Y~i~ = PlainText~i~ XOR Ciphertext~i-1~ F(Y, key); Ciphertext~0~ = IV PCBC Y~i~ = PlainText~i~ XOR (Ciphertext~i-1~ XOR PlainText~i-1~) F(Y, key); Ciphertext~0~ = IV CFB Y~i~ = Ciphertext~i-1~ Plaintext XOR F(Y, key); Ciphertext~0~ = IV OFB Y~i~ = F(Key, I~i-1~);Y~0~=IV Plaintext XOR Y~i~ CTR Y~i~ = F(Key, IV + g(i));IV = token(); Plaintext XOR Y~i~

    Note

    In this case ~i~ represents an index over the # of blocks in the plaintext. F() and g() represent the function used to convert plaintext into ciphertext.

    "}, {"location": "cryptography/what-are-block-ciphers/#electronic-codebook-ecb", "title": "Electronic Codebook (ECB)", "text": "

    ECB is the most basic block cipher, it simply chunks up plaintext into blocks and independently encrypts those blocks and chains them all into a ciphertext.

    "}, {"location": "cryptography/what-are-block-ciphers/#flaws", "title": "Flaws", "text": "

    Because ECB independently encrypts the blocks, patterns in data can still be seen clearly, as shown in the CBC Penguin image below.

    Original Image ECB Image Other Block Cipher Modes"}, {"location": "cryptography/what-are-block-ciphers/#cipher-block-chaining-cbc", "title": "Cipher Block Chaining (CBC)", "text": "

    CBC is an improvement upon ECB where an Initialization Vector is used in order to add randomness. The encrypted previous block is used as the IV for each sequential block meaning that the encryption process cannot be parallelized. CBC has been declining in popularity due to a variety of

    Note

    Even though the encryption process cannot be parallelized, the decryption process can be parallelized. If the wrong IV is used for decryption it will only affect the first block as the decryption of all other blocks depends on the ciphertext not the plaintext.

    "}, {"location": "cryptography/what-are-block-ciphers/#propogating-cipher-block-chaining-pcbc", "title": "Propogating Cipher Block Chaining (PCBC)", "text": "

    PCBC is a less used cipher which modifies CBC so that decryption is also not parallelizable. It also cannot be decrypted from any point as changes made during the decryption and encryption process \"propogate\" throughout the blocks, meaning that both the plaintext and ciphertext are used when encrypting or decrypting as seen in the images below.

    "}, {"location": "cryptography/what-are-block-ciphers/#counter-ctr", "title": "Counter (CTR)", "text": "

    Note

    Counter is also known as CM, integer counter mode (ICM), and segmented integer counter (SIC)

    CTR mode makes the block cipher similar to a stream cipher and it functions by adding a counter with each block in combination with a nonce and key to XOR the plaintext to produce the ciphertext. Similarly, the decryption process is the exact same except instead of XORing the plaintext, the ciphertext is XORed. This means that the process is parallelizable for both encryption and decryption and you can begin from anywhere as the counter for any block can be deduced easily.

    "}, {"location": "cryptography/what-are-block-ciphers/#security-considerations", "title": "Security Considerations", "text": "

    If the nonce chosen is non-random, it is important to concatonate the nonce with the counter (high 64 bits to the nonce, low 64 bits to the counter) as adding or XORing the nonce with the counter would break security as an attacker can cause a collisions with the nonce and counter. An attacker with access to providing a plaintext, nonce and counter can then decrypt a block by using the ciphertext as seen in the decryption image.

    "}, {"location": "cryptography/what-are-block-ciphers/#padding-oracle-attack", "title": "Padding Oracle Attack", "text": "

    A Padding Oracle Attack sounds complex, but essentially means abusing a block cipher by changing the length of input and being able to determine the plaintext.

    "}, {"location": "cryptography/what-are-block-ciphers/#requirements", "title": "Requirements", "text": ""}, {"location": "cryptography/what-are-block-ciphers/#execution", "title": "Execution", "text": "
    1. If we have two blocks of ciphertext, C~1~ and C~2~, we can get the plaintext P~2~
    2. Since we know that CBC decryptionis dependent on the prior ciphertext, if we change the last byte of C~1~ we can see if C~2~ has correct padding
    3. If it is correctly padded we know that the last byte of the plaintext
    4. If not, we can increase our byte by one and repeat until we have a successful padding
    5. We then repeat this for all successive bytes following C~1~ and if the block is 16 bytes we can expect a maximum of 4080 attempts which is trivial
    "}, {"location": "cryptography/what-are-hashing-functions/", "title": "Hashing Functions", "text": "

    Hashing functions are one way functions which theoretically provide a unique output for every input. MD5, SHA-1, and other hashes which were considered secure are now found to have collisions or two different pieces of data which produce the same supposed unique output.

    "}, {"location": "cryptography/what-are-hashing-functions/#string-hashing", "title": "String Hashing", "text": "

    A string hash is a number or string generated using an algorithm that runs on text or data.

    The idea is that each hash should be unique to the text or data (although sometimes it isn\u2019t). For example, the hash for \u201cdog\u201d should be different from other hashes.

    You can use command line tools tools or online resources such as this one. Example: $ echo -n password | md5 5f4dcc3b5aa765d61d8327deb882cf99 Here, \u201cpassword\u201d is hashed with different hashing algorithms:

    Generally, when verifying a hash visually, you can simply look at the first and last four characters of the string.

    "}, {"location": "cryptography/what-are-hashing-functions/#file-hashing", "title": "File Hashing", "text": "

    A file hash is a number or string generated using an algorithm that is run on text or data. The premise is that it should be unique to the text or data. If the file or text changes in any way, the hash will change.

    What is it used for? - File and data identification - Password/certificate storage comparison

    How can we determine the hash of a file? You can use the md5sum command (or similar).

    $ md5sum samplefile.txt\n3b85ec9ab2984b91070128be6aae25eb samplefile.txt\n
    "}, {"location": "cryptography/what-are-hashing-functions/#hash-collisions", "title": "Hash Collisions", "text": "

    A collision is when two pieces of data or text have the same cryptographic hash. This is very rare.

    What\u2019s significant about collisions is that they can be used to crack password hashes. Passwords are usually stored as hashes on a computer, since it\u2019s hard to get the passwords from hashes.

    If you bruteforce by trying every possible piece of text or data, eventually you\u2019ll find something with the same hash. Enter it, and the computer accepts it as if you entered the actual password.

    Two different files on the same hard drive with the same cryptographic hash can be very interesting.

    \u201cIt\u2019s now well-known that the cryptographic hash function MD5 has been broken,\u201d said Peter Selinger of Dalhousie University. \u201cIn March 2005, Xiaoyun Wang and Hongbo Yu of Shandong University in China published an article in which they described an algorithm that can find two different sequences of 128 bytes with the same MD5 hash.\u201d

    For example, he cited this famous pair:

    and

    Each of these blocks has MD5 hash 79054025255fb1a26e4bc422aef54eb4.

    Selinger said that \u201cthe algorithm of Wang and Yu can be used to create files of arbitrary length that have identical MD5 hashes, and that differ only in 128 bytes somewhere in the middle of the file. Several people have used this technique to create pairs of interesting files with identical MD5 hashes.\u201d

    Ben Laurie has a nice website that visualizes this MD5 collision. For a non-technical, though slightly outdated, introduction to hash functions, see Steve Friedl\u2019s Illustrated Guide. And here\u2019s a good article from DFI News that explores the same topic.

    "}, {"location": "cryptography/what-are-stream-ciphers/", "title": "Stream Ciphers", "text": "

    A Stream Cipher is used for symmetric key cryptography, or when the same key is used to encrypt and decrypt data. Stream Ciphers encrypt pseudorandom sequences with bits of plaintext in order to generate ciphertext, usually with XOR. A good way to think about Stream Ciphers is to think of them as generating one-time pads from a given state.

    "}, {"location": "cryptography/what-are-stream-ciphers/#definitions", "title": "Definitions", "text": ""}, {"location": "cryptography/what-are-stream-ciphers/#one-time-pads", "title": "One Time Pads", "text": "

    A one time pad is an encryption mechanism whereby the entire plaintext is XOR'd with a random sequence of numbers in order to generate a random ciphertext. The advantage of the one time pad is that it offers an immense amount of security BUT in order for it to be useful, the randomly generated key must be distributed on a separate secure channel, meaning that one time pads have little use in modern day cryptographic applications on the internet. Stream ciphers extend upon this idea by using a key, usually 128 bit in length, in order to seed a pseudorandom keystream which is used to encrypt the text.

    "}, {"location": "cryptography/what-are-stream-ciphers/#types-of-stream-ciphers", "title": "Types of Stream Ciphers", "text": ""}, {"location": "cryptography/what-are-stream-ciphers/#synchronous-stream-ciphers", "title": "Synchronous Stream Ciphers", "text": "

    A Synchronous Stream Cipher generates a keystream based on internal states not related to the plaintext or ciphertext. This means that the stream is generated pseudorandomly outside of the context of what is being encrypted. A binary additive stream cipher is the term used for a stream cipher which XOR's the bits with the bits of the plaintext. Encryption and decryption require that the synchronus state cipher be in the same state, otherwise the message cannot be decrypted.

    "}, {"location": "cryptography/what-are-stream-ciphers/#self-synchronizing-stream-ciphers", "title": "Self-synchronizing Stream Ciphers", "text": "

    A Self-synchronizing Stream Cipher, also known as an asynchronous stream cipher or ciphertext autokey (CTAK), is a stream cipher which uses the previous N digits in order to compute the keystream used for the next N characters.

    Note

    Seems a lot like block ciphers doesn't it? That's because block cipher feedback mode (CFB) is an example of a self-synchronizing stream ciphers.

    "}, {"location": "cryptography/what-are-stream-ciphers/#stream-cipher-vulnerabilities", "title": "Stream Cipher Vulnerabilities", "text": ""}, {"location": "cryptography/what-are-stream-ciphers/#key-reuse", "title": "Key Reuse", "text": "

    The key tenet of using stream ciphers securely is to NEVER repeat key use because of the communative property of XOR. If C~1~ and C~2~ have been XOR'd with a key K, retrieving that key K is trivial because C~1~ XOR C~2~ = P~1~ XOR P~2~ and having an english language based XOR means that cryptoanalysis tools such as a character frequency analysis will work well due to the low entropy of the english language.

    "}, {"location": "cryptography/what-are-stream-ciphers/#bit-flipping-attack", "title": "Bit-flipping Attack", "text": "

    Another key tenet of using stream ciphers securely is considering that just because a message has been decrypted, it does not mean the message has not been tampered with. Because decryption is based on state, if an attacker knows the layout of the plaintext, a Man in the Middle (MITM) attack can flip a bit during transit altering the underlying ciphertext. If a ciphertext decrypts to 'Transfer $1000', then a middleman can flip a single bit in order for the ciphertext to decrypt to 'Transfer $9000' because changing a single character in the ciphertext does not affect the state in a synchronus stream cipher.

    "}, {"location": "cryptography/what-is-a-substitution-cipher/", "title": "Substitution Cipher", "text": "

    A Substitution Cipher is system of encryption where different symobls substitute a normal alphabet.

    "}, {"location": "cryptography/what-is-a-vigenere-cipher/", "title": "Vigenere Cipher", "text": "

    A Vigenere Cipher is an extended Caesar Cipher where a message is encrypted using various Caesar shifted alphabets.

    The following table can be used to encode a message:

    "}, {"location": "cryptography/what-is-a-vigenere-cipher/#encryption", "title": "Encryption", "text": "

    For example, encrypting the text SUPERSECRET with CODE would follow this process:

    1. CODE gets padded to the length of SUPERSECRET so the key becomes CODECODECOD
    2. For each letter in SUPERSECRET we use the table to get the Alphabet to use, in this instance row C and column S
    3. The ciphertext's first letter then becomes U
    4. We eventually get UISITGHGTSW
    "}, {"location": "cryptography/what-is-a-vigenere-cipher/#decryption", "title": "Decryption", "text": "
    1. Go to the row of the key, in this case C
    2. Find the letter of the cipher text in this row, in this case U
    3. The column is the first letter of the decrypted ciphertext, so we get S
    4. After repeating this process we get back to SUPERSECRET
    "}, {"location": "cryptography/what-is-caesar-cipher-rot-13/", "title": "Caesar Cipher/ROT 13", "text": "

    The Caesar Cipher or Caesar Shift is a cipher which uses the alphabet in order to encode texts.

    CAESAR encoded with a shift of 8 is KIMAIZ so ABCDEFGHIJKLMNOPQRSTUVWXYZ becomes IJKLMNOPQRSTUVWXYZABCDEFGH

    ROT13 is the same thing but a fixed shift of 13, this is a trivial cipher to bruteforce because there are only 25 shifts.

    "}, {"location": "cryptography/what-is-rsa/", "title": "RSA", "text": "

    RSA, which is an abbreviation of the author's names (Rivest\u2013Shamir\u2013Adleman), is a cryptosystem which allows for asymmetric encryption. Asymmetric cryptosystems are alos commonly referred to as Public Key Cryptography where a public key is used to encrypt data and only a secret, private key can be used to decrypt the data.

    "}, {"location": "cryptography/what-is-rsa/#definitions", "title": "Definitions", "text": ""}, {"location": "cryptography/what-is-rsa/#what-makes-rsa-viable", "title": "What makes RSA viable?", "text": "

    If public n, public e, private d are all very large numbers and a message m holds true for 0 < m < n, then we can say:

    (m^e^)^d^ \u2261 m (mod n)

    Note

    The triple equals sign in this case refers to modular congruence which in this case means that there exists an integer k such that (m^e^)^d^ = kn + m

    RSA is viable because it is incredibly hard to find d even with m, n, and e because factoring large numbers is an arduous process.

    "}, {"location": "cryptography/what-is-rsa/#implementation", "title": "Implementation", "text": "

    RSA follows 4 steps to be implemented: 1. Key Generation 2. Encryption 3. Decryption

    "}, {"location": "cryptography/what-is-rsa/#key-generation", "title": "Key Generation", "text": "

    We are going to follow along Wikipedia's small numbers example in order to make this idea a bit easier to understand.

    Note

    In This example we are using Carmichael's totient function where \u03bb(n) = lcm(\u03bb(p), \u03bb(q)), but Euler's totient function is perfectly valid to use with RSA. Euler's totient is \u03c6(n) = (p \u2212 1)(q \u2212 1)

    1. Choose two prime numbers such as:
    2. Find n:
    3. Calculate \u03bb(n) = lcm(p-1, q-1)

    4. Choose a public exponent such that 1 < e < \u03bb(n) and is coprime (not a factor of) \u03bb(n). The standard is most cases is 65537, but we will be using:

    5. Calculate d as the modular multiplicative inverse or in english find d such that: d x e mod \u03bb(n) = 1

    Now we have a public key of (3233, 17) and a private key of (3233, 413)

    "}, {"location": "cryptography/what-is-rsa/#encryption", "title": "Encryption", "text": "

    With the public key, m can be encrypted trivially

    The ciphertext is equal to m^e^ mod n or:

    c = m^17^ mod 3233

    "}, {"location": "cryptography/what-is-rsa/#decryption", "title": "Decryption", "text": "

    With the private key, m can be decrypted trivially as well

    The plaintext is equal to c^d^ mod n or:

    m = c^413^ mod 3233

    "}, {"location": "cryptography/what-is-rsa/#exploitation", "title": "Exploitation", "text": "

    From the RsaCtfTool README

    Attacks:

    "}, {"location": "cryptography/what-is-xor/", "title": "XOR", "text": ""}, {"location": "cryptography/what-is-xor/#data-representation", "title": "Data Representation", "text": "

    Data can be represented in different bases, an 'A' needs to be a numerical representation of Base 2 or binary so computers can understand them

    "}, {"location": "cryptography/what-is-xor/#xor-basics", "title": "XOR Basics", "text": "

    An XOR or eXclusive OR is a bitwise operation indicated by ^ and shown by the following truth table:

    A B A ^ B 0 0 0 0 1 1 1 0 1 1 1 0

    So what XOR'ing bytes in the action 0xA0 ^ 0x2C translates to is:

    1 0 1 0 0 0 0 0 0 0 1 0 1 1 0 0 1 0 0 0 1 1 0 0

    0b10001100 is equivelent to 0x8C, a cool property of XOR is that it is reversable meaning 0x8C ^ 0x2C = 0xA0 and 0x8C ^ 0xA0 = 0x2C

    "}, {"location": "cryptography/what-is-xor/#what-does-this-have-to-do-with-ctf", "title": "What does this have to do with CTF?", "text": "

    XOR is a cheap way to encrypt data with a password. Any data can be encrypted using XOR as shown in this Python example:

    >>> data = 'CAPTURETHEFLAG'\n>>> key = 'A'\n>>> encrypted = ''.join([chr(ord(x) ^ ord(key)) for x in data])\n>>> encrypted\n'\\x02\\x00\\x11\\x15\\x14\\x13\\x04\\x15\\t\\x04\\x07\\r\\x00\\x06'\n>>> decrypted = ''.join([chr(ord(x) ^ ord(key)) for x in encrypted])\n>>> decrypted\n'CAPTURETHEFLAG'\n

    This can be extended using a multibyte key by iterating in parallel with the data.

    "}, {"location": "cryptography/what-is-xor/#exploiting-xor-encryption", "title": "Exploiting XOR Encryption", "text": ""}, {"location": "cryptography/what-is-xor/#single-byte-xor-encryption", "title": "Single Byte XOR Encryption", "text": "

    Single Byte XOR Encryption is trivial to bruteforce as there are only 255 key combinations to try.

    "}, {"location": "cryptography/what-is-xor/#multibyte-xor-encryption", "title": "Multibyte XOR Encryption", "text": "

    Multibyte XOR gets exponentially harder the longer the key, but if the encrypted text is long enough, character frequency analysis is a viable method to find the key. Character Frequency Analysis means that we split the cipher text into groups based on the number of characters in the key. These groups then are bruteforced using the idea that some letters appear more frequently in the english alphabet than others.

    "}, {"location": "faq/connecting-to-services/", "title": "How to connect to services", "text": "

    Note

    While service challenges are often connected to with netcat or PuTTY, solving them will sometimes require using a scripting language like Python. CTF players often use Python alongside pwntools.

    You can run pwntools right in your browser by using repl.it.

    "}, {"location": "faq/connecting-to-services/#using-netcat", "title": "Using netcat", "text": "

    netcat is a networking utility found on macOS and linux operating systems and allows for easy connections to CTF challenges. Service challenges will commonly give you an address and a port to connect to. The syntax for connecting to a service challenge with netcat is nc <ip> <port>.

    "}, {"location": "faq/connecting-to-services/#using-conemu", "title": "Using ConEmu", "text": "

    Windows users can connect to service challenges using ConEmu, which can be downloaded here. Connecting to service challenges with ConEmu is done by running nc <ip> <port>.

    "}, {"location": "faq/i-need-a-server/", "title": "I need a server", "text": "

    Occasionally, certain kinds of exploits will require a server to connect back to. Some examples are connect back shellcode, cross site request forgery (CSRF), or blind cross site scripting (XSS).

    "}, {"location": "faq/i-need-a-server/#i-just-a-web-server", "title": "I just a web server", "text": "

    If you just need a web server to host simple static websites or check access logs, we recommend using PythonAnywhere to host a simple web application. You can program a simple web application in popular Python web frameworks (e.g. Flask) and host it there for free.

    "}, {"location": "faq/i-need-a-server/#i-need-a-real-server", "title": "I need a real server", "text": "

    If you need a real server (perhaps to run complex calculations or for shellcode to connect back to), we recommend DigitalOcean. DigitalOcean has a cheap $4-6/month plan for a small server that can be freely configured to do whatever you need.

    "}, {"location": "faq/recommended-software/", "title": "Recommended Software", "text": "

    Generally in cyber security competitions, it is up to you and your team to determine what software to use. In some cases you may even end up creating new tools to give you an edge! That being said, here are some applications that we recommend for most competitors for most competitions.

    "}, {"location": "faq/recommended-software/#disassemblersdecompilers", "title": "Disassemblers/Decompilers", "text": ""}, {"location": "faq/recommended-software/#debuggers", "title": "Debuggers", "text": ""}, {"location": "faq/recommended-software/#web-tools", "title": "Web Tools", "text": ""}, {"location": "faq/recommended-software/#virtualization", "title": "Virtualization", "text": ""}, {"location": "faq/recommended-software/#programming", "title": "Programming", "text": ""}, {"location": "faq/recommended-software/#miscellaneous", "title": "Miscellaneous", "text": ""}, {"location": "forensics/overview/", "title": "Forensics", "text": "

    Forensics is the art of recovering the digital trail left on a computer. There are plenty of methods to find data which is seemingly deleted, not stored, or worse, covertly recorded.

    An important part of forensics is having the right tools, as well as being familiar with the following topics:

    "}, {"location": "forensics/what-are-file-formats/", "title": "File Formats", "text": "

    File Extensions are not the sole way to identify the type of a file, files have certain leading bytes called file signatures which allow programs to parse the data in a consistent manner. Files can also contain additional \"hidden\" data called metadata which can be useful in finding out information about the context of a file's data.

    "}, {"location": "forensics/what-are-file-formats/#file-signatures", "title": "File Signatures", "text": "

    File signatures (also known as File Magic Numbers) are bytes within a file used to identify the format of the file. Generally they\u2019re 2-4 bytes long, found at the beginning of a file.

    "}, {"location": "forensics/what-are-file-formats/#what-is-it-used-for", "title": "What is it used for?", "text": "

    Files can sometimes come without an extension, or with incorrect ones. We use file signature analysis to identify the format (file type) of the file. Programs need to know the file type in order to open it properly.

    "}, {"location": "forensics/what-are-file-formats/#how-do-you-find-the-file-signature", "title": "How do you find the file signature?", "text": "

    You need to be able to look at the binary data that constitutes the file you\u2019re examining. To do this, you\u2019ll use a hexadecimal editor. Once you find the file signature, you can check it against file signature repositories such as Gary Kessler\u2019s.

    "}, {"location": "forensics/what-are-file-formats/#example", "title": "Example", "text": "

    The file above, when opened in a Hex Editor, begins with the bytes FFD8FFE0 00104A46 494600 or in ASCII \u02c7\u00ff\u02c7\u2021 JFIF where \\x00 and \\x10 lack symbols.

    Searching in Gary Kessler\u2019s database shows that this file signature belongs to a JPEG/JFIF graphics file, exactly what we suspect.

    "}, {"location": "forensics/what-is-a-hex-editor/", "title": "Hex Editor", "text": "

    A hexadecimal (hex) editor (also called a binary file editor or byte editor) is a computer program you can use to manipulate the fundamental binary data that constitutes a computer file. The name \u201chex\u201d comes from \u201chexadecimal,\u201d a standard numerical format for representing binary data. A typical computer file occupies multiple areas on the platter(s) of a disk drive, whose contents are combined to form the file. Hex editors that are designed to parse and edit sector data from the physical segments of floppy or hard disks are sometimes called sector editors or disk editors. A hex editor is used to see or edit the raw, exact contents of a file. Hex editors may used to correct data corrupted by a system or application. A list of editors can be found on the forensics Wiki. You can download one and install it on your system.

    "}, {"location": "forensics/what-is-a-hex-editor/#example", "title": "Example", "text": "

    Open fileA.jpg in a hex editor. (Most Hex editors have either a \u201cFile > Open\u201d option or a simple drag and drop.)

    When you open fileA.jpg in your hex editor, you should see something similar to this:

    Your hex editor should also have a \u201cgo to\u201d or \u201cfind\u201d feature so you can jump to a specific byte.

    "}, {"location": "forensics/what-is-disk-imaging/", "title": "Disk Imaging", "text": "

    A forensic image is an electronic copy of a drive (e.g. a hard drive, USB, etc.). It\u2019s a bit-by-\u00adbit or bitstream file that\u2019s an exact, unaltered copy of the media being duplicated.

    Wikipedia said that the most straight\u00adforward disk imaging method is to read a disk from start to finish and write the data to a forensics image format. \u201cThis can be a time-consuming process, especially for disks with a large capacity,\u201d Wikipedia said.

    To prevent write access to the disk, you can use a write blocker. It\u2019s also common to calculate a cryptographic hash of the entire disk when imaging it. \u201cCommonly-used cryptographic hashes are MD5, SHA1 and/or SHA256,\u201d said Wikipedia. \u201cBy recalculating the integrity hash at a later time, one can determine if the data in the disk image has been changed. This by itself provides no protection against intentional tampering, but it can indicate that the data was altered, e.g. due to corruption.\u201d

    Why image a disk? Forensic imaging: - Prevents tampering with the original data\u00ad evidence - Allows you to play around with the copy, without worrying about messing up the original

    "}, {"location": "forensics/what-is-disk-imaging/#forensic-image-extraction-exmple", "title": "Forensic Image Extraction Exmple", "text": "

    This example uses the tool AccessData FTK Imager.

    Step 1: Go to File > Create Disk Image

    Step 2: Select Physical Drive, because the USB or hard drive you\u2019re imaging is a physical device or drive.

    Step 3: Select the drive you\u2019re imaging. The 1000 GB is my computer hard drive; the 128 MB is the USB that I want to image.

    Step 4: Add a new image destination

    Step 5: Select whichever image type you want. Choose Raw (dd) if you\u2019re a beginner, since it\u2019s the most common type

    Step 6: Fill in all the evidence information

    Step 7: Choose where you want to store it

    Step 8: The image destination has been added. Now you can start the image extraction

    Step 9: Wait for the image to be extracted

    Step 10: This is the completed extraction

    Step 11: Add the image you just created so that you can view it

    Step 12: This time, choose image file, since that\u2019s what you just created

    Step 13: Enter the path of the image you just created

    Step 14: View the image.

    1. Evidence tree Structure of the drive image
    2. File list List of all the files in the drive image folder
    3. Properties Properties of the file/folder being examined
    4. Hex viewer View of the drive/folders/files in hexadecimal

    Step 15: To view files in the USB, go to Partition 1 > [USB name] > [root] in the Evidence Tree and look in the File List

    Step 16: Selecting fileA, fileB, fileC, or fileD gives us some properties of the files & a preview of each photo

    Step 17: Extract files of interest for further analysis by selecting, right-clicking and choosing Export Files

    "}, {"location": "forensics/what-is-memory-forensics/", "title": "Memory Forensics", "text": "

    There are plenty of traces of someone's activity on a computer, but perhaps some of the most valuble information can be found within memory dumps, that is images taken of RAM. These dumps of data are often very large, but can be analyzed using a tool called Volatility

    "}, {"location": "forensics/what-is-memory-forensics/#volatility-basics", "title": "Volatility Basics", "text": "

    Memory forensics isn't all that complicated, the hardest part would be using your toolset correctly. A good workflow is as follows:

    1. Run strings for clues
    2. Identify the image profile (which OS, version, etc.)
    3. Dump processes and look for suspicious processes
    4. Dump data related interesting processes
    5. View data in a format relating to the process (Word: docx, Notepad: txt, Photoshop: psd, etc.)
    "}, {"location": "forensics/what-is-memory-forensics/#profile-identification", "title": "Profile Identification", "text": "

    In order to properly use Volatility you must supply a profile with --profile=PROFILE, therefore before any sleuthing, you need to determine the profile using imageinfo:

    $ python vol.py -f ~/image.raw imageinfo\nVolatility Foundation Volatility Framework 2.4\nDetermining profile based on KDBG search...\n\n          Suggested Profile(s) : Win7SP0x64, Win7SP1x64, Win2008R2SP0x64, Win2008R2SP1x64\n                     AS Layer1 : AMD64PagedMemory (Kernel AS)\n                     AS Layer2 : FileAddressSpace (/Users/Michael/Desktop/win7_trial_64bit.raw)\n                      PAE type : PAE\n                           DTB : 0x187000L\n                          KDBG : 0xf80002803070\n          Number of Processors : 1\n     Image Type (Service Pack) : 0\n                KPCR for CPU 0 : 0xfffff80002804d00L\n             KUSER_SHARED_DATA : 0xfffff78000000000L\n           Image date and time : 2012-02-22 11:29:02 UTC+0000\n     Image local date and time : 2012-02-22 03:29:02 -0800\n
    "}, {"location": "forensics/what-is-memory-forensics/#dump-processes", "title": "Dump Processes", "text": "

    In order to view processes, the pslist or pstree or psscan command can be used.

    $ python vol.py -f ~/image.raw pslist --profile=Win7SP0x64 pstree\nVolatility Foundation Volatility Framework 2.5\nOffset(V)          Name                    PID   PPID   Thds     Hnds   Sess  Wow64 Start                          Exit\n------------------ -------------------- ------ ------ ------ -------- ------ ------ ------------------------------ ------------------------------\n0xffffa0ee12532180 System                    4      0    108        0 ------      0 2018-04-22 20:02:33 UTC+0000\n0xffffa0ee1389d040 smss.exe                232      4      3        0 ------      0 2018-04-22 20:02:33 UTC+0000\n...\n0xffffa0ee128c6780 VBoxTray.exe           3324   1123     10        0      1      0 2018-04-22 20:02:55 UTC+0000\n0xffffa0ee14108780 OneDrive.exe           1422   1123     10        0      1      1 2018-04-22 20:02:55 UTC+0000\n0xffffa0ee14ade080 svchost.exe             228    121      1        0      1      0 2018-04-22 20:14:43 UTC+0000\n0xffffa0ee1122b080 notepad.exe            2019   1123      1        0      1      0 2018-04-22 20:14:49 UTC+0000\n
    "}, {"location": "forensics/what-is-memory-forensics/#process-memory-dump", "title": "Process Memory Dump", "text": "

    Dumping the memory of a process can prove to be fruitful, say we want to dump the data from notepad.exe:

    $ python vol.py -f ~/image.raw --profile=Win7SP0x64 memdump -p 2019 -D dump/\nVolatility Foundation Volatility Framework 2.4\n************************************************************************\nWriting System [     2019] to 2019.dmp\n\n$ ls -alh dump/2019.dmp\n-rw-r--r--  1 user  staff   111M Apr 22 20:47 dump/2019.dmp\n
    "}, {"location": "forensics/what-is-memory-forensics/#other-useful-commands", "title": "Other Useful Commands", "text": "

    There are plenty of commands that Volatility offers but some highlights include:

    "}, {"location": "forensics/what-is-metadata/", "title": "Metadata", "text": "

    Metadata is data about data. Different types of files have different metadata. The metadata on a photo could include dates, camera information, GPS location, comments, etc. For music, it could include the title, author, track number and album.

    "}, {"location": "forensics/what-is-metadata/#what-kind-of-file-metadata-is-useful", "title": "What kind of file metadata is useful?", "text": "

    Potentially, any file metadata you can find could be useful.

    "}, {"location": "forensics/what-is-metadata/#how-do-i-find-it", "title": "How do I find it?", "text": "

    Note

    EXIF Data is metadata attached to photos which can include location, time, and device information.

    One of our favorite tools is exiftool, which displays metadata for an input file, including: - File size - Dimensions (width and height) - File type - Programs used to create (e.g. Photoshop) - OS used to create (e.g. Apple)

    Run command line: exiftool(-k).exe [filename] and you should see something like this:

    "}, {"location": "forensics/what-is-metadata/#example", "title": "Example", "text": "

    Let's take a look at File A's metadata with exiftool:

    File type

    Image description

    Make and camera info

    GPS Latitude/Longitude

    "}, {"location": "forensics/what-is-metadata/#timestamps", "title": "Timestamps", "text": "

    Timestamps are data that indicate the time of certain events (MAC): - Modification \u2013 when a file was modified - Access \u2013 when a file or entries were read or accessed - Creation \u2013 when files or entries were created

    "}, {"location": "forensics/what-is-metadata/#types-of-timestamps", "title": "Types of timestamps", "text": ""}, {"location": "forensics/what-is-metadata/#why-do-we-care", "title": "Why do we care?", "text": "

    Certain events such as creating, moving, copying, opening, editing, etc. might affect the MAC times. If the MAC timestamps can be attained, a timeline of events could be created.

    "}, {"location": "forensics/what-is-metadata/#timeline-patterns", "title": "Timeline Patterns", "text": "

    There are plenty more patterns than the ones introduced below, but these are the basics you should start with to get a good understanding of how it works, and to complete this challenge.

    "}, {"location": "forensics/what-is-metadata/#examples", "title": "Examples", "text": "

    We know that the BMP files fileA and fileD are the same, but that the JPEG files fileB and fileC are different somehow. So how can we find out what went on with these files?

    By using time stamp information from the file system, we can learn that the BMP fileD was the original file, with fileA being a copy of the original. Afterward, fileB was created by modifying fileB, and fileC was created by modifying fileA in a different way.

    Follow along as we demonstrate.

    We\u2019ll start by analyzing images in AccessData FTK Imager, where there\u2019s a Properties window that shows you some information about the file or folder you\u2019ve selected.

    Here are the extracted MAC times for fileA, fileB, fileC and fileD: Note, AccessData FTK Imager assumes that the file times on the drive are in UTC (Universal Coordinated Time). I subtracted four hours, since the USB was set up in Eastern Standard Time. This isn\u2019t necessary, but it helps me understand the times a bit better.

    Highlight timestamps that are the same, if timestamps are off by a few seconds, they should be counted as the same. This lets you see a clear difference between different timestamps. Then, highlight oldest to newest to help put them in order.

    Identify timestamp patterns.

    "}, {"location": "forensics/what-is-stegonagraphy/", "title": "Steganography", "text": "

    Steganography is the practice of hiding data in plain sight. Steganography is often embedded in images or audio.

    You could send a picture of a cat to a friend and hide text inside. Looking at the image, there\u2019s nothing to make anyone think there\u2019s a message hidden inside it.

    You could also hide a second image inside the first.

    "}, {"location": "forensics/what-is-stegonagraphy/#steganography-detection", "title": "Steganography Detection", "text": "

    So we can hide text and an image, how do we find out if there is hidden data?

    FileA and FileD appear the same, but they\u2019re different. Also, FileD was modified after it was copied, so it\u2019s possible there might be steganography in it.

    FileB and FileC don\u2019t appear to have been modified after being created. That doesn\u2019t rule out the possibility that there\u2019s steganography in them, but you\u2019re more likely to find it in fileD. This brings up two questions:

    1. Can we determine that there is steganography in fileD?
    2. If there is, what was hidden in it?
    "}, {"location": "forensics/what-is-stegonagraphy/#lsb-steganography", "title": "LSB Steganography", "text": "

    File are made of bytes. Each byte is composed of eight bits.

    Changing the least-significant bit (LSB) doesn\u2019t change the value very much.

    So we can modify the LSB without changing the file noticeably. By doing so, we can hide a message inside.

    "}, {"location": "forensics/what-is-stegonagraphy/#lsb-steganography-in-images", "title": "LSB Steganography in Images", "text": "

    LSB Steganography or Least Significant Bit Steganography is a method of Steganography where data is recorded in the lowest bit of a byte.

    Say an image has a pixel with an RGB value of (255, 255, 255), the bits of those RGB values will look like

    1 1 1 1 1 1 1 1

    By modifying the lowest, or least significant, bit, we can use the 1 bit space across every RGB value for every pixel to construct a message.

    1 1 1 1 1 1 1 0

    The reason steganography is hard to detect by sight is because a 1 bit difference in color is insignificant as seen below.

    "}, {"location": "forensics/what-is-stegonagraphy/#example", "title": "Example", "text": "

    Let\u2019s say we have an image, and part of it contains the following binary:

    And let\u2019s say we want to hide the character y inside.

    First, we need to convert the hidden message to binary.

    Now we take each bit from the hidden message and replace the LSB of the corresponding byte with it.

    And again:

    And again:

    And again:

    And again:

    And again:

    And again:

    And once more:

    Decoding LSB steganography is exactly the same as encoding, but in reverse. For each byte, grab the LSB and add it to your decoded message. Once you\u2019ve gone through each byte, convert all the LSBs you grabbed into text or a file. (You can use your file signature knowledge here!)

    "}, {"location": "forensics/what-is-stegonagraphy/#what-other-types-of-steganography-are-there", "title": "What other types of steganography are there?", "text": "

    Steganography is hard for the defense side, because there\u2019s practically an infinite number of ways it could be carried out. Here are a few examples: - LSB steganography: different bits, different bit combinations - Encode in every certain number of bytes - Use a password - Hide in different places - Use encryption on top of steganography

    "}, {"location": "forensics/what-is-wireshark/", "title": "Wireshark", "text": "

    Note from our infrastructure team

    \"Wireshark saved me hours on my last tax return! - David\"

    \"[Wireshark] is great for ruining your weekend and fixing pesky networking problems!\" - Max\"

    \"Wireshark is the powerhouse of the cell. - Joe\"

    \"Does this cable do anything? - Ayyaz\"

    Wireshark is a network protocol analyzer which is often used in CTF challenges to look at recorded network traffic. Wireshark uses a filetype called PCAP to record traffic. PCAPs are often distributed in CTF challenges to provide recorded traffic history.

    "}, {"location": "forensics/what-is-wireshark/#interface", "title": "Interface", "text": "

    Upon opening Wireshark, you are greeted with the option to open a PCAP or begin capturing network traffic on your device.

    The network traffic displayed initially shows the packets in order of which they were captured. You can filter packets by protocol, source IP address, destination IP address, length, etc.

    In order to apply filters, simply enter the constraining factor, for example 'http', in the display filter bar.

    Filters can be chained together using '&&' notation. In order to filter by IP, ensure a double equals '==' is used.

    The most pertinent part of a packet is its data payload and protocol information.

    "}, {"location": "forensics/what-is-wireshark/#decrypting-ssl-traffic", "title": "Decrypting SSL Traffic", "text": "

    By default, Wireshark cannot decrypt SSL traffic on your device unless you grant it specific certificates.

    "}, {"location": "forensics/what-is-wireshark/#high-level-ssl-handshake-overview", "title": "High Level SSL Handshake Overview", "text": "

    In order for a network session to be encrypted properly, the client and server must share a common secret for which they can use to encrypt and decrypt data without someone in the middle being able to guess. The SSL Handshake loosely follows this format:

    1. The client sends a list of available cipher suites it can use along with a random set of bytes referred to as client_random
    2. The server sends back the cipher suite that will be used, such as TLS_DHE_RSA_WITH_AES_128_CBC_SHA, along with a random set of bytes referred to as server_random
    3. The client generates a pre-master secret, encrypts it, then sends it to the server.
    4. The server and client then generate a common master secret using the selected cipher suite
    5. The client and server begin communicating using this common secret
    "}, {"location": "forensics/what-is-wireshark/#decryption-requirements", "title": "Decryption Requirements", "text": "

    There are several ways to be able to decrypt traffic.

    "}, {"location": "reverse-engineering/overview/", "title": "Overview", "text": ""}, {"location": "reverse-engineering/overview/#reverse-engineering", "title": "Reverse Engineering", "text": "

    Reverse Engineering in a CTF is typically the process of taking a compiled (machine code, bytecode) program and converting it back into a more human readable format.

    Very often the goal of a reverse engineering challenge is to understand the functionality of a given program such that you can identify deeper issues.

    "}, {"location": "reverse-engineering/what-are-decompilers/", "title": "Decompilers", "text": "

    Decompilers do the impossible and reverse compiled code back into psuedocode/code.

    IDA offers HexRays, which translates machine code into a higher language pseudocode.

    "}, {"location": "reverse-engineering/what-are-decompilers/#example-workflow", "title": "Example Workflow", "text": "

    Let's say we are disassembling a program which has the source code:

    #include <stdio.h>\n\nvoid printSpacer(int num){\n    for(int i = 0; i < num; ++i){\n        printf(\"-\");\n    }\n    printf(\"\\n\");\n}\n\nint main()\n{\n    char* string = \"Hello, World!\";\n    for(int i = 0; i < 13; ++i){\n        printf(\"%c\", string[i]);\n        for(int j = i+1; j < 13; j++){\n            printf(\"%c\", string[j]);\n        }\n        printf(\"\\n\");\n        printSpacer(13 - i);\n    }\n    return 0;\n}\n

    And creates an output of:

    Hello, World!\n-------------\nello, World!\n------------\nllo, World!\n-----------\nlo, World!\n----------\no, World!\n---------\n, World!\n--------\n World!\n-------\nWorld!\n------\norld!\n-----\nrld!\n----\nld!\n---\nd!\n--\n!\n-\n

    If we are given a binary compiled from that source and we want to figure out how the source looks, we can use a decompiler to get c pseudocode which we can then use to reconstruct the function. The sample decompilation can look like:

    printSpacer:\nint __fastcall printSpacer(int a1)\n{\n  int i; // [rsp+8h] [rbp-8h]\n\n  for ( i = 0; i < a1; ++i )\n    printf(\"-\");\n  return printf(\"\\n\");\n}\n\nmain:\nint __cdecl main(int argc, const char **argv, const char **envp)\n{\n  int v4; // [rsp+18h] [rbp-18h]\n  signed int i; // [rsp+1Ch] [rbp-14h]\n\n  for ( i = 0; i < 13; ++i )\n  {\n    v4 = i + 1;\n    printf(\"%c\", (unsigned int)aHelloWorld[i], envp);\n    while ( v4 < 13 )\n      printf(\"%c\", (unsigned int)aHelloWorld[v4++]);\n    printf(\"\\n\");\n    printSpacer(13 - i);\n  }\n  return 0;\n}\n

    A good method of getting a good representation of the source is to convert the decompilation into Python since Python is basically psuedocode that runs. Starting with main often allows you to gain a good overview of what the program is doing and will help you translate the other functions.

    "}, {"location": "reverse-engineering/what-are-decompilers/#main", "title": "Main", "text": "

    We know we will start with a main function and some variables, if you trace the execution of the variables, you can oftentimes determine the variable type. Because i is being used as an index, we know its an int, and because v4 used as one later on, it too is an index. We can also see that we have a variable aHelloWorld being printed with \"%c\", we can determine it represents the 'Hello, World!' string. Lets define all these variables in our Python main function:

    def main():\n    string = \"Hello, World!\"\n    i = 0\n    v4 = 0\n    for i in range(0, 13):\n        v4 = i + 1\n        print(string[i], end='')\n        while v4 < 13:\n            print(string[v4], end='')\n            v4 += 1\n        print()\n        printSpacer(13-i)\n
    "}, {"location": "reverse-engineering/what-are-decompilers/#printspacer-function", "title": "printSpacer Function", "text": "

    Now we can see that printSpacer is clearly being fed an int value. Translating it into python shouldn't be too hard.

    def printSpacer(number):\n    i = 0\n    for i in range(0, number):\n        print(\"-\", end='')\n    print()\n
    "}, {"location": "reverse-engineering/what-are-decompilers/#results", "title": "Results", "text": "

    Running main() gives us:

    Hello, World!\n-------------\nello, World!\n------------\nllo, World!\n-----------\nlo, World!\n----------\no, World!\n---------\n, World!\n--------\n World!\n-------\nWorld!\n------\norld!\n-----\nrld!\n----\nld!\n---\nd!\n--\n!\n-\n
    "}, {"location": "reverse-engineering/what-are-disassemblers/", "title": "Disassemblers", "text": "

    A disassembler is a tool which breaks down a compiled program into machine code.

    "}, {"location": "reverse-engineering/what-are-disassemblers/#list-of-disassemblers", "title": "List of Disassemblers", "text": ""}, {"location": "reverse-engineering/what-are-disassemblers/#ida", "title": "IDA", "text": "

    The Interactive Disassembler (IDA) is the industry standard for binary disassembly. IDA is capable of disassembling \"virtually any popular file format\". This makes it very useful to security researchers and CTF players who often need to analyze obscure files without knowing what they are or where they came from. IDA also features the industry leading Hex Rays decompiler which can convert assembly code back into a pseudo code like format.

    IDA also has a plugin interface which has been used to create some successful plugins that can make reverse engineering easier:

    "}, {"location": "reverse-engineering/what-are-disassemblers/#binary-ninja", "title": "Binary Ninja", "text": "

    Binary Ninja is an up and coming disassembler that attempts to bring a new, more programmatic approach to reverse engineering. Binary Ninja brings an improved plugin API and modern features to reverse engineering. While it's less popular or as old as IDA, Binary Ninja (often called binja) is quickly gaining ground and has a small community of dedicated users and followers.

    Binja also has some community contributed plugins which are collected here: https://github.com/Vector35/community-plugins

    "}, {"location": "reverse-engineering/what-are-disassemblers/#gdb", "title": "gdb", "text": "

    The GNU Debugger is a free and open source debugger which also disassembles programs. It's capable as a disassembler, but most notably it is used by CTF players for its debugging and dynamic analysis capabailities.

    gdb is often used in tandom with enhancement scripts like peda, pwndbg, and GEF

    "}, {"location": "reverse-engineering/what-is-assembly-machine-code/", "title": "Assembly/Machine Code", "text": "

    Machine Code or Assembly is code which has been formatted for direct execution by a CPU. Machine Code is the reason why readable programming languages like C, when compiled, cannot be reversed into source code (well Decompilers can sort of, but more on that later).

    "}, {"location": "reverse-engineering/what-is-assembly-machine-code/#from-source-to-compilation", "title": "From Source to Compilation", "text": "

    Godbolt shows the differences in machine code generated by various compilers.

    For example, if we have a simple C++ function:

    #include <unistd.h>\n#include <stdio.h>\n#include <stdlib.h>\n\nint main() {\n    char c;\n    int fd = syscall(2, \"/etc/passwd\", 0);\n    while (syscall(0, fd, &c, 1)) {\n        putchar(c);\n    }\n}\n

    We can see the compilation results in some verbose instructions for the CPU:

    .LC0:\n  .string \"/etc/passwd\"\nmain:\n  push rbp\n  mov rbp, rsp\n  sub rsp, 16\n  mov edx, 0\n  mov esi, OFFSET FLAT:.LC0\n  mov edi, 2\n  mov eax, 0\n  call syscall\n  mov DWORD PTR [rbp-4], eax\n.L3:\n  lea rdx, [rbp-5]\n  mov eax, DWORD PTR [rbp-4]\n  mov ecx, 1\n  mov esi, eax\n  mov edi, 0\n  mov eax, 0\n  call syscall\n  test rax, rax\n  setne al\n  test al, al\n  je .L2\n  movzx eax, BYTE PTR [rbp-5]\n  movsx eax, al\n  mov edi, eax\n  call putchar\n  jmp .L3\n.L2:\n  mov eax, 0\n  leave\n  ret\n

    This is a one way process for compiled languages as there is no way to generate source from machine code. While the machine code may seem unintelligible, the extremely basic functions can be interpreted with some practice.

    "}, {"location": "reverse-engineering/what-is-assembly-machine-code/#x86-64", "title": "x86-64", "text": "

    x86-64 or amd64 or i64 is a 64-bit Complex Instruction Set Computing (CISC) architecture. This basically means that the registers used for this architecture extend an extra 32-bits on Intel's x86 architecture. CISC means that a single instruction can do a bunch of different things at once, such as memory accesses, register reads, etc. It is also a variable-length instruction set, which means different instructions can be different sizes ranging from 1 to 16 bytes long. And finally x86-64 allows for multi-sized register access, which means that you can access certain parts of a register which are different sizes.

    "}, {"location": "reverse-engineering/what-is-assembly-machine-code/#x86-64-registers", "title": "x86-64 Registers", "text": "

    x86-64 registers behave similarly to other architectures. A key component of x86-64 registers is multi-sized access which means the register RAX can have its lower 32 bits accessed with EAX. The next lower 16 bits can be accessed with AX and the lowest 8 bits can be accessed with AL which allows for the compiler to make optimizations which boost program execution.

    x86-64 has plenty of registers to use, including rax, rbx, rcx, rdx, rdi, rsi, rsp, rip, r8-r15, and more! But some registers serve special purposes.

    The special registers include: - RIP: the instruction pointer - RSP: the stack pointer - RBP: the base pointer

    "}, {"location": "reverse-engineering/what-is-assembly-machine-code/#instructions", "title": "Instructions", "text": "

    An instruction represents a single operation for the CPU to perform.

    There are different types of instructions including:

    Because x86-64 is a CISC architecture, instructions can be quite complex for machine code, such as repne scasb which repeats up to ECX times over memory at EDI looking for a NULL byte (0x00), decrementing ECX each byte (essentially strlen() in a single instruction!).

    It is important to remember that an instruction really is just memory; this idea will become useful with Return Oriented Programming or ROP.

    Note

    Instructions, numbers, strings, everything are always represented in hex!

    add rax, rbx\nmov rax, 0xdeadbeef\nmov rax, [0xdeadbeef] == 67 48 8b 05 ef be ad de\n\"Hello\" == 48 65 6c 6c 6f\n== 48 01 d8\n== 48 c7 c0 ef be ad de\n
    "}, {"location": "reverse-engineering/what-is-assembly-machine-code/#execution", "title": "Execution", "text": "

    What should the CPU execute? This is determined by the RIP register where IP means instruction pointer. Execution follows the pattern: fetch the instruction at the address in RIP, decode it, run it.

    "}, {"location": "reverse-engineering/what-is-assembly-machine-code/#examples", "title": "Examples", "text": "
    1. mov rax, 0xdeadbeef

    Here the operation mov is moving the \"immediate\" 0xdeadbeef into the register RAX

    1. mov rax, [0xdeadbeef + rbx * 4]

    Here the operation mov is moving the data at the address of [0xdeadbeef + RBX*4] into the register RAX. When brackets are used, you can think of the program as getting the content from that effective address.

    "}, {"location": "reverse-engineering/what-is-assembly-machine-code/#example-execution", "title": "Example Execution", "text": "
    -> 0x0804000: mov eax, 0xdeadbeef            Register Values:\n   0x0804005: mov ebx, 0x1234                RIP = 0x0804000\n   0x080400a: add, rax, rbx                  RAX = 0x0\n   0x080400d: inc rbx                        RBX = 0x0\n   0x0804010: sub rax, rbx                   RCX = 0x0\n   0x0804013: mov rcx, rax                   RDX = 0x0\n
       0x0804000: mov eax, 0xdeadbeef            Register Values:\n-> 0x0804005: mov ebx, 0x1234                RIP = 0x0804005\n   0x080400a: add, rax, rbx                  RAX = 0xdeadbeef\n   0x080400d: inc rbx                        RBX = 0x0\n   0x0804010: sub rax, rbx                   RCX = 0x0\n   0x0804013: mov rcx, rax                   RDX = 0x0\n
       0x0804000: mov eax, 0xdeadbeef            Register Values:\n   0x0804005: mov ebx, 0x1234                RIP = 0x080400a\n-> 0x080400a: add, rax, rbx                  RAX = 0xdeadbeef\n   0x080400d: inc rbx                        RBX = 0x1234\n   0x0804010: sub rax, rbx                   RCX = 0x0\n   0x0804013: mov rcx, rax                   RDX = 0x0\n
       0x0804000: mov eax, 0xdeadbeef            Register Values:\n   0x0804005: mov ebx, 0x1234                RIP = 0x080400d\n   0x080400a: add, rax, rbx                  RAX = 0xdeadd123\n-> 0x080400d: inc rbx                        RBX = 0x1234\n   0x0804010: sub rax, rbx                   RCX = 0x0\n   0x0804013: mov rcx, rax                   RDX = 0x0\n
       0x0804000: mov eax, 0xdeadbeef            Register Values:\n   0x0804005: mov ebx, 0x1234                RIP = 0x0804010\n   0x080400a: add, rax, rbx                  RAX = 0xdeadd123\n   0x080400d: inc rbx                        RBX = 0x1235\n-> 0x0804010: sub rax, rbx                   RCX = 0x0\n   0x0804013: mov rcx, rax                   RDX = 0x0\n
       0x0804000: mov eax, 0xdeadbeef            Register Values:\n   0x0804005: mov ebx, 0x1234                RIP = 0x0804013\n   0x080400a: add, rax, rbx                  RAX = 0xdeadbeee\n   0x080400d: inc rbx                        RBX = 0x1235\n   0x0804010: sub rax, rbx                   RCX = 0x0\n-> 0x0804013: mov rcx, rax                   RDX = 0x0\n
       0x0804000: mov eax, 0xdeadbeef            Register Values:\n   0x0804005: mov ebx, 0x1234                RIP = 0x0804005\n   0x080400a: add, rax, rbx                  RAX = 0xdeadbeee\n   0x080400d: inc rbx                        RBX = 0x1235\n   0x0804010: sub rax, rbx                   RCX = 0xdeadbeee\n   0x0804013: mov rcx, rax                   RDX = 0x0\n
    "}, {"location": "reverse-engineering/what-is-assembly-machine-code/#control-flow", "title": "Control Flow", "text": "

    How can we express conditionals in x86-64? We use conditional jumps such as:

    They jump if their condition is true, and just go to the next instruction otherwise. These conditionals are checking EFLAGS, which are special registers which store flags on certain instructions such as add rax, rbx which sets the o (overflow) flag if the sum is greater than a 64-bit register can hold, and wraps around. You can jump based on that with a jo instruction. The most important thing to remember is the cmp instruction:

    cmp rax, rbx\njle error\n
    This assembly jumps if RAX <= RBX

    "}, {"location": "reverse-engineering/what-is-assembly-machine-code/#addresses", "title": "Addresses", "text": "

    Memory acts similarly to a big array where the indices of this \"array\" are memory addresses. Remember from earlier:

    mov rax, [0xdeadbeef]

    The square brackets mean \"get the data at this address\". This is analogous to the C/C++ syntax: rax = *0xdeadbeef;

    "}, {"location": "reverse-engineering/what-is-bytecode/", "title": "What is bytecode", "text": ""}, {"location": "reverse-engineering/what-is-c/", "title": "The C Programming Language", "text": ""}, {"location": "reverse-engineering/what-is-c/#history", "title": "History", "text": "

    The C programming language was written by Dennis Ritchie in the 1970s while he was working at Bell Labs. It was first used to reimplement the Unix operating system which was purely written in assembly language. At first, the Unix developers were considering using a language called \"B\" but because B wasn't optimized for the target computer, the C language was created.

    Note

    C is the letter and the programming language after B!

    C was designed to be close to assembly and is still widely used in lower level programming where speed and control are needed (operating systems, embedded systems). C was also very influential to other programming languages used today. Notable languages include C++, Objective-C, Golang, Java, JavaScript, PHP, Python, and Rust.

    "}, {"location": "reverse-engineering/what-is-c/#hello-world", "title": "Hello World", "text": "

    C is an ancestor of many other programming languages and if you are familiar with programming, it's likely that C will be at least somewhat familiar.

    #include <stdio.h>\nint main()\n{\n   printf(\"Hello, World!\");\n   return 0;\n}\n
    "}, {"location": "reverse-engineering/what-is-c/#today", "title": "Today", "text": "

    Today C is widely used either as a low level programming language or is the base language that other programming languages are implemented in.

    While it can be difficult to see, the C language compiles down directly into machine code. The compiler is programmed to process the provided C code and emit assembly that's targetted to whatever operating system and architecture the compiler is set to use.

    Some common compilers include:

    A good way to explore this relationship is to use this online GCC Explorer from Matt Godbolt.

    In regards to CTF, many reverse engineering and exploitation CTF challenges are written in C because the language compiles down directly to assembly and there are little to no safeguards in the language. This means developers must manually handle both. Of course, this can lead to mistakes which can sometimes lead to security issues.

    Note

    Other higher level langauges like Python manage memory and garbage collection for you. Google Golang was inspired by C, but adds in functionality like garbage collection and memory safety.

    There are some examples of famously vulnerable functions in C which are still available and can still result in vulnerabilities:

    "}, {"location": "reverse-engineering/what-is-c/#types", "title": "Types", "text": "

    C has four basic types:

    "}, {"location": "reverse-engineering/what-is-c/#pointers", "title": "Pointers", "text": "

    C uses an idea known as pointers. A pointer is a variable which contains the address of another variable.

    To understand this idea we should first understand that memory is laid out in terms of addresses and data gets stored at these addresses.

    Take the following example of defining an integer in C:

    int x = 4;\n

    To the programmer this is the variable x receiving the value of 4. The computer stores this value in some location in memory. For example we can say that address 0x1000 now holds the value 4. The computer knows to directly access the memory and retrieve the value 4 whenever the programmer tries to use the x variable. If we were to say x + 4, the computer would give you 8 instead of 0x1004.

    But in C we can retrieve the memory address being used to hold the 4 value (i.e. 0x1000) by using the & character and using * to create an \"integer pointer\" type.

    int* y = &x;\n

    The y variable will store the address pointed to by the xvariable (0x1000).

    Note

    The * character allows us to declare pointer variables but also allows us to access the value stored at a pointer. For example, entering *y allows us to access the 4 value instead of 0x1000.

    Whenever we use the y variable we are using the memory address, but if we use the x variable we use the value stored at the memory address.

    "}, {"location": "reverse-engineering/what-is-c/#arrays", "title": "Arrays", "text": "

    Arrays are a grouping of objects of the same type. They are typically created with the following syntax:

    type arrayName [ arraySize ];\n

    To initialize values in the array we can do:

    int integers[ 10 ] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};\n

    Arrays allow programmers to group data into logical containers.

    To access the individual elements of an array we access the contents by their \"index\". Most programming langauges today start counting from 0. So to take our previous example:

    int integers[ 10 ] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};\n/*     indexes        0  1  2  3  4  5  6  7  8   9\n

    To access the value 6 we would use index 5:

    integers[5];\n
    "}, {"location": "reverse-engineering/what-is-c/#how-do-arrays-work", "title": "How do arrays work?", "text": "

    Arrays are a clever combination of multiplication, pointers, and programming.

    Because the computer knows the data type used for every element in the array, the computer needs to simply multiply the size of the data type by the index you are looking for and then add this value to the address of the beginning of the array.

    For example if we know that the base address of an array is 1000 and we know that each integer takes 8 bytes, we know that if we have 8 integers right next to each other, we can get the integer at the 4th index with the following math:

    1000 + (4 * 8) =  1032\n
    array [ 1   , 2   , 3   , 4   , 5   , 6   , 7   , 8   ]\nindex   0     1     2     3     4     5     6     7\naddrs  1000  1008  1016  1024  1032  1040  1048  1056\n
    "}, {"location": "reverse-engineering/what-is-c/#memory-management", "title": "Memory Management", "text": ""}, {"location": "reverse-engineering/what-is-gdb/", "title": "The GNU Debugger (GDB)", "text": "

    The GNU Debugger or GDB is a powerful debugger which allows for step-by-step execution of a program. It can be used to trace program execution and is an important part of any reverse engineering toolkit.

    "}, {"location": "reverse-engineering/what-is-gdb/#vanilla-gdb", "title": "Vanilla GDB", "text": "

    GDB without any modifications is unintuitive and obscures a lot of useful information. The plug-in pwndb solves a lot of these problems and makes for a much more pleasant experience. But if you are constrained and have to use vanilla gdb, here are several things to make your life easier.

    "}, {"location": "reverse-engineering/what-is-gdb/#starting-gdb", "title": "Starting GDB", "text": "

    To execute GBD and attach it to a program simply run gdb [program]

    "}, {"location": "reverse-engineering/what-is-gdb/#disassembly", "title": "Disassembly", "text": "

    (gdb) disassemble [address/symbol] will display the disassembly for that function/frame

    GDB will autocomplete functions, so saying (gdb) disas main suffices if you'd like to see the disassembly of main

    "}, {"location": "reverse-engineering/what-is-gdb/#view-disassembly-during-execution", "title": "View Disassembly During Execution", "text": "

    Another handy thing to see while stepping through a program is the disassembly of nearby instructions:

    (gdb) display/[# of instructions]i $pc [\u00b1 offset]

    "}, {"location": "reverse-engineering/what-is-gdb/#example-usage", "title": "Example Usage", "text": "

    (gdb) display/10i $pc - 0x5

    This command will show 10 instructions on screen with an offset from the next instruction of 5, giving us this display:

       0x8048535 <main+6>:  lock pushl -0x4(%ecx)\n   0x8048539 <main+10>: push   %ebp\n=> 0x804853a <main+11>: mov    %esp,%ebp\n   0x804853c <main+13>: push   %ecx\n   0x804853d <main+14>: sub    $0x14,%esp\n   0x8048540 <main+17>: sub    $0xc,%esp\n   0x8048543 <main+20>: push   $0x400\n   0x8048548 <main+25>: call   0x80483a0 <malloc@plt>\n   0x804854d <main+30>: add    $0x10,%esp\n   0x8048550 <main+33>: sub    $0xc,%esp\n
    "}, {"location": "reverse-engineering/what-is-gdb/#deleting-views", "title": "Deleting Views", "text": "

    If for whatever reason, a view no long suits your needs simply call (gdb) info display which will give you a list of active displays:

    Auto-display expressions now in effect:\nNum Enb Expression\n1:   y  /10bi $pc-0x5\n

    Then simply execute (gdb) delete display 1 and your execution will resume without the display.

    "}, {"location": "reverse-engineering/what-is-gdb/#registers", "title": "Registers", "text": "

    In order to view the state of registers with vanilla gdb, you need to run the command info registers which will display the state of all the registers:

    eax            0xf77a6ddc   -142971428\necx            0xffe06b10   -2069744\nedx            0xffe06b34   -2069708\nebx            0x0  0\nesp            0xffe06af8   0xffe06af8\nebp            0x0  0x0\nesi            0xf77a5000   -142979072\nedi            0xf77a5000   -142979072\neip            0x804853a    0x804853a <main+11>\neflags         0x286    [ PF SF IF ]\ncs             0x23 35\nss             0x2b 43\nds             0x2b 43\nes             0x2b 43\nfs             0x0  0\ngs             0x63 99\n

    If you simply would like to see the contents of a single register, the notation x/x $[register] where:

    "}, {"location": "reverse-engineering/what-is-gdb/#pwndbg", "title": "Pwndbg", "text": "

    These commands work with vanilla gdb as well.

    "}, {"location": "reverse-engineering/what-is-gdb/#setting-breakpoints", "title": "Setting Breakpoints", "text": "

    Setting breakpoints in GDB uses the format b*[Address/Symbol]

    "}, {"location": "reverse-engineering/what-is-gdb/#example-usage_1", "title": "Example Usage", "text": ""}, {"location": "reverse-engineering/what-is-gdb/#deleting-breakpoints", "title": "Deleting Breakpoints", "text": "

    As before, in order to delete a view, you can list the available breakpoints using (gdb) info breakpoints (don't forget about GDB's autocomplete, you don't always need to type out every command!) which will display all breakpoints:

    Num     Type           Disp Enb Address    What\n1       breakpoint     keep y   0x0804852f <main>\n3       breakpoint     keep y   0x0804864d <__libc_csu_init+61>\n

    Then simply execute (gdb) delete 1

    Note

    GDB creates breakpoints chronologically and does NOT reuse numbers.

    "}, {"location": "reverse-engineering/what-is-gdb/#stepping", "title": "Stepping", "text": "

    What good is a debugger if you can't control where you are going? In order to begin execution of a program, use the command r [arguments] similar to how if you ran it with dot-slash notation you would execute it ./program [arguments]. In this case the program will run normally and if no breakpoints are set, you will execute normally. If you have breakpoints set, you will stop at that instruction.

    "}, {"location": "reverse-engineering/what-is-gdb/#examining", "title": "Examining", "text": "

    Examining data in GDB is also very useful for seeing how the program is affecting data. The notation may seem complex at first, but it is flexible and provides powerful functionality.

    (gdb) x/[#][size][format] [Address/Symbol/Register][\u00b1 offset]

    "}, {"location": "reverse-engineering/what-is-gdb/#example-usage_2", "title": "Example Usage", "text": ""}, {"location": "reverse-engineering/what-is-gdb/#forking", "title": "Forking", "text": "

    If the program happens to be an accept-and-fork server, gdb will have issues following the child or parent processes. In order to specify how you want gdb to function you can use the command set follow-fork-mode [on/off]

    "}, {"location": "reverse-engineering/what-is-gdb/#setting-data", "title": "Setting Data", "text": "

    If you would like to set data at any point, it is possible using the command set [Address/Register]=[Hex Data]

    "}, {"location": "reverse-engineering/what-is-gdb/#example-usage_3", "title": "Example Usage", "text": ""}, {"location": "reverse-engineering/what-is-gdb/#process-mapping", "title": "Process Mapping", "text": "

    A handy way to find the process's mapped address spaces is to use info proc map:

    Mapped address spaces:\n\n    Start Addr   End Addr       Size     Offset objfile\n     0x8048000  0x8049000     0x1000        0x0 /directory/program\n     0x8049000  0x804a000     0x1000        0x0 /directory/program\n     0x804a000  0x804b000     0x1000     0x1000 /directory/program\n    0xf75cb000 0xf75cc000     0x1000        0x0\n    0xf75cc000 0xf7779000   0x1ad000        0x0 /lib32/libc-2.23.so\n    0xf7779000 0xf777b000     0x2000   0x1ac000 /lib32/libc-2.23.so\n    0xf777b000 0xf777c000     0x1000   0x1ae000 /lib32/libc-2.23.so\n    0xf777c000 0xf7780000     0x4000        0x0\n    0xf778b000 0xf778d000     0x2000        0x0 [vvar]\n    0xf778d000 0xf778f000     0x2000        0x0 [vdso]\n    0xf778f000 0xf77b1000    0x22000        0x0 /lib32/ld-2.23.so\n    0xf77b1000 0xf77b2000     0x1000        0x0\n    0xf77b2000 0xf77b3000     0x1000    0x22000 /lib32/ld-2.23.so\n    0xf77b3000 0xf77b4000     0x1000    0x23000 /lib32/ld-2.23.so\n    0xffc59000 0xffc7a000    0x21000        0x0 [stack]\n

    This will show you where the stack, heap (if there is one), and libc are located.

    "}, {"location": "reverse-engineering/what-is-gdb/#attaching-processes", "title": "Attaching Processes", "text": "

    Another useful feature of GDB is to attach to processes which are already running. Simply launch gdb using gdb, then find the process id of the program you would like to attach to an execute attach [pid].

    "}, {"location": "web-exploitation/overview/", "title": "Overview", "text": ""}, {"location": "web-exploitation/overview/#web-exploitation", "title": "Web Exploitation", "text": "

    Websites all around the world are programmed using various programming languages. While there are specific vulnerabilities in each programming langage that the developer should be aware of, there are issues fundamental to the internet that can show up regardless of the chosen language or framework.

    These vulnerabilities often show up in CTFs as web security challenges where the user needs to exploit a bug to gain some kind of higher level privelege.

    Common vulnerabilities to see in CTF challenges:

    "}, {"location": "web-exploitation/command-injection/what-is-command-injection/", "title": "Command Injection", "text": "

    Command Injection is a vulnerability that allows an attacker to submit system commands to a computer running a website. This happens when the application fails to encode user input that goes into a system shell. It is very common to see this vulnerability when a developer uses the system() command or its equivalent in the programming language of the application.

    import os\n\ndomain = user_input() # ctf101.org\n\nos.system('ping ' + domain)\n

    The above code when used normally will ping the ctf101.org domain.

    But consider what would happen if the user_input() function returned different data?

    import os\n\ndomain = user_input() # ; ls\n\nos.system('ping ' + domain)\n

    Because of the additional semicolon, the os.system() function is instructed to run two commands.

    It looks to the program as:

    ping ; ls\n

    Note

    The semicolon terminates a command in bash and allows you to put another command after it.

    Because the ping command is being terminated and the ls command is being added on, the ls command will be run in addition to the empty ping command!

    This is the core concept behind command injection. The ls command could of course be switched with another command (e.g. wget, curl, bash, etc.)

    Command injection is a very common means of privelege escalation within web applications and applications that interface with system commands. Many kinds of home routers take user input and directly append it to a system command. For this reason, many of those home router models are vulnerable to command injection.

    "}, {"location": "web-exploitation/command-injection/what-is-command-injection/#example-payloads", "title": "Example Payloads", "text": ""}, {"location": "web-exploitation/command-injection/what-is-command-injection/#related-challenges", "title": "Related Challenges", "text": ""}, {"location": "web-exploitation/cross-site-request-forgery/what-is-cross-site-request-forgery/", "title": "Cross Site Request Forgery (CSRF)", "text": "

    A Cross Site Request Forgery or CSRF Attack, pronounced see surf, is an attack on an authenticated user which uses a state session in order to perform state changing attacks like a purchase, a transfer of funds, or a change of email address.

    The entire premise of CSRF is based on session hijacking, usually by injecting malicious elements within a webpage through an <img> tag or an <iframe> where references to external resources are unverified.

    "}, {"location": "web-exploitation/cross-site-request-forgery/what-is-cross-site-request-forgery/#using-csrf", "title": "Using CSRF", "text": "

    GET requests are often used by websites to get user input. Say a user signs in to an banking site which assigns their browser a cookie which keeps them logged in. If they transfer some money, the URL that is sent to the server might have the pattern:

    http://securibank.com/transfer.do?acct=[RECEPIENT]&amount=[DOLLARS]

    Knowing this format, an attacker can send an email with a hyperlink to be clicked on or they can include an image tag of 0 by 0 pixels which will automatically be requested by the browser such as:

    <img src=\"http://securibank.com/transfer.do?acct=[RECEPIENT]&amount=[DOLLARS]\" width=\"0\" height=\"0\" border=\"0\">

    "}, {"location": "web-exploitation/cross-site-scripting/what-is-cross-site-scripting/", "title": "Cross Site Scripting (XSS)", "text": "

    Cross Site Scripting or XSS is a vulnerability where on user of an application can send JavaScript that is executed by the browser of another user of the same application.

    This is a vulnerability because JavaScript has a high degree of control over a user's web browser.

    For example JavaScript has the ability to:

    By combining all of these abilities, XSS can maliciously use JavaScript to extract user's cookies and send them to an attacker controlled server. XSS can also modify the DOM to phish users for their passwords. This only scratches the surface of what XSS can be used to do.

    XSS is typically broken down into three categories:

    "}, {"location": "web-exploitation/cross-site-scripting/what-is-cross-site-scripting/#reflected-xss", "title": "Reflected XSS", "text": "

    Reflected XSS is when an XSS exploit is provided through a URL paramater.

    For example:

    https://ctf101.org?data=<script>alert(1)</script>\n

    You can see the XSS exploit provided in the data GET parameter. If the application is vulnerable to reflected XSS, the application will take this data parameter value and inject it into the DOM.

    For example:

    <html>\n    <body>\n        <script>alert(1)</script>\n    </body>\n</html>\n

    Depending on where the exploit gets injected, it may need to be constructed differently.

    Also, the exploit payload can change to fit whatever the attacker needs it to do. Whether that is to extract cookies and submit it to an external server, or to simply modify the page to deface it.

    One of the deficiencies of reflected XSS however is that it requires the victim to access the vulnerable page from an attacker controlled resource. Notice that if the data paramter, wasn't provided the exploit wouldn't work.

    In many situations, reflected XSS is detected by the browser because it is very simple for a browser to detect malicous XSS payloads in URLs.

    "}, {"location": "web-exploitation/cross-site-scripting/what-is-cross-site-scripting/#stored-xss", "title": "Stored XSS", "text": "

    Stored XSS is different from reflected XSS in one key way. In reflected XSS, the exploit is provided through a GET parameter. But in stored XSS, the exploit is provided from the website itself.

    Imagine a website that allows users to post comments. If a user can submit an XSS payload as a comment, and then have others view that malicious comment, it would be an example of stored XSS.

    The reason being that the web site itself is serving up the XSS payload to other users. This makes it very difficult to detect from the browser's perspective and no browser is capable of generically preventing stored XSS from exploiting a user.

    "}, {"location": "web-exploitation/cross-site-scripting/what-is-cross-site-scripting/#dom-xss", "title": "DOM XSS", "text": "

    DOM XSS is XSS that is due to the browser itself injecting an XSS payload into the DOM. While the server itself may properly prevent XSS, it's possible that the client side scripts may accidentally take a payload and insert it into the DOM and cause the payload to trigger.

    The server itself is not to blame, but the client side JavaScript files are causing the issue.

    "}, {"location": "web-exploitation/directory-traversal/what-is-directory-traversal/", "title": "Directory Traversal", "text": "

    Directory Traversal is a vulnerability where an application takes in user input and uses it in a directory path.

    Any kind of path controlled by user input that isn't properly sanitized or properly sandboxed could be vulnerable to directory traversal.

    For example, consider an application that allows the user to choose what page to load from a GET parameter.

    <?php\n    $page = $_GET['page']; // index.php\n    include(\"/var/www/html/\" . $page);\n?>\n

    Under normal operation the page would be index.php. But what if a malicious user gave in something different?

    <?php\n    $page = $_GET['page']; // ../../../../../../../../etc/passwd\n    include(\"/var/www/html/\" . $page);\n?>\n

    Here the user is submitting ../../../../../../../../etc/passwd.

    This will result in the PHP interpreter leaving the directory that it is coded to look in ('/var/www/html') and instead be forced up to the root folder.

    include(\"/var/www/html/../../../../../../../../etc/passwd\");\n

    Ultimately this will become /etc/passwd because the computer will not go a directory above its top directory.

    Thus the application will load the /etc/passwd file and emit it to the user like so:

    root:x:0:0:root:/root:/bin/bash\ndaemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin\nbin:x:2:2:bin:/bin:/usr/sbin/nologin\nsys:x:3:3:sys:/dev:/usr/sbin/nologin\nsync:x:4:65534:sync:/bin:/bin/sync\ngames:x:5:60:games:/usr/games:/usr/sbin/nologin\nman:x:6:12:man:/var/cache/man:/usr/sbin/nologin\nlp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin\nmail:x:8:8:mail:/var/mail:/usr/sbin/nologin\nnews:x:9:9:news:/var/spool/news:/usr/sbin/nologin\nuucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin\nproxy:x:13:13:proxy:/bin:/usr/sbin/nologin\nwww-data:x:33:33:www-data:/var/www:/usr/sbin/nologin\nbackup:x:34:34:backup:/var/backups:/usr/sbin/nologin\nlist:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin\nirc:x:39:39:ircd:/var/run/ircd:/usr/sbin/nologin\ngnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/usr/sbin/nologin\nnobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin\nsystemd-timesync:x:100:102:systemd Time Synchronization,,,:/run/systemd:/bin/false\nsystemd-network:x:101:103:systemd Network Management,,,:/run/systemd/netif:/bin/false\nsystemd-resolve:x:102:104:systemd Resolver,,,:/run/systemd/resolve:/bin/false\nsystemd-bus-proxy:x:103:105:systemd Bus Proxy,,,:/run/systemd:/bin/false\n_apt:x:104:65534::/nonexistent:/bin/false\n

    This same concept can be applied to applications where some input is taken from a user and then used to access a file or path or similar. This vulnerability very often can be used to leak sensitive data or extract application source code to find other vulnerabilities.

    "}, {"location": "web-exploitation/php/what-is-php/", "title": "PHP", "text": "

    PHP is one of the most used languages for back-end web development and therefore it has become a target by hackers. PHP is a language which makes it painful to be secure for most instances, making it every hacker's dream target.

    "}, {"location": "web-exploitation/php/what-is-php/#overview", "title": "Overview", "text": "

    PHP is a C-like language which uses tags enclosed by <?php ... ?> (sometimes just <? ... ?>). It is inlined into HTML. A word of advice is to keep the php docs open because function names are strange due to the fact that the length of function name is used to be the key in PHP's internal dictionary, so function names were shortened/lengthened to make the lookup faster. Other things include:

    "}, {"location": "web-exploitation/php/what-is-php/#example", "title": "Example", "text": "
    <?php\n    if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['email']) && isset($_POST['password'])) {\n        $db = new mysqli('127.0.0.1', 'cs3284', 'cs3284', 'logmein');\n        $email = $_POST['email'];\n        $password = sha1($_POST['password']);\n        $res = $db->query(\"SELECT * FROM users WHERE email = '$email' AND password = '$password'\");\n        if ($row = $res->fetch_assoc()) {\n            $_SESSION['id'] = $row['id'];\n            header('Location: index.php');\n            die();\n        }\n   }\n?>\n<html>...\n

    This example PHP simply checks the POST data for an email and password. If the password is equal to the hashed password in the database, the use is logged in and redirected to the index page.

    The line email = '$email' uses automatic string interpolation in order to convert $email into a string to compare with the database.

    "}, {"location": "web-exploitation/php/what-is-php/#type-juggling", "title": "Type Juggling", "text": "

    PHP will do just about anything to match with a loose comparison (\\=\\=) which means things can be 'equal' (\\=\\=) or really equal (\\=\\=\\=). The implicit integer parsing to strings is the root cause of a lot of issues in PHP.

    "}, {"location": "web-exploitation/php/what-is-php/#type-comparison-table", "title": "Type Comparison Table", "text": ""}, {"location": "web-exploitation/php/what-is-php/#comparisons-of-x-with-php-functions", "title": "Comparisons of $x with PHP Functions", "text": "Expression gettype() empty() is_null() isset() boolean: if($x) $x = \"\"; string TRUE FALSE TRUE FALSE $x = null; NULL TRUE TRUE FALSE FALSE var $x; NULL TRUE TRUE FALSE FALSE $x is undefined NULL TRUE TRUE FALSE FALSE $x = array(); array TRUE FALSE TRUE FALSE $x = array('a', 'b'); array FALSE FALSE TRUE TRUE $x = false; boolean TRUE FALSE TRUE FALSE $x = true; boolean FALSE FALSE TRUE TRUE $x = 1; integer FALSE FALSE TRUE TRUE $x = 42; integer FALSE FALSE TRUE TRUE $x = 0; integer TRUE FALSE TRUE FALSE $x = -1; integer FALSE FALSE TRUE TRUE $x = \"1\"; string FALSE FALSE TRUE TRUE $x = \"0\"; string TRUE FALSE TRUE FALSE $x = \"-1\"; string FALSE FALSE TRUE TRUE $x = \"php\"; string FALSE FALSE TRUE TRUE $x = \"true\"; string FALSE FALSE TRUE TRUE $x = \"false\"; string FALSE FALSE TRUE TRUE"}, {"location": "web-exploitation/php/what-is-php/#comparisons", "title": "\"==\" Comparisons", "text": "TRUE FALSE 1 0 -1 \"1\" \"0\" \"-1\" NULL array() \"php\" \"\" TRUE ==TRUE== FALSE ==TRUE== FALSE ==TRUE== ==TRUE== FALSE ==TRUE== FALSE FALSE ==TRUE== FALSE FALSE FALSE ==TRUE== FALSE ==TRUE== FALSE FALSE ==TRUE== FALSE ==TRUE== ==TRUE== FALSE ==TRUE== 1 ==TRUE== FALSE ==TRUE== FALSE FALSE ==TRUE== FALSE FALSE FALSE FALSE FALSE FALSE 0 FALSE ==TRUE== FALSE ==TRUE== FALSE FALSE ==TRUE== FALSE ==TRUE== FALSE ==TRUE== ==TRUE== -1 ==TRUE== FALSE FALSE FALSE ==TRUE== FALSE FALSE ==TRUE== FALSE FALSE FALSE FALSE \"1\" ==TRUE== FALSE ==TRUE== FALSE FALSE ==TRUE== FALSE FALSE FALSE FALSE FALSE FALSE \"0\" FALSE ==TRUE== FALSE ==TRUE== FALSE FALSE ==TRUE== FALSE FALSE FALSE FALSE FALSE \"-1\" ==TRUE== FALSE FALSE FALSE ==TRUE== FALSE FALSE ==TRUE== FALSE FALSE FALSE FALSE NULL FALSE ==TRUE== FALSE ==TRUE== FALSE FALSE FALSE FALSE ==TRUE== ==TRUE== FALSE ==TRUE== array() FALSE ==TRUE== FALSE FALSE FALSE FALSE FALSE FALSE ==TRUE== ==TRUE== FALSE FALSE \"php\" ==TRUE== FALSE FALSE ==TRUE== FALSE FALSE FALSE FALSE FALSE FALSE ==TRUE== FALSE \"\" FALSE ==TRUE== FALSE ==TRUE== FALSE FALSE FALSE FALSE ==TRUE== FALSE FALSE ==TRUE=="}, {"location": "web-exploitation/php/what-is-php/#comparisons_1", "title": "\"===\" Comparisons", "text": "TRUE FALSE 1 0 -1 \"1\" \"0\" \"-1\" NULL array() \"php\" \"\" TRUE ==TRUE== FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE ==TRUE== FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE 1 FALSE FALSE ==TRUE== FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE 0 FALSE FALSE FALSE ==TRUE== FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE -1 FALSE FALSE FALSE FALSE ==TRUE== FALSE FALSE FALSE FALSE FALSE FALSE FALSE \"1\" FALSE FALSE FALSE FALSE FALSE ==TRUE== FALSE FALSE FALSE FALSE FALSE FALSE \"0\" FALSE FALSE FALSE FALSE FALSE FALSE ==TRUE== FALSE FALSE FALSE FALSE FALSE \"-1\" FALSE FALSE FALSE FALSE FALSE FALSE FALSE ==TRUE== FALSE FALSE FALSE FALSE NULL FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE ==TRUE== FALSE FALSE FALSE array() FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE ==TRUE== FALSE FALSE \"php\" FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE ==TRUE== FALSE \"\" FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE ==TRUE=="}, {"location": "web-exploitation/php/what-is-php/#file-inclusion", "title": "File Inclusion", "text": "

    PHP has multiple ways to include other source files such as require, require_once and include. These can take a dynamic string such as require $_GET['page'] . \".php\"; which is usually seen in templating.

    "}, {"location": "web-exploitation/php/what-is-php/#php-stream-filters", "title": "PHP Stream Filters", "text": "

    PHP has its own URL scheme: php://... and its main purpose is to filter output automatically. It can automatically remove certain HTML tags and can base64 encode as well.

    "}, {"location": "web-exploitation/php/what-is-php/#example_1", "title": "Example", "text": "
    $fp = fopen('php://output', 'w');\nstream_filter_append(\n       $fp,\n       'string.strip_tags',\n       STREAM_FILTER_WRITE,\n       array('b','i','u'));\nfwrite($fp, \"<b>bolded text</b> enlarged to a <h1>level 1 heading</h1>\\n\");\n/* <b>bolded text</b> enlarged to a level 1 heading */\n
    "}, {"location": "web-exploitation/php/what-is-php/#exploitation", "title": "Exploitation", "text": "

    These filters can also be used on input such as:

    "}, {"location": "web-exploitation/server-side-request-forgery/what-is-server-side-request-forgery/", "title": "Server Side Request Forgery (SSRF)", "text": "

    Server Side Request Forgery or SSRF is where an attacker is able to cause a web application to send a request that the attacker defines.

    For example, say there is a website that lets you take a screenshot of any site on the internet.

    Under normal usage a user might ask it to take a screenshot of a page like Google, or The New York Times. But what if a user does something more nefarious? What if they asked the site to take a picture of http://localhost ? Or perhaps tries to access something more useful like http://localhost/server-status ?

    Note

    127.0.0.1 (also known as localhost or loopback) represents the computer itself. Accessing localhost means you are accessing the computer's own internal network. Developers often use localhost as a way to access the services they have running on their own computers.

    Depending on what the response from the site is the attacker may be able to gain additional information about what's running on the computer itself.

    In addition, the requests originating from the server would come from the server's IP not the attackers IP. Because of that, it is possible that the attacker might be able to access internal resources that he wouldn't normally be able to access.

    Another usage for SSRF is to create a simple port scanner to scan the internal network looking for internal services.

    "}, {"location": "web-exploitation/sql-injection/what-is-sql-injection/", "title": "SQL Injection", "text": "

    SQL Injection is a vulnerability where an application takes input from a user and doesn't vaildate that the user's input doesn't contain additional SQL.

    <?php\n    $username = $_GET['username']; // kchung\n    $result = mysql_query(\"SELECT * FROM users WHERE username='$username'\");\n?>\n

    If we look at the $username variable, under normal operation we might expect the username parameter to be a real username (e.g. kchung).

    But a malicious user might submit different kind of data. For example, consider if the input was '?

    The application would crash because the resulting SQL query is incorrect.

    SELECT * FROM users WHERE username='''\n

    Note

    Notice the extra single quote at the end.

    With the knowledge that a single quote will cause an error in the application we can expand a little more on SQL Injection.

    What if our input was ' OR 1=1?

    SELECT * FROM users WHERE username='' OR 1=1\n

    1 is indeed equal to 1. This equates to true in SQL. If we reinterpret this the SQL statement is really saying

    SELECT * FROM users WHERE username='' OR true\n

    This will return every row in the table because each row that exists must be true.

    We can also inject comments and termination characters like -- or /* or ;. This allows you to terminate SQL queries after your injected statements. For example '-- is a common SQL injection payload.

    SELECT * FROM users WHERE username=''-- '\n

    This payload sets the username parameter to an empty string to break out of the query and then adds a comment (--) that effectively hides the second single quote.

    Using this technique of adding SQL statements to an existing query we can force databases to return data that it was not meant to return.

    "}]} \ No newline at end of file diff --git a/sitemap.xml.gz b/sitemap.xml.gz index d302cc79..dbfdbfcb 100644 Binary files a/sitemap.xml.gz and b/sitemap.xml.gz differ diff --git a/web-exploitation/command-injection/what-is-command-injection/index.html b/web-exploitation/command-injection/what-is-command-injection/index.html index 1394d0f8..66de7e27 100644 --- a/web-exploitation/command-injection/what-is-command-injection/index.html +++ b/web-exploitation/command-injection/what-is-command-injection/index.html @@ -3067,6 +3067,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/web-exploitation/cross-site-request-forgery/what-is-cross-site-request-forgery/index.html b/web-exploitation/cross-site-request-forgery/what-is-cross-site-request-forgery/index.html index c73e93cf..1b290ce7 100644 --- a/web-exploitation/cross-site-request-forgery/what-is-cross-site-request-forgery/index.html +++ b/web-exploitation/cross-site-request-forgery/what-is-cross-site-request-forgery/index.html @@ -3058,6 +3058,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/web-exploitation/cross-site-scripting/what-is-cross-site-scripting/index.html b/web-exploitation/cross-site-scripting/what-is-cross-site-scripting/index.html index 029188ff..6e3130f9 100644 --- a/web-exploitation/cross-site-scripting/what-is-cross-site-scripting/index.html +++ b/web-exploitation/cross-site-scripting/what-is-cross-site-scripting/index.html @@ -3019,6 +3019,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/web-exploitation/directory-traversal/what-is-directory-traversal/index.html b/web-exploitation/directory-traversal/what-is-directory-traversal/index.html index 6682900a..b2a26dd8 100644 --- a/web-exploitation/directory-traversal/what-is-directory-traversal/index.html +++ b/web-exploitation/directory-traversal/what-is-directory-traversal/index.html @@ -3019,6 +3019,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/web-exploitation/overview/index.html b/web-exploitation/overview/index.html index c5ff4483..8c825da0 100644 --- a/web-exploitation/overview/index.html +++ b/web-exploitation/overview/index.html @@ -3017,6 +3017,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/web-exploitation/php/what-is-php/index.html b/web-exploitation/php/what-is-php/index.html index fd6b89aa..35013f21 100644 --- a/web-exploitation/php/what-is-php/index.html +++ b/web-exploitation/php/what-is-php/index.html @@ -3166,6 +3166,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/web-exploitation/server-side-request-forgery/what-is-server-side-request-forgery/index.html b/web-exploitation/server-side-request-forgery/what-is-server-side-request-forgery/index.html index d99196d0..61acca44 100644 --- a/web-exploitation/server-side-request-forgery/what-is-server-side-request-forgery/index.html +++ b/web-exploitation/server-side-request-forgery/what-is-server-side-request-forgery/index.html @@ -3019,6 +3019,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + + diff --git a/web-exploitation/sql-injection/what-is-sql-injection/index.html b/web-exploitation/sql-injection/what-is-sql-injection/index.html index 8ca04fa1..fdb870ae 100644 --- a/web-exploitation/sql-injection/what-is-sql-injection/index.html +++ b/web-exploitation/sql-injection/what-is-sql-injection/index.html @@ -3019,6 +3019,113 @@ + + + + + + + + + + + +
  • + + + + + + + + + + + +
  • + + +