Monday, August 31, 2020

How To Install Metasploit In Termux

Continue reading

  1. Hacking Tools And Software
  2. Best Pentesting Tools 2018
  3. Hacker Tools
  4. Hacker Tools 2020
  5. Tools Used For Hacking
  6. Tools Used For Hacking
  7. Pentest Tools Free
  8. Hacking Tools Free Download
  9. Hak5 Tools
  10. Pentest Tools Alternative
  11. Game Hacking
  12. Hacker Techniques Tools And Incident Handling
  13. Hacker Tools For Windows
  14. Hacker Tools Apk
  15. Pentest Automation Tools
  16. Hack Tools Download
  17. Top Pentest Tools
  18. Pentest Tools For Mac
  19. Wifi Hacker Tools For Windows
  20. Install Pentest Tools Ubuntu
  21. Hacker Tools Windows
  22. Pentest Box Tools Download
  23. Hacker Tools For Windows
  24. Best Hacking Tools 2019
  25. Hack App
  26. Hack Tools For Ubuntu
  27. Computer Hacker
  28. Blackhat Hacker Tools
  29. Hack Tools For Windows
  30. Pentest Tools Website
  31. Pentest Tools For Mac
  32. Hacking Tools 2019
  33. Pentest Tools For Android
  34. Hacker Tools Hardware
  35. Hacking Tools Pc
  36. Best Hacking Tools 2020
  37. Pentest Tools Find Subdomains
  38. Best Hacking Tools 2019
  39. How To Install Pentest Tools In Ubuntu
  40. Hacker
  41. Hackers Toolbox
  42. How To Make Hacking Tools
  43. Tools Used For Hacking
  44. Hack Tools Download
  45. Easy Hack Tools
  46. Hack Tools Online
  47. Hacker Hardware Tools
  48. Pentest Tools Linux
  49. Hack Tool Apk
  50. Pentest Automation Tools
  51. Pentest Tools Open Source
  52. Pentest Tools Review
  53. Pentest Tools Alternative
  54. Easy Hack Tools
  55. Hacker Tools Free Download
  56. Easy Hack Tools
  57. Hacker Tools
  58. Free Pentest Tools For Windows
  59. Best Hacking Tools 2020
  60. Tools 4 Hack
  61. Hacking Tools Software
  62. Pentest Tools Open Source
  63. Hacking Tools For Windows Free Download
  64. World No 1 Hacker Software
  65. Hack App
  66. Hack Tools Download
  67. Hack Rom Tools
  68. Pentest Tools Bluekeep
  69. Hacking Tools Github
  70. Pentest Tools Alternative
  71. Hacker Tool Kit
  72. Hak5 Tools
  73. Hacker Tools Online
  74. Hack Tools 2019
  75. Pentest Tools Url Fuzzer
  76. Game Hacking
  77. Hacking App
  78. Pentest Tools Bluekeep
  79. Pentest Tools Windows
  80. Github Hacking Tools
  81. Best Hacking Tools 2020

Sunday, August 30, 2020

Linux Command Line Hackery Series - Part 6


Welcome back to Linux Command Line Hackery series, I hope you've enjoyed this series so far and would have learned something (at least a bit). Today we're going to get into user management, that is we are going to learn commands that will help us add and remove users and groups. So bring it on...

Before we get into adding new users to our system lets first talk about a command that will be useful if you are a non-root user.

Command: sudo
Syntax: sudo [options] command
Description: sudo allows a permitted user to execute a command as a superuser or another user.

Since the commands to follow need root privileges, if you are not root then don't forget to prefix these commands with sudo command. And yes you'll need to enter the root password in order to execute any command with sudo as root.

