[Hack The Boo] Day 4 Challenges
by - Thursday, January 1, 1970 at 12:00 AM
thanks
Reply
Very thanks u. Good hint
Reply
Awesome!
Reply
Thanks
Reply
For forensics challenge I wouldn't suggest using Ghidra (unless you're a gigachad GURU), If you run "strings [BAD FILE]" you can sniff that it's compiled with a some python flavor, prob "pyinstaller" or something.

You can decompile this ELF file into a .pyc, and then to a py, check this article out https://book.hacktricks.xyz/generic-methodologies-and-resources/basic-forensic-methodology/specific-software-file-type-tricks/.pyc

You only have to figure out the "bad MAGIC NUMBER" errors if they appear to you, and check out these tools: https://github.com/zrax/pycdc OR https://github.com/extremecoders-re/pyinstxtractor
Reply
(October 25, 2022, 01:47 PM)nirs Wrote:
(October 25, 2022, 01:37 PM)11231123 Wrote: For web challenge:

POST /api/getfacts

{
    "type":true
}


why does it work ?

For me, the json data types (string, number, object, array and boolean) would need to match. Initially I tried the string "admin" which gave an error, I then tried boolean, which as indicated above works.
Reply
thenks....
Reply
(October 25, 2022, 01:05 PM)Hacker2222 Wrote: plz discuss day 4 challenges here

reversing challenge:


cheers :D
Reply
Thanks
Reply
(October 26, 2022, 10:57 AM)am9obi1 Wrote:
(October 25, 2022, 01:47 PM)nirs Wrote:
(October 25, 2022, 01:37 PM)11231123 Wrote: For web challenge:

POST /api/getfacts

{
    "type":true
}


why does it work ?

For me, the json data types (string, number, object, array and boolean) would need to match. Initially I tried the string "admin" which gave an error, I then tried boolean, which as indicated above works.


It's actually pretty simple: PHPs switch case does not check for type equality. It just thinks any string equals the boolean "true", similar to how "1" also equals "true" in many languages. However, before that switch statement, a type-sensitive check is done for "secret" using three equality signs. So if we put in "true", the first check fails (the one that makes sure only localhost can access the data), but the switch case still accepts the input for any string. And since "secret" is the first case, that's the one that triggers for "true".
Reply


 Users viewing this thread: [Hack The Boo] Day 4 Challenges: No users currently viewing.