Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VolgaCTF 2021 Qualifier - Summary #32

Open
aszx87410 opened this issue Mar 28, 2021 · 5 comments
Open

VolgaCTF 2021 Qualifier - Summary #32

aszx87410 opened this issue Mar 28, 2021 · 5 comments

Comments

@aszx87410
Copy link
Owner

Writeups

  1. VolgaCTF 2021 Qualifier - Online Wallet (Part 2) 14 solved
  2. VolgaCTF 2021 Qualifier - Static Site 38 solved
  3. VolgaCTF 2021 Qualifier - Unicorn Networks 48 solved
  4. VolgaCTF 2021 Qualifier - JWT 131 solved
  5. VolgaCTF 2021 Qualifier - flask-admin 81 solved
@aszx87410
Copy link
Owner Author

VolgaCTF 2021 Qualifier, [Mar 28, 2021 at 10:42:45 PM]:
intended solution

JSON.parse('{"money":100000000000000000000000000000000000000000000000000000000000001E-60}')

100

select json_extract('{"money":100000000000000000000000000000000000000000000000000000000000001E-60}','$.money')

100.00000000000001

@PeGrina
Copy link

PeGrina commented Mar 29, 2021

By the way, it was possible to get a negative value, which also gave the flag.

@aszx87410
Copy link
Owner Author

Hi @PeGrina, could you elaborate on how to get negative value? I am curious!

@PeGrina
Copy link

PeGrina commented Mar 29, 2021

Yes, @aszx87410, I did it in a slightly strange way, I just quickly sent transfer requests, because of this, the server processed 2 parallel requests at once, which is why it took money from my account 2 times. Because of this, out of 100 coins, I have -98 coins left.

@aszx87410
Copy link
Owner Author

@PeGrina It sounds like race condition? Actually I also solved this one by race condition but I still don't know why it works. There are transaction and select... for update, I thought the balance of the wallet will be locked and shouldn't have race condition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants