AI Arena - andywer's results

In AI Arena you train an AI character to battle in a platform fighting game. Imagine a cross between Pokรฉmon and Super Smash Bros, but the characters are AIs, and you can train them to learn almost any skill in preparation for battle.

General Information

Platform: Code4rena

Start Date: 09/02/2024

Pot Size: $60,500 USDC

Total HM: 17

Participants: 283

Period: 12 days

Judge:

Id: 328

League: ETH

AI Arena

Findings Distribution

Researcher Performance

Rank: 28/283

Findings: 2

Award: $238.93

๐ŸŒŸ Selected for report: 0

๐Ÿš€ Solo Findings: 0

Lines of code

https://github.com/code-423n4/2024-02-ai-arena/blob/cd1a0e6d1b40168657d1aaee8223dc050e15f8cc/src/FighterFarm.sol#L214

Vulnerability details

Impact

The DNA for new fighters is calculated in a predictable manner using the sender address and fighters.length, making it possible for an attacker to anticipate the DNA and mint a fighter with desired attributes by front-running a transaction.

Proof of Concept

Hash all combinations of a few different sender addresses of accounts under your control and different values for fighters.length, apply the DNA logic to derive attributes and note the ones with desired attributes.

Now try to claim those fighters at just the right time when fighters.length has the right value with the right account and you got yourself a predictably valuable fighter.

See https://github.com/code-423n4/2024-02-ai-arena/blob/main/src/FighterFarm.sol#L212-L220

Tools Used

Unreleased AI tool

Include at least the block hash in the data before hashing. To be really safe, a two stage process where a claim has to be submitted first, but can only be executed in a different block, then using the later block's hash, might be preferable.

Assessed type

Invalid Validation

#0 - c4-pre-sort

2024-02-24T02:04:01Z

raymondfam marked the issue as sufficient quality report

#1 - c4-pre-sort

2024-02-24T02:04:16Z

raymondfam marked the issue as duplicate of #53

#2 - c4-judge

2024-03-06T03:54:06Z

HickupHH3 marked the issue as satisfactory

#3 - c4-judge

2024-03-15T02:10:54Z

HickupHH3 changed the severity to 2 (Med Risk)

#4 - c4-judge

2024-03-22T04:23:10Z

HickupHH3 marked the issue as duplicate of #376

Findings Information

Awards

238.8948 USDC - $238.89

Labels

bug
2 (Med Risk)
insufficient quality report
satisfactory
:robot:_01_group
duplicate-47

External Links

Lines of code

https://github.com/code-423n4/2024-02-ai-arena/blob/cd1a0e6d1b40168657d1aaee8223dc050e15f8cc/src/GameItems.sol#L185

Vulnerability details

Impact

The contract lacks a mechanism for revoking burning privileges from addresses that were previously granted such access, potentially leading to long-term risks if an address is compromised or should no longer be trusted.

Proof of Concept

https://github.com/code-423n4/2024-02-ai-arena/blob/cd1a0e6d1b40168657d1aaee8223dc050e15f8cc/src/GameItems.sol#L185

Tools Used

Unreleased AI tool

Add a function to revoke burning privileges.

Assessed type

Access Control

#0 - c4-pre-sort

2024-02-22T19:34:18Z

raymondfam marked the issue as insufficient quality report

#1 - c4-pre-sort

2024-02-22T19:34:27Z

raymondfam marked the issue as duplicate of #47

#2 - c4-judge

2024-03-08T03:31:01Z

HickupHH3 marked the issue as satisfactory

AuditHub

A portfolio for auditors, a security profile for protocols, a hub for web3 security.

Built bymalatrax ยฉ 2024

Auditors

Browse

Contests

Browse

Get in touch

ContactTwitter