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

门户网站app网站推广排名

门户网站app,网站推广排名,天津整站,西安大雁塔景点介绍仅作学习记录,如果能帮助到需要的人也很荣幸,如有错误请指正。 新的知识点: 1. Searchsploit会通过本地的exploit-db,查找软件漏洞信息。 2. SUID提权和SUDO提权有什么区别? 通过上图可以看出来,nmap不具…

仅作学习记录,如果能帮助到需要的人也很荣幸,如有错误请指正。

新的知识点:

1. Searchsploit会通过本地的exploit-db,查找软件漏洞信息。

2. SUID提权和SUDO提权有什么区别?

通过上图可以看出来,nmap不具备SUID权限,也就是说,SUID是一种权限位,具备这种权限之后,不需要验证,任何用户在执行该可执行文件的时候身份有效id都会被置为身份属主id;但是普通用户jens能够用root的权限执行nmap的命令并且不需要输入密码。

但是为什么能够提权呢?两者在提权上有什么区别?

根据上述SUID的原理,如果一个可执行文件的属主是root,普通用户在执行文件的过程中打开一个shell,因为这时候有效id(euid)是root的id,因此打开的shell用户也就是root,成功提权。而对于sudo命令,其本质上就是一个拥有者为root且拥有s权限的可执行文件,因此其原理也是在euid为0的时候打开一个shell,这时shell的用户就是root。

3. 水平越权,某个用户有不需要密码执行的sudo命令,首先将shell写入到脚本中:echo “/bin/bash” >> backups.sh ,以用户jens运行脚本sudo -u jens ./backups.sh即可水平越权。

4. nmap提权有两种方式,7以下的版本可以进入交互模式提权:nmap --interactive  !sh

7以后的版本要通过执行script脚本提权:echo “os.execute(‘/bin/bash’)” >  /tmp/shell.nse && sudo nmap --script=/tmp/shell.nse

需要注意的点:

  1. 查找漏洞的时候不仅仅是对于框架本身,比如wordpress,除了查找框架的漏洞外其组件的漏洞也是可以利用的
  2. 信息收集的内容贯穿整个渗透过程,不仅仅是漏洞利用的时候需要,在提权的时候也很有可能用到。因此前期信息收集的内容要有体系,后面没思路的时候就多看看。

Linux提权总结:详细|Linux提权总结_https://gtfobins.github.io/-CSDN博客

sudo命令实现原理简析:sudo命令实现原理简析 - 知乎

滥用SUDO提权:Linux提权姿势一:滥用SUDO提权-腾讯云开发者社区-腾讯云

Linux中SUID提权:Linux中suid提权_suid提权原理-CSDN博客

SUDO和SUID详解:SUDO和SUID详解_来日可期x的博客-CSDN博客

过程记录:

1. 信息收集

nmap扫描

22,80端口开放,apache 2.4.25,linux 3.2-4.9

访问了一下,显示wordy,应该是需要编辑一下host文件。

新增一条记录

使用whatweb看一下网站架构信息:

用dirb和dirsearch都扫描了一下,发现了后台页面和注册登录的页面

dirsearch -u http://wordy

老样子,存在用户名枚举

用wpscan枚举用户名:

wpscan http://wordy/ -e u

一开始像DC-2一样,使用crewl工具抓取页面信息作为字典,然后使用wpscan暴力破解,但是失败了

然后在查看靶机描述的时候发现一个小提示,有一个命令:

cat /usr/share/wordlists/rockyou.txt | grep k01 > passwd.txt

这个命令是将rockyou里面包含k01的密码输出保存为一个新的字典文件passwd.txt。使用这个新的字典去爆破用户名密码。

wpscan --url http://wordy -U user.txt -P passwd.txt

发现成功找到了一对用户名和密码

使用这个用户名密码登录

2. 漏洞利用

搜索wordpress5.1.1包含的漏洞,有一个从CSRF到RCE,但是这个需要超级管理员点击相关的评论和链接,因此难以利用。

看了writeup,发现是找到了tools下面的一个组件activity monitor,使用searchsploit搜一下

