cyber

cyber etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster
cyber etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster

28 Kasım 2017 Salı

Web Application Penetration Testing With WFuzz (Wfuzz İle Web Uygulama Güvenliği Testleri)







What İs WFuzz?


WFuzz is a powerful tool for general web security testing where we can perform security tests on web applications, perform XSS and SQL injection tests on our web pages with their own wordlists, and perform page and page directory browsing (BruteForce). In addition to these, Encode (Encryption) is also capable of doing.


How To İnstall Wfuzz?


We download the wfuzz-2.1.3.tar.gz file located in the Downloads section at https://github.com/xmendez/wfuzz/releases/tag/v2.1.3 and open the console. We go to the Downloads folder and open our file and go there:

1) $ cd Downloads
2) $ tar -xvf wfuzz-2.1.3.tar.gz
3) $ cd wfuzz-2.1.3

Wfuzz Parameters

-c = Http allows status codes to output in color.
-z = We will not use wordlist when we are doing Fuzz operation.
-hc xxx = xxx The status code can not be shown on the status code screen.

The number of answers like 404 (Page Not Found) is quite high because some sites have a long scan. So it might make sense to use it.

-d: post request

FUZZ: I want to make a fuzz section

The most commonly used HTTP Status Codes are as follows;

     • 100 = Continue
     • 200 = OK (Successful)
     • 201 = Created.
     • 202 = Accepted.
     • 204 = No Content
     • 301 = Permanently Redirected or Moved
     • 302 = Temporarily Redirected or Moved
     • 400 = Bad Request
     • 401 = Authorization Required.
     • 403 = Prohibited
     • 404 = Not Found
     • 500 = Critical Server Error


    Wfuzz is more than a web content browser:

 • Wfuzz can help you secure your web applications by finding and exploiting web application security vulnerabilities. Wfuzz's web application is supported by security vulnerable browser plugins.

• Wfuzz is a completely modular framework and makes it even easier for the newest Python developers to contribute. The building inserts are simple and take a little more than a few minutes.
     
 • Offers a simple language interface to previous HTTP requests / responses using other tools such as Wfuzz, Wfuzz or Burp. This allows you to do manual and semi-automated tests with the full content and understanding of your actions and context without relying on a web application browser based on the application.

OK. It's so good here. Let's go to practice :)

• Now, when I do content management, we scan the admin panes
   


       wfuzz -c -z file, / usr / share / wfuzz / worldlist / general / admin-panels.txt - hc 404 http://harranbilisim.com/FUZZ
 


       The first time I use this command directory, the -c parameter,
       We wanted it to be colored so the codes could be recognized.
        We will use it with -z file
     
       We made the WordList selection.
       The 404 status code for 137 keywords scanned with -hc 404
       We got a big part back.
       Then we used http://www.agamakala.com/FUZZ.
     
       If you want to make an experiment by putting each keyword in the Wordlist
       we are writing the key word "FUZZ" in capital letters.




   200 returning answers admin user login page 

   Ok we found the panel with the necessary parameters
    Okay Now Scan Sql Vulnerability

wfuzz -c -z file,/usr/share/wfuzz/worldlist/Injections/SQL.txt – hc 404 www.blablablabla.com/index.php?id=51/FUZZ


   Many successful responses have returned

We Can XSS Scanning
wfuzz -c -z file,XSS.txt --hc 404 http://blablablabla.bla/inc/takvim/index.php?month=3&year=2017/FUZZ

   
   Many successful answers have returned now let's check manually


Finding Sensitive Files

WFUZZ with the apache.txt file located under usr / share / wfuzz / wordlist / vulns directory

.htaccess
.htpasswd
.meta
.webm
access_log
cgi
cgi-bin
cgi-pub
cgi-script

Let's test it looking for sensitive files like

wfuzz -c -z file, apache.txt -hc 404 http://blablabla.bla/FUZZ



   We can download the logs and htaccess file and view the contents.

   We are still trying to read server-side etc / passwd with dirTraversal-nix.txt file located under the         
same directory


Did not get any successful results
looking for a windows server-side sensitive file with dirTraversal-win.txt in the same directory

I can with stress testing / usr / share / wfuzz / wordlist / stress / test_ext


