Skip to content

PolySwarm CTF challenge example fails with NoAliveStates during contract deployment #2676

@dguido

Description

@dguido

Description

The PolySwarm CTF challenge example in examples/ctf/polyswarm_challenge/ fails immediately during contract deployment with all states being terminated. The simplified version works correctly, but the full challenge does not.

Current Behavior

When running polyswarm_challenge.py:

  1. Contract deployment succeeds but terminates the only state
  2. All subsequent transactions fail with NoAliveStates
  3. States before deployment: 1 ready, 0 terminated
  4. States after deployment: 0 ready, 1 terminated

Investigation Results

  • The winnerlog.bin file starts with plaintext: "dogecointothemoonlambosoondudes!"
  • This suggests the bytecode file may be corrupted or contain test data instead of actual contract bytecode
  • The bytecode is 3930 bytes but appears to have non-bytecode data at the beginning
  • The simplified version (polyswarm_simplified.py) works perfectly, demonstrating the core technique

Error Output

Deploying WinnerLog contract...
Bytecode length: 3930 bytes
States before deployment: 1 ready, 0 terminated
States after deployment: 0 ready, 1 terminated
WinnerLog deployed at: 0x2e4d2a597a2fcbdf6cc55eb5c973e76aa19ac410

Authorizing CashMoney contract...
Authorization transaction issue: 

❌ Transaction failed: 
⚠️  This example requires specific contract setup.

Hexdump of winnerlog.bin (first 32 bytes)

00000000  7f 64 6f 67 65 63 6f 69  6e 74 6f 74 68 65 6d 6f  |.dogecointothemo|
00000010  6f 6e 6c 61 6d 62 6f 73  6f 6f 6e 64 75 64 65 73  |onlambosoondudes|

Proposed Solution

  1. Obtain or regenerate the correct WinnerLog contract bytecode
  2. Verify the bytecode is valid EVM bytecode (should start with valid opcodes, not ASCII text)
  3. Update the example to use proper contract bytecode
  4. Add validation to check bytecode format before deployment

Environment

  • Manticore version: 0.3.7
  • Python version: 3.11+
  • The simplified version works, indicating Manticore EVM functionality is operational

Workaround

Users can run polyswarm_simplified.py which demonstrates the same technique and works correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions