Привет всем,
Я работаю над задачей CTF, которая включает в себя реверс-инжиниринг флага и анализ основной функции предоставленного бинарного файла. Вот с чем я столкнулся до сих пор:
Описание задачи:
Цель - выполнить реверс-инжиниринг бинарного файла, чтобы извлечь флаг. Формат флага ожидается как алфавитно-цифровой, заключённый в фигурные скобки.
Буду благодарен за любые советы по подходу к декодированию или расшифровке флага, если он зашифрован или замаскирован.
Я работаю над задачей CTF, которая включает в себя реверс-инжиниринг флага и анализ основной функции предоставленного бинарного файла. Вот с чем я столкнулся до сих пор:
Описание задачи:
Цель - выполнить реверс-инжиниринг бинарного файла, чтобы извлечь флаг. Формат флага ожидается как алфавитно-цифровой, заключённый в фигурные скобки.
Буду благодарен за любые советы по подходу к декодированию или расшифровке флага, если он зашифрован или замаскирован.
C#:
// CrackMe
// Token: 0x06000003 RID: 3 RVA: 0x0000206C File Offset: 0x0000026C
public static void Main(string[] args)
{
Console.Write("Please enter the flag:");
string text = Console.ReadLine();
bool flag = text.Length == 24 && (int)(text.get_Chars(19) - text.get_Chars(3) * text.get_Chars(16) + text.get_Chars(10)) == -6684 && text.get_Chars(4) * text.get_Chars(21) + text.get_Chars(8) + text.get_Chars(11) == 'ར' && text.get_Chars(15) * text.get_Chars(14) - text.get_Chars(16) + text.get_Chars(14) == '◓' && text.get_Chars(12) * text.get_Chars(0) - text.get_Chars(15) - text.get_Chars(12) == '᷄' && text.get_Chars(23) + text.get_Chars(23) * text.get_Chars(1) == '␢' && (int)(text.get_Chars(19) - text.get_Chars(2) - text.get_Chars(16) - text.get_Chars(20)) == -218 && (int)(text.get_Chars(6) - text.get_Chars(12) - text.get_Chars(6) + text.get_Chars(5)) == -33 && (int)(text.get_Chars(0) * text.get_Chars(23) * text.get_Chars(1) + text.get_Chars(8)) == 611447 && text.get_Chars(4) + text.get_Chars(11) + text.get_Chars(2) - text.get_Chars(7) == '~' && text.get_Chars(7) * text.get_Chars(9) - text.get_Chars(9) == '⸺' && text.get_Chars(20) * text.get_Chars(3) + text.get_Chars(19) * text.get_Chars(21) == '⒖' && (int)(text.get_Chars(9) - text.get_Chars(14) * text.get_Chars(2) + text.get_Chars(17)) == -6266 && text.get_Chars(8) * text.get_Chars(21) + text.get_Chars(21) + text.get_Chars(13) == 'ၬ' && text.get_Chars(15) + text.get_Chars(8) - text.get_Chars(18) == 'M' && (int)(text.get_Chars(9) - text.get_Chars(15) * text.get_Chars(15)) == -10307 && (int)(text.get_Chars(19) - text.get_Chars(12) - text.get_Chars(5) * text.get_Chars(19)) == -4267 && (int)(text.get_Chars(12) - text.get_Chars(15) - text.get_Chars(0) - text.get_Chars(17)) == -149 && text.get_Chars(2) + text.get_Chars(16) + text.get_Chars(5) == 'þ' && (int)(text.get_Chars(22) * text.get_Chars(4) * text.get_Chars(21) * text.get_Chars(11)) == 23525040 && text.get_Chars(12) + text.get_Chars(14) - text.get_Chars(9) + text.get_Chars(10) == '×' && text.get_Chars(10) + text.get_Chars(7) - text.get_Chars(1) == '\u0096' && text.get_Chars(13) - text.get_Chars(22) + text.get_Chars(5) * text.get_Chars(11) == '▥' && text.get_Chars(15) * text.get_Chars(10) + text.get_Chars(23) - text.get_Chars(21) == '⠝' && text.get_Chars(14) + text.get_Chars(2) - text.get_Chars(14) == 'D' && text.get_Chars(23) - text.get_Chars(4) - text.get_Chars(19) == '\b' && text.get_Chars(8) + text.get_Chars(16) - text.get_Chars(3) + text.get_Chars(17) == 'Ì' && text.get_Chars(7) + text.get_Chars(18) + text.get_Chars(11) == 'Ŏ' && text.get_Chars(22) * text.get_Chars(5) - text.get_Chars(8) + text.get_Chars(20) == 'ሦ' && text.get_Chars(22) * text.get_Chars(21) - text.get_Chars(14) == 'ன' && (int)(text.get_Chars(8) - text.get_Chars(11) * text.get_Chars(1) * text.get_Chars(4)) == -557502 && text.get_Chars(9) + text.get_Chars(10) - text.get_Chars(18) == 'd' && text.get_Chars(12) - text.get_Chars(2) + text.get_Chars(21) * text.get_Chars(21) == '' && text.get_Chars(5) + text.get_Chars(15) - text.get_Chars(19) == '\u0088' && text.get_Chars(20) * text.get_Chars(12) + text.get_Chars(3) == 'ⴍ' && (int)(text.get_Chars(13) * text.get_Chars(12) * text.get_Chars(7)) == 1669356 && text.get_Chars(5) * text.get_Chars(13) - text.get_Chars(23) == '▓' && text.get_Chars(4) - text.get_Chars(6) + text.get_Chars(10) == 'a' && text.get_Chars(9) + text.get_Chars(20) + text.get_Chars(17) == 'Ĥ' && text.get_Chars(20) + text.get_Chars(1) + text.get_Chars(5) * text.get_Chars(21) == 'ጋ' && text.get_Chars(14) * text.get_Chars(11) + text.get_Chars(13) - text.get_Chars(18) == '⩡' && text.get_Chars(23) - text.get_Chars(21) + text.get_Chars(4) * text.get_Chars(2) == 'ሑ' && text.get_Chars(18) * text.get_Chars(23) + text.get_Chars(3) * text.get_Chars(9) == '䣀' && text.get_Chars(8) + text.get_Chars(17) + text.get_Chars(15) + text.get_Chars(9) == 'Ű' && (int)(text.get_Chars(19) - text.get_Chars(15) + text.get_Chars(15) - text.get_Chars(21)) == -6 && text.get_Chars(13) - text.get_Chars(7) + text.get_Chars(6) * text.get_Chars(6) == 'ጝ' && text.get_Chars(8) + text.get_Chars(12) - text.get_Chars(19) + text.get_Chars(6) == 'Ñ' && (int)(text.get_Chars(14) - text.get_Chars(16) - text.get_Chars(15) * text.get_Chars(23)) == -12757 && text.get_Chars(11) - text.get_Chars(6) + text.get_Chars(18) == '\u008d';
if (flag)
{
Console.WriteLine("You found the FLAG!");
}
else
{
Console.WriteLine("Flag is not correct :(");
}
}