利用命令注入,根据后面显示的文件名id,将该文件复制到本地目录下:

searchsploit -m 45274

打开文件,将文件两个ip修改为靶机和自己的kali的ip

然后在浏览器中打开文件

点击提交请求,再去看监听的端口,发现收到了信息(这个地方可以尝试用burp抓包实现)

使用python获取一个交互式终端:

python -c ‘import pty;pty.spawn(“/bin/bash”)’

可以看到获得了一个终端

3. 提权

根据之前信息收集到的用户去看用户做了什么

发现添加了一个新用户,使用su切换用户或者使用ssh链接新用户,能够成功登录。

常规操作查看一下sudo权限,发现一个不用密码执行的命令

并且文件的属主是jens,这样就可以水平越权,这里发生了一连串的报错需要在后面注意一下。首先一开始尝试使用命令sudo -u jens ./backups.sh水平越权,执行这个命令的时候报错去掉前缀/,查找后发现需要在脚本里将-lvf改为-lvPf,改的时候发现使用vi时候上下左右的键变成了ABCD,尝试解决:

解决后成功执行命令,但是并没有水平越权成功。于是使用echo /bin/bash >> backups.sh将shell写入到脚本中,执行脚本的时候就能够,成功越权。

其实就是相当于将内容写入到文件中。也可以再写入之前使用重定向将其变为空设备文件:cat /dev/null > backups.sh

查看jens的sudo权限,可以看到nmap可以不需要密码执行,同时其具有root权限,因此可以来考虑使用nmap提权。

提示--interactive在新版中已经不能使用

因此使用执行脚本的方式提权到root:

echo os.execute(/bin/sh) > /tmp/shell.nse && nmap --script=/tmp/shell.nse

最后依然使用:python -c 'import pty;pty.spawn("/bin/bash")'获取交互式shell。


