Skip to content

Commit 8d0230c

Browse files
authored
Add files via upload
1 parent e5dd599 commit 8d0230c

File tree

3 files changed

+53
-0
lines changed

3 files changed

+53
-0
lines changed

bin/win-bin-analysis/README.md

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# win-bin-analysis
2+
3+
# Description
4+
* Find the key hidden in the windows executable files
5+
6+
# Hint
7+
* exe's arent the only type of executable file
8+
9+
# Difficulty
10+
* easy-medium
11+
12+
# Solution
13+
```
14+
analyze the dll(not the exe) in ghidra, search for strings, find a bunch of strings that get outputed when the file is executed, get one of the strings, and decrypt using one of the strings as a key and one string saying the encryption algorithm
15+
```
16+
```
17+
flag-jctf{00g@_B000G@@_B1LL_G8S_wAs-H3Re}
18+
password-HKEY_CURRENT_USER
19+
encryption-AES(CBC)
20+
fakeFlag-njsctf{look-harder}
21+
encrypt-flag-U2FsdGVkX1+/+Gg+TT1OswZb7zJBF954sV9CPYr9yjuECuBh60j/qG3Kw4Hk9/l6fu5ibkYarZWNBByLBuGrYQ==
22+
```
23+
24+
# Files Needed
25+
* winBinAnalysis.zip
Binary file not shown.

bin/win-bin-analysis/src.cs

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
using System.Diagnostics;
2+
int coolfunction(string input)
3+
{
4+
Process.Start("cmd.exe", "/K tree");
5+
string output = "AES(CBC)"; //encyrption for key
6+
return 2345325;
7+
}
8+
9+
Process.Start("cmd.exe", "/K tree");
10+
Console.WriteLine($"You really shouldn't run exe's from people that you dont trust {Environment.UserName}");
11+
Console.WriteLine($"SENDING HKEY_CLASSES_ROOT/.386/PersistentHandler {Environment.NewLine}Date: {DateTime.Now:d} Time: {DateTime.Now:t}");
12+
coolfunction("sample text");
13+
var max = 87;
14+
var counter = -42;
15+
string encKey = "HKEY_CURRENT_USER"; //passowrd for key
16+
string words = "njsctf{look-harder}";
17+
for (int i = 0; i < max; i++)
18+
{
19+
words = words + counter;
20+
counter += 3;
21+
22+
}
23+
24+
Console.WriteLine($"{Environment.NewLine} {words} ");
25+
26+
string realKey = "U2FsdGVkX1+/+Gg+TT1OswZb7zJBF954sV9CPYr9yjuECuBh60j/qG3Kw4Hk9/l6fu5ibkYarZWNBByLBuGrYQ=="; //solution for key encrypted
27+
28+
Console.ReadLine();

0 commit comments

Comments
 (0)