Command: useradd
Syntax: useradd [options] username
Description: this command is used for creating new user but is kinda old school.
Lets try to add a new user to our box.
[Note: I'm performing these commands as root user, you'll need root privileges to add a new user to your box. If you aren't root then you can try these commands by prefixing the sudo command at the very beginning of these command like this sudo useradd joe. You'll be prompted for your root password, enter it and you're good to go]

useradd joe

To verify that this command has really added a user to our box we can look at three files that store a users data on a Linux box, which are:

/etc/passwd -> this file stores information about a user separated by colons in this manner, first is login name, then in past there used to be an encrypted password hash at the second place however since the password hashes were moved to shadow file now it has a cross (x) there, then there is user id, after it is the user's group id, following it is a comment field, then the next field contains users home directory, and at last is the login shell of the user.

/etc/group  -> this file stores information about groups, that is id of the group and to which group an user belongs.

/etc/shadow -> this file stores the encrypted password of users.

Using our command line techniques we learned so far lets check out these files and verify if our user has been created:

cat /etc/passwd /etc/group /etc/shadow | grep joe



In the above screenshot you can notice an ! in the /etc/shadow, this means the password of this user has not been set yet. That means we have to set the password of user joe manually, lets do just that.

Command: passwd
Syntax: passwd [options] [username]
Description: this command is used to change the password of user accounts.
Note that this command needs root privileges. So if you are not root then prefix this command with sudo.

passwd joe



After typing this command, you'll be prompted password and then for verifying your password. The password won't show up on the terminal.
Now joe's account is up and running with a password.

The useradd command is a old school command, lets create a new user with a different command which is kinda interactive.

Command: adduser
Syntax: adduser [options] user
Description: adduser command adds a user to the system. It is more friendly front-end to the useradd command.

So lets create a new user with adduser.

adduser jane



as seen in the image it prompts for password, full name and many other things and thus is easy to use.

OK now we know how to create a user its time to create a group which is very easy.

Command: addgroup
Syntax: addgroup [options] groupname
Description: This command is used to create a new group or add an existing user to an existing group.

We create a new group like this

addgroup grownups



So now we have a group called grownups, you can verify it by looking at /etc/group file.
Since joe is not a grownup user yet but jane is we'll add jane to grownups group like this:

addgroup jane grownups



Now jane is the member of grownups.

Its time to learn how to remove a user from our system and how to remove a group from the system, lets get straight to that.

Command: deluser
Syntax: deluser [options] username
Description: remove a user from system.

Lets remove joe from our system

deluser joe

Yes its as easy as that. But remember by default deluser will remove the user without removing the home directory or any other files owned by the user. Removing the home directory can be achieved by using the --remove-home option.

deluser jane --remove-home

Also the --remove-all-files option removes all the files from the system owned by the user (better watch-out). And to create a backup of all the files before deleting use the --backup option.

We don't need grownups group so lets remove it.

Command: delgroup
Syntax: delgroup [options] groupname
Description: remove a group from the system.

To remove grownups group just type:

delgroup grownups



That's it for today hope you got something in your head.
More info

  1. Pentest Tools Website
  2. Pentest Tools Online
  3. Hacking Tools Pc
  4. Hacking Tools Download
  5. Hack Tools For Windows
  6. Pentest Tools Apk
  7. New Hack Tools
  8. Nsa Hack Tools Download
  9. Termux Hacking Tools 2019
  10. What Are Hacking Tools
  11. Hacker Tools 2019
  12. Hack Rom Tools
  13. Pentest Tools Online
  14. Hack Tool Apk No Root
  15. Kik Hack Tools
  16. Pentest Reporting Tools
  17. Hacking Tools 2019
  18. Hacker Tools For Pc
  19. Hacking Tools For Mac
  20. Hacking Tools For Mac
  21. Nsa Hack Tools
  22. Computer Hacker
  23. Hacking Tools Pc
  24. Tools Used For Hacking
  25. Pentest Tools Alternative
  26. New Hacker Tools
  27. Hacking Tools Windows
  28. Hacker Tools Github
  29. How To Hack
  30. Hacking Tools For Windows
  31. Hacker Tools 2019
  32. Pentest Tools Review
  33. Hack Tool Apk No Root
  34. Pentest Tools Website
  35. Hacking Tools Free Download
  36. Hacker Techniques Tools And Incident Handling
  37. Termux Hacking Tools 2019
  38. Hacking Tools And Software
  39. Pentest Tools Review
  40. Black Hat Hacker Tools
  41. Pentest Tools Github
  42. Hacking Tools Mac
  43. Hacker Tools For Ios
  44. Hacker Tools Online
  45. Hacking Tools For Games
  46. Bluetooth Hacking Tools Kali
  47. Easy Hack Tools
  48. Hack Tools Download
  49. Hacker Tools Hardware
  50. Hack Apps
  51. Hacking Tools Download
  52. Free Pentest Tools For Windows
  53. Pentest Tools Apk
  54. Hacking Tools 2019
  55. Hack Tools Online
  56. Hacker Tool Kit
  57. What Is Hacking Tools
  58. How To Make Hacking Tools
  59. Hacking Tools For Games
  60. Pentest Recon Tools
  61. Hackers Toolbox
  62. Install Pentest Tools Ubuntu
  63. Underground Hacker Sites
  64. Black Hat Hacker Tools
  65. Hacker Tools Hardware
  66. How To Make Hacking Tools

DSploit

DSploit

After playing with the applications installed on the Pwn Pad, I found that the most important application (at least for me) was missing from the pre-installed apps. Namely, DSploit. Although DSploit has tons of features, I really liked the multiprotocol password sniffing (same as dsniff) and the session hijacking functionality.

The DSploit APK in the Play Store was not working for me, but the latest nightly on http://dsploit.net worked like a charm.

Most features require that you and your target uses the same WiFi network, and that's it. It can be Open, WEP, WPA/WPA2 Personal. On all of these networks, DSploit will sniff the passwords - because of the active attacks. E.g. a lot of email clients still use IMAP with clear text passwords, or some webmails, etc. 

First, DSploit lists the AP and the known devices on the network. In this case, I chose one victim client.


In the following submenu, there are tons of options, but the best features are in the MITM section. 


Stealthiness warning: in some cases, I received the following popup on the victim Windows:


This is what we have under the MITM submenu:


Password sniffing

For example, let's start with the Password Sniffer. It is the same as EvilAP and DSniff in my previous post. With the same results for the popular Hungarian webmail with the default secure login checkbox turned off. Don't forget, this is not an Open WiFi network, but one with WPA2 protection!


Session hijack

Now let's assume that the victim is very security-aware and he checks the secure login checkbox. Another cause can be that the victim already logged in, long before we started to attack. The session hijacking function is similar to the Firesheep tool, but it works with every website where the session cookies are sent in clear text, and there is no need for any additional support.

In a session hijacking attack (also called "sidejacking"), after the victim browser sends the authentication cookies in clear text, DSploit copies these cookies into its own browser, and opens the website with the same cookies, which results in successful login most of the time. Let's see session hijacking in action!

Here, we can see that the session cookies have been sniffed from the air:


Let's select that session, and be amazed that we logged into the user's webmail session.




Redirect traffic

This feature can be used both for fun or profit. For fun, you can redirect all the victim traffic to http://www.kittenwar.com/. For-profit, you can redirect your victim to phishing pages.


Replace images, videos

I think this is just for fun here. Endless Rick Rolling possibilities.


Script injection

This is mostly for profit. client-side injection, drive-by-exploits, endless possibilities.

Custom filter

If you are familiar with ettercap, this has similar functionalities (but dumber), with string or regex replacements. E.g. you can replace the news, stock prices, which pizza the victim ordered, etc. If you know more fun stuff here, please leave a comment (only HTTP scenario - e.g. attacking Facebook won't work).

Additional fun (not in DSploit) - SSLStrip 

From the MITM section of DSploit, I really miss the SSLStrip functionality. Luckily, it is built into the Pwn Pad. With the help of SSLStrip, we can remove the references to HTTPS links in the clear text HTTP traffic, and replace those with HTTP. So even if the user checks the secure login checkbox at freemail.hu, the password will be sent in clear text - thus it can be sniffed with DSniff.

HTML source on the client-side without SSLstrip:


HTML source on the client-side with SSL strip:


With EvilAP, SSLStrip, and DSniff, the password can be stolen. No hacking skillz needed.

Lessons learned here

If you are a website operator where you allow your users to login, always:
  1. Use HTTPS with a trusted certificate, and redirect all unencrypted traffic to HTTPS ASAP
  2. Mark the session cookies with the secure flag
  3. Use HSTS to prevent SSLStrip attacks
If you are a user:
  1. Don't trust sites with your confidential data if the above points are not fixed. Choose a more secure alternative
  2. Use HTTPS everywhere plugin
  3. For improved security, use VPN
Because hacking has never been so easy before.
And last but not least, if you like the DSploit project, don't forget to donate them!
Related news
  1. Hacking Tools Mac
  2. Hacker Tools 2019
  3. Nsa Hacker Tools
  4. Hacker Tools For Mac
  5. Growth Hacker Tools
  6. Pentest Tools Website
  7. Hacking Tools For Mac
  8. Hack Tools Download
  9. Hacker Tools Hardware
  10. Hacker Tools Apk
  11. Pentest Tools Tcp Port Scanner
  12. Hacking Tools Software
  13. Growth Hacker Tools
  14. Hack Tools For Windows
  15. Hacker Tools Software
  16. Hack App
  17. Tools Used For Hacking
  18. Android Hack Tools Github
  19. Hacking Tools Hardware
  20. Pentest Tools Apk
  21. Pentest Tools Find Subdomains
  22. Hacker Tool Kit
  23. Black Hat Hacker Tools
  24. Pentest Tools Find Subdomains
  25. Best Hacking Tools 2019
  26. Game Hacking
  27. Hacking Tools
  28. Hacker Tools 2019
  29. Hacking Tools Kit
  30. Pentest Tools Apk
  31. How To Hack
  32. Pentest Tools Github
  33. Hack Website Online Tool
  34. Hacking Tools Online
  35. Easy Hack Tools
  36. Pentest Tools Windows
  37. Hack Tools
  38. Pentest Box Tools Download
  39. Wifi Hacker Tools For Windows
  40. Hackrf Tools
  41. Hacking Tools 2020
  42. Pentest Tools Framework
  43. Hack Tools
  44. Computer Hacker
  45. Hacking Tools 2019
  46. Pentest Tools Download
  47. Hacking Tools Pc
  48. Hak5 Tools
  49. Pentest Tools Windows
  50. Best Pentesting Tools 2018
  51. Pentest Tools For Android
  52. Hackers Toolbox
  53. Tools Used For Hacking
  54. Physical Pentest Tools
  55. Hacking Tools For Windows Free Download
  56. Hacker Tools 2019
  57. Hacking Tools Name
  58. Pentest Tools Url Fuzzer
  59. Hacking Apps
  60. Nsa Hacker Tools
  61. Pentest Automation Tools
  62. Pentest Tools Kali Linux
  63. Hacking Tools Github
  64. Hackrf Tools
  65. Pentest Tools List
  66. Github Hacking Tools
  67. Hacking Tools Windows
  68. Hak5 Tools
  69. Hack Rom Tools
  70. New Hacker Tools
  71. What Is Hacking Tools
  72. Hacker Search Tools
  73. How To Install Pentest Tools In Ubuntu
  74. Pentest Tools Github
  75. Hacking Tools Usb
  76. Hacking Tools For Mac
  77. Pentest Tools For Mac
  78. Hacking Tools For Windows
  79. Hacking Tools Kit
  80. Hacking Tools For Beginners
  81. Hacker Search Tools
  82. Pentest Tools Open Source
  83. Android Hack Tools Github
  84. Hacking Tools
  85. Hacking Tools Windows
  86. Hacking Tools For Beginners
  87. Hacking Tools For Pc
  88. Pentest Tools Download
  89. Pentest Tools Github
  90. Bluetooth Hacking Tools Kali
  91. Hacker Tools Apk Download
  92. Hacker Hardware Tools
  93. Hack Tools
  94. Hacking Tools For Games
  95. Hacker Tools
  96. Computer Hacker
  97. Hacker Techniques Tools And Incident Handling
  98. Hacker Tools Github
  99. Hacking Tools For Windows
  100. Hacking Tools Free Download
  101. Pentest Automation Tools
  102. Tools For Hacker
  103. Install Pentest Tools Ubuntu
  104. Hack App
  105. Pentest Tools Alternative
  106. Install Pentest Tools Ubuntu
  107. Blackhat Hacker Tools
  108. Termux Hacking Tools 2019
  109. Hack Tools
  110. What Are Hacking Tools
  111. Blackhat Hacker Tools
  112. Hacker Security Tools
  113. Hack Tools For Windows
  114. Pentest Tools List
  115. What Are Hacking Tools
  116. Pentest Tools Windows
  117. Pentest Tools List
  118. Pentest Tools List
  119. Blackhat Hacker Tools
  120. Hacking Tools Download
  121. Hacking App
  122. Pentest Automation Tools
  123. Hacking Tools
  124. Pentest Tools Linux
  125. Hacker Tools Windows
  126. Hacker Tools Apk
  127. Hacker Tools Hardware
  128. Nsa Hack Tools
  129. Underground Hacker Sites
  130. Pentest Tools Subdomain
  131. Pentest Tools Review
  132. Hacking Tools Hardware
  133. Hack Apps
  134. Hack Website Online Tool

CSRF Referer Header Strip

Intro

Most of the web applications I see are kinda binary when it comes to CSRF protection; either they have one implemented using CSRF tokens (and more-or-less covering the different functions of the web application) or there is no protection at all. Usually, it is the latter case. However, from time to time I see application checking the Referer HTTP header.

A couple months ago I had to deal with an application that was checking the Referer as a CSRF prevention mechanism, but when this header was stripped from the request, the CSRF PoC worked. BTW it is common practice to accept empty Referer, mainly to avoid breaking functionality.

The OWASP Cross-Site Request Forgery (CSRF) Prevention Cheat Sheet tells us that this defense approach is a baaad omen, but finding a universal and simple solution on the Internetz to strip the Referer header took somewhat more time than I expected, so I decided that the stuff that I found might be useful for others too.

Solutions for Referer header strip

Most of the techniques I have found were way too complicated for my taste. For example, when I start reading a blog post from Egor Homakov to find a solution to a problem, I know that I am going to:
  1. learn something very cool;
  2. have a serious headache from all the new info at the end.
This blog post from him is a bit lighter and covers some useful theoretical background, so make sure you read that first before you continue reading this post. He shows a few nice tricks to strip the Referer, but I was wondering; maybe there is an easier way?

Rich Lundeen (aka WebstersProdigy) made an excellent blog post on stripping the Referer header (again, make sure you read that one first before you continue). The HTTPS to HTTP trick is probably the most well-known one, general and easy enough, but it quickly fails the moment you have an application that only runs over HTTPS (this was my case).

The data method is not browser independent but the about:blank trick works well for some simple requests. Unfortunately, in my case the request I had to attack with CSRF was too complex and I wanted to use XMLHttpRequest. He mentions that in theory, there is anonymous flag for CORS, but he could not get it work. I also tried it, but... it did not work for me either.

Krzysztof Kotowicz also wrote a blog post on Referer strip, coming to similar conclusions as Rich Lundeen, mostly using the data method.

Finally, I bumped into Johannes Ullrich's ISC diary on Referer header and that led to me W3C's Referrer Policy. So just to make a dumb little PoC and show that relying on Referer is a not a good idea, you can simply use the "referrer" meta tag (yes, that is two "r"-s there).

The PoC would look something like this:
<html>
<meta name="referrer" content="never">
<body>
<form action="https://vistimsite.com/function" method="POST">
<input type="hidden" name="param1" value="1" />
<input type="hidden" name="param2" value="2" />
...
</form>
<script>
document.forms[0].submit();
</script>
</body>
</html>

Conclusion

As you can see, there is quite a lot of ways to strip the Referer HTTP header from the request, so it really should not be considered a good defense against CSRF. My preferred way to make is PoC is with the meta tag, but hey, if you got any better solution for this, use the comment field down there and let me know! :)

Related articles


  1. Install Pentest Tools Ubuntu
  2. Hack Tools Download
  3. Pentest Tools For Windows
  4. Nsa Hacker Tools
  5. Bluetooth Hacking Tools Kali
  6. Hacker
  7. Hacker Tools For Pc
  8. Hacking Tools For Windows Free Download
  9. Hack Tools Online
  10. Hacker Tools For Mac
  11. Hacker Tools 2020
  12. Nsa Hack Tools Download
  13. Hacking Tools For Kali Linux
  14. Bluetooth Hacking Tools Kali
  15. Hacking Tools For Kali Linux
  16. Hacker Tools Github
  17. Underground Hacker Sites
  18. Hack Tools
  19. Black Hat Hacker Tools
  20. Hacker
  21. Pentest Tools Find Subdomains
  22. Termux Hacking Tools 2019
  23. Growth Hacker Tools
  24. Black Hat Hacker Tools
  25. Hacker Tools Apk Download
  26. Hack Tools Mac
  27. Blackhat Hacker Tools
  28. Hacking Tools For Windows
  29. Computer Hacker
  30. Hacking Tools Mac
  31. Hacking Tools Windows 10
  32. Hacking Tools 2019
  33. Hacking App
  34. Computer Hacker
  35. Hack Tools For Pc
  36. Pentest Recon Tools
  37. Hacking Tools For Pc
  38. Pentest Tools Open Source
  39. Hacker Tools For Mac
  40. Hacker Tools Apk Download
  41. Hacker
  42. Pentest Tools For Mac
  43. Nsa Hack Tools Download
  44. Easy Hack Tools
  45. Pentest Tools Linux
  46. Hacker Tools Github
  47. Hacker Tools Free
  48. Hacks And Tools
  49. Best Pentesting Tools 2018
  50. Pentest Tools Website
  51. Growth Hacker Tools
  52. Pentest Tools For Windows
  53. Blackhat Hacker Tools
  54. Hack Tools Online
  55. Hack App
  56. Top Pentest Tools
  57. Android Hack Tools Github
  58. Pentest Automation Tools
  59. Hacker Tools 2019
  60. Hacking Tools 2019
  61. Hacker Security Tools
  62. Hack Tool Apk
  63. Hacker Security Tools
  64. Hacking Tools Mac
  65. Pentest Recon Tools
  66. Hacker Tools Apk Download
  67. Pentest Tools Subdomain
  68. Kik Hack Tools
  69. Easy Hack Tools
  70. Install Pentest Tools Ubuntu
  71. Hack Rom Tools
  72. Hacker Security Tools
  73. Hacks And Tools
  74. Hacking Tools 2020
  75. Hacker Tools Free Download
  76. Nsa Hacker Tools
  77. Nsa Hack Tools Download
  78. Pentest Tools Linux
  79. Hacker Tools Apk Download
  80. Pentest Reporting Tools
  81. Pentest Tools List
  82. Hacker Tools Hardware
  83. Pentest Tools Windows
  84. Tools For Hacker
  85. Github Hacking Tools
  86. Hacker Tools Apk
  87. Hacker Tool Kit
  88. Hacker Tools Hardware
  89. Hack Tools 2019
  90. Pentest Tools Nmap
  91. Blackhat Hacker Tools
  92. Github Hacking Tools
  93. What Are Hacking Tools
  94. Pentest Tools Online
  95. Pentest Tools Apk
  96. Pentest Tools For Mac
  97. Pentest Tools Windows
  98. Hacker Tools List
  99. Pentest Recon Tools
  100. Pentest Reporting Tools
  101. Pentest Tools Bluekeep
  102. Hacker Tools Free
  103. Blackhat Hacker Tools
  104. Pentest Tools Alternative
  105. Hacker Tools 2020
  106. Best Hacking Tools 2020
  107. Kik Hack Tools
  108. How To Hack
  109. Ethical Hacker Tools
  110. Hacker Hardware Tools
  111. Pentest Box Tools Download
  112. Pentest Tools Online
  113. Hacking Tools For Windows 7
  114. How To Make Hacking Tools
  115. Termux Hacking Tools 2019
  116. Pentest Tools Linux