kali command note

ReZero lol
  1. lsof -i 用以显示符合条件的进程情况,lsof(list open files)是一个列出当前系统打开文件的工具。以root用户来执行lsof -i

  2. lsof -i:端口号,用于查看某一端口的占用情况,比如查看22号端口使用情况,lsof -i:22

  3. 切换 root用户 su root

  4. netstat -tunlp 用于显示tcp,udp的端口和进程等相关情况,如图
    这里写图片描述

    • ifconfig -a 以列表形式列出所有可用接口
    • ifconfig eth0 up 激活第一(0)个网络设备(网卡)
    • ifconfig eth0 up 192.168.1.23 为第一个设备分配IP
    • dhclient 自动配置
  5. 网站复制机
    httrack 输入运行即可
    提供至少两个参数 projectName & aimUrl

  6. cache 搜索引擎技巧
    显示快照 cache:edu.+++.com

  7. locate theharvester
    ./thehaverster.py -d kula.com -l 10 -b google
    -l 限定搜索结果数目
    -b 指定公有知识库,可填all
    -d url

  8. whois url
    特别留意dns服务器
    如果dns服务器只列出名字,可用host翻译成IP

  9. host 可互译IP与域名
    建议添加 -a 以便列出额外信息

  10. man 查看工具命令
    man tool_name 显示关于命令的更多信息

  11. Nslookup

    server DNS_IP
    set type = any(mx为IP)

  12. DIG
    dig @target_IP (加参数)-t AXRF

  13. 当区域传输(dig)失败之后
    考虑使用fierce
    ./fiercer.pl -dns domain

  14. MetaGooFill
    ./metagoofil.py -d domain -t fileTypeSplit, -n number -o dir -f index.html

  15. ThreatAgent Drone
    信息收集工具

  16. scan

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
1. ping 与 ping 扫描  
fping 工具用来批量化扫描
fping -a -g 172.16.45.1 172.16.45.254 > host.txt
-a 输出只显示活动主机
-g 指定范围
`> host.txt` 写出到文件
2. TCP连接扫描
nmap -sT -p- -Pn IP1-IP2
-s 扫描类型
T TCP ; S SYN; U UDP ; V Version; X Xmas; N Null; O Os
-p- 扫描所有端口
-Pn 跳过主机发现阶段,对所有地址进行扫描
范围IP1连续到IP2
不连续可使用文件方法-iL File
tips:
Xmas 和Null扫描利用的是RFC文档
即当没有将SYN,ACK,RST标记(Xmas即为此种数据包)置位时,若端口开启,会忽略数据包,端口关闭,会返回响应。
这两种适应于遵循RFC文档的系统,即linux和Unix系统。对windows系统并不感冒。
多数情况下Null和Xmas扫描相反,因为发送包标记为空。

3. nmap –script script_name IP
banner 创建一个TCP端口,将目标系统的所有信息打印
vuln 扫描漏洞的准备工作

4. 漏洞扫描
nessus 的安装和使用
  • Post title:kali command note
  • Post author:ReZero
  • Create time:2017-01-24 22:52:00
  • Post link:https://rezeros.github.io/2017/01/24/kalicommandnote/
  • Copyright Notice:All articles in this blog are licensed under BY-NC-SA unless stating additionally.
 Comments
Contents