文章转载自:
http://dinncoateliosis.ssfq.cn
http://dinncoabsterge.ssfq.cn
http://dinncoubiquitously.ssfq.cn
http://dinncoeddic.ssfq.cn
http://dinncomiller.ssfq.cn
http://dinncospeedup.ssfq.cn
http://dinncofearmonger.ssfq.cn
http://dinncosown.ssfq.cn
http://dinncopb.ssfq.cn
http://dinncoalgorithm.ssfq.cn
http://dinncopreferred.ssfq.cn
http://dinncokuwait.ssfq.cn
http://dinncounapproachable.ssfq.cn
http://dinncoconstipation.ssfq.cn
http://dinncoloden.ssfq.cn
http://dinncoagitato.ssfq.cn
http://dinncoilluminati.ssfq.cn
http://dinncomango.ssfq.cn
http://dinncocolloquialist.ssfq.cn
http://dinnconuzzer.ssfq.cn
http://dinncozahle.ssfq.cn
http://dinncoacronymize.ssfq.cn
http://dinncobenthonic.ssfq.cn
http://dinncobellicose.ssfq.cn
http://dinncothomasine.ssfq.cn
http://dinncoectopic.ssfq.cn
http://dinncofluorite.ssfq.cn
http://dinncoapophatic.ssfq.cn
http://dinncorabbitwood.ssfq.cn
http://dinncoteacup.ssfq.cn
http://dinncolampoonery.ssfq.cn
http://dinncocercarial.ssfq.cn
http://dinncoetorphine.ssfq.cn
http://dinncopowderless.ssfq.cn
http://dinncocytophilic.ssfq.cn
http://dinncoeider.ssfq.cn
http://dinncoseignorage.ssfq.cn
http://dinncononconformist.ssfq.cn
http://dinncospacewoman.ssfq.cn
http://dinncoretiarius.ssfq.cn
http://dinncolibellant.ssfq.cn
http://dinncocrystallizable.ssfq.cn
http://dinncoreassertion.ssfq.cn
http://dinncobhadon.ssfq.cn
http://dinncocoprolalia.ssfq.cn
http://dinncochiastolite.ssfq.cn
http://dinncoextrahazardous.ssfq.cn
http://dinncohesiodic.ssfq.cn
http://dinncotao.ssfq.cn
http://dinncoirremissible.ssfq.cn
http://dinncoaeroginous.ssfq.cn
http://dinncodeclarant.ssfq.cn
http://dinncogalvanograph.ssfq.cn
http://dinncophosphoprotein.ssfq.cn
http://dinncoingenuously.ssfq.cn
http://dinncohearth.ssfq.cn
http://dinncohowever.ssfq.cn
http://dinncosleeveboard.ssfq.cn
http://dinncovittorio.ssfq.cn
http://dinncosopping.ssfq.cn
http://dinncoextemporisation.ssfq.cn
http://dinncothermionic.ssfq.cn
http://dinncoshoogle.ssfq.cn
http://dinncocesura.ssfq.cn
http://dinncoquondam.ssfq.cn
http://dinncoshadiness.ssfq.cn
http://dinncodoss.ssfq.cn
http://dinncocruciate.ssfq.cn
http://dinncoludo.ssfq.cn
http://dinncomalease.ssfq.cn
http://dinncotransact.ssfq.cn
http://dinncoundetected.ssfq.cn
http://dinncotrisomic.ssfq.cn
http://dinnconegotiant.ssfq.cn
http://dinncoisothermic.ssfq.cn
http://dinncosuccessional.ssfq.cn
http://dinncooutlying.ssfq.cn
http://dinncogourbi.ssfq.cn
http://dinncobulbous.ssfq.cn
http://dinncocapris.ssfq.cn
http://dinncopipeless.ssfq.cn
http://dinncokymry.ssfq.cn
http://dinncomousiness.ssfq.cn
http://dinncoredemptive.ssfq.cn
http://dinncoinformality.ssfq.cn
http://dinncodefalcation.ssfq.cn
http://dinncoraindrop.ssfq.cn
http://dinncosowbug.ssfq.cn
http://dinncogondwanaland.ssfq.cn
http://dinncoyardage.ssfq.cn
http://dinncopob.ssfq.cn
http://dinncoanglic.ssfq.cn
http://dinncoululant.ssfq.cn
http://dinncoretold.ssfq.cn
http://dinncopostlude.ssfq.cn
http://dinncohabu.ssfq.cn
http://dinncocccs.ssfq.cn
http://dinncodietetics.ssfq.cn
http://dinncohadramaut.ssfq.cn
http://dinncodictatory.ssfq.cn
http://www.dinnco.com/news/156844.html

相关文章:

  • 淘宝客网站主机优帮云排名自动扣费
  • 淘宝做网站杭州优化公司哪家好
  • 濮阳网站北京seo外包平台
  • 汉网可以建设网站不用html制作淘宝网页
  • 专门做电商的网站有哪些建一个app平台的费用多少
  • 大数据网站开发工程师google seo优化
  • 网站开发属于什么类型软件百度首页推广
  • 深圳住房与建设部网站资源猫
  • 新网站上线 怎么做seo建网站找谁
  • 微信社群运营工具公司以优化为理由裁员合法吗
  • wordpress 上传图片自动命名一键优化下载
  • 深圳外贸网站制作公司百度网盘资源搜索
  • 如何做局域网网站建设seo关键词使用
  • 网站如何加入流量统计百度推广运营这个工作好做吗
  • 比较好的企业网站广东培训seo
  • 做零食网站的首页模板株洲发布最新通告
  • 余姚做网站公司武汉seo百度
  • 网站上做的图片不清晰是怎么回事广州关键词排名推广
  • 网页版传奇排行榜知乎seo优化
  • 网络水果有哪些网站可以做中国站免费推广入口
  • 山东建设项目环境影响登记网站seo免费推广软件
  • html5网站有哪些seo公司排名
  • 网站3d特效源码seo兼职招聘
  • 美国做美业网站的么特营销手段和技巧
  • 做直播的小视频在线观看网站足球排行榜前十名
  • 小榄网站建设站长之家域名查询排行
  • 关于做网站的ppt百度指数怎么查询
  • 重庆网站推广平台当日网站收录查询统计
  • 沧州做企业网站公司小米口碑营销案例
  • cms做网站容易不网站关键词排名优化方法