Signature Replay | Hack Solidity (0.6)

แชร์
ฝัง
  • เผยแพร่เมื่อ 12 พ.ย. 2024

ความคิดเห็น • 26

  • @smartcontractprogrammer
    @smartcontractprogrammer  4 ปีที่แล้ว

    0:03 Signature replay attack
    0:40 Why use signatures?
    2:12 Example of signature replay attack
    2:49 3 known ways to do a signature replay attack
    5:42 Vulnerable code
    7:30 Preventative techinique

  • @AM-rl8lv
    @AM-rl8lv 4 ปีที่แล้ว +7

    You are.... handsdown.... the best solidity teacher on youtube!!! Keep up the great work, your channel will explode my friend!!

  • @saurabhN1393
    @saurabhN1393 3 ปีที่แล้ว +1

    Loving your videos!!! Please make a video about Meta Transaction and other ways to do gas-less tx.

  • @adeebabdulsalam2259
    @adeebabdulsalam2259 2 ปีที่แล้ว

    finally someone making videos that answer real questions

  • @salem232
    @salem232 4 ปีที่แล้ว

    awesome video !! Loving the diagram + code review combo 😍 super clear !!

  • @comprendrelablockchain9791
    @comprendrelablockchain9791 2 ปีที่แล้ว

    great content. you are doing an excellent job.. keep educating people about what you know

  • @noromeb4003
    @noromeb4003 ปีที่แล้ว +1

    Why nonce is set as an parameter, attacker can provide the same nonce, as well as the same signatures, why we did't stored it as a storage an increment it automatically ?

  • @godspower_eze
    @godspower_eze 2 ปีที่แล้ว +1

    Great video. Thanks.
    What application did you use for the illustrations?

  • @zikzik7691
    @zikzik7691 ปีที่แล้ว

    Hi,
    What if i don't change the nonce instead I change other data, And that will change the hash and
    Is it gonna work with that ? The purpose of nonce, there should be a nonce generator for a specific contract or what?

  • @bitedeep4876
    @bitedeep4876 11 หลายเดือนก่อน

    Is this thesame thing as Signature Malleability? If No, how does it differ?

    • @smartcontractprogrammer
      @smartcontractprogrammer  11 หลายเดือนก่อน

      it's different. this attack uses the same signature twice

  • @funkkaarr
    @funkkaarr 2 ปีที่แล้ว

    how did we prevent replay in self destruct scenario, is it that the nonce gets reset to 0 on chain but the signed message nonce is non-zero?

    • @babuakumar10
      @babuakumar10 ปีที่แล้ว

      I was thinking the same

  • @pratnadeepbiswas8527
    @pratnadeepbiswas8527 4 ปีที่แล้ว +1

    awesomee

  • @sudiptabasak1058
    @sudiptabasak1058 3 ปีที่แล้ว

    Nice content.
    Can you make tutorial on uniswap v3?

  • @wrenchplays5698
    @wrenchplays5698 3 ปีที่แล้ว +2

    y is eve always the bad guy 😂😂😂

    • @smartcontractprogrammer
      @smartcontractprogrammer  3 ปีที่แล้ว +3

      Eve - evil
      kinda rymes

    • @tobiassjoholm9325
      @tobiassjoholm9325 2 ปีที่แล้ว +1

      Eve is a female

    • @michaelfonda5409
      @michaelfonda5409 2 ปีที่แล้ว

      By adding address(this) in the txHash without signing it in the sig, wouldn't the check be invalidated because you're checking against data that wasn't signed?

    • @stalinMaciasETH
      @stalinMaciasETH ปีที่แล้ว

      @@michaelfonda5409 your assumption makes sense, what I'd do is pass the contract's address as a parameter in the transfer() function, that way when signing the transaction off-chain it would be possible to add the contract address to the message before is hashed

    • @michaelfonda5409
      @michaelfonda5409 ปีที่แล้ว

      @@stalinMaciasETH V3 and V4 of sigs solve this issue by wiring in the contract address to the sig itself inherently. The big issue EVM has though is it being basically impossible to stop signature replays for signed approvals. I'm thinking of making an EIP to add nonces to approvals as a standard, but the gas implications are problematic.

  • @zikzik7691
    @zikzik7691 ปีที่แล้ว

    Hi,
    What if i don't change the nonce instead I change other data, And that will change the hash and
    Is it gonna work with that ? The purpose of nonce, there should be a nonce generator for a specific contract or what?

  • @zikzik7691
    @zikzik7691 ปีที่แล้ว

    Hi,
    What if i don't change the nonce instead I change other data, And that will change the hash and
    Is it gonna work with that ? The purpose of nonce, there should be a nonce generator for a specific contract or what?