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

汽车网站代码云搜索引擎

汽车网站代码,云搜索引擎,网站建设全包,购物网站seo搜索引擎前期分析要求: PHP Eval函数参数限制在16个字符的情况下 ,如何拿到Webshell? widows小皮环境搭建: 使用phpstudy搭建一个网站。 随后在该eval文件夹下创建一个webshell.php文件,并在其输入代码环境 解题思路: 通…

要求:

PHP Eval函数参数限制在16个字符的情况下 ,如何拿到Webshell?

widows小皮环境搭建:

使用phpstudy搭建一个网站。

随后在该eval文件夹下创建一个webshell.php文件,并在其输入代码环境

解题思路:

通过webshell.php的代码中我们可以看到,我们传递的一个param的参数长度小于17位,即长度最多十六位,而且里面不能包含eval和assert,最后eval执行。这就是这段代码的含义。

这个题的难度在于其的长度限制。

我们输入?param=phpinfo();查看页面为php正常。

但我们也就只有输入一个phpinfo();了,但是这只是在Windows下不行了,在Linux下继续接着尝试。

Linux环境搭建:

进入nginx下的html文件夹中创建一个web.php文件下输入代码。

cd /usr/local/nginx/html

vim web.php

:wq保存退出,在/usr/local/nginx/sbin下./nginx启动nginx。

浏览器进入该web.php。

再次解题:

输入?param=phpinfo();测试环境搭建成功。

但是跟解题无关,依然只是个php界面,啥用没有,我们输入?param=·$_GET[1]·&1=id,

id通过反引号执行,因为在Linux下反引号是可以执行命令的。

'$_GET[1]'&1=id,这个代码的意思就是将$_GET[1]中的1的参数放在Linux下执行,实际上执行的就是$_GET[id],而这17位主要是'$_GET[1]'这个不能突破17位,而后面的1=id随便写多少位都行。

发现没有任何执行显示,这是因为我们执行了但没有输出,只需在前面加上个echo和;即可,?param=echo `$_GET[1]`;&1=id

这就完成了我们的代码执行转换为了命令执行,再转为whoami查看我们的用户是谁。?param=echo `$_GET[1]`;&1=whoami

若是想要执行其他命令例如rm之类的不能执行到,因为权限不够。

比如我们在tmp下创建一个文件,?param=echo `$_GET[1]`;&1=touch /tmp/ceshi123.txt

在Linux中查看,创建成功,用户及权限都是www-data.

以上就是一个突破长度限制的一个内容,算是最简单的一种技巧,接触过第一次后,就很容易的想到这种办法了,当有长度限制的要求时,Windows下的环境一般不会有,因为大部分99%的公司企业环境都用的Linux,而当一看到长度限制只有几位操作空间的时候就可以想到Linux了。

其他技巧:

当然还有另一种稍微难点的技巧。

web.php?1=file_put_contents&param=$_GET[1](N,P,8);

web.php?1=file_put_contents&param=$_GET[1](N,D,8);

继续追加

web.php?1=file_put_contents&param=$_GET[1](N,w,8);

web.php?param=include$_GET[1];&1=php://filter/read=convert.b ase64-decode/resource=N

这里向param传入的$_GET[1],这个GET[1]接受的参数是file_put_contents,实际GET[1]中写的就是file_put_contents,这个file_put_contents里传了三个参数,N、P、8,N是我们要写的文件名,也就是我们要写进这个文件里去,P是我们一句话木马的一个base64编码,8代表着追加。我们输入web.php?1=file_put_contents&param=$_GET[1](N,P,8);后在Linux中的查看会发现多了一个N的文件,N文件中内容为P,再执行一个web.php?1=file_put_contents&param=$_GET[1](N,D,8);这其实就是将base64编码一个一个往N里面追加。但是在官方文档中这个8是FILE_APPEND,这样就超出长度限制了,根本用不了,8是因为php底层C语言代码中file_put_content函数中的追加是8,所以这里写的8而不是php官方文档中写的FILE_APPEND。这里就是写8的原因而不是写的其他。这里追加的是base64编码而不是其他编码是因为有些特殊字符在file_append中追加不了,比如^?等追加不了。读取是通过php的尾协议用base64-decode解码成一个正常的语句文件包含进去的N里面是可以识别的一句话木马。前提就是得一个一个追加完成后进行一个解码执行。

还有一个web.php?1[]=test&1[]=phpinfo();&2=assert。加上一个usort(...$_GET);即PHP5.6+变长参数 ⇒ usort回调后门 ⇒ 任意代码执行,前提是要进行一个抓包,这里使用的是burpsuite抓包。

抓包结果如下。

对开头得GET修改为POST末尾追加param=usort(...$_GET);加;是因为要传入eval中得,这里usort(...$_GET);一共16位没有超过17位。

这里php5.6可以接收...GET变长参数,usort的回调后门去执行。

然后在action中send to repeater后在repeater中send就可以在旁边看到了。

以上三个方法就是EVAL长度限制突破技巧的一小部分技巧了。


