- Web Penetration Testing with Kali Linux(Third Edition)
- Gilberto Najera Gutierrez Juned Ahmed Ansari
- 290字
- 2021-06-24 18:44:53
Keeping sessions in HTTP
HTTP is a stateless client-server protocol, where a client makes a request and the server responds with the data. The next request that comes is treated as an entirely new request, unrelated to the previous one. The design of HTTP requests is such that they are all independent of each other. When you add an item to your shopping cart while shopping online, the application needs a mechanism to tie the items to your account. Each application may use a different way to identify each session.
The most widely used technique to track sessions is through a session ID (identifier) set by the server. As soon as a user authenticates with a valid username and password, a unique random session ID is assigned to that user. On each request sent by the client, the unique session ID is included to tie the request to the authenticated user. The ID could be shared using the GET or POST method. When using the GET method, the session ID would become a part of the URL; when using the POST method, the ID is shared in the body of the HTTP message. The server maintains a table mapping usernames to the assigned session ID. The biggest advantage of assigning a session ID is that even though HTTP is stateless, the user is not required to authenticate every request; the browser would present the session ID and the server would accept it.
Session ID also has a drawback: anyone who gains access to the session ID could impersonate the user without requiring a username and password. Furthermore, the strength of the session ID depends on the degree of randomness used to generate it, which could help defeat brute force attacks.
- 嵌入式Linux驅動程序和系統開發實例精講
- Instant Optimizing Embedded Systems using Busybox
- Windows Server 2019 Administration Fundamentals
- 無蘋果不生活 The New iPad隨身寶典
- 完美應用RHEL 8
- 計算機系統:基于x86+Linux平臺
- Python UNIX和Linux系統管理指南
- 鴻蒙操作系統設計原理與架構
- iOS 10 開發指南
- Linux網絡操作系統項目教程(RHEL 7.4/CentOS 7.4)(第3版)(微課版)
- Web Penetration Testing with Kali Linux(Third Edition)
- VMware vSphere 5.1 Cookbook
- Linux內核分析及應用
- Learning Joomla! 3 Extension Development(Third Edition)
- 程序員必讀經典(算法基礎+計算機系統)