time signer
my favorite ictf chall so far, great job catsiftheywereablueberry
problem
If only there was a way to stop time…
#!/usr/bin/env python3
from hashlib import sha256
from datetime import datetime
from time import sleep
from os import urandom
secret = urandom(16)
flag = open("flag.txt").read()
def sign(time):
time_in_bytes = time.to_bytes((time.bit_length() + 7) // 8, "little")
return sha256(secret + time_in_bytes).hexdigest()
def extend_time(extended_time):
print("Current extended time: " + str(extended_time))
print("How many seconds do you want to extend time with?")
inp_time = input(">> ")
if len(inp_time) > 10:
print("Thats too long!")
return extended_time
time = int(float(inp_time))
if time < 0:
print("Invalid time!")
return extended_time
return extended_time + time
def get_time(extended_time):
time = int(datetime.now().timestamp()) + extended_time
time_signature = sign(time)
print("Time of generation: " + str(time))
print("Time signature: " + time_signature)
def get_flag(extended_time):
time = int(datetime.now().timestamp()) + extended_time
time_signature = sign(time)
print("Time of generation: " + str(time))
print("Guess the time signature to get the flag!")
inp_signature = str(input(">> "))
if inp_signature == time_signature:
print("Wow you did it! Here is the flag: " + flag)
exit()
else:
print("Wrong time signature!")
def main():
print("----------------------------------------------")
print("| |")
print("| Welcome to the Time Signer! |")
print("| Who wouldn't want their time signed?!? |")
print("| |")
print("----------------------------------------------")
extended_time = 0
while True:
print("")
print("Please select an option:")
print("1. Extend time")
print("2. Get time")
print("3. Get flag")
print("4. Exit")
inp = int(input(">> "))
print("")
if inp == 1:
extended_time = extend_time(extended_time)
elif inp == 2:
get_time(extended_time)
elif inp == 3:
get_flag(extended_time)
elif inp == 4:
exit()
else:
print("Invalid option!")
sleep(1)
if __name__ == "__main__":
main()
solution
the exploit i used was a hash length extension attack
not going to go into detail on how it works but i will show my general thinking below
first, i found this library called hlextend which is useful for hash length extension attacks
there were a few other libraries out there, but they didn’t seem to work or were not in python which is what i’m using to write my exploit
then, i knew that we had to get the time to be really large because the hash length extension attack will add at least 30 bytes of data, which is pretty big in terms of numbers
another cool thing is that there was int(float(n))
so it is possible to use scientific notation like 3.3e48
to get arbitrary large numbers, and because we can do it
multiple times, we can get any arbitrary number as our time variable
another factor to consider is that the process for adding time takes at least 100 seconds, so we have to offset our desired offset a little so that we have time to change the time variable (confused? me too)
from pwn import *
import hlextend.hlextend as hlextend
from datetime import datetime
def get_time() -> int:
return int(datetime.now().timestamp())
def conv(q):
return q.to_bytes((q.bit_length() + 7) // 8, "little")
def unconv(w: bytes):
return int.from_bytes(w, 'little')
# p = process(["python3", "main.py"])
p = remote("puzzler7.imaginaryctf.org", 14004)
p.recvuntil(b">> ")
p.sendline(b"2")
p.recvuntil(b"Time of generation: ")
time_1 = p.recvline(keepends=False)
p.recvuntil(b"Time signature: ")
real_signature = p.recvline(keepends=False).decode('ascii')
print(f"current_time = {get_time()}")
print(f"time_1 = {int(time_1)} | {conv(int(time_1))}")
print(f"real_signature = {real_signature}")
sha = hlextend.sha256()
append_this = b'1337'
known_plaintext = conv(int(time_1))
secret_length = 16
sha.extend(b'', known_plaintext, secret_length, real_signature)
predict_digest = sha.hexdigest()
print(f"predict_digest = {predict_digest}")
time_to_waste = 130
goal_time = unconv(conv(int(time_1)) + b'\x80' + b'\x00' * (56 - 21) + (160).to_bytes(8, 'big'))
goal_extended_time = goal_time - int(time_1) - time_to_waste
deadline = get_time()+time_to_waste
p.recvuntil(b">> ")
extended_time = 0
difference = goal_extended_time
while extended_time != goal_extended_time:
p.sendline(b'1')
p.recvuntil(b"Current extended time: ")
extended_time = int(p.recvline(keepends=False).decode("ascii"))
difference = goal_extended_time-extended_time
assert difference >= 0
if difference == 1:
p.sendline(b"1")
break
if difference == 0:
p.sendline(b'0')
break
print(f"extended_time = {extended_time}\t\tdifference = {difference}")
n2 = int(int(str(difference)[0])*100-1)/100
to_input = f"{n2}e{len(str(difference))-1}"
print(f"to_input = {to_input}")
p.sendline(to_input.encode('ascii'))
print(f"current_time = {get_time()}")
print(f"goal_extended_time = {goal_extended_time}")
print(f"waiting for deadline ({deadline-get_time()}s)")
while deadline != get_time():
print(f"waiting for deadline ({deadline-get_time()}s)")
sleep(0.1)
p.recvuntil(b">>")
p.sendline(b"3")
p.sendline(predict_digest.encode('ascii'))
print(f"wanted time = {goal_time}")
print(p.interactive())
here is the output of that:
[x] Opening connection to puzzler7.imaginaryctf.org on port 14004
[x] Opening connection to puzzler7.imaginaryctf.org on port 14004: Trying 137.184.207.224
[+] Opening connection to puzzler7.imaginaryctf.org on port 14004: Done
current_time = 1694367451
time_1 = 1694367450 | b'\xda\xfe\xfdd'
real_signature = 4a1e2ddd785f79e29cb594270a75fbfa4485ca736e7c958f516fc317cd5185c7
predict_digest = 1750d6c51c7006a69f7c6617dd7faad4504dc589c7378658532b87393070bc09
extended_time = 0 difference = 24626253872746549507674400062589758628174837044040904167467683377653576107185756632133916409303072275504692249755518
to_input = 1.99e115
extended_time = 19899999999999998122381656193378251810434980681107757170889003657361155819408032085020210059933520985243327966216192 difference = 4726253872746551385292743869211506817739856362933146996578679720292420287777724547113706349369551290261364283539326
to_input = 3.99e114
extended_time = 23889999999999997856376117832499166821389770187179587487058973639298317142389816379554551885788171817944414473420800 difference = 736253872746551651298282230090591806785066856861316680408709738355258964795940252579364523514900457560277776334718
to_input = 6.99e113
extended_time = 24588999999999997807102754775463662175109431717892821881772283925456127953715288939863069195355952095223470295613440 difference = 37253872746551700571645287126096453065405326148082285695399452197448153470467692270847213947120180281221954142078
to_input = 2.99e112
extended_time = 24618899999999997804970621082054894121342704544958586247273151366625320115516512540278873071965153105081066965696512 difference = 7353872746551702703778980534864506832132499082317920194532011028255991669244091855043337337919170423625284059006
to_input = 6.99e111
extended_time = 24625889999999997804691486155076630083119403330882673802680554921722563500624471426664180217638894962856153732612096 difference = 363872746551702982913907513128545055433713158230364787128455931012606561285205469736191664177312648538517143422
to_input = 2.99e110
extended_time = 24626188999999997804700869631783905485016164496179518757982977473643132305810472385780782664963083680861309779312640 difference = 64872746551702973530430805853143158672547861385409484705904010443801375284246353133744339988594643382470442878
to_input = 5.99e109
extended_time = 24626248899999997804704183800351871343882709209400999922558646989119458369755647592800531968137116451576838692536320 difference = 4972746551702970216262237887284292127834639904244909036388534117737430109039333384441165955823927853557219198
to_input = 3.99e108
extended_time = 24626252889999997804703925738015300295682089070677475812410889337896882820719458815145805591358547552984716791513088 difference = 982746551702970474324574458332492747973363428355056794039756693286466297816988110817944524722519975458242430
to_input = 8.99e107
extended_time = 24626253788999997804703890857217002610852420292687671617804675970694543760769467656382997863970861882782388414578688 difference = 83746551702970509205372756017322416751353232549663007406959032346416288975750918545332210392722303835176830
to_input = 7.99e106
extended_time = 24626253868899997804703884421741206004199017041838462837211028010960458813997315009014933584696613454883837202923520 difference = 3846551702970515640848552623975820002202441330256655366693117293188441623118982824606458820620855046831998
to_input = 2.99e105
extended_time = 24626253871889997804703884443383418075658849112096400608432219007521938148164586146479707225601813433158364387344384 difference = 856551702970515619206340552515987931944503559035464370131637959021170485654209183701258842346327862411134
to_input = 7.99e104
extended_time = 24626253872688997804703884491065638807989049824352421383142081385755358950323358404993751297300042435862897715314688 difference = 57551702970515571524119820185787219688482784325601991898217156862398227140165112003029839641794534440830
to_input = 4.99e103
extended_time = 24626253872738897804703884492593521915627395323697098418655458486601197559998228859500066589674807470899892034994176 difference = 7651702970515569996236712547441720343805748812224891052378547187527772633849819628264804604800214761342
to_input = 6.99e102
extended_time = 24626253872745887804703884492551212281998784554241845133202598244667904567675975576622920505666942647888794477395968 difference = 661702970515570038546346176052489799059034265085132985671539509781055510995903636129627615897772359550
to_input = 5.99e101
extended_time = 24626253872746486804703884492511977124578664945471821451774308242466428057536475970181953020008038877182296567316480 difference = 62702970515570077781503596172098569082715693375135187148049649280661951963389295033398322395682439038
to_input = 5.99e100
extended_time = 24626253872746546704703884492509607743950433567851554653156938057371594331993767721154857721369939623539810943107072 difference = 2802970515570080150884224403476189349514310745320281981775191988910979058687933132651964881306648446
to_input = 1.99e99
extended_time = 24626253872746548694703884492509598594657005249777978548257798988585551407934331618044827095215166208430348819234816 difference = 812970515570080160033517831794262925619209884389068024699251425014089089314087906067074343430520702
to_input = 7.99e98
extended_time = 24626253872746549493703884492509578081428944887985385247487796565640230866305455690511331585636406432163323680129024 difference = 13970515570080180546745892156055518919979886812013345240880300941622584823666665843341368569626494
to_input = 0.99e97
extended_time = 24626253872746549503603884492509578088917811755935111249569031111005693835728192083344672673460813305646984451850240 difference = 4070515570080180539257025288105792917898652266647882271457564548789243735842258969857707797905278
to_input = 3.99e96
extended_time = 24626253872746549507593884492509578310394319985863833369049973211195477172444223093033534525383911053610554425868288 difference = 80515570080180317780517058177070798417710166458098934741533539100381883919161221894137823887230
to_input = 7.99e94
extended_time = 24626253872746549507673784492509578305117863276718533581826258279703200080534501976545627673754748981777324906119168 difference = 615570080180323056973767322370585641425097950376026651254655588288735548323293727367343636350
to_input = 5.99e92
extended_time = 24626253872746549507674383492509578305079581668079619985824077268725024503323700407556009494683770941638386972098560 difference = 16570080180323095255375961284181643606108928551603862056224577906914619301333866305277656958
to_input = 0.99e91
extended_time = 24626253872746549507674393392509578305079374246828863476691373202211393744029694161200862899138001532769341768990720 difference = 6670080180323095462797212040690776310175442182363156062470933053510165070742735350480764798
to_input = 5.99e90
extended_time = 24626253872746549507674399382509578305079751316328094228263818576690731502652873229785334983548800692763004319563776 difference = 680080180323095085727712809939203864800962844604532883402348581425754271582741687930191742
to_input = 5.99e89
extended_time = 24626253872746549507674399981509578305079743791993158976782225781722646259801185953056022176144552695643617483554816 difference = 81080180323095093252047745190685457595930929847384570679077894233158519579861074766200702
to_input = 7.99e88
extended_time = 24626253872746549507674400061409578305079745761588284135409980298660761014322077673745664842776122598163169895514112 difference = 1180180323095091282452620032057703078992815092863678958388251566526949677341522354241406
to_input = 0.99e87
extended_time = 24626253872746549507674400062399578305079745734662194333034721874712568398645933467724835689051901667796661286469632 difference = 190180323095091309378709834432961502941007708539823164409080720251170607708030963285886
to_input = 0.99e86
extended_time = 24626253872746549507674400062498578305079745731969585352797196032317749137078319047122752773679479574760010425565184 difference = 91180323095091312071318814670487345335826970107437585011163635623592700744681824190334
to_input = 8.99e85
extended_time = 24626253872746549507674400062588478305079745738392177150659884320503675339772350371765720522852130318726456575787008 difference = 1280323095091305648727016807799057149900767413406260368195886450941956778235673968510
to_input = 0.99e84
extended_time = 24626253872746549507674400062589468305079745738399759792591461881016900926468059354821955238559258030571902688296960 difference = 290323095091305641144374876221496636675180717697277311961170743814244932789561458558
to_input = 1.99e83
extended_time = 24626253872746549507674400062589667305079745738411686707107861354697400614867743785676015943200802387486069714059264 difference = 91323095091305629217460359822022956175492318012846457900466102269888018622535696254
to_input = 8.99e82
extended_time = 24626253872746549507674400062589757205079745738416383862319026402038727852104868560637546133706932441591245529153536 difference = 1423095091305624520305148656975614848255080888071496370275596139833913446720601982
to_input = 0.99e81
extended_time = 24626253872746549507674400062589758195079745738416303825134289740019908409892531455820913047703266312442527388532736 difference = 433095091305624600342333393637633667697293225176313003361599805963062164861222782
to_input = 3.99e80
extended_time = 24626253872746549507674400062589758594079745738416282737208951629271518838125040830137637171611906991358025534537728 difference = 34095091305624621430258731748382057269060715801996279237691165284146666715217790
to_input = 2.99e79
extended_time = 24626253872746549507674400062589758623979745738416284574966368918254453399134089787090440632755650834492271494168576 difference = 4195091305624619592501314459399122708051666845043475776547421441012420755586942
to_input = 3.99e78
extended_time = 24626253872746549507674400062589758627969745738416284232446750951450486131018880276245567475375867990595037407739904 difference = 205091305624619935020932426203089976166876355888348933927204284909654842015614
to_input = 1.99e77
extended_time = 24626253872746549507674400062589758628168745738416284232491477059433530981117536208683370332956236946399314128666624 difference = 6091305624619934976206318220045126068220423450546076346835329105378121088894
to_input = 5.99e75
extended_time = 24626253872746549507674400062589758628174735738416284232680164858496983307975146608570895013837752119771316195688448 difference = 101305624619934787518519156592799210610023563021395465320155733376054067070
to_input = 0.99e74
extended_time = 24626253872746549507674400062589758628174834738416284232683036093237839822782932615797103350087012528165128331329536 difference = 2305624619934784647284415736284402824016336813059216059747339563918425982
to_input = 1.99e72
extended_time = 24626253872746549507674400062589758628174836728416284232683016453773366415852989327830273463583056804317264089186304 difference = 315624619934784666923880209691332767304303642945720015471187428160569214
to_input = 2.99e71
extended_time = 24626253872746549507674400062589758628174837027416284232682999062036552412928403911335029615008939226414484895563776 difference = 16624619934784684315617023694257352720798886794294133049090207354191742
to_input = 0.99e70
extended_time = 24626253872746549507674400062589758628174837037316284232682998630726116940651187891542665907777618871990423797104640 difference = 6724619934784684746927459166534568740591250501525453403514268452650878
to_input = 5.99e69
extended_time = 24626253872746549507674400062589758628174837043306284232682998337254038954714098577016490725163423166643419591213056 difference = 734619934784685040399537152471658055117425684139649108861272658542462
to_input = 6.99e68
extended_time = 24626253872746549507674400062589758628174837044005284232682998353472363315920534617138386326624385382129018240761856 difference = 35619934784685024181212791265222014995530082678686893375674008993662
to_input = 2.99e67
extended_time = 24626253872746549507674400062589758628174837044035184232682998355784724720684435827881616755268157874563269517115392 difference = 5719934784685021868851386501320804252299654034914400941422732640126
to_input = 4.99e66
extended_time = 24626253872746549507674400062589758628174837044040174232682998355682118877403294150971273100967356547836875089379328 difference = 729934784685021971457229782462481162643308335715727667817160376190
to_input = 6.99e65
extended_time = 24626253872746549507674400062589758628174837044040873232682998355679629980806665029658387830710049087400764751478784 difference = 30934784685021973946126379091602475528578593023188103927498276734
to_input = 2.99e64
extended_time = 24626253872746549507674400062589758628174837044040903132682998355682035878316218108655896096967986702006456982437888 difference = 1034784685021971540228869538523478020312335085573498235267317630
to_input = 0.99e63
extended_time = 24626253872746549507674400062589758628174837044040904122682998355682124214606354690043037044715584206310658461925376 difference = 44784685021971451892579401942090879364587488069194033787830142
to_input = 3.99e61
extended_time = 24626253872746549507674400062589758628174837044040904162582998355682123408313591843362288736108094177816586303307776 difference = 4884685021971452698872164788771627673194978097688105946447742
to_input = 3.99e60
extended_time = 24626253872746549507674400062589758628174837044040904166572998355682123327684315558694213905247345174967179087446016 difference = 894685021971452779501441073439702504055727100537513162309502
to_input = 7.99e59
extended_time = 24626253872746549507674400062589758628174837044040904167371998355682123352898030525530509508632452133443670009446400 difference = 95685021971452754287726106603406900670620142061022240309118
to_input = 8.99e58
extended_time = 24626253872746549507674400062589758628174837044040904167461898355682123347331020007684467389518455066701010290343936 difference = 5785021971452759854736624449449019784617208803681959411582
to_input = 4.99e57
extended_time = 24626253872746549507674400062589758628174837044040904167466888355682123347138450817400914119915334737459391299059712 difference = 795021971452760047305814733002289387737538045300950695806
to_input = 6.99e56
extended_time = 24626253872746549507674400062589758628174837044040904167467587355682123347128863236795669524766528383504407502782464 difference = 96021971452760056893395338246884536543892000284746973054
to_input = 8.99e55
extended_time = 24626253872746549507674400062589758628174837044040904167467677255682123347129742535436773740899264555000852260061184 difference = 6121971452760056014096697142668403807720503839989694334
to_input = 5.99e54
extended_time = 24626253872746549507674400062589758628174837044040904167467683245682123347129935873046591312244474630677028845649920 difference = 131971452760055820759087325097058597644827663404105598
to_input = 0.99e53
extended_time = 24626253872746549507674400062589758628174837044040904167467683344682123347129945835744476353372627530842646840868864 difference = 32971452760055810796389440055930444744662045408886654
to_input = 2.99e52
extended_time = 24626253872746549507674400062589758628174837044040904167467683374582123347129943506286048460919907380956432806445056 difference = 3071452760055813125847867948383164894548259443310462
to_input = 2.99e51
extended_time = 24626253872746549507674400062589758628174837044040904167467683377572123347129943672108604407149397237109929487106048 difference = 81452760055812960025312002153675038394762762649470
to_input = 7.99e49
extended_time = 24626253872746549507674400062589758628174837044040904167467683377652023347129943669689423662184697641952592518971392 difference = 1552760055812962444492747118374633552099730784126
to_input = 0.99e48
extended_time = 24626253872746549507674400062589758628174837044040904167467683377653013347129943669659814372226177063807470121517056 difference = 562760055812962474102037076895211697222128238462
to_input = 4.99e47
extended_time = 24626253872746549507674400062589758628174837044040904167467683377653512347129943669625713997399591475917338097745920 difference = 63760055812962508202411903480799587354152009598
to_input = 5.99e46
extended_time = 24626253872746549507674400062589758628174837044040904167467683377653572247129943669626798900268114013186660686102528 difference = 3860055812962507117509034958262318031563652990
to_input = 2.99e45
extended_time = 24626253872746549507674400062589758628174837044040904167467683377653575237129943669627054736157881248789858317500416 difference = 870055812962506861673145191026714833932255102
to_input = 7.99e44
extended_time = 24626253872746549507674400062589758628174837044040904167467683377653576036129943669626981815861358828655713210859520 difference = 71055812962506934593441713446848979038895998
to_input = 6.99e43
extended_time = 24626253872746549507674400062589758628174837044040904167467683377653576106029943669626983545215880339042233823002624 difference = 1155812962506932864087191936462458426752894
to_input = 0.99e42
extended_time = 24626253872746549507674400062589758628174837044040904167467683377653576107019943669626983479785557403759892043399168 difference = 165812962506932929517514871744800206356350
to_input = 0.99e41
extended_time = 24626253872746549507674400062589758628174837044040904167467683377653576107118943669626983484848212978532097942618112 difference = 66812962506932924454859296972594307137406
to_input = 5.99e40
extended_time = 24626253872746549507674400062589758628174837044040904167467683377653576107178843669626983487598764169913114371817472 difference = 6912962506932921704308105591577877938046
to_input = 5.99e39
extended_time = 24626253872746549507674400062589758628174837044040904167467683377653576107184833669626983487873819289051216014737408 difference = 922962506932921429252986453476235018110
to_input = 8.99e38
extended_time = 24626253872746549507674400062589758628174837044040904167467683377653576107185732669626983487868125978131324267921408 difference = 23962506932921434946297373367981834110
to_input = 1.99e37
extended_time = 24626253872746549507674400062589758628174837044040904167467683377653576107185752569626983487867243533569768011333632 difference = 4062506932921435828741934924238421886
to_input = 3.99e36
extended_time = 24626253872746549507674400062589758628174837044040904167467683377653576107185756559626983487867417219131468033294336 difference = 72506932921435655056373224216461182
to_input = 6.99e34
extended_time = 24626253872746549507674400062589758628174837044040904167467683377653576107185756629526983487867417277127154460524544 difference = 2606932921435654998377537789230974
to_input = 1.99e33
extended_time = 24626253872746549507674400062589758628174837044040904167467683377653576107185756631516983487867417209174116785979392 difference = 616932921435655066330575463776126
to_input = 5.99e32
extended_time = 24626253872746549507674400062589758628174837044040904167467683377653576107185756632115983487867417238254980643684352 difference = 17932921435655037249711606071166
to_input = 0.99e31
extended_time = 24626253872746549507674400062589758628174837044040904167467683377653576107185756632125883487867417238479985927258112 difference = 8032921435655037024706322497406
to_input = 7.99e30
extended_time = 24626253872746549507674400062589758628174837044040904167467683377653576107185756632133873487867417238923153806196736 difference = 42921435655036581538443558782
to_input = 3.99e28
extended_time = 24626253872746549507674400062589758628174837044040904167467683377653576107185756632133913387867417238926790099992576 difference = 3021435655036577902149762942
to_input = 2.99e27
extended_time = 24626253872746549507674400062589758628174837044040904167467683377653576107185756632133916377867417238926865563910144 difference = 31435655036577826685845374
to_input = 2.99e25
extended_time = 24626253872746549507674400062589758628174837044040904167467683377653576107185756632133916407767417238926865974951936 difference = 1535655036577826274803582
to_input = 0.99e24
extended_time = 24626253872746549507674400062589758628174837044040904167467683377653576107185756632133916408757417238926865995923456 difference = 545655036577826253832062
to_input = 4.99e23
extended_time = 24626253872746549507674400062589758628174837044040904167467683377653576107185756632133916409256417238926865964466176 difference = 46655036577826285289342
to_input = 3.99e22
extended_time = 24626253872746549507674400062589758628174837044040904167467683377653576107185756632133916409296317238926865965514752 difference = 6755036577826284240766
to_input = 5.99e21
extended_time = 24626253872746549507674400062589758628174837044040904167467683377653576107185756632133916409302307238926865966039040 difference = 765036577826283716478
to_input = 6.99e20
extended_time = 24626253872746549507674400062589758628174837044040904167467683377653576107185756632133916409303006238926865966039040 difference = 66036577826283716478
to_input = 5.99e19
extended_time = 24626253872746549507674400062589758628174837044040904167467683377653576107185756632133916409303066138926865966039040 difference = 6136577826283716478
to_input = 5.99e18
extended_time = 24626253872746549507674400062589758628174837044040904167467683377653576107185756632133916409303072128926865966039040 difference = 146577826283716478
to_input = 0.99e17
extended_time = 24626253872746549507674400062589758628174837044040904167467683377653576107185756632133916409303072227926865966039040 difference = 47577826283716478
to_input = 3.99e16
extended_time = 24626253872746549507674400062589758628174837044040904167467683377653576107185756632133916409303072267826865966039040 difference = 7677826283716478
to_input = 6.99e15
extended_time = 24626253872746549507674400062589758628174837044040904167467683377653576107185756632133916409303072274816865966039040 difference = 687826283716478
to_input = 5.99e14
extended_time = 24626253872746549507674400062589758628174837044040904167467683377653576107185756632133916409303072275415865966039040 difference = 88826283716478
to_input = 7.99e13
extended_time = 24626253872746549507674400062589758628174837044040904167467683377653576107185756632133916409303072275495765966039040 difference = 8926283716478
to_input = 7.99e12
extended_time = 24626253872746549507674400062589758628174837044040904167467683377653576107185756632133916409303072275503755966039040 difference = 936283716478
to_input = 8.99e11
extended_time = 24626253872746549507674400062589758628174837044040904167467683377653576107185756632133916409303072275504654966039040 difference = 37283716478
to_input = 2.99e10
extended_time = 24626253872746549507674400062589758628174837044040904167467683377653576107185756632133916409303072275504684866039040 difference = 7383716478
to_input = 6.99e9
extended_time = 24626253872746549507674400062589758628174837044040904167467683377653576107185756632133916409303072275504691856039040 difference = 393716478
to_input = 2.99e8
extended_time = 24626253872746549507674400062589758628174837044040904167467683377653576107185756632133916409303072275504692155039040 difference = 94716478
to_input = 8.99e7
extended_time = 24626253872746549507674400062589758628174837044040904167467683377653576107185756632133916409303072275504692244939040 difference = 4816478
to_input = 3.99e6
extended_time = 24626253872746549507674400062589758628174837044040904167467683377653576107185756632133916409303072275504692248929040 difference = 826478
to_input = 7.99e5
extended_time = 24626253872746549507674400062589758628174837044040904167467683377653576107185756632133916409303072275504692249728040 difference = 27478
to_input = 1.99e4
extended_time = 24626253872746549507674400062589758628174837044040904167467683377653576107185756632133916409303072275504692249747940 difference = 7578
to_input = 6.99e3
extended_time = 24626253872746549507674400062589758628174837044040904167467683377653576107185756632133916409303072275504692249754930 difference = 588
to_input = 4.99e2
extended_time = 24626253872746549507674400062589758628174837044040904167467683377653576107185756632133916409303072275504692249755429 difference = 89
to_input = 7.99e1
extended_time = 24626253872746549507674400062589758628174837044040904167467683377653576107185756632133916409303072275504692249755508 difference = 10
to_input = 0.99e1
current_time = 1694367562
goal_extended_time = 24626253872746549507674400062589758628174837044040904167467683377653576107185756632133916409303072275504692249755518
waiting for deadline (19s)
waiting for deadline (19s)
waiting for deadline (19s)
waiting for deadline (18s)
waiting for deadline (18s)
waiting for deadline (18s)
waiting for deadline (18s)
waiting for deadline (18s)
waiting for deadline (18s)
waiting for deadline (18s)
waiting for deadline (18s)
waiting for deadline (18s)
waiting for deadline (17s)
waiting for deadline (17s)
waiting for deadline (17s)
waiting for deadline (17s)
waiting for deadline (17s)
waiting for deadline (17s)
waiting for deadline (17s)
waiting for deadline (17s)
waiting for deadline (17s)
waiting for deadline (16s)
waiting for deadline (16s)
waiting for deadline (16s)
waiting for deadline (16s)
waiting for deadline (16s)
waiting for deadline (16s)
waiting for deadline (16s)
waiting for deadline (16s)
waiting for deadline (16s)
waiting for deadline (15s)
waiting for deadline (15s)
waiting for deadline (15s)
waiting for deadline (15s)
waiting for deadline (15s)
waiting for deadline (15s)
waiting for deadline (15s)
waiting for deadline (15s)
waiting for deadline (15s)
waiting for deadline (14s)
waiting for deadline (14s)
waiting for deadline (14s)
waiting for deadline (14s)
waiting for deadline (14s)
waiting for deadline (14s)
waiting for deadline (14s)
waiting for deadline (14s)
waiting for deadline (14s)
waiting for deadline (14s)
waiting for deadline (13s)
waiting for deadline (13s)
waiting for deadline (13s)
waiting for deadline (13s)
waiting for deadline (13s)
waiting for deadline (13s)
waiting for deadline (13s)
waiting for deadline (13s)
waiting for deadline (13s)
waiting for deadline (12s)
waiting for deadline (12s)
waiting for deadline (12s)
waiting for deadline (12s)
waiting for deadline (12s)
waiting for deadline (12s)
waiting for deadline (12s)
waiting for deadline (12s)
waiting for deadline (12s)
waiting for deadline (11s)
waiting for deadline (11s)
waiting for deadline (11s)
waiting for deadline (11s)
waiting for deadline (11s)
waiting for deadline (11s)
waiting for deadline (11s)
waiting for deadline (11s)
waiting for deadline (11s)
waiting for deadline (10s)
waiting for deadline (10s)
waiting for deadline (10s)
waiting for deadline (10s)
waiting for deadline (10s)
waiting for deadline (10s)
waiting for deadline (10s)
waiting for deadline (10s)
waiting for deadline (10s)
waiting for deadline (9s)
waiting for deadline (9s)
waiting for deadline (9s)
waiting for deadline (9s)
waiting for deadline (9s)
waiting for deadline (9s)
waiting for deadline (9s)
waiting for deadline (9s)
waiting for deadline (9s)
waiting for deadline (8s)
waiting for deadline (8s)
waiting for deadline (8s)
waiting for deadline (8s)
waiting for deadline (8s)
waiting for deadline (8s)
waiting for deadline (8s)
waiting for deadline (8s)
waiting for deadline (8s)
waiting for deadline (7s)
waiting for deadline (7s)
waiting for deadline (7s)
waiting for deadline (7s)
waiting for deadline (7s)
waiting for deadline (7s)
waiting for deadline (7s)
waiting for deadline (7s)
waiting for deadline (7s)
waiting for deadline (7s)
waiting for deadline (6s)
waiting for deadline (6s)
waiting for deadline (6s)
waiting for deadline (6s)
waiting for deadline (6s)
waiting for deadline (6s)
waiting for deadline (6s)
waiting for deadline (6s)
waiting for deadline (6s)
waiting for deadline (5s)
waiting for deadline (5s)
waiting for deadline (5s)
waiting for deadline (5s)
waiting for deadline (5s)
waiting for deadline (5s)
waiting for deadline (5s)
waiting for deadline (5s)
waiting for deadline (5s)
waiting for deadline (4s)
waiting for deadline (4s)
waiting for deadline (4s)
waiting for deadline (4s)
waiting for deadline (4s)
waiting for deadline (4s)
waiting for deadline (4s)
waiting for deadline (4s)
waiting for deadline (4s)
waiting for deadline (3s)
waiting for deadline (3s)
waiting for deadline (3s)
waiting for deadline (3s)
waiting for deadline (3s)
waiting for deadline (3s)
waiting for deadline (3s)
waiting for deadline (3s)
waiting for deadline (3s)
waiting for deadline (2s)
waiting for deadline (2s)
waiting for deadline (2s)
waiting for deadline (2s)
waiting for deadline (2s)
waiting for deadline (2s)
waiting for deadline (2s)
waiting for deadline (2s)
waiting for deadline (2s)
waiting for deadline (2s)
waiting for deadline (1s)
waiting for deadline (1s)
waiting for deadline (1s)
waiting for deadline (1s)
waiting for deadline (1s)
waiting for deadline (1s)
waiting for deadline (1s)
waiting for deadline (1s)
waiting for deadline (1s)
wanted time = 24626253872746549507674400062589758628174837044040904167467683377653576107185756632133916409303072275504693944123098
[*] Switching to interactive mode
Please select an option:
1. Extend time
2. Get time
3. Get flag
4. Exit
>>
Time of generation: 24626253872746549507674400062589758628174837044040904167467683377653576107185756632133916409303072275504693944123098
Guess the time signature to get the flag!
>> Wow you did it! Here is the flag: ictf{length_extension_attack_more_like_time_extension_attack}
[*] Got EOF while reading in interactive
the script even times it perfectly to the second!