Httpx:一款针对HTTP的安全研究工具

关于Httpx

Httpx是一款运行速度极快的多功能HTTP安全工具,它可以使用[
retryablehttp](https://github.com/projectdiscovery/retryablehttp-
go)库来运行多种网络探针,并使用了多线程机制来维持运行的稳定性和结果的准确性。

功能介绍

简单和模块化的代码库,易于贡献代码;

快速和完全可配置的参数选项支持探测多个元素;

支持多种基于HTTP的探测;

默认情况下,智能自动从https回退到http;

支持主机、URL和CIDR作为输入;

在遇到Web应用防火墙时,能够自动处理边缘情况、进行重试和退避等操作;

支持的探测

** 探测**

|

** 默认检测**

|

** 探测**

|

** 默认检测**

—|—|—|—

URL

|

true

|

IP

|

true

Title

|

true

|

CNAME

|

true

Status Code

|

true

|

Raw HTTP

|

false

Content Length

|

true

|

HTTP2

|

false

TLS Certificate

|

true

|

HTTP 1.1 Pipeline

|

false

CSP Header

|

true

|

Virtual host

|

false

Location Header

|

true

|

CDN

|

false

Web Server

|

true

|

Path

|

false

Web Socket

|

true

|

Ports

|

false

Response Time

|

true

|

Request method

|

false

工具安装

Httpx要求本地主机安装并配置好Go v1.14+环境,然后可以使用下列命令来获取Httpx代码库:

GO111MODULE=on go get -v github.com/projectdiscovery/httpx/cmd/httpx

工具使用

httpx -h

上述命令将显示工具的帮助信息,下面给出的是该工具支持的所有参数选项:

Usage of ./httpx:

 

  -H value

      Custom Header

  -allow value

      Allowlist ip/cidr

  -body string

      Request Body

  -cdn

      Check if domain's ip belongs to known CDN (akamai, cloudflare, ..)

  -cname

      Output first cname

  -content-length

      Extracts content length

  -content-type

      Extracts content-type

  -csp-probe

      Send HTTP probes on the extracted CSP domains

  -debug

      Debug mode

  -deny value

      Denylist ip/cidr

  -extract-regex string

      Extract Regex

  -fc string

      Filter status code

  -filter-regex string

      Filter Regex

  -filter-string string

      Filter String

  -fl string

      Filter content length

  -follow-host-redirects

      Only follow redirects on the same host

  -follow-redirects

      Follow Redirects

  -http-proxy string

      HTTP Proxy, eg http://127.0.0.1:8080

  -http2

      HTTP2 probe

  -include-chain

      Show Raw HTTP Chain In Output (-json only)

  -include-response

      Show Raw HTTP Response In Output (-json only)

  -ip

      Output target ip

  -json

      JSON Output

  -l string

      File containing domains

  -location

      Extracts location header

  -match-regex string

      Match Regex

  -match-string string

      Match string

  -max-response-body-size int

      Maximum response body size (default 2147483647)

  -mc string

      Match status code

  -method

      Output method

  -ml string

      Match content length

  -no-color

      No Color

  -no-fallback

      If HTTPS on port 443 is successful on default configuration, probes also port 80 for HTTP

  -o string

      File to write output to (optional)

  -path string

      Request path/file (example '/api')

  -paths string

      Command separated paths or file containing one path per line (example '/api/v1,/apiv2')

  -pipeline

      HTTP1.1 Pipeline

  -ports value

      ports range (nmap syntax: eg 1,2-10,11)

  -random-agent

      Use randomly selected HTTP User-Agent header value

  -request string

      File containing raw request

  -response-in-json

      Show Raw HTTP Response In Output (-json only) (deprecated)

  -response-time

      Output the response time

  -retries int

      Number of retries

  -silent

      Silent mode

  -sr

      Save response to file (default 'output')

  -srd string

      Save response directory (default "output")

  -stats

      Enable statistic on keypress (terminal may become unresponsive till the end)

  -status-code

      Extracts status code

  -store-chain

      Save chain to file (default 'output')

  -tech-detect

      Perform wappalyzer based technology detection

  -threads int

      Number of threads (default 50)

  -timeout int

      Timeout in seconds (default 5)

  -title

      Extracts title

  -tls-grab

      Perform TLS data grabbing

  -tls-probe

      Send HTTP probes on the extracted TLS domains

  -unsafe

      Send raw requests skipping golang normalization

  -verbose

      Verbose Mode

  -version

      Show version of httpx

  -vhost

      Check for VHOSTs

  -vhost-input

      Get a list of vhosts as input

  -web-server

      Extracts server header

  -websocket

      Prints out if the server exposes a websocket

  -x string

      Request Methods, use ALL to check all verbs ()