Thank you for reading. You can follow me on twitter https://twitter.com/berkdusunur

8 Kasım 2017 Çarşamba

DNS Amplification DDoS Attack



WHAT İS DNS ?

The Domain Name System (DNS) is a hierarchical decentralized naming system for computers, services, or other resources connected to the Internet or a private network. It associates various information with domain namesassigned to each of the participating entities. Most prominently, it translates more readily memorized domain names to the numerical IP addresses needed for locating and identifying computer services and devices with the underlying network protocols. By providing a worldwide, distributed directory service, the Domain Name System is an essential component of the functionality on the Internet, that has been in use since 1985

(Wikipedia)




When I want to go to berkdusunur.net with Browser, the browser first asks me if i can translate berkdusunur.net address to me


The system looks in the / etc / hosts directory. If there is an ip address on the berkdusunur.net domain it will use it.
Otherwise it goes to the DNS resolver provided by DHCP. If not, it goes to the root server.
The root servers in Turkey are called ODTU. From there it is directed to the domain name.




DNS INQUIRIES

By leaving the DNS recursion query on, you allow an attacker to use your DNS on your behalf.

DNS Amplification attacks, a professional attack technique, attack by sending packets to you via a DNS server that is in your domain


(If 1 DNS packet is 50 bytes, this packet will be returned in response to 10x ie 500 bytes).

Thus, the attacker will not only use your bandwidth, but at the same time will also provide his / her own privacy, creating the perception that the attacker is like you.


How do we know if our DNS server is open for the recursion query?


You can learn in two shapes

1. If you want to check the settings of your DNS server

2. From the outside DNS server will do DNS Recursion query.




NMAP RECURSIVE INQUIRY

Using a script located in Nmap it helps to detect the weakness of the dns server 1 to get 10


Let's first scan the DNS server list that we found using this script of NMAP.




Command

nmap -sU -p 53 --script=dns-recursion -iL /home/ceh/Masaüstü/recursive-amp4.txt 



TSUNAMI - DNS AMPLIFICATION ATTACK

Tsunami is making DNS requests to the servers in the DNS list that I specify.In the answer, the changed source leads to ip address as well as to the victim
I have displayed help parameters
After downloading the tool and installing the necessary packages







Attacks

./tsunami -s 192.168.1.80 -p 100 -f recursive_dns.txt

-s = destination address
-p = request to be made by each DNS server (default 1)
-f = command to open the server list

After launching the attack, we listen to the packages coming through the wireshark in the virtual system that we attacked



give me one take ten :) 


www.berkdusunur.net
berkdusunurx@gmail.com

Wi-Fi DE-authentication Attack (Ağdan Düşürme Saldırıları)





     This article is broadcasting in turkish and english



Disconnecting can be done by sending De-authentication packets to a device connected to a network.

Bir ağa bağlı cihaza De-authentication paketleri göndererek bağlantı kesilebilir.


ATTACK | SALDIRI


Let's first find the networks that broadcast on the web

Öncelikle çevremizde yayın yapan ağları bulalım

Command  " airodump-ng wlan0  " 



My Target turktelekom_bd63

Benim Hedefim turktelekom_bd63


Let's first expthat broadcast in this address lore the mac addresses
(Bu acces pointe bağlı cihazların MAC adreslerini bulalım)

Command
airodump-ng -c 1 --bssid 98:DE:D0:47:B5:76 wlan0



sddsds
Target Mac Address 3C:A0:67:61:16:B7 

Destination MAC address belongs to Windows device


Hedef MAC adresi 3C:A0:67:61:16:B7

Hedef MAC adresi Windows cihaza ait 


Deauthentication Attacks

Command

aireplay-ng --deauth 2000 -a 98:DE:D0:47:B5:76 -c 3C:A0:67:61:16:B7 wlan0

--deauth number of packages
-a BSSID

-c Client  MAC

İnterface wlan0mon



At the same time, we can create  a loop with the parameter -0 0 

Aynı zamanda -0 0 parametresi ile döngü oluşturabiliriz.


