ELF檔案。F5檢視僞代碼(感覺沒有僞代碼就不行
關鍵的地方貼出來。
if ( numRead )
{
if ( childCheckDebugResult() )
{
responseFalse();
}
else if ( bufParentRead[0] == 123 )
{
if ( strlen(bufParentRead) == 42 )
{
if ( !strncmp(&bufParentRead[1], "53fc275d81", 0xAuLL) )
{
if ( bufParentRead[strlen(bufParentRead) - 1] == 125 )
{
if ( !strncmp(&bufParentRead[31], "4938ae4efd", 0xAuLL) )
{
if ( !confuseKey(bufParentRead, 42) )
{
responseFalse();
}
else if ( !strncmp(bufParentRead, "{daf29f59034938ae4efd53fc275d81053ed5be8c}", 0x2AuLL) )
{
responseTrue();
}
最開始試了一下
{daf29f59034938ae4efd53fc275d81053ed5be8c}
不對。但是可以确定
flag
的格式是
{53fc275d81x(20個)4938ae4efd}
。然後看到前面有一個
confuseKey
函數,進去看一看。
關鍵代碼如下:
strncpy(szPart1, szKey + 1, 0xAuLL);
strncpy(szPart2, szKey + 11, 0xAuLL);
strncpy(szPart3, szKey + 21, 0xAuLL);
strncpy(szPart4, szKey + 31, 0xAuLL);
memset(szKey, 0, iKeyLength);
*szKey = 123;
strcat(szKey, szPart3);
strcat(szKey, szPart4);
strcat(szKey, szPart1);
strcat(szKey, szPart2);
szKey[41] = 125;
return 1;
10位為一組,調換順序。
flag為
53fc275d81053ed5be8cdaf29f59034938ae4efd
最坑的是送出的flag不帶
{}