╋━━━━━━━━━━━━━━━━━━━━╋
┃发现-----四层发现 ┃
┃ 优点 ┃
┃ 可路由且结果可靠 ┃
┃ 不太可能被防火墙过滤 ┃
┃ 甚至可以发现所有端口都被过滤的主机 ┃
┃ 缺点 ┃
┃ 基于状态过滤的防火墙可能过滤扫描 ┃
┃ 全端口扫描速度慢 ┃
┃ TCP ┃
┃ 未经请求的ACK-----RST ┃
┃ SYN-----SYN/ACK、RST ┃
┃ UDP ┃
┃ ICMP端口不可达、一去不复返 ┃
╋━━━━━━━━━━━━━━━━━━━━╋
╋━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╋
┃发现-----四层发现 ┃
┃ACK-----TCP Port-----RST ┃
┃Scapy ┃
┃ i=IP() ┃
┃ i.dst"1.1.1.1" ┃
┃ t=TCP() ┃
┃ t.flags=‘A‘ ┃
┃ r=(i/t) ┃
┃ a=sr1(r) ┃
┃ a.display() ┃
┃a=sr1(IP(dst="1.1.1.1")/TCP(dport=80,flags=‘A‘),timeout=1)) ┃
┃ACK_ping.py ┃
╋━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╋
[email protected]:~# scapy
WARNING: No route found for IPv6 destination :: (no default route?)
Welcome to Scapy (2.2.0)
>>> i=IP()
>>> t=TCP()
>>> r=(i/t)
>>> r[IP].dst="192.168.1.138"
>>> r.display()
###[ IP ]###
version= 4
ihl= None
tos= 0x0
len= None
id= 1
flags=
frag= 0
ttl= 64
proto= tcp
chksum= None
src= 192.168.77.129
dst= 192.168.1.138
\options\
###[ TCP ]###
sport= ftp_data
dport= http
seq= 0
ack= 0
dataofs= None
reserved= 0
flags= S
window= 8192
chksum= None
urgptr= 0
options= {}
>>> r[TCP].flags="A"
>>> r.display()
###[ IP ]###
version= 4
ihl= None
tos= 0x0
len= None
id= 1
flags=
frag= 0
ttl= 64
proto= tcp
chksum= None
src= 192.168.77.129
dst= 192.168.1.138
\options\
###[ TCP ]###
sport= ftp_data
dport= http
seq= 0
ack= 0
dataofs= None
reserved= 0
flags= A
window= 8192
chksum= None
urgptr= 0
options= {}
>>> a=sr1(r)
Begin emission:
.*Finished to send 1 packets.
Received 2 packets, got 1 answers, remaining 0 packets
>>> a.display()
###[ IP ]###
version= 4L
ihl= 5L
tos= 0x0
len= 40
id= 18868
flags=
frag= 0L
ttl= 128
proto= tcp
chksum= 0x20c0
src= 192.168.1.138
dst= 192.168.77.129
\options\
###[ TCP ]###
sport= http
dport= ftp_data
seq= 0
ack= 0
dataofs= 5L
reserved= 0L
flags= R
window= 32767
chksum= 0x5f21
urgptr= 0
options= {}
###[ Padding ]###
load= ‘\x00\x00\x00\x00\x00\x00‘
>>> r[TCP].dport=445
>>> r.display()
###[ IP ]###
version= 4
ihl= None
tos= 0x0
len= None
id= 1
flags=
frag= 0
ttl= 64
proto= tcp
chksum= None
src= 192.168.77.129
dst= 192.168.1.138
\options\
###[ TCP ]###
sport= ftp_data
dport= microsoft_ds
seq= 0
ack= 0
dataofs= None
reserved= 0
flags= A
window= 8192
chksum= None
urgptr= 0
options= {}
>>> a1=sr1(r)
Begin emission:
.*Finished to send 1 packets.
Received 2 packets, got 1 answers, remaining 0 packets
>>> a1.display()
###[ IP ]###
version= 4L
ihl= 5L
tos= 0x0
len= 40
id= 19321
flags=
frag= 0L
ttl= 128
proto= tcp
chksum= 0x1efb
src= 192.168.1.138
dst= 192.168.77.129
\options\
###[ TCP ]###
sport= microsoft_ds
dport= ftp_data
seq= 0
ack= 0
dataofs= 5L
reserved= 0L
flags= R
window= 32767
chksum= 0x5db4
urgptr= 0
options= {}
###[ Padding ]###
load= ‘\x00\x00\x00\x00\x00\x00‘
>>> r[IP].dst="192.168.1.11"
>>> r.display()
###[ IP ]###
version= 4
ihl= None
tos= 0x0
len= None
id= 1
flags=
frag= 0
ttl= 64
proto= tcp
chksum= None
src= 192.168.77.129
dst= 192.168.1.11
\options\
###[ TCP ]###
sport= ftp_data
dport= microsoft_ds
seq= 0
ack= 0
dataofs= None
reserved= 0
flags= A
window= 8192
chksum= None
urgptr= 0
options= {}
>>> a2=sr1(r,timeout=1)
Begin emission:
.*Finished to send 1 packets.
Received 2 packets, got 1 answers, remaining 0 packets
>>> r.display()
###[ IP ]###
version= 4
ihl= None
tos= 0x0
len= None
id= 1
flags=
frag= 0
ttl= 64
proto= tcp
chksum= None
src= 192.168.77.129
dst= 192.168.1.11
\options\
###[ TCP ]###
sport= ftp_data
dport= microsoft_ds
seq= 0
ack= 0
dataofs= None
reserved= 0
flags= A
window= 8192
chksum= None
urgptr= 0
options= {}
>>> r[IP].dst="192.168.1.1"
>>> r[TCP].dport=23419 //数字不需要双引号
>>> r.display()
###[ IP ]###
version= 4
ihl= None
tos= 0x0
len= None
id= 1
flags=
frag= 0
ttl= 64
proto= tcp
chksum= None
src= 192.168.77.129
dst= 192.168.1.1
\options\
###[ TCP ]###
sport= ftp_data
dport= 23419
seq= 0
ack= 0
dataofs= None
reserved= 0
flags= A
window= 8192
chksum= None
urgptr= 0
options= {}
>>> a=sr1(r)
Begin emission:
.*Finished to send 1 packets
.................
>>> a=sr1(r,timeout=1)
Begin emission:
.Finished to send 1 packets.
*
Received 2 packets, got 0 answers, remaining 1 packets
>>> a=sr1(IP(dst="192.168.1.127")/TCP(dport=80,flags="A"),timeout=1)
Begin emission:
......*Finished to send 1 packets.
Received 7 packets, got 1 answers, remaining 0 packets
>>> a
<IP version=4L ihl=5L tos=0x0 len=40 id=37320 flags= frag=0L ttl=128 proto=tcp chksum=0xd8b6 src=192.168.1.127 dst=192.168.77.129 options=[] |<TCP sport=http dport=ftp_data seq=0 ack=0 dataofs=5L reserved=0L flags=R window=32767 chksum=0x5f2c urgptr=0 |<Padding load=‘\x00\x00\x00\x00\x00\x00‘ |>>>
>>> a=sr1(IP(dst="192.168.1.1")/TCP(dport=80,flags="A"),timeout=1)
Begin emission:
*Finished to send 1 packets.
Received 1 packets, got 0 answers, remaining 1 packets
╭────────────────────────────────────────────╮
[ACK_Ping.py]
#!/usr/bin/python
import loggging
logging.getLogger("scapy.runtime").setLevel(logging.ERROR)
from scapy.all import *
if len(sys.argv)!=2;
print "Usage - ./ACK Ping.py [/24 network address]"
print "Example - ./ACK Ping.py 1.1.1.0"
print "Example will perform a TCP ACK ping scan of the 1.1.1.0/24 range"
sys.exit()
address=str(sys.argv[1])
prefix= address.split(‘.‘)[0]+‘.‘+address.split(‘.‘)[1]+‘.‘+address.split(‘.‘)[2]+‘.‘
for add in range[1,254];
response=sr1(IP(dst=prefix+str(addr)/TCP(dport=22222,flags=‘A‘),timeout=0.1,verbose=0)
try:
if int(response[TCP],flags)==4;
print prefix+str(addr)
except:
pass
╰────────────────────────────────────────────╯
[email protected]:~# chmod u+x ACK_Ping.py
[email protected]:~# ./ACK_Ping.py
[email protected]:~# ./ACK_Ping.py 192.168.1.0
╋━━━━━━━━━━━━━━━━╋
┃发现-----四层发现 ┃
┃ UDP-----UDP Port-----ICMP ┃
┃ u=UDP() ┃
┃ u.dport=33333 ┃
┃ r=(i/u) ┃
┃ a-sr1(r,timeout=1,verbose=1) ┃
┃ A.display() ┃
┃ ICMP ┃
┃ ┃
┃ UDP_Ping.py ┃
┃ UDP发现不可靠 ┃
╋━━━━━━━━━━━━━━━━╋
>>> i=IP()
>>> u=UDP()
>>> r=(i/u)
>>> r.display()
###[ IP ]###
version= 4
ihl= None
tos= 0x0
len= None
id= 1
flags=
frag= 0
ttl= 64
proto= udp
chksum= None
src= 127.0.0.1
dst= 127.0.0.1
\options\
###[ UDP ]###
sport= domain
dport= domain
len= None
chksum= None
>>> r[IP].dst="192.168.1.138"
>>> r[TCP].dport=7345
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/scapy/packet.py", line 770, in __getitem__
raise IndexError("Layer [%s] not found" % lname)
IndexError: Layer [TCP] not found
>>> r[UDP].dport=7345
>>> r.display()
###[ IP ]###
version= 4
ihl= None
tos= 0x0
len= None
id= 1
flags=
frag= 0
ttl= 64
proto= udp
chksum= None
src= 192.168.77.129
dst= 192.168.1.138
\options\
###[ UDP ]###
sport= domain
dport= 7345
len= None
chksum= None
>>> a=sr1(r)
Begin emission:
.Finished to send 1 packets.
.*
Received 3 packets, got 1 answers, remaining 0 packets
>>> a.display()
>>> r[IP].dst="192.168.1.11"
>>> a=sr1(r,timeout=1)
Begin emission:
.Finished to send 1 packets.
Received 1 packets, got 0 answers, remaining 1 packets
>>> r.display()
###[ IP ]###
version= 4
ihl= None
tos= 0x0
len= None
id= 1
flags=
frag= 0
ttl= 64
proto= udp
chksum= None
src= 192.168.77.129
dst= 192.168.1.11
\options\
###[ UDP ]###
sport= domain
dport= 7345
len= None
chksum= None
>>> a=sr1(r,timeout=1)
Begin emission:
Finished to send 1 packets.
Received 0 packets, got 0 answers, remaining 1 packets
>>> a=sr1(IP(dst="192.168.1.138")/UDP(dport=7456),timeout=1)
Begin emission:
.Finished to send 1 packets.
Received 1 packets, got 0 answers, remaining 1 packets
╭────────────────────────────────────────────╮
[UDP_Ping.py]
#!/usr/bin/python
import loggging
logging.getLogger("scapy.runtime").setLevel(logging.ERROR)
from scapy.all import *
if len(sys.argv)!=2;
print "Usage - ./ACK Ping.py [/24 network address]"
print "Example - ./ACK Ping.py 1.1.1.0"
print "Example will perform a TCP ACK ping scan of the 1.1.1.0/24 range"
sys.exit()
address=str(sys.argv[1])
prefix= address.split(‘.‘)[0]+‘.‘+address.split(‘.‘)[1]+‘.‘+address.split(‘.‘)[2]+‘.‘
for add in range[1,254];
response=sr1(IP(dst=prefix+str(addr)/UCP(dport=33333),timeout=0.1,verbose=0)
try:
if int(response[IP],proto)==1;
print prefix+str(addr)
except:
pass
╰────────────────────────────────────────────╯
[email protected]:~# ./UDP_Ping.py 192.168.1.0
[email protected]:~# ./UDP_Ping.py 221.144.145.0
该笔记为安全牛课堂学员笔记,想看此课程或者信息安全类干货可以移步到安全牛课堂
Security+认证为什么是互联网+时代最火爆的认证?
牛妹先给大家介绍一下Security+
Security+ 认证是一种中立第三方认证,其发证机构为美国计算机行业协会CompTIA ;是和CISSP、ITIL 等共同包含在内的国际 IT 业 10 大热门认证之一,和CISSP偏重信息安全管理相比,Security+ 认证更偏重信息安全技术和操作。
通过该认证证明了您具备网络安全,合规性和操作安全,威胁和漏洞,应用程序、数据和主机安全,访问控制和身份管理以及加密技术等方面的能力。因其考试难度不易,含金量较高,目前已被全球企业和安全专业人士所普遍采纳。
Security+认证如此火爆的原因?
原因一:在所有信息安全认证当中,偏重信息安全技术的认证是空白的, Security+认证正好可以弥补信息安全技术领域的空白 。
目前行业内受认可的信息安全认证主要有CISP和CISSP,但是无论CISP还是CISSP都是偏重信息安全管理的,技术知识讲的宽泛且浅显,考试都是一带而过。而且CISSP要求持证人员的信息安全工作经验都要5年以上,CISP也要求大专学历4年以上工作经验,这些要求无疑把有能力且上进的年轻人的持证之路堵住。在现实社会中,无论是找工作还是升职加薪,或是投标时候报人员,认证都是必不可少的,这给年轻人带来了很多不公平。而Security+的出现可以扫清这些年轻人职业发展中的障碍,由于Security+偏重信息安全技术,所以对工作经验没有特别的要求。只要你有IT相关背景,追求进步就可以学习和考试。
原因二: IT运维人员工作与翻身的利器。
在银行、证券、保险、信息通讯等行业,IT运维人员非常多,IT运维涉及的工作面也非常广。是一个集网络、系统、安全、应用架构、存储为一体的综合性技术岗。虽然没有程序猿们“生当做光棍,死亦写代码”的悲壮,但也有着“锄禾日当午,不如运维苦“的感慨。天天对着电脑和机器,时间长了难免有对于职业发展的迷茫和困惑。Security+国际认证的出现可以让有追求的IT运维人员学习网络安全知识,掌握网络安全实践。职业发展朝着网络安全的方向发展,解决国内信息安全人才的匮乏问题。另外,即使不转型,要做好运维工作,学习安全知识取得安全认证也是必不可少的。
原因三:接地气、国际范儿、考试方便、费用适中!
CompTIA作为全球ICT领域最具影响力的全球领先机构,在信息安全人才认证方面是专业、公平、公正的。Security+认证偏重操作且和一线工程师的日常工作息息相关。适合银行、证券、保险、互联网公司等IT相关人员学习。作为国际认证在全球147个国家受到广泛的认可。
在目前的信息安全大潮之下,人才是信息安全发展的关键。而目前国内的信息安全人才是非常匮乏的,相信Security+认证一定会成为最火爆的信息安全认证。
近期,安全牛课堂在做此类线上培训,感兴趣可以了解