Writing a Good Report
-
Step 1: Craft a Descriptive Title
-
Step 2: Provide a Clear Summary
-
Step 3: Include a Severity Assessment
-
Step 4: Give Clear Steps to Reproduce
-
Step 5: Provide a Proof of Concept
(it’s helpful to include a video, screenshots, or photos documenting your exploit,called a proof-of-concept (POC) file.)
-
Step 6: Describe the Impact and Attack Scenarios
-
Step 7: Recommend Possible Mitigations
Step 8: Validate the Report
Internet Security Controls
Content Encoding
Base64 encoding’s character set includes the uppercase alphabet characters A to Z, the lowercase alphabet characters a to z, the number characters 0
to 9, the characters + and /, and finally, the = character for padding. Base64url
encoding is a modified version of base64 used for the URL format. It’s similar to base64, but uses different non-alphanumeric characters and omits padding.
Q29udGVudCBFbmNvZGluZw==
Another popular encoding method is hex encoding. Hexadecimal encoding, or hex, is a way of representing characters in a base-16 format, where
characters range from 0 to F. Hex encoding takes up more space and is less
efficient than base64 but provides for a more human-readable encoded
string. This is the hex-encoded version of the string "Content Encoding"; you
can see that it takes up more characters than its base64 counterpart:
436f6e74656e7420456e636f64696e67
URL编码是一种将字符转换为更容易在互联网上传输的格式的方法。URL编码字符串中的每个字符都可以由其指定的十六进制数表示,该十六进制数前面有一个%标识
使用URL解码和编码这样的URL计算器:URL Encode and Decode - Onlinehttps://www.urlencoder.org/
或者,你可以使用CyberChef(https://gchq.github.io/CyberChef/)对base64内容和其他类型的编码内容进行解码。
Chapter 3: How the Internet Works
✔Internet Security Controls
会话管理和HTTP cookie
会话管理是一个过程,它允许服务器处理来自同一用户的多个请求,而不要求用户再次登录。
大多数网站使用cookie在HTTP请求中传递会话信息。 HTTP Cookie是web服务器发送到浏览器的小块数据。当您登录到站点时,服务器会为您创建一个会话,并将会话ID作为cookie发送到浏览器。收到cookie后,浏览器将其存储,并将其包含在同一服务器的每个请求中.
基于令牌的身份验证
基于令牌的身份验证系统将此信息直接存储在某种令牌中。令牌允许服务器通过解码令牌本身来推断您的身份,而不是在服务器端存储信息并使用会话ID进行查询。这样,应用程序就不必在服务器端存储和维护会话信息。
JSON Web令牌
JSON Web令牌(JWT)是最常用的身份验证令牌类型之一。它有三个组件:头部、有效载荷和签名。
标头标识用于生成签名的算法。它是一个包含算法名称的base64url编码字符串。以下是JWT头的外观:
Manipulating the alg Field
攻击者伪造自己令牌的一种方法是篡改令牌头的alg字段,该字段列出了用于编码签名的算法。如果应用程序不限制JWT中使用的算法类型,攻击者可以指定要使用的算法,这可能会危及令牌的安全性。
Brute-Forcing the Key
Reading Sensitive Information
The Same-Origin Policy
同源策略(SOP)是一条规则,它限制来自一个源的脚本如何与另一个源的资源交互。
在一句话中,SOP是这样的:只有当页面来源相同时,来自页面a的脚本才能访问来自页面B的数据。此规则保护现代web应用程序,并防止许多常见的web漏洞。(跨域访问问题)
如果两个URL共享相同的协议、主机名和端口号,则称它们具有相同的来源。