From c8f6b0abb1c8891024d4b6f032c22dbf76ad9b14 Mon Sep 17 00:00:00 2001 From: Andrew Kerr Date: Mon, 16 Dec 2013 01:50:12 -0500 Subject: [PATCH] Added cheatsheets for markdown, ncat, and sqlmap. Some cheatsheets that I created for a project for CIS4930, Ethical Hacking and Penetration Testing. On request of the professor, I will be sending a pull request with these cheatsheets. --- cheatsheets/markdown | 41 ++++++++++++++++++++++++++++++++++++++++ cheatsheets/ncat | 30 +++++++++++++++++++++++++++++ cheatsheets/sqlmap | 45 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 116 insertions(+) create mode 100644 cheatsheets/markdown create mode 100644 cheatsheets/ncat create mode 100644 cheatsheets/sqlmap diff --git a/cheatsheets/markdown b/cheatsheets/markdown new file mode 100644 index 0000000..8b551a6 --- /dev/null +++ b/cheatsheets/markdown @@ -0,0 +1,41 @@ +# headers +h1 header +========= +h2 header +--------- + +# blockquotes +> first level and paragraph +>> second level and first paragraph +> +> first level and second paragraph + +# lists +## unordered - use *, +, or - + * Red + * Green + * Blue + +## ordered + 1. First + 2. Second + 3. Third + +# code - use 4 spaces/1 tab +regular text + code code code +or: +Use the `printf()` function + +# hr's - three or more of the following +*** +--- +___ + +# links +This is [an example](http://example.com "Title") inline link. + +# emphasis +*em* _em_ + +**strong** __strong__ diff --git a/cheatsheets/ncat b/cheatsheets/ncat new file mode 100644 index 0000000..cde25ba --- /dev/null +++ b/cheatsheets/ncat @@ -0,0 +1,30 @@ +# Connect mode (ncat is client) | default port is 31337 +ncat [] + +# Listen mode (ncat is server) | default port is 31337 +ncat -l [] [] + +# Transfer file (closes after one transfer) +ncat -l [] [] < file + +# Transfer file (stays open for multiple transfers) +ncat -l --keep-open [] [] < file + +# Receive file +ncat [] [] > file + +# Brokering | allows for multiple clients to connect +ncat -l --broker [] [] + +# Listen with SSL | many options, use ncat --help for full list +ncat -l --ssl [] [] + +# Access control +ncat -l --allow +ncat -l --deny + +# Proxying +ncat --proxy [:] --proxy-type {http | socks4} [] + +# Chat server | can use brokering for multi-user chat +ncat -l --chat [] [] diff --git a/cheatsheets/sqlmap b/cheatsheets/sqlmap new file mode 100644 index 0000000..92287c5 --- /dev/null +++ b/cheatsheets/sqlmap @@ -0,0 +1,45 @@ +# Test URL and POST data and return database banner (if possible) +./sqlmap.py --url="" --data="" --banner + +# Parse request data and test | request data can be obtained with burp +./sqlmap.py -r + +# Fingerprint | much more information than banner +./sqlmap.py -r --fingerprint + +# Get database username, name, and hostname +./sqlmap.py -r --current-user --current-db --hostname + +# Check if user is a database admin +./sqlmap.py -r --is-dba + +# Get database users and password hashes +./sqlmap.py -r --users --passwords + +# Enumerate databases +./sqlmap.py -r --dbs + +# List tables for one database +./sqlmap.py -r -D --tables + +# Other database commands +./sqlmap.py -r -D --columns + --schema + --count +# Enumeration flags +./sqlmap.py -r -D + -T + -C + -U + +# Extract data +./sqlmap.py -r -D -T -C --dump + +# Execute SQL Query +./sqlmap.py -r --sql-query="" + +# Append/Prepend SQL Queries +./sqlmap.py -r --prefix="" --suffix="" + +# Get backdoor access to sql server | can give shell access +./sqlmap.py -r --os-shell