Also, without using the -c parameter we can make a drop-off attack for all devices, not just for a device
Ayrıca -c parametresini kullanmadan yanlızca bir cihaza yönelik değil,tüm cihazlara yönelik bir ağdan düşürme saldırısı yapabiliriz.



İn monitor mode, let's look at the status of MAC addresses at these acces points

Monitor modda bu acces point deki MAC adreslerinin durumlarına bakalım. 




As you can see, the device with the target MAC address is trying to be dropped from the network.
       Görüldüğü gibi hedef MAC adresine sahip cihaz ağdan düşürülmeye                                                             çalışılıyor.


This assures that we have a handshake package that we will use to grab the handshake once the device is reconnected and to infiltrate the acces pointe.
        Bu saldırı cihaz tekrar bağlanınca handshake yakalayıp acces pointe sızmak için kullanacağımız bir handshake paketine sahip olmamızı sağlar.


Thank you for reading
www.berkdusunur.net
berkdusunurx@gmail.com

26 Ağustos 2017 Cumartesi

SSH Servisine Brute Force Saldırıları



Değerli blog takipçilerim :) bugün sizlere ssh servisine yapılan brute force saldırılarını örnek ile elimden geldiğince göstermeye çalışacağım

Öncelikle sanal bir lab oluşturup kali sanal makinesinden kevgir sanal makinesinin ssh servisine bir deneme yanılma saldırısı yapacağız .

SSH SERVİSİ

SSH (Secure Shell) güvenli veri iletimi için kriptografik ağ protokolüdür.

Ssh ile ağa bağlı olan iki bilgisayar arasında veri aktarımı güvenlik kanalı üzerinden güvensiz bir ağda yapılır.
 Bu durumda ağda Ssh ile haberleşen makinelerden biri ssh sunucusu diğeri ssh istemcisi olur. Bu protokol şartları SSH-1 ve SSH-2 olmak üzere iki önemli sürüm üzerinden birbirinden ayrılır.

Ssh kabuk hesabına erişim için Unix ve benzeri işletim sistemlerinde protokolün en iyi uygulaması olarak bilinir, ama aynı zamanda Windows üzerindeki hesaplara erişim için de kullanılabilir.

Ssh Telnet ve diğer uzaktan kabuğa erişim yapan güvensiz protokollerin (Berkeley rsh ve rexec protokolü gibi) yerine güvenli veri iletimini sağlaması için tasarlanmıştır.

Brute Force Saldırıları


 Brute force (Deneme-Yanılma) saldırıları hedef sistem için oluşturulmuş olan kullanıcı adı parolla listlerini deneyen bir atak çeşididir.

Oluşturulan wordliste göre başarıya ulaşmak saatler, aylar ve hatta yılları bile alabiliyor.
Eskiden sıklıkla kullanılan ve kullanıcıların bilinçsiz olması nedeniyle işe yarayan Brute-Force'un artık işe yaramayan nedenlerden biri olmasının nedeni de sistemlerin Brute-Force saldırılarını kolayca tanımlayabilmesidir.

Artık çoğu sistem yalnızca 5 kere arka arkaya yanlış parollanın giriş yapılması halinde hesabı hemen belli bir süreliğine askıya alıyor.
Böylece Brute-Force saldırıları daha başlamadan büyük bir ara ile karşı karşıya kalıyor.

SSH Servisine Brute-Force Saldırıları 

Öncelikle hedef sistemde basit bir nmap taraması yapalım.


  hedef sistem ssh servisini 1322 portunda koşturuyor .

  örnek olması açısından basit bir wordlist oluşturduk


   HYDRA İLE BRUTE FORCE

Hydra birçok uzak erişim protokolüne parolla deneyen birçok tooldan birisidir 

FTP, http, vnc, smtp,pop3,rdp, telnet gibi protokolleri destekler.
Bu protokollere sözlük saldırısı gerçekleştirebilir. 

Sızma Testlerinde stabil olduğundan genellikle kullanılan bir araçtır Ayrıca; bu yazılım, Windows ve Linux işletim sistemlerinde çalışabilmektedir ve komut satırı aracıdır

Saldırı Aşaması

hydra ssh -s 1322 -l admin -P parollauzantısı

  
 

Saldırı sonucunda ssh servisinin kullanıcı adı ve parollasını elde ettik 


