Teatime – An RPC Attack Framework For Blockchain Nodes

Teatime is an RPC attack framework aimed at making it easy to spot misconfigurations in blockchain nodes. It detects a large variety of issues, ranging from information leaks to open accounts, and configuration manipulation.

The goal is to enable tools scanning for vulnerable nodes and minimizing the risk of node-based attacks due to common vulnerabilities. Teatime uses a plugin-based architecture, so extending the library with your own checks is straightforward.https://googleads.g.doubleclick.net/pagead/ads?client=ca-pub-4429384950262667&output=html&h=280&adk=523957041&adf=979114891&pi=t.aa~a.3337566754~i.5~rp.4&w=1118&fwrn=4&fwrnh=100&lmt=1615886934&num_ads=1&rafmt=1&armr=3&sem=mc&pwprc=6189846884&psa=1&ad_type=text_image&format=1118×280&url=https%3A%2F%2Fwww.cybeseclabs.com%2F2021%2F03%2F03%2Fteatime-an-rpc-attack-framework-for-blockchain-nodes%2F&flash=32.0.0&fwr=0&pra=3&rh=200&rw=1118&rpe=1&resp_fmts=3&wgl=1&fa=27&adsid=ChAI8K7BggYQs8fp0t3Gj5sqEkgA6kPaAKKbc57PO5N-Yj7ULiDEm1Tax2ng8oDZlGWH3uopT2wmzIrm3Zxp8mdVU1RiWpLsm0OxLW7DNdn-yKrz00BbI2TRG1k&dt=1615886934687&bpp=6&bdt=1978&idt=6&shv=r20210310&cbv=r20190131&ptt=9&saldr=aa&abxe=1&cookie=ID%3D3cf259ef26776b3d-229cbc966bc60013%3AT%3D1615822324%3ART%3D1615822324%3AS%3DALNI_MZhkv2eufIWrUfpW3epVtvq0zhgSQ&prev_fmts=0x0%2C728x90%2C728x90&nras=2&correlator=741349154627&frm=20&pv=1&ga_vid=2078688146.1615886934&ga_sid=1615886934&ga_hid=1852364319&ga_fc=0&u_tz=330&u_his=4&u_java=1&u_h=900&u_w=1440&u_ah=813&u_aw=1440&u_cd=24&u_nplug=2&u_nmime=5&adx=226&ady=1806&biw=1440&bih=742&scr_x=0&scr_y=0&eid=182982000%2C182982200%2C21068083%2C21068944%2C31060304%2C21069711&oid=3&pvsid=3684689023538202&pem=992&ref=https%3A%2F%2Fwww.cybeseclabs.com%2Fpage%2F2%2F&rx=0&eae=0&fc=1408&brdim=0%2C23%2C0%2C23%2C1440%2C23%2C1440%2C805%2C1440%2C742&vis=1&rsz=%7C%7Cs%7C&abl=NS&fu=8320&bc=31&jar=2021-03-15-15&ifi=4&uci=a!4&btvi=2&fsb=1&xpc=FOf23qgJNE&p=https%3A//www.cybeseclabs.com&dtd=75

Please note that this library is still a PoC and lacks documentation. If there are plugins you would like to see, feel free to contact me on Twitter!
Installation

Teatime runs on Python 3.6+.

To get started, simply run

$ pip3 install teatime

Alternatively, clone the repository and run

$ pip3 install .

Or directly through Python’s setuptools:

$ python3 setup.py install

Example

To get started, simply instantiate a Scanner class and pass in the target IP, port, node type, and a list of instantiated plugins. Consider the following sample to check whether a node is synced and mining:

from teatime.scanner import Scanner
from teatime.plugins.context import NodeType
from teatime.plugins.eth1 import NodeSync, MiningStatus

TARGET_IP = "127.0.0.1"
TARGET_PORT = 8545
INFURA_URL = "Infura API Endpoint"

def get_scanner():
return Scanner(
ip=TARGET_IP,
port=TARGET_PORT,
node_type=NodeType.GETH,
plugins=[
NodeSync(infura_url=INFURA_URL, block_threshold=10),
MiningStatus(should_mine=False)
]
)

if __name__ == '__main__':
scanner = get_scanner()
report = scanner.run()
print(report.to_dict())

Check out the examples directory for more small samples! Teatime is fully typed, so also feel free to explore options in your IDE if reading the documentation is not your preferred choice. 🙂
Future Development

The future of Teatime is uncertain, even though I would love to add broader checks that go beyond RPC interfaces, specifically for technologies such as:

  • Ethereum 2.0
  • Filecoin
  • IPFS

If you want to integrate plugins for smaller, less meaningful chains such as Bitcoin or Ethereum knock-offs, feel free to fork the project and integrate them separately.

Download Teatime

+————————————————-

This is only an educational purposes only I am not responsible for further activities

Join my forum and learn more ethical hacking and penetration testing

https://t.me/whiteHatHacks

Get me at

alex14324.blogspot.com

https://t.me/alex14324

https://github.com/alex14324

https://www.instagram.com/alex_14324

https://discord.gg/6NPtGxZ

——————————————————-+

Leave a Reply

Your email address will not be published. Required fields are marked *