漏洞学习之Race condition in faucet when using starport

链接:https://hackerone.com/reports/1438052

详细: https://blog.credshields.com/race-condition-in-tendermints-starport-7cebe176d935

accounts:
  - name: alice
    coins: ["0token", "200000000stake"]
  - name: bob
    coins: ["500token", "100000000stake"]
validator:
  name: alice
  staked: "100000000stake"
client:
  openapi:
    path: "docs/static/openapi.yml"
  vuex:
    path: "vue/src/store"
faucet:
  name: bob
  coins: ["5token", "100000stake"]  
  coins_max: ["11token", "100000stake"]

这里有一个配置,配置了coins_max 最大可以取11个token,但是呢,可以利用多线程来引发竞争条件

POST / HTTP/1.1
Host: 172.105.41.242:4500
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:95.0) Gecko/20100101 Firefox/95.0
Accept: application/json
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://172.105.41.242:4500/
Content-Type: application/json
Origin: http://172.105.41.242:4500
Content-Length: 63
Connection: close
{
  "address": "ALICE_ADDRESS"
}


同时利用多个client去访问

发现可以取到30个token

主要修复的点,其实就是放在队列里面去请求。而且这个项目,代码是开源的,这种情况是可以去审计的。

漏洞学习之IDOR is NOT only about others ID

链接:https://infosecwriteups.com/i-mean-idor-is-not-only-about-others-id-2d26115072ba

作者开始了一个创建列表的请求:

作者认为bookmark_id 可能存在IDOR,测试过后发现并没有起作用。

而每个人只能公开3个collection,只要多创建,就会只显示3个,其他的会被锁。

然后呢,作者在共享的时候,把bookmark_id 替换为被锁的,然后就一样可以直接使用,这就突破了

业务的限制。

逻辑漏洞,确实好挖。