Sunday, June 4, 2023

How To Remove Write Protection From USB Drives And Memory Cards

If you've got a USB drive or SD card that can't be formatted and to which you can't copy files, then take a look at our guide to removing write protection.

Sometimes you'll find that it's impossible to format, delete or copy new files to an SD card or USB flash drive. Windows will tell you that it is write protected, even though there is no 'lock' switch or – if there is – you've made sure the switch is set correctly to allow files to be written to the drive.
But just in case this switch is news to you, it is well worth checking that your device has the switch set to 'unlocked'. When set to 'locked' you won't be able to copy any new files on to the memory card or USB stick, and it also stops you from accidentally formatting it.
iemhacker-remove-write-protection-from-usb
You'll still be able to view files which are already stored on the drive, but you can't delete them (they sometimes seem to delete OK, but the next time you check, there they are again!).
ut if this isn't the problem, you might still be able to fix things and continue to use your USB flash drive or SD card – we'll explain how.
Unfortunately, in some cases the device may be corrupt or physically broken and no tricks or software will make it work again. The only solution in this case is to buy a new drive. And if you're just trying to get back lost data, see our guide on How to recover deleted filed for free.
iemhacker
In any version of Windows from XP onwards, run Regedit.exe.
If you're not sure how to find it, searching 'regedit' in the Start menu will usually show the program at the top of the list.
It's a bit like File Explorer, so use the pane on the left to navigate to the following key:
Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies
Note: if you can't find StorageDevicePolicies, see the next step.
Double-click on the WriteProtect value in the right-hand pane. You can now change the Value data from 1 to 0. Then click OK to save the change. Close Regedit and restart your computer. Connect your USB drive again and, with a bit of luck, you should find it is no longer write protected.
You can now continue to use the drive, but it's worth copying off any files you want to keep and then formatting it by right-clicking on it in the list of drives in File Explorer and choosing Format.

StorageDevicePolicies

If you can't find StorageDevicePolicies, you can create it by right-clicking in the white space in the 'Control' folder and choosing New -> Key and entering the name StorageDevicePolicies.
Now double-click on the new key (it will show as a folder) and right-click once again in the white space and choose New -> DWORD. Name this WriteProtect and set its value to 0. Click OK, exit Regedit and reboot your computer.
If this method doesn't work, go to the next step.

Diskpart

iemhacker
With your USB drive or memory card attached to your computer, launch a command prompt. You can do this by searching for cmd.exe or 'Command Prompt' in the Start menu.
Note: you may need to run cmd.exe with administrator privileges if you see an "access is denied" message. To do this, right-click on Command Prompt in the Start menu and choose 'Run as administrator' from the menu that appears.
If you have Windows 10, simply right-click on the Start button (bottom left of the screen) and choose Command Prompt (admin).
Now, at the prompt, type the following and press Enter after each command:
diskpart
list disk
select disk x (where x is the number of your non-working drive – use the capacity to work out which one it is)
attributes disk clear readonly
clean
create partition primary
format fs=fat32 (you can swap fat32 for ntfs if you only need to use the drive with Windows computers)
exit
That's it. Your drive should now work as normal in File Explorer. If it doesn't, it's bad news and there's nothing more to be done. Your stick or memory card is scrap and fit only for the bin. But the good news is that storage is cheap.
More information

How To Secure Your Home Against "Internet Of Things" And FUD

TL;DR, most of the security news about IoT is full of FUD. Always put the risks in context - who can exploit this and what can the attacker do with it. Most story only covers the latter.

Introduction

There is rarely a day without news that another "Internet of Things" got hacked. "Smart" safes, "smart" rifles, "smart" cars, "smart" fridges, "smart" TVs, "smart" alarm systems, "smart" meters, "smart" bulbs, NAS devices, routers. These devices are getting hacked every day. Because most of these devices were never designed with security as a goal, and some of them have been never tested by security professionals, it is no surprise that these things are full of vulnerabilities.





Independent security researchers find these vulnerabilities, write a cool blog post or give a presentation about the vulnerability and the exploit, and the media forgets the constraints just for the sake of more clicks. "We are all doomed" we can read in the news, but sometimes the risks are buried deeply in technical jargon. Please note I blame the news sites here, not the researchers.

http://www.slideshare.net/danielmiessler/iot-attack-surfaces-defcon-2015

