Skip to content

Instantly share code, notes, and snippets.

View CharaD7's full-sized avatar
🏠
Working from home

Joy Ayitey CharaD7

🏠
Working from home
View GitHub Profile
@CharaD7
CharaD7 / ens-avatar-selfref-poc.js
Created August 18, 2026 19:33
ENS ens-metadata-service: avatar/header fetch self-referential request amplification (DoS) - PoC harness
// PoC: ens-metadata-service avatar/header image fetch can be turned into a
// self-referential request-amplification loop (DoS on metadata.ens.domains).
//
// Chain (all verified against the repo + the exact npm deps it pins):
// 1. Attacker owns a name and sets its avatar text record to
// https://attacker.example/redir, where /redir 302-redirects to
// https://metadata.ens.domains/mainnet/avatar/<attacker-name>.
// 2. A victim (anyone, including another app that renders avatars) requests
// https://metadata.ens.domains/mainnet/avatar/<attacker-name>.
// 3. src/service/avatar.ts:107-115 calls abortableFetch(avatarURI). That is
@CharaD7
CharaD7 / PoC_DisputePreemption.t.sol
Last active August 18, 2026 13:41
The Graph Horizon: indexing-dispute ID preemption lets a bad indexer permanently shield faults from slashing (DisputeManager, Arbitrum One 0x2FE023a5, deployed == HEAD)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.27;
import { IDisputeManager } from "@graphprotocol/interfaces/contracts/subgraph-service/IDisputeManager.sol";
import { DisputeManagerTest } from "./DisputeManager.t.sol";
/**
* PoC: Indexer permanently shields a fault from ever being disputed.
*
* Indexing dispute ID = keccak256(abi.encodePacked(allocationId, poi, blockNumber)).
@CharaD7
CharaD7 / IndexOverflow.t.sol
Last active August 18, 2026 09:58
Aave RewardsDistributor INDEX_OVERFLOW: dust-supply permanently bricks an incentivized reserve's supply side (deployed INCENTIVES_IMPL 0x0ee554F6)
// SPDX-License-Identifier: AGPL-3.0
pragma solidity ^0.8.20;
import {Test, console2} from "forge-std/Test.sol";
/// Minimal, faithful reproduction of the DEPLOYED Aave RewardsDistributor index math
/// (aave-v3-periphery RewardsDistributor, mainnet INCENTIVES_IMPL 0x0ee554F6, Sourcify
/// exact-match verified). The deployed _getAssetIndex is:
/// firstTerm = emissionPerSecond * timeDelta * assetUnit / totalSupply
/// newIndex = firstTerm + oldIndex
@CharaD7
CharaD7 / RoundingProof.t.sol
Created August 16, 2026 22:23
SparkLend SC-1569 half-up rounding - free value extraction (live on mainnet pool 0x5aE32920)
// SPDX-License-Identifier: AGPL-3.0
pragma solidity ^0.8.20;
import {Test, console2} from "forge-std/Test.sol";
/// @notice Reproduces the SC-1569 half-up rounding extraction math on DEPLOYED SparkLend
/// (pool 0xC13e21B648A5Ee794902342038FF3aDAB66BE987, pool logic 0x5aE329203E00f76891094DcfedD5Aca082a50e1b,
/// last upgraded 2024-04-08). The deployed WadRayMath uses half-up rayMul/rayDiv
/// (adds HALF_RAY before dividing). At a fractional liquidity index, choosing amounts whose
/// remainder sits on the half-up boundary lets a user mint scaled units worth more than the
@CharaD7
CharaD7 / PoC_USDtbRedeemBrick.t.sol
Last active August 18, 2026 10:22
Ethena: USDtb redemptions permanently bricked - USDtbMinting.redeem() always reverts because the deployed AnchorageTokenUSDtb deprecated burnFrom() (reverts Deprecated()) while USDtbMinting still calls usdtb.burnFrom(). Verified on-chain (mainnet fork, 3 passing Foundry tests).
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
import { Test } from "forge-std/Test.sol";
/**
* PoC (mainnet fork): USDtbMinting.redeem() is permanently bricked.
*
* Deployed USDtb (AnchorageTokenUSDtb at 0xc139... via impl 0x9d6d77...)
* deprecated burnFrom() to ALWAYS revert Deprecated(). USDtbMinting.redeem()
@CharaD7
CharaD7 / README.md
Last active August 13, 2026 08:02
PoC: Chainlink node (Core) unauthenticated LOOP-plugin /discovery + /plugins/:name/debug/pprof/* endpoints (PR #21120, v2.59.0). Go self-check test, fix patch, README, and live Docker capture.

PoC - Chainlink Node: Unauthenticated LOOP-plugin pprof / metrics / discovery

Bug

The Chainlink node's API server registers the LOOP-plugin debug endpoints (/discovery, /plugins/:name/metrics, /plugins/:name/debug/pprof/*, /plugins/:name/debug/pprof/symbol) on the public, unauthenticated API group. Anyone who can reach the node's API port can pull a running plugin's real Go pprof profiles (heap/allocs/goroutine/CPU) and Prometheus metrics with no credentials, enumerate running plugins via /discovery, and drive CPU-DoS via

@CharaD7
CharaD7 / it-ebooks.md
Created September 28, 2024 17:26 — forked from baiwfg2/it-ebooks.md
Download ebooks as you want
@CharaD7
CharaD7 / .gitconfig
Last active July 10, 2024 13:09
Git config settings for alx students
[alias]
i = init
f = fetch
pr = fetch origin +refs/pull/*/head:refs/remotes/origin/pr/*
cl = clone
rao = remote add origin
rso = remote set-url origin
acm = "!f() { git add . && git commit -m \"$(echo $@)\"; }; f";
@CharaD7
CharaD7 / cloudSettings
Last active August 2, 2021 17:09
This gist should work easily for all those who tried the old version of bitfumes gist from sarthaksavvy. This is a cloud-based global settings configuration for Visual Studio Code (VSCode) for all platforms. I made some changes to the versions and version dependencies and tested it thoroughly, do not hesitate to contact me if things don't go wel…
{"lastUpload":"2020-09-03T08:25:59.907Z","extensionVersion":"v3.4.3"}
@CharaD7
CharaD7 / .gitconfig
Last active August 6, 2021 18:31 — forked from sarthaksavvy/.gitconfig
Git configuration
[alias]
acm = "!f() { git add . && git commit -m \"$(echo $@)\"; }; f";
c = checkout
com = checkout master
cob = checkout -b
b = branch
# Delete branches.
# -d for normal delete, -D for forced delete
# Example g bd branch_name OR g bD branch_name