Skip to main content
added 5 characters in body
Source Link
ceseshi
  • 765
  • 2
  • 10

In this scenario, contract A is not something that the attacker deploys, but some existing contract that the Target contract normally readsneeds to workread. Target reads some values from a view function in A, and trusts that they will be correct, since it assumes that at the time of reading it will be the only one interacting with A. The view function is not protected from reentrancy because it is not a security risk to A.

But A has some function that when called (1), allows the attacker to modify the values in A and call back Hack (2), which allows the attacker to continue the transaction to Target (3), which will call the view function from A (4), without knowing that it will have been manipulated just before.

Contract A could protect the Target from this attack by implementing an anti reentrancy mechanism in the view function, so that the 4th call could not be performed and the whole transaction would revert.

In this scenario, contract A is not something that the attacker deploys, but some existing contract that the Target contract normally reads to work. Target reads some values from a view function in A, and trusts that they will be correct, since it assumes that at the time of reading it will be the only one interacting with A.

But A has some function that when called (1), allows the attacker to modify the values and call back Hack (2), which allows the attacker to continue the transaction to Target (3), which will call the view function from A (4), without knowing that it will have been manipulated just before.

Contract A could protect the Target from this attack by implementing an anti reentrancy mechanism in the view function, so that the 4th call could not be performed and the whole transaction would revert.

In this scenario, contract A is not something that the attacker deploys, but some existing contract that the Target contract normally needs to read. Target reads some values from a view function in A, and trusts that they will be correct, since it assumes that at the time of reading it will be the only one interacting with A. The view function is not protected from reentrancy because it is not a security risk to A.

But A has some function that when called (1), allows the attacker to modify the values in A and call back Hack (2), which allows the attacker to continue the transaction to Target (3), which will call the view function from A (4), without knowing that it will have been manipulated just before.

Contract A could protect the Target from this attack by implementing an anti reentrancy mechanism in the view function, so that the 4th call could not be performed and the whole transaction would revert.

Rollback to Revision 1
Source Link
ceseshi
  • 765
  • 2
  • 10

In this scenario, contract A is not something that the attacker deploys, but some existing contract that the Target contract normally reads to work. Target reads some values from a view function in A, and trusts that they will be correct, since it assumes that at the time of reading it will be the only one interacting with A.

But A has some function that when called (1), allows the attacker to modify the values in A and call back Hack (2), which allows the attacker to continue the transaction to Target (3), which will call the view function from A (4), without knowing that it will have been manipulated just before.

Contract A could protect the Target from this attack by implementing an anti reentrancy mechanism in the view function, so that the 4th call could not be performed and the whole transaction would revert.

In this scenario, contract A is not something that the attacker deploys, but some existing contract that the Target contract normally reads to work. Target reads some values from a view function in A, and trusts that they will be correct, since it assumes that at the time of reading it will be the only one interacting with A.

But A has some function that when called (1), allows the attacker to modify the values in A and call back Hack (2), which allows the attacker to continue the transaction to Target (3), which will call the view function from A (4), without knowing that it will have been manipulated just before.

Contract A could protect the Target from this attack by implementing an anti reentrancy mechanism in the view function, so that the 4th call could not be performed and the whole transaction would revert.

In this scenario, contract A is not something that the attacker deploys, but some existing contract that the Target contract normally reads to work. Target reads some values from a view function in A, and trusts that they will be correct, since it assumes that at the time of reading it will be the only one interacting with A.

But A has some function that when called (1), allows the attacker to modify the values and call back Hack (2), which allows the attacker to continue the transaction to Target (3), which will call the view function from A (4), without knowing that it will have been manipulated just before.

Contract A could protect the Target from this attack by implementing an anti reentrancy mechanism in the view function, so that the 4th call could not be performed and the whole transaction would revert.

added 5 characters in body
Source Link
ceseshi
  • 765
  • 2
  • 10

In this scenario, contract A is not something that the attacker deploys, but some existing contract that the Target contract normally reads to work. Target reads some values from a view function in A, and trusts that they will be correct, since it assumes that at the time of reading it will be the only one interacting with A.

But A has some function that when called (1), allows the attacker to modify the values in A and call back Hack (2), which allows the attacker to continue the transaction to Target (3), which will call the view function from A (4), without knowing that it will have been manipulated just before.

Contract A could protect the Target from this attack by implementing an anti reentrancy mechanism in the view function, so that the 4th call could not be performed and the whole transaction would revert.

In this scenario, contract A is not something that the attacker deploys, but some existing contract that the Target contract normally reads to work. Target reads some values from a view function in A, and trusts that they will be correct, since it assumes that at the time of reading it will be the only one interacting with A.

But A has some function that when called (1), allows the attacker to modify the values and call back Hack (2), which allows the attacker to continue the transaction to Target (3), which will call the view function from A (4), without knowing that it will have been manipulated just before.

Contract A could protect the Target from this attack by implementing an anti reentrancy mechanism in the view function, so that the 4th call could not be performed and the whole transaction would revert.

In this scenario, contract A is not something that the attacker deploys, but some existing contract that the Target contract normally reads to work. Target reads some values from a view function in A, and trusts that they will be correct, since it assumes that at the time of reading it will be the only one interacting with A.

But A has some function that when called (1), allows the attacker to modify the values in A and call back Hack (2), which allows the attacker to continue the transaction to Target (3), which will call the view function from A (4), without knowing that it will have been manipulated just before.

Contract A could protect the Target from this attack by implementing an anti reentrancy mechanism in the view function, so that the 4th call could not be performed and the whole transaction would revert.

Source Link
ceseshi
  • 765
  • 2
  • 10
Loading