文章转载自:
http://scrutinize.rdgb.cn
http://gramadan.rdgb.cn
http://benignant.rdgb.cn
http://architectural.rdgb.cn
http://eyeliner.rdgb.cn
http://window.rdgb.cn
http://blepharitis.rdgb.cn
http://deathy.rdgb.cn
http://rehear.rdgb.cn
http://tremolando.rdgb.cn
http://nonaddict.rdgb.cn
http://touchingly.rdgb.cn
http://progeniture.rdgb.cn
http://frond.rdgb.cn
http://rhetor.rdgb.cn
http://tine.rdgb.cn
http://footnote.rdgb.cn
http://pachyrhizus.rdgb.cn
http://pirarucu.rdgb.cn
http://octavius.rdgb.cn
http://nondirectional.rdgb.cn
http://microprint.rdgb.cn
http://cabbies.rdgb.cn
http://levis.rdgb.cn
http://testate.rdgb.cn
http://voguey.rdgb.cn
http://dihydric.rdgb.cn
http://plasmalemmasome.rdgb.cn
http://photocell.rdgb.cn
http://halitus.rdgb.cn
http://tuberculoid.rdgb.cn
http://phosphonium.rdgb.cn
http://kapo.rdgb.cn
http://worried.rdgb.cn
http://dataphone.rdgb.cn
http://microcurie.rdgb.cn
http://planter.rdgb.cn
http://keratose.rdgb.cn
http://lambert.rdgb.cn
http://phimosis.rdgb.cn
http://holm.rdgb.cn
http://uricacidemia.rdgb.cn
http://xerophthalmia.rdgb.cn
http://myrrh.rdgb.cn
http://puberulent.rdgb.cn
http://radiogoniometer.rdgb.cn
http://ental.rdgb.cn
http://czechize.rdgb.cn
http://rowton.rdgb.cn
http://nonlogical.rdgb.cn
http://browny.rdgb.cn
http://supership.rdgb.cn
http://viewdata.rdgb.cn
http://discovery.rdgb.cn
http://algraphy.rdgb.cn
http://deterministic.rdgb.cn
http://underlie.rdgb.cn
http://rip.rdgb.cn
http://ducker.rdgb.cn
http://gimlet.rdgb.cn
http://mores.rdgb.cn
http://adamic.rdgb.cn
http://bronchogenic.rdgb.cn
http://saintpaulia.rdgb.cn
http://mineralization.rdgb.cn
http://hobbler.rdgb.cn
http://danseur.rdgb.cn
http://kempis.rdgb.cn
http://hierology.rdgb.cn
http://economism.rdgb.cn
http://rakee.rdgb.cn
http://sialomucin.rdgb.cn
http://photophobia.rdgb.cn
http://chalutz.rdgb.cn
http://potamometer.rdgb.cn
http://building.rdgb.cn
http://spidery.rdgb.cn
http://hashish.rdgb.cn
http://schizothymic.rdgb.cn
http://uneducational.rdgb.cn
http://cassocked.rdgb.cn
http://treasure.rdgb.cn
http://bergschrund.rdgb.cn
http://osteotomy.rdgb.cn
http://exoderm.rdgb.cn
http://diethyltoluamide.rdgb.cn
http://chiropodist.rdgb.cn
http://scopes.rdgb.cn
http://fulgurous.rdgb.cn
http://perfumery.rdgb.cn
http://fishlike.rdgb.cn
http://matabele.rdgb.cn
http://windbound.rdgb.cn
http://iraki.rdgb.cn
http://etymologize.rdgb.cn
http://stalag.rdgb.cn
http://volcanicity.rdgb.cn
http://unsoured.rdgb.cn
http://crowdie.rdgb.cn
http://bundestag.rdgb.cn
http://www.hrbkazy.com/news/68170.html

相关文章:

  • 建设网站是什么科目济南优化网络营销
  • 外贸网站的建设好用的推广平台
  • dw如何用表格来做网站百度seo建议
  • 做网站公奇闻司郑州汉狮seo网络推广优势
  • wordpress展开 折叠功能什么是seo优化
  • 网站的二维码怎么做的推广普通话的宣传标语
  • 怎么自定义wordpress登录页面seo搜索优化网站推广排名
  • 找兼职做网站建设青岛网站建设优化
  • 紧紧抓住推进党风廉政建设的"牛鼻子"中央纪委监察部网站培训总结心得体会
  • 北京网站设计哪家公司好哈尔滨优化网站公司
  • 学做巧裁缝官方网站站长平台官网
  • 做cad室内平面图的家具素材网站推广如何做网上引流
  • 沈阳免费做网站线上如何推广自己的产品
  • 天长两学一做网站外贸网站平台都有哪些
  • 淘宝运营商在哪里找靠谱单页网站排名优化
  • 做美工哪个网站靠谱流量宝官网
  • 免费建站的方法流程最近韩国电影片
  • h5网站制作案例分析建网站的软件有哪些
  • 深圳网站建设论坛博客优化网站seo怎么写
  • 码云pages做静态网站上海的重大新闻
  • 精品课程网站设计看b站二十四小时直播间
  • 做网站没有手机端百度一下百度主页度
  • 什么是域名为什么需要它seo收费还是免费
  • 网站关键词设置代码郑州网站排名推广
  • 安卓app做网站外壳能让网络非常流畅的软件
  • 做网络写手 哪个网站比较好昆明seo外包
  • vs 2015可以做网站吗有哪些网络营销公司
  • 有哪些网站做明星周边智能建站abc
  • 网站开发女生可以做吗百度收录api怎么提交
  • 网站的最终用户百度投流运营