The official website and many other website I found only mentioned to install Microsoft Visual C++ 2010 Redistributable Package. Some websites even gave an inappropriate installation instruction to user. Although Microsoft Visual C++ 2010 Redistributable Package might be required for older version of ODBC connector, but definitely not version 5.3.6.
Also, it is better if you are installing the latest version of Visual C++ as well. Many website I found (such as this, this, this and this) are still providing link to the old version of Visual C++ even a new version is already available at the time of their writing. You may check the latest version of Visual C++ at Microsoft website here but, even the official website cannot be trusted as I can find a more updated version of Visual C++ 2015 here at the time of writing this article…
I used to use telnet for testing if the firewall working properly in the office. Telnet is good for simple test, but when comes to testing a large number of destination IP and ports it will be very time consuming. After searching on the Internet I found Netcat, a tool for testing connection. It is build-in in most Linux OS but not on Windows. So I found Ncat here as part of the Nmap for Windows by nmap.org, but too bad that it won’t execute on some Windows as it requires Microsoft Visual C++ Redistributable Package installed.
A Ncat portable is an alternative, but the website only provided a beta version of Ncat 5.59BETA1, and require you to compile your own if you would like a newer version.
They did provide a documentation on how to compile Ncat with static linking library, but if you follow the steps you will encounter a few problems which you have to troubleshoot yourselves.
So here is my steps on compiling Ncat portable after I had gone through all the trouble.If you are someone who can edit the documentation on secwiki.org, please do that for me as I don’t want to get an extra account for just editing the document :)
If you want to avoid the trouble to compile, you can download the Ncat which I compiled here, however use it at your own risk as I might have inject some malware inside :)
Building Ncat Portable for Windows
The following steps has been tested using the following environment:
Microsoft Visual Studio 2010 Version SP1 (10.0.40219.1 SP1Rel)
First, follow all steps on the original documentation at https://secwiki.org/w/Nmap/Ncat_Portable till you copied the resulted static libs and include files from “C:\OpenSSL” to the “mswin32\OpenSSL” directory in the Nmap source tree in step 5. Below is a screenshot of the original documentation in case it is edited at the time you read this article.
Assuming that everything went fine till now, you’re about 7 steps away from building Ncat portable.
Open Nmap solution in Visual Studio from mswin32\nmap.sln and switch the build configuration to “Ncat Static” like so:
Right click on Solution “nmap” in the Solution Explorer sidebar and choose “Configuration Manager“.
Switch the active solution configuration to “Ncat Static“. Check the “Build” check box for project “liblua“. Make sure that the nsock, nbase and ncat projects have switched to the “Static” configuration also. Then close the “Configuration Manager”.
Right click on the ncat project and select “Set as StartUp Project“.
Right click on the “nsock” project in Visual Studio and click “Properties“. In “Configuration Properties” > “General” > “C/C++” > “General“, in “Additional Include Directories“, add path “..\mswin32\OpenSSL\include“
Right click on the “ncat” project in Visual Studio and click “Properties“. In “Configuration Properties” > “General” > “C/C++” > “General“, in “Additional Include Directories“, add path “..\mswin32\OpenSSL\include” and “..\liblua“
Right click on the “ncat” project in Visual Studio and click “Properties“. In “Configuration Properties” > “General” > “Linker” > “General“, in “Additional Library Directories“, add path “..\mswin32\OpenSSL\lib“
Expand the “ncat” project, double click the file “ncat_ssl.c” and comment out the line “#include <openssl/applink.c>“
Right click on the “liblua” project in Visual Studio and click “Properties“. In “Configuration Properties” > “General” > “C/C++” > “Code Generation“, set “Runtime Library” to “Multi-threaded DLL (/MD)“
Right click on the “ncat” project in Visual Studio and click “Build“. Alternatively you can press the F7 key to start building.
Because the printer was replaced, I need to reconfigured all PC to remove the old printer and add the new printer. It is strange to find that out of 4 PC, 2 of them doesn’t work.
On Windows 7 PC:
Unable to delete the printer
Unable to change the default printer
After searching on the Internet and checking the difference between the working PC and not working PC, it looks like the 2 PC which has problem was inflected with malware before. The permission on the printer related registry was incorrectly set.
Run registry editor regedit
Go to HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows
In the menu, select Edit > Permissions
Click Advanced and make sure all permissions are inherited from CURRENT_USER
Recently I found that my router running DD-WRT is not able to handle NAT loopback (Accessing router’s public IP from internal network). After searching through the Internet, I found this post mentioned that it is a problem in DD-WRT since revision r15760. It is stated that the problem will not be fixed. As a user, we can only apply workaround to the issue. Here are the steps:
Make sure your DD-WRT version is r15760 or newer
Navigate to your router administrator page
Go to the Administrator section, Commands section
In the Commands text box, input the following command:
iptables -t mangle -A PREROUTING -i ! `get_wanface` -d `nvram get wan_ipaddr` -j MARK --set-mark 0xd001
iptables -t nat -A POSTROUTING -m mark --mark 0xd001 -j MASQUERADE
Press the Save Firewall button. You should see the following screen:
Reboot your router, the NAT loopback should be function now
I helped a few small company in administrating their PC. To prevent the user from installing software and to prevent from infection of computer virus, I have set their accounts to limited account.
However some legacy software installed on the protected area of the drive (EG. C:\legacy_program) and require write access might have problem for these limited account to run the program.
A quick search I did on the Internet found this article which mentioned the workaround to this, is to use access control list (ACL). To do this, you can use the GUI to configure or by the following command:
cacls "C:\legacy_program" /e /t /p users:c
If this still doesn’t help, it could be the case that the legacy program is trying to write to registry as well. You will need to locate the registry and configure the necessary permission.
Sometimes you download a file from Internet and it become a file ended with dot character which cannot be opened, renamed and deleted. I found this article on the Internet with the solution. To be able to handle this, you have to use the special path format in the command prompt.
So for example, you want to delete the file, the command you will use is: