Technical Interview Flashcards
(39 cards)
Hypertext Transfer Protocol (HTTP) Requests
- Follows Client/Server Model -or- Request/Response Model: structures requests and responses over the Internet.
- HTTP is Stateless protocol - Independent transactions - like flipping a coin | Web Applications still track your state by means of cookies and sessions.
- Application layer | HTTP uses Transmission Control Protocol (TCP):
- TCP defines how data is transmitted.
- Requests = Specify client actions or methods: GET, POST, DELETE, etc.
- Responses = Server status codes.
GET (HTTP Request)
Retrieves data.
POST (HTTP Request)
Creates a new object, creates something new: - ex: adds a new item to your shopping cart.
HTTP Proxy
- HTTP proxy is an application that runs between the browser and the server, allowing you to intercept, view, and modify HTTP requests and responses.
- Proxy means to act on behalf of another.
URL
- Stands for Uniform Resource Locator = Web Address.
Scheme (URL Structure)
Indicates the protocol that the browser must use to request the resouce (a protocol is a set method for exchanging or transferring data around a computer network). Usually for websites the protocol is HTTPS or HTTP (its unsecured version).
Authority (URL Structure)
Separated from the scheme by the character pattern :// If present the authority includes both the domain (e.g. www.example.com) and the port (80), separated by a colon:
- The domain indicates which Web server is being requested.
- The port indicates the technical “gate” used to access the resources on the web server. It is usually omitted if the web server uses the standard ports of the HTTP protocol (80 for HTTP and 443 for HTTPS) to grant access to its resources. Otherwise it is mandatory.
Path to Resource (URL Structure)
The path refers to the exact location of a page, post, file, or resource on the Web server.
Anchor (URL Structure)
An anchor represents a sort of “bookmark” inside the resource, giving the browser the directions to show the content located at that “bookmarked” spot.
100-199 (HTTP Response Codes)
- Informational responses
The request was received, continuing to process.
200-299 (HTTP Response Codes)
- Successful responses
The request has succeeded. The meaning of the success depends on the HTTP method: - GET: The resource has been fetched and is transmitted in the message body.
- HEAD: The entity headers are in the message body.
- PUT or POST: The resource describing the result of the action is transmitted in the message body.
- TRACE: The message body contains the request message as received by the server.
300-399 (HTTP Response Codes)
- Redirects
Further action needs to be taken in order to complete the request.
400-499 (HTTP Response Codes)
- Client error
The request contains bad syntax or cannot be fulfilled.
500-599 (HTTP Response Codes)
- Server errors
The server failed to fulfill an apparently valid request.
Regular Expressions
- Regular expressions are used to find patterns within text.
- Common Uses of Regular Expressions:
1. Validate text
2. Search through text
HTML
- Stands for Hypertext Markup Language.
- Code used to structure a web page and its content.
- Consists a series of elements, which you use to enclose (tags), or wrap different parts of the content to make it appear a certain way, or act a certain way.
Opening Tag (HTML)
This consists of the name of the element wrapped in opening and closing angle brackets. This states where the element begins or starts to take effect.
Closing Tag (HTML)
This is the same as the opening tag, except that it includes a forward slash before the element name. This states where the element ends.
Content (HTML)
This is the content of the element.
Element (HTML)
The opening tag, the closing tag, and the content together comprise the element.
Attributes (HTML)
Attributes contain extra information about the element that you do not want to appear in the actual content.
Nesting Elements (HTML)
Elements within other elements.
Empty Elements (HTML)
Some elements have no content and are called empty elements.
Open Web Application Security Project (OWASP) - Injection
- Broad class of vulnerabilities: SQL, NoSQL, OS, and LDAP injection.
- Injection happens when untrusted data is sent to an interpreter as a part of a command or a query. The attacker can trick the interpreter into performing unintended actions or accessing data without proper authorization.
- An interpreter translates a statement of the program one at a time into machine code or machine language instructions.
- A query is a request for data results or for action on data.
https: //thehackerish.com/owasp-top-10-vulnerabilities-injection-explained/