There are huge differences between the following risks:

  • Attackers can directly communicate with the router (or camera) from the Internet without authentication and exploit the vulnerability. This is the worst-case scenario. For example, an automated ransomware attack against your NAS is pretty bad.
  • Attackers have to position themselves in the same WAN network (e.g. Sprint mobile network in the case of Jeep hacking) to exploit the vulnerability. This is still pretty bad.
  • The vulnerable code can not be triggered directly from the Internet, but tricks like CSRF can be used to exploit it (details later in this post). 
  • The vulnerable code can not be triggered directly from the Internet, and it uses a protocol/port which prevents Cross Protocol Scripting. Attackers have to access the local network before exploiting this vulnerability.
As it is the case with the worst scenario, one can find a lot of devices connected to the internet. You can always find funny stuff at http://explorer.shodanhq.com/#/explore , or use the nmap screenshot script to find your own stuff :)


Network exposure

Most devices are behind an IPv4 NAT device (e.g. home router), thus can not be reached from the Internet side by default. Except when the device configures the firewall via UPNP. Or the device has a persistence cloud connection, and the cloud can send commands to the device. Or the device uses IPv6 tunneling (e.g. Teredo), thus it is reachable from the Internet. But not every vulnerability on your home network is accessible directly from the Internet. As more and more devices and networks will support IPv6, this scenario might change, but I hope most home routers will come with a default deny configuration in their IPv6 firewall module. On the other hand, scanning for IPv6 devices blindly is not feasible due to the large number of IPv6 addresses, but some tricks might work

If attackers can not access the device directly, there is a way to hack it through the user's browser. Just convince the victim user to visit a website, and via CSRF (Cross Site Request Forgery) and brute-forcing the device IP, it is possible to hack some devices (mostly through HTTP - if the exploit can fit into simple GET or POST commands.

If attackers can not attack the device vulnerability through the Internet directly, or via CSRF, but have connected to the same network - the network exposure shrinks significantly. And when attackers are on the same network as you, I bet you have bigger problems than the security of the IoT devices ...

Recommendations for home users

Don't buy **** you don't need

Disconnect from the power cord the IoT devices you don't need to operate 7*24. 

Disable cloud connectivity if it is not necessary. For example, I have a NAS device that can be reached through the "cloud", but I have disabled it by not configuring any default gateway for the device. I prefer connecting to my network via VPN and reach all my stuff through that.

Prevent CSRF attacks. I use two tricks. Don't use the 192.168.0.x - 192.168.10.x network at-home - use an uncommon IP range instead (e.g. 192.168.156.x is better). The second trick is I configured my Adblock plugin in my primary browser to block access to my internal network. And I use another browser whenever I want to access my internal devices. Update: On Firefox you can use NoScript ABE to block access to internal resources.


Check your router configuration:

  • disable UPnP
  • check the firewall settings and disable unnecessary port forwards
  • check for IPv6 settings, and configure the firewall as default deny for incoming IPv6 TCP/UDP.

Change default passwords, especially for services connected to the Internet. Follow password best practices.

Run Nmap to locate new IoT in your home network :) 

Run a WiFi scan to locate new WiFi access points. Let me share a personal experience with you. I moved to a new house and brought my own WiFi router with me. I plugged it in, and forget about WiFi. Months later it turned out I had two other WiFi devices in my house - the cable modem had its own integrated WiFi with default passwords printed on the bottom, and the Set-top-box was the same - default WiFi passwords printed on the bottom. And don't forget to scan for ZigBee, Bluetooth, IrDA, FM, ...

Update your devices - in case you have a lot of free time in your hand.

Don't allow your guests to connect to your home network. Set up a separated AP for them. Imagine your nephew stealing your private photos or videos from your NAS or DNLA server.

With great power, comes great responsibility. The less device you own in your house, the less time you need to maintain those.

Read the manuals of your devices. Be aware of the different interfaces. Configure it in a secure way.

Disable Teredo protocol in case you don't need IPv6.

Stop being amazed by junk hacking.

Update: Disable WebRTC: https://www.browserleaks.com/webrtc , in Chrome you can use this extension: https://chrome.google.com/webstore/detail/webrtc-network-limiter/npeicpdbkakmehahjeeohfdhnlpdklia

Update: Prevent against DNS rebind attacks via configuring a DNS server which can block internal IP addresses. OpenDNS can block internal IP, but this is not a default option, you have to configure it.

Recommendations for vendors

For vendors, I recommend at least the followings:

  • Implement security during Software Development LifeCycle
  • Continuous security testing and bug bounties
  • Seamless auto-update
  • Opt-in cloud connectivity

