MIT License

项目介绍

franccesco/getaltname 是一个托管在 GitHub 上的开源项目,主要使用 Python 编写,采用 MIT License 许可证,目前获得 391 个 Star、71 次 Fork。

仓库全名
franccesco/getaltname
开源许可证
MIT License
Star 数
391
Fork 数
71
未关闭 Issue
3

README 摘要

GSAN - Get Subject Alternative Names GSAN is a tool that can extract Subject Alternative Names (SAN) found in SSL Certificates directly from https servers which can provide you with DNS names (subdomains) or virtual servers. It doesn't rely on Certificate Transparency logs, it connects directly to the server and extracts the SANs from the certificate, which can be specially useful when you're analyzing internal…

完整内容见 GitHub 原始 README 或本页 。

常见问题

getaltname 用什么语言开发?

主要使用 Python 编写,采用 MIT License 许可证,目前有 391 个 Star。

getaltname 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 getaltname 的源码?

可以直接克隆仓库:git clone https://github.com/franccesco/getaltname.git,默认分支为 master;安装与运行步骤见仓库 README。

getaltname 最近还在维护吗?

仓库最近一次更新为 9月1日,当前有 3 个未关闭 Issue;Star 数为 391,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

Extract subdomains from SSL certificates in HTTPS sites.

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

语言占比

Dockerfile
Python

Release

README

GSAN - Get Subject Alternative Names

GSAN is a tool that can extract Subject Alternative Names (SAN) found in SSL Certificates directly from https servers which can provide you with DNS names (subdomains) or virtual servers.

It doesn’t rely on Certificate Transparency logs, it connects directly to the server and extracts the SANs from the certificate, which can be specially useful when you’re analyzing internal servers or self-signed certificates.

Installation

Use pip (or pipx - recommended) to avoid contaminating your system with a bunch of dependencies.

$ pipx install --user gsan

You can also install and run it using Docker.

$ docker run --rm -i francc3sco/gsan <DOMAIN>

Usage

Basic usage is just passing the domain of an HTTPS server to the tool, and it will return a list of subdomains found in the certificate.

$ gsan microsoft.com

microsoft.com [126]:
- microsoft.com
- successionplanning.microsoft.com
- explore-security.microsoft.com
...
- wwwbeta.microsoft.com
- gigjam.microsoft.com
- mspartnerira.microsoft.com
...

Alternatively, you can pass a text file with a list of domains to scan by using the xargs command.

$ cat domains.txt | xargs gsan

google.com [93]:
- google.fr
...
- google.com.au

amazon.com [37]:
- uedata.amazon.com
...
- origin-www.amazon.com.au

youtube.com [93]:
- google.fr
...
- google.com.au

If you’re using the dockerized version, you can achieve the same by doing:

$ cat domains.txt | xargs docker run --rm -i francc3sco/gsan

You can combine gsan with other tools like shodan to get a list of SANs found in a list of domains or IP addresses as long as you respect the IP|DOMAIN:PORT format.

$ shodan search --fields ip_str,port --separator : --limit 100 https | cut -d : -f 1,2 | xargs gsan --timeout 1

207.21.195.58 [1]:
- orielstat.com

162.159.135.42 [4]:
- temp927.kinsta.cloud
- temp312.kinsta.cloud

34.230.178.151 [2]:
- procareltc.com
- clarest.com

20.62.53.137 [1]:
- budget.lis.virginia.gov

199.60.103.228 [3]:
- hscoscdn40.net
- sites-proxy.hscoscdn40.net
...

You can also output to a file by using the --output flag which can be useful to then pass the output to other tools such as Nmap.

$ gsan microsoft.com --output microsoft.txt | nmap -iL microsoft.txt

Or, if you have a large list of domains:

$ cat domains.txt | xargs gsan --output domains.txt | nmap -iL domains.txt

Or, if you want chaos to take the world:

$ shodan search --fields ip_str,port --separator : --limit 1000 has_ipv6:false https | \
  cut -d : -f 1,2 | \
  xargs gsan --timeout 1 --output sans.txt && \
  sudo nmap -sS -F -vvv -iL sans.txt -oX import_to_metasploit.xml

评论

暂无评论