Лаборатория TJCTF 2016 - torrent [forensics 90]

delimitry
, 1 июня 2016

Help, someone's sharing flags.  

We have a torrent file.

I've extracted information from torrent file.
length = 28
piece length = 2
pieces = 280

Total flag file size is 28 bytes.
14 SHA1 pieces total. Each piece is 20-byte SHA1 hash value.
So we need to find all two-bytes pieces (with flag's parts) to restore full flag.

Final script: 

import hashlib

fn = 'flag_d542574c3e963792fe07321fd262fe28e6f5cf0ea126efe01148dd6890b63a4d.torrent'
with open(fn, 'rb') as f:
    data = f.read()
hashes = data[140:140+280]

two_letters_hashes = {}
for i in xrange(0, 256):
    for j in xrange(0, 256):
        two_letters = chr(i) + chr(j)
        two_letters_hashes[hashlib.sha1(two_letters).digest()] = two_letters

flag = ''
all_hashes = {}
for i in xrange(0, len(hashes) / 20):
    h = hashes[i * 20:i * 20 + 20]
    flag += two_letters_hashes.get(h, '?')
print flag

The flag is: tjctf{pls_2_n0t_fl4g_share}

1 комментарий:

  1. ChasTume
       #   12:58, 22 мая 2017
    Propecia Barata Comprar Kamagra Chewable Comprar Cialis 5 Mg Andorra Dostinex Mg Order Generic Zoloft Viagra Action Generique Levitra Prix Discount Generic Cialis Pricing Ight Sensitivity Cephalexin Viagra Comment S Utilise Cheap Generic Lasix Isotretinoin Order Now Free Consultation Kamagra Falschung Tadalafil Tablets Levitra Without A Rx Orlistat Acheter Pharmacy Nolvadex Viagra Kaufen Nurnberg Idealista Propecia Cheapest Cialis Rivaldo Propecia Amagra 50 Mg Price Generic Viagra Direct Cheap Isotretinoin Curacne Next Day Commander Viagra Pharmacie Kamagra Pharmacy Dutasteride Benign Prostatic Hyperplasia Where Can I Buy Amoxicillin Side Efects Generic Zoloft Online Hersteller Levitra Zithromax Greenstone Generic Cialis Online Diflucan For Sale Online Sky Pharmacy Online Drugstore Review Need To Order Cialis Generic Prevacid Online Acheter Cialis Meilleur Prix Cialis Online Buy Pharmacycanada Mens Ed Medications Online Pharmacy Doxycycline Monohydrate Does Amoxicillin Affect Depo Provera Pharmacy Online 365 Generic Kamagra Flagyl 400mg Tablets Dosage Buy Domperidone With Out A Perscription Cialis Pills Sildenafil A Buon Mercato 120 Mg Average Cost Of Viagra 100mg Cheap Zoloft Amoxil Clavulonic Acid Viagra Pillen Manner Canadian Cheap Cialis Priligy 30mg Buy Detrol Propecia Female Cialis Canadian Pharmacy Prednizone Cialis Viagra Verkauf Brand Zoloft Online Overdose On Zithromax Comparatif Viagra Cialis Levitra Order Cialis Tablets Buy Kamagra Tablets

Авторизуйтесь, что бы оставить комментарий