Recommendations for journalists

Stop FUD. Pretty please.

The questions to ask before losing your head

  • who can exploit the vulnerability?
  • what prerequisites do we have about the attack to successfully exploit the vulnerability? Is the attacker already in your home network? If yes, you have probably bigger problems.
  • what can the attacker do when the exploit is successful?

And last but not least, don't forget that in the case of IoT devices, sometimes users are the product, not the customer. IoT is about collecting data for marketing purposes.


Continue reading

Saturday, June 3, 2023

Emulating Shellcodes - Chapter 2

 Lets check different  Cobalt Strike shellcodes and stages in the shellcodes emulator SCEMU.




This stages are fully emulated well and can get the IOC and the behavior of the shellcode.

But lets see another first stage big shellcode with c runtime embedded in a second stage.


In this case is loading tons of API using GetProcAddress at the beginning, then some encode/decode pointer and tls get/set values to store an address. And ends up crashing because is jumping an address that seems more code than address 0x9090f1eb.

Here there are two types of allocations:


Lets spawn a console on -c 3307548 and see if some of this allocations has the next stage.

The "m" command show all the memory maps but the "ma" show only the allocations done by the shellcode.



Dumping memory with "md" we see that there is data, and dissasembling this address with "d" we see the prolog of a function.

So we have second stage unpacked in alloc_e40064


With "mdd" we do a memory dump to disk we found the size in previous screenshot,  and we can do  some static reversing of stage2 in radare/ghidra/ida

In radare we can verify that the extracted is the next stage:


I usually do correlation between the emulation and ghidra, to understand the algorithms.

If wee look further we can realize that the emulator called a function on the stage2, we can see the change of code base address and  is calling the allocated buffer in 0x4f...



And this  stage2 perform several API calls let's check it in ghidra.


We can see in the emulator that enters in the IF block, and what are the (*DAT_...)() calls

Before a crash lets continue to the SEH pointer, in this case is the way, and the exception routine checks IsDebuggerPresent() which is not any debugger pressent for sure, so eax = 0;



So lets say yes and continue the emulation.


Both IsDebuggerPresent() and UnHandledExceptionFilter() can be used to detect a debugger, but the emulator return what has to return to not be detected. 

Nevertheless the shellcode detects something and terminates the process.

Lets trace the branches to understand the logic:


target/release/scemu -f shellcodes/unsuported_cs.bin -vv | egrep '(\*\*|j|cmp|test)'



Continuing the emulation it's setting the SEH  pointer to previous stage:


Lets see from the console where is pointing the SEH chain item:


to be continued ...


https://github.com/sha0coder/scemu






