🎈
Hacking for fun
GithubCV
  • About me
  • Friends
  • Technology
    • os折腾——Arch & Win11 双系统
    • 2024 Let's GoSSIP
    • 固件仿真
    • 安全随笔——安全到底是什么
    • 《信息安全论文写作》方法论
    • Heap Exploitation
    • 信息收集
    • GPT-4 初体验
    • 关于定向 fuzz 的总结
    • Beacon 实验
    • 对 AI 的认知
    • CSAPP —— lab1 datalab
    • 可视化入门学习
    • Python 爬虫入门学习
    • 对 UNIX 新的认识
    • Great works are connected
    • 开源与黑客
    • 搭建个人网站
  • Life
    • 一个悲观de乐观主义者的独白
    • 路在脚下
    • 法律学习初体验
    • 悟已往之不谏 知来者之可追
    • 在自训队,是一种什么样的体验
    • 支教
    • A passion for difficult and novel problems
    • 2022,我的年度总结
    • 1.21 大年三十
    • 1.20 打工日记
    • 浪漫的中国酒文化
    • 我的哲学批判
    • The review of The Grand Hotel
    • 暑假感想
    • 随想
  • Paper reading
    • Fuzzing
      • PDIFF
      • SyzVegas: Beating Kernel Fuzzing Odds with Reinforcement Learning
      • 1dFuzz: Reproduce 1-Day Vulnerabilities with Directed Differential Fuzzing
      • SyzDirect: Directed Greybox Fuzzing for Linux Kernel
    • Others
      • Cumulative Reasoning With Language Model
      • A Review of the F-Measure: Its History, Properties, Criticism, and Alternatives
      • Araña: Discovering and Characterizing Password Guessing Attacks in Practice
      • ChameleMon: Shifting Measurement Attention as Network State Changes
Powered by GitBook
On this page
  • 前言
  • 流程
  • 工具

Was this helpful?

  1. Technology

信息收集

前言

信息收集是渗透测试的前期工作,目的在于扩大目标的攻击面,为后续有针对性的测试做铺垫。笔者认为,信息收集=流程+工具,有了完整的流程加上趁手的工具,信息收集就可以实现自动化(无脑化),故整理了一套方法论,供读者参考。

以下内容摘自笔记,语言为英语,是因为实际工作中,我们必须时刻注意保护自己,尽可能减少特征(当然下面的笔记中有很明显的中国特征,是个错误示范)。比如工作设备不能被恶意的物理接触(e.g. u盘)、操作系统的时区、语言、敏感文件的存储、特定虚拟机只做特定的事、网络环境等等,这些内容由于与本 blog 不相关故不展开。

流程

前提:假定已知某个目标域名

  • whois

  • fuzzing top domain name

    • host="xxx" in fofa

    • search which domain has been taken in godaddy

  • use tool to search specific target

    • fofa clue search

    • whois(whoxy, sqlsec.com)

      • similar domains

      • whois history

    • github.com: in:xxx

    • virustotal

    • CMS fingerprint

    • censys

    • netlas.io

    • beian.miit.gov.cn

    • error log

  • find real ip

    • favicon hash

    • DNS record

    • ssl certificate

    • pingning from many places

    • search specific body

    • ctrl + u → related code → directory travel(try to change ip when acces denied)

    • nslookup

  • scan related network address(e.g., 1.1.1.1 - 1.1.1.10)

    • don't miss website can't be access(state code: 3xx ~ 4xx)

  • find all subdomain

  • scan port && directory(special / rarely seen port or directory may match with specific exploitation)

    • duplicate

    • attack according to type

    • wanna dynamic file & admin interface, nor static file(check source code)

      • audit code and search "admin, login, ajax"

      • chrome developer tool

  • discover bug & exp

    • login interface without verification, try brute force

工具

Register:

ip check:

  • virustotal

  • favicon hash, body

  • dns record

  • ssl certificate: search.censys.io

  • engine: O.zone

passwd guess:

  • online: Medusa, Hyrda

    • medusa -h <ip_address> - admin -p admin -M 10443

  • offline: Hashcat

    You cannot use hashcat to recover online accounts (like Gmail, Instagram, Facebook, Twitter, etc.), because hashcat has no way to work on online accounts.

port scan(/24 all are results):

  • masscan, blackwater(comprehensive use, adjust parameter)

    blackwater -i x.x.x.x -c 400 -р 1-65535
    ​
    masscan -p1-65535 x.x.x.x/24 --exclude x.x.x.x-x.x.x.x --rate 800 > <result>
  • Nmap(recognize fingerprint): nmap -A <ip_address> -o ‹output_filename>

  • rustscan:

    alias rustscan='docker run -it --rm --name rustscan rustscan/rustscan: 2.1. 1'
    rustscan -a 127.0.0.1 -q --range 1-10000

bug scan: Nessus, Core Impact, Netsparker

Register:

structure: Metasploit

directory(self-built websites && special path):

  • dirmap:

    python3 dirmap.py -iF targets.txt -1cf
    python3 dirmap.py -i <url> -lcf
  • dirsearch:

    python dirsearch.py -e php -u <url> --exclude-status 403,401 --deep-recursive -o <output_filename>
  • dirb: dirb <url> -0 <result>

subdomain:

  • oneforall(directory, parameter): python3 oneforall.py --target <domain> --exclude www run --output <output_filename>

  • knockpy: knockpy -d <domain> --recon --bruteforce --save report

  • google: site: xxxxxx -www

  • fofa: domain="xxxxxx"

search: fofa syntax

traffic listening: burp suite

picture: exiftool

version recognize: hash value && * match

sql injection:

  • manually

    • Determine whether there is injection and whether the injection is character or numeric(difference: quotation marks && number of sql)

      • trick: 1' or 1 = 1 #, 1 or 1 = 1 # → retum messge?

      • sleep

      • Guess the number of fields in the SQL query statement

      • Determine the order of displayed fields

    • Get target

      • current database

      • table

      • field names in the table

  • sqlmap

  • Defense

    • POD: user input is bound to the statement, separating it from the SQL query

    • Make sure only 1 result is returned

    • Anti-CSRF token

PreviousHeap ExploitationNextGPT-4 初体验

Last updated 11 months ago

Was this helpful?

ip address:

ASN:

ping from many places:

except CDN:

http probe:

regular express:

https://strongpassword.onionmail.org
https://10minutemail.com
https://pry.sh
https://ipinfo.io/AS3462
https://tools.ipip.net/newping.php
https://www.cnblogs.com/qiudabai/p/9763739.html
https://sitereport.netcraft.com/
https://dnslytics.com
https://passivedns.mnemonic.no
https://strongpassword.onionmail.org/
https://10minutemail.com/
https://scan.javasec.cn
https://api.subdomain.center/?domian=
https://github.com/projectdiscovery/httpx
https://ihateregex.io/expr/url/