工具运行

使用stdin运行Httpx

这种方式将使用Httpx针对hosts.txt文件中所有的主机和子域名进行检测,并返回正在运行HTTP Web服务器的URL地址:

▶ cat hosts.txt | httpx

 

    __    __  __       _  __

   / /_  / /_/ /_____ | |/ /

  / __ \/ __/ __/ __ \|   /

 / / / / /_/ /_/ /_/ /   |  

/_/ /_/\__/\__/ .___/_/|_|   v1.0  

             /_/            

 

    projectdiscovery.io

 

[WRN] Use with caution. You are responsible for your actions

[WRN] Developers assume no liability and are not responsible for any misuse or damage.

 

https://mta-sts.managed.hackerone.com

https://mta-sts.hackerone.com

https://mta-sts.forwarding.hackerone.com

https://docs.hackerone.com

https://www.hackerone.com

https://resources.hackerone.com

https://api.hackerone.com

https://support.hackerone.com

使用文件输入运行Httpx

这种方式将使用Httpx针对hosts.txt文件中所有的主机和子域名进行检测,并返回正在运行HTTP Web服务器的URL地址:

▶ httpx -l hosts.txt -silent

 

https://docs.hackerone.com

https://mta-sts.hackerone.com

https://mta-sts.managed.hackerone.com

https://mta-sts.forwarding.hackerone.com

https://www.hackerone.com

https://resources.hackerone.com

https://api.hackerone.com

https://support.hackerone.com

使用CIDR输入运行Httpx

▶ echo 173.0.84.0/24 | httpx -silent

 

https://173.0.84.29

https://173.0.84.43

https://173.0.84.31

https://173.0.84.44

https://173.0.84.12

https://173.0.84.4

https://173.0.84.36

https://173.0.84.45

https://173.0.84.14

https://173.0.84.25

https://173.0.84.46

https://173.0.84.24

https://173.0.84.32

https://173.0.84.9

https://173.0.84.13

https://173.0.84.6

https://173.0.84.16

https://173.0.84.34

使用subfinder运行Httpx

▶ subfinder -d hackerone.com | httpx -title -tech-detect -status-code -title -follow-redirects

 

    __    __  __       _  __

   / /_  / /_/ /_____ | |/ /

  / __ \/ __/ __/ __ \|   /

 / / / / /_/ /_/ /_/ /   |

/_/ /_/\__/\__/ .___/_/|_|

             /_/              v1.0.6

 

    projectdiscovery.io

 

Use with caution. You are responsible for your actions

Developers assume no liability and are not responsible for any misuse or damage.

https://mta-sts.managed.hackerone.com [404] [Page not found · GitHub Pages] [Varnish,GitHub Pages,Ruby on Rails]

https://mta-sts.hackerone.com [404] [Page not found · GitHub Pages] [Varnish,GitHub Pages,Ruby on Rails]

https://mta-sts.forwarding.hackerone.com [404] [Page not found · GitHub Pages] [GitHub Pages,Ruby on Rails,Varnish]

https://docs.hackerone.com [200] [HackerOne Platform Documentation] [Ruby on Rails,jsDelivr,Gatsby,React,webpack,Varnish,GitHub Pages]

https://support.hackerone.com [301,302,301,200] [HackerOne] [Cloudflare,Ruby on Rails,Ruby]

https://resources.hackerone.com [301,301,404] [Sorry, no Folders found.]

工具运行截图

项目地址

Httpx: GitHub传送门

Pages,Ruby on Rails]

https://mta-sts.forwarding.hackerone.com [404] [Page not found · GitHub Pages] [GitHub Pages,Ruby on Rails,Varnish]