More information
  1. Tools Used For Hacking
  2. Pentest Tools List
  3. Best Pentesting Tools 2018
  4. Hacker Tools For Pc
  5. Hacking Tools
  6. Hack App
  7. Pentest Tools Linux
  8. Hacking Tools For Windows Free Download
  9. Pentest Tools Windows
  10. Hacking Apps
  11. Hack Apps
  12. Underground Hacker Sites
  13. Hack App
  14. Hack Tools For Mac
  15. Hack Tools Mac
  16. Pentest Tools Linux
  17. Hacker Tools For Ios
  18. Hacking Tools For Beginners
  19. Pentest Tools
  20. Hack Tools
  21. Hacking Tools Online
  22. Hack Tool Apk
  23. Pentest Tools Download
  24. Hacker Tools Mac
  25. Pentest Tools Find Subdomains
  26. Pentest Tools Url Fuzzer
  27. Hacking Tools Kit
  28. Physical Pentest Tools
  29. Hacking Tools Mac
  30. Best Pentesting Tools 2018
  31. Black Hat Hacker Tools
  32. Usb Pentest Tools
  33. Pentest Tools Framework
  34. Best Pentesting Tools 2018
  35. Pentest Tools Bluekeep
  36. Install Pentest Tools Ubuntu
  37. Nsa Hacker Tools
  38. Hacking Tools For Games
  39. Hacker
  40. Hacker Tools List
  41. Install Pentest Tools Ubuntu
  42. Hacker
  43. Usb Pentest Tools
  44. Hack Tools For Ubuntu
  45. Hacking Apps
  46. Hacker Tools Hardware
  47. Hacker Tools 2020
  48. Termux Hacking Tools 2019
  49. Pentest Tools Subdomain
  50. Growth Hacker Tools
  51. Hackrf Tools
  52. Hackrf Tools
  53. Hacker Tools Software
  54. Hacker Tools Software
  55. Pentest Tools Url Fuzzer
  56. Hack Tools For Pc
  57. Hacking Tools Windows
  58. New Hacker Tools
  59. Nsa Hack Tools
  60. Hackers Toolbox
  61. Pentest Tools Github
  62. Hacking Tools Windows 10
  63. Hacking Tools For Mac
  64. Pentest Tools For Android
  65. Pentest Tools Tcp Port Scanner
  66. Hacker Tools
  67. Hacker Tools Online
  68. What Are Hacking Tools
  69. Tools Used For Hacking
  70. Pentest Tools Framework
  71. Hacking Tools Name
  72. Hacker Tools Windows
  73. Tools For Hacker
  74. Hack Tools
  75. Hacker Tools 2019
  76. Pentest Tools Port Scanner
  77. Hack Tools For Games
  78. Termux Hacking Tools 2019
  79. Hack Tools Online
  80. Best Hacking Tools 2020
  81. Hacking Tools For Kali Linux
  82. Top Pentest Tools
  83. Pentest Recon Tools
  84. Hacking Tools For Kali Linux
  85. Hacking Tools Hardware
  86. Nsa Hacker Tools
  87. Hacking Tools Online
  88. Hacker Tools For Pc
  89. Hacking Tools For Kali Linux
  90. Blackhat Hacker Tools
  91. Pentest Tools Review
  92. Pentest Tools List
  93. Hacker Tool Kit
  94. Pentest Tools
  95. Black Hat Hacker Tools
  96. Blackhat Hacker Tools
  97. Pentest Tools
  98. Nsa Hack Tools Download
  99. Hack Tools Mac
  100. Hacker Tool Kit
  101. Hacking Tools Online
  102. Hack Tools 2019
  103. Pentest Tools
  104. Hack Tools For Ubuntu
  105. Hack Apps
  106. Pentest Tools Tcp Port Scanner
  107. Growth Hacker Tools
  108. Tools Used For Hacking
  109. Tools 4 Hack
  110. Pentest Tools For Android

Hackerhubb.blogspot.com

Hackerhubb.blogspot.com

Related news


  1. Github Hacking Tools
  2. Hacking Tools For Beginners
  3. World No 1 Hacker Software
  4. Pentest Tools Windows
  5. New Hacker Tools
  6. Hacker Tools
  7. Pentest Tools Tcp Port Scanner
  8. Hack Tools Github
  9. Hacking Tools Usb
  10. Pentest Tools Free
  11. Hackers Toolbox
  12. Hack Tools For Windows
  13. Pentest Recon Tools
  14. Hacker Tool Kit
  15. Pentest Tools Nmap
  16. Hack Tool Apk No Root
  17. Hack Tool Apk No Root
  18. What Are Hacking Tools
  19. Hack Tools
  20. New Hacker Tools
  21. Pentest Tools Linux
  22. Hacker Tools For Ios
  23. Hack Tools
  24. Beginner Hacker Tools
  25. Pentest Tools Online
  26. Pentest Tools Apk
  27. Hack Tools Pc
  28. Pentest Tools Android
  29. Bluetooth Hacking Tools Kali
  30. Hack Tools Mac
  31. What Are Hacking Tools
  32. Hacker Search Tools
  33. Hacking Apps
  34. Hacking Tools Download
  35. Hacking Tools For Windows 7
  36. Hacker Techniques Tools And Incident Handling
  37. Pentest Tools Subdomain
  38. Tools For Hacker
  39. Hacking Tools For Beginners
  40. Hacker Tools For Mac
  41. Hacking Tools Hardware
  42. Hack Tools
  43. Hacker Tools Windows
  44. Pentest Tools For Windows
  45. Hacking Apps
  46. Hack And Tools
  47. Pentest Automation Tools
  48. Hacker Tools For Ios
  49. Pentest Tools Android
  50. Hacking Tools Free Download
  51. Hacker Tools List
  52. Hack Tools For Windows
  53. Hacker Tools
  54. World No 1 Hacker Software
  55. Pentest Reporting Tools
  56. Hacker Tools Software
  57. Hackers Toolbox
  58. Pentest Tools Website Vulnerability
  59. Hacker Tools Linux
  60. How To Make Hacking Tools
  61. Pentest Tools Nmap
  62. Hacker Tools Mac
  63. Hacking Tools Hardware
  64. Pentest Tools Free
  65. Hacks And Tools
  66. Pentest Tools Website