code hacking, zen coding

ebCTF 2013 – Web400 (crypto/aes/cbc/hmac) Write-Up

ebCTF 2013 – Web400 (crypto/aes/cbc/hmac) Write-Up

This Web challenge was part of the ebCTF competition. It’s actually more crypto than web. We get a simple web site driving the famous cowsay binary: define(’MY_AES_IV’, CENSORED); define(’MY_AES_KEY’, CENSORED); define(’MY_HMAC_KEY’, CENSORED); define("FLAG","CENSORED"); function aes($data, $encrypt) {   $aes = mcrypt_module_open(MCRYPT_RIJNDAEL_128, ”, MCRYPT_MODE_CBC, ”);   mcrypt_generic_init($aes, MY_AES_KEY, MY_AES_IV);   return […]

Share

HackYouToo CTF – Crypto 300 – Everybody Lies

HackYouToo CTF – Crypto 300 – Everybody Lies

Mr. Menhall has invented his own encryption algorithm and promised to give the flag to anyone who manages to decipher the message: vWsMajX21l6BdKwDxaRA3utqhpvFL0V= def hashcrypt(msg, key):     token = hashlib.sha1(key).digest()     res = ""     for c in msg:         n = ord(c) ^ […]

Share

HackYouToo CTF – Crypto 500 – AllahAkbar

HackYouToo CTF – Crypto 500 – AllahAkbar

We were able to intercept a suspicious file. This is an archive of correspondence between leading cryptographers of hostile organization. According to the agents’ data, during the conversation one of the respondents accidentally uses a file that is added as trusted to all computers of the organization. Their antivirus software […]

Share

HackYouToo CTF – Binary 300 – Shredder Write-up

HackYouToo CTF – Binary 300 – Shredder Write-up

Have you tried feeding critical documents to a shredder? We’ve accidentally done this very thing. Shredder: shredder.exe Document remains: broken_flag.jpg We need our document back! See: http://hackyou.ctf.su/tasks/shredder Shredder is a Win32 binary that encrypt source file “flag.jpg” to “broken_flag.jpg”. The encryption is only some translations and swaps and can be […]

Share

NDH2k12 Public Wargame – RSA Writeup

NDH2k12 Public Wargame – RSA Writeup

Simple RSA: $ cat john.pub —– BEGIN PUBLIC KEY —– KG4gPSAxNTQ5Mzg4MzAyOTk5NTE5LCBlID0gMTAxKQ== —–  END PUBLIC KEY  —– francois@squeeze:~/ndh2012/public/rsa$ echo -n "KG4gPSAxNTQ5Mzg4MzAyOTk5NTE5LCBlID0gMTAxKQ==" | base64 -d (n = 1549388302999519, e = 101) e = 101 n = 1549388302999519 Factorize n -> n = p * q -> 1549388302999519 = 31834349 * 48670331 $ […]

Share