https://docs.hackerone.com [200] [HackerOne Platform Documentation] [Ruby on Rails,jsDelivr,Gatsby,React,webpack,Varnish,GitHub Pages]

https://support.hackerone.com [301,302,301,200] [HackerOne] [Cloudflare,Ruby on Rails,Ruby]

https://resources.hackerone.com [301,301,404] [Sorry, no Folders found.]

工具运行截图

[外链图片转存中…(img-54eLIV54-1690250903726)]

项目地址

Httpx: GitHub传送门

接下来我将给各位同学划分一张学习计划表!

学习计划

那么问题又来了,作为萌新小白,我应该先学什么,再学什么?
既然你都问的这么直白了,我就告诉你,零基础应该从什么开始学起:

阶段一:初级网络安全工程师

接下来我将给大家安排一个为期1个月的网络安全初级计划,当你学完后,你基本可以从事一份网络安全相关的工作,比如渗透测试、Web渗透、安全服务、安全分析等岗位;其中,如果你等保模块学的好,还可以从事等保工程师。

综合薪资区间6k~15k

1、网络安全理论知识(2天)
①了解行业相关背景,前景,确定发展方向。
②学习网络安全相关法律法规。
③网络安全运营的概念。
④等保简介、等保规定、流程和规范。(非常重要)

2、渗透测试基础(1周)
①渗透测试的流程、分类、标准
②信息收集技术:主动/被动信息搜集、Nmap工具、Google Hacking
③漏洞扫描、漏洞利用、原理,利用方法、工具(MSF)、绕过IDS和反病毒侦察
④主机攻防演练:MS17-010、MS08-067、MS10-046、MS12-20等

3、操作系统基础(1周)
①Windows系统常见功能和命令
②Kali Linux系统常见功能和命令
③操作系统安全(系统入侵排查/系统加固基础)

4、计算机网络基础(1周)
①计算机网络基础、协议和架构
②网络通信原理、OSI模型、数据转发流程
③常见协议解析(HTTP、TCP/IP、ARP等)
④网络攻击技术与网络安全防御技术
⑤Web漏洞原理与防御:主动/被动攻击、DDOS攻击、CVE漏洞复现

5、数据库基础操作(2天)
①数据库基础
②SQL语言基础
③数据库安全加固

6、Web渗透(1周)
①HTML、CSS和JavaScript简介
②OWASP Top10
③Web漏洞扫描工具
④Web渗透工具:Nmap、BurpSuite、SQLMap、其他(菜刀、漏扫等)

那么,到此为止,已经耗时1个月左右。你已经成功成为了一名“脚本小子”。那么你还想接着往下探索吗?

阶段二:中级or高级网络安全工程师(看自己能力)

综合薪资区间15k~30k

7、脚本编程学习(4周)
在网络安全领域。是否具备编程能力是“脚本小子”和真正网络安全工程师的本质区别。在实际的渗透测试过程中,面对复杂多变的网络环境,当常用工具不能满足实际需求的时候,往往需要对现有工具进行扩展,或者编写符合我们要求的工具、自动化脚本,这个时候就需要具备一定的编程能力。在分秒必争的CTF竞赛中,想要高效地使用自制的脚本工具来实现各种目的,更是需要拥有编程能力。

零基础入门的同学,我建议选择脚本语言Python/PHP/Go/Java中的一种,对常用库进行编程学习
搭建开发环境和选择IDE,PHP环境推荐Wamp和XAMPP,IDE强烈推荐Sublime;

Python编程学习,学习内容包含:语法、正则、文件、 网络、多线程等常用库,推荐《Python核心编程》,没必要看完

用Python编写漏洞的exp,然后写一个简单的网络爬虫

PHP基本语法学习并书写一个简单的博客系统

熟悉MVC架构,并试着学习一个PHP框架或者Python框架 (可选)

了解Bootstrap的布局或者CSS。

阶段三:顶级网络安全工程师

如果你对网络安全入门感兴趣,那么你需要的话可以点击这里👉网络安全重磅福利:入门&进阶全套282G学习资源包免费分享!

学习资料分享

当然,只给予计划不给予学习资料的行为无异于耍流氓,这里给大家整理了一份【282G】的网络安全工程师从入门到精通的学习资料包,可点击下方二维码链接领取哦。

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值