Doğrulamak için admin adlı kullanıcının parollasını kullanarak sisteme ssh ile bağlanalım


 Parollayı da girdikten sonra hedefin komut satırına bağlandık.



Bir sonraki yazıda görüşmek üzere :)

Sağlıcakla kalın

25 Ağustos 2017 Cuma

Nmap İle Gizlilik Ve Zaafiyet Taraması



Merhaba arkadaşlar :) Yaklaşık 20 dakika boyunca girişi nasıl yapsam diye düşündüm.
Bugün siz değerli blog takipçilerime nmap'i proxychains ile nasıl kullanacagımızdan bahsedeceğim.
Bunun yanı sıra nmap'in bünyesinde bulunan scriptler ile oluşturduğum lab ortamında zaafiyetli makine üzerinde zaafiyet araştırması yapacağız.

Proxychains

Proxychains tor ağını kullanarak birçok tool ile kullanabileceğimiz (Metasploit hariç) bir proxy servisidir.
Default olarak config dosyasında tor ağını kullanır. Başlayalım.

"sudo apt-get install proxychains" ile aracı kuralım



Şuan proxychains tor ağını kullanıyor. Sisteminde tor paketleri kurulu olmayan arkadaşlar için

sudo apt-get install tor 

komutu ile tor paketini kurabiliriz.
Tor ile kullanmak istemeyen kendi proxy servislerini girmek isteyen arkadaşlar için config dosyasını açalım

gedit /etc/proxychains.conf

 en altta bulunan socks4     127.0.0.1 9050 satırını "#" ile yorum satırı haline   getirelim. Ardından kendi proxy servisimizi "http" "İP" "port" şeklinde girelim

Config dosyasını kaydedip çıktıktan sonra proxychainsi kullanmaya başlayabiliriz.



"proxychains nmap ardından parametreler" şeklinde kullanabiliriz.

NMAP İle Random İP

Nmap bünyesinde bulunan bir parametre ile yapacağı taramalarda kaynak ip adresimiz dışında farklı ip adresleri düşürerek saldırganın ip adresinin tespit edilmesini zorlaştırabiliyor

Bu örneği bridge ile bagladığım sanal makinem üzerinden göstereceğim fiziksel makine ile sanal makine de nmap taraması yapacağız gelen paketleri de wireshark ile yakalayıp inceleyeceğiz.

Parametre


"nmap -sS -D RND:5 192.168.1.106"

-sS Parametresi ile root kullanıcısı olan saldırgan hedefe SYN paketi yollar.
karşılığında SYN/ACK paketi alır ve ACK gönderir.

-D RND:5  Parametresi ile 5 farklı random ip ile istek yollar fakat cevaplar random ip adresine değil saldırgana döner 

Ardından hedef ip adresini girdik. Örnek olması açısından taramayı başlatalım ve gelen istekleri wireshark ile yakalayıp inceleyelim 


Öncelikle -D RND:5 parametresini kullanmadan bir tarama yapalım. Gelen istekleri inceleyelim



Taramamızı yaptık wireshark ile paketleri inceleyelim




Görüldüğü gibi 192.168.1.99 ip adresimden hedef 192.168.1.106 ip adresine TCP istekleri geldi

Şimdide random ip parametresini kullanarak bir tarama gerçekleştirelim


Gelen paketleri inceleyelim



Görüldüğü gibi 192.168.1.99 ip adresim dışında random ip adresleri üreterek bir tarama gerçekleştirdi

NMAP İle Zaafiyet Taraması 

NMAP  "usr/share/nmap/scripts/" dizini altında nmap'in scriptlerini görüntüleyebiliriz


Bir önceki taramadaki gibi sanal bir lab ortamı oluşturalım.

nmap -sS -A 192.168.1.106

-A Parametresi ile  hedef sistemin ismi kullandığı sistem ve sürümü (ihtimaller ile) ve içerdiği güvenlik zaafiyetlerini listeliyoruz




Script Kullanımı

nmap --script=sectiginizscript 192.168.1.106 ile scriptleri çalıştırabilirsiniz



Bir dahaki yazıda görüşmek üzere 

Sağlıcakla kalın :)