diff --git a/Spasm/README.md b/Spasm/README.md new file mode 100644 index 0000000..61815d9 --- /dev/null +++ b/Spasm/README.md @@ -0,0 +1,17 @@ +# Spasm +[Challenge Description] + +## Summary +- **Author:** Ivan Leong Cheng Yang +- **Discord Username:** i.xed +- **Category:** Forensics +- **Difficulty:** Hard + +## Hints +- `Tried a .cmd extension?` (100 points) + +## Files +- [`goodluck.png`](./dist/goodluck.png) + +## Flags +- `HEX{sch1z0phr3n14_ftw}` (static) diff --git a/Spasm/dist/goodluck.png b/Spasm/dist/goodluck.png new file mode 100644 index 0000000..e90da86 Binary files /dev/null and b/Spasm/dist/goodluck.png differ diff --git a/Spasm/solution/Pasted image 20240415225214.png b/Spasm/solution/Pasted image 20240415225214.png new file mode 100644 index 0000000..4abde5e Binary files /dev/null and b/Spasm/solution/Pasted image 20240415225214.png differ diff --git a/Spasm/solution/Pasted image 20240415230008.png b/Spasm/solution/Pasted image 20240415230008.png new file mode 100644 index 0000000..c46887b Binary files /dev/null and b/Spasm/solution/Pasted image 20240415230008.png differ diff --git a/Spasm/solution/Pasted image 20240415230205.png b/Spasm/solution/Pasted image 20240415230205.png new file mode 100644 index 0000000..a3abe18 Binary files /dev/null and b/Spasm/solution/Pasted image 20240415230205.png differ diff --git a/Spasm/solution/Pasted image 20240415230346.png b/Spasm/solution/Pasted image 20240415230346.png new file mode 100644 index 0000000..d9b94f9 Binary files /dev/null and b/Spasm/solution/Pasted image 20240415230346.png differ diff --git a/Spasm/solution/Pasted image 20240415231038.png b/Spasm/solution/Pasted image 20240415231038.png new file mode 100644 index 0000000..4c55e9e Binary files /dev/null and b/Spasm/solution/Pasted image 20240415231038.png differ diff --git a/Spasm/solution/Writeup.md b/Spasm/solution/Writeup.md new file mode 100644 index 0000000..275465a --- /dev/null +++ b/Spasm/solution/Writeup.md @@ -0,0 +1,44 @@ +Any fps players? Valorant, CSGO? I love stretched resolution. Stretch resolution makes me brain go monke, monke brain spasm aim + schizophrenia. My favorite stretched resolution is 1440x1080 and I am slowly losing my s4n___. + +--- + +You are first presented with this file goodluck.png +![[goodluck.png]] + +This image is basically a polyglot, so it is basically a zip file in disguise. To extract the zip file out of this image, change the file extension to a .cmd + +Tool used to make this polyglot : pdvzip - A simple command-line tool used to embed a ZIP file within a PNG image, + +After changing the file into a .cmd and executing it, you will get this screen to appear +![[Pasted image 20240415225214.png]] +You realise that it is asking for a passphrase. +To get this passphrase, you need to analyze the file even further by using strings +Since we know that the creator is slowly losing something with the word s4n, we can search for s4n within the strings output. + +![[Pasted image 20240415230008.png]] + +It seems there is a word that we now know and we filled in the blank in the original question. Let's try that as the password! + +It seems to have extracted successfully. +![[Pasted image 20240415230205.png]] + +There is a New folder as well. +After looking inside it, you can see a flag.jpg + +![[Pasted image 20240415230346.png]] + +It seems that the flag is edging literally, which suggests a change in the widths and height of the image. Sounds familiar, didn't the creator mention his favorite resolution? + +After inspecting the image height and width, it is currently at 1446x540, which suggest a massive change in the height. + +To change the height of the image, you can go to a hex editor such as hexed.it, upload the file, and start modifying values + +To change the height, simply look for the first FF C0 that appears in the file (Indicator of SOF) and start reading it till you find 02 1C which is the hexadecimal values that represent the height. Change it back to 1080 in hexadecimal which is 04 38 + +Save the file and you would get the flag +![[Pasted image 20240415231038.png]] + + + +More details can be found at this post talking about the anatomy of a JPEG file +https://www.ccoderun.ca/programming/2017-01-31_jpeg/#:~:text=The%202-byte%20image%20height,65535%20x%2065535%20in%20size \ No newline at end of file diff --git a/Spasm/solution/goodluck.png b/Spasm/solution/goodluck.png new file mode 100644 index 0000000..e90da86 Binary files /dev/null and b/Spasm/solution/goodluck.png differ