Kali CeWL

CeWL 使用指南:基础与进阶方法

一、基础使用方法

1. 基本爬取

cewl http://example.com -w output.txt
  • 爬取目标网站所有可见文本
  • 生成字典保存到 output.txt

2. 控制爬取深度

cewl http://example.com -d 2 -w depth_words.txt
  • -d 2:爬取2层深度的链接(默认1层)

3. 设置最小单词长度

cewl http://example.com -m 6 -w long_words.txt
  • -m 6:只收集6个字符以上的单词

4. 包含数字组合

cewl http://example.com --with-numbers -w num_words.txt
  • 收集如"password123"这类组合

二、进阶使用方法

1. 元数据收集

cewl http://example.com -a -w meta_data.txt
  • -a:收集作者、邮件等元信息
  • 可获取如<meta name="author" content="admin">等内容

2. 邮箱地址抓取

cewl http://example.com -e -w emails.txt
  • 专门提取页面中的邮箱地址

3. 登录页面关键词抓取

cewl http://example.com/login -m 5 --lowercase -w login_terms.txt
  • 针对登录页面收集关键词
  • --lowercase:统一转为小写

4. 代理设置

cewl http://example.com --proxy http://127.0.0.1:8080
  • 通过代理访问目标(避免IP封锁)

5. 组合优化字典

cewl http://example.com -m 5 | sort | uniq > final_dict.txt
  • 去重并排序生成高质量字典

三、实战技巧

1. 密码策略分析

cewl http://company.com/careers -m 8 --with-numbers
  • 通过招聘页面收集公司密码策略(如"要求8位含数字")

2. 多站点联合字典

cewl http://site1.com -w temp1.txt
cewl http://site2.com -w temp2.txt
cat temp1.txt temp2.txt | sort -u > combined.txt

3. 特殊字符处理

cewl http://example.com | sed 's/$/!/' > with_special.txt
  • 给所有单词添加特殊字符(如"password!")

四、工具联动

1. 结合Hydra爆破

cewl http://target.com/login -w passwords.txt
hydra -L users.txt -P passwords.txt http-post-form "/login:user=^USER^&pass=^PASS^:Invalid"

2. 使用John优化字典

cewl http://target.com -w base.lst
john --wordlist=base.lst --rules --stdout > enhanced.lst

3. 搭配Crunch生成组合

cewl http://target.com -m 3 -w words.txt
crunch 6 6 -t @@@%%% -p $(cat words.txt | head -5) > combos.txt
  • 生成"单词+数字"组合(如"admin123")

五、注意事项

  1. 合法性:仅对授权目标使用
  2. 速率控制:添加--delay 3参数(3秒延迟)
  3. 递归深度:商业站点建议-d 1避免封禁
  4. 用户代理:使用-u "Mozilla/5.0"伪装浏览器
  5. HTTPS证书:遇到错误时添加--no-ssl-check

六、典型输出示例

company2023
Welcome@123
admin
qwerty
john.doe@example.com
summer_secret

七、替代方案对比

工具特点适用场景
CeWL动态生成目标相关字典精准爆破
SecLists预置通用字典快速测试
Mentalist图形化规则生成复杂组合
Wfuzz参数模糊测试API测试

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值