Thursday, 26 May 2011
OS Fingerprint
By default,
if TTL <= 128, the os is windows.
if TTL <= 64, the os is lunix.
Active detection
nmap:
nmap -O 192.168.1.1
T1: TCP SYN -> 21
T2: TCP NULL -> 21
T3: TCP SYN|FIN|URG|PSH -> 21
T4: TCP ACK -> 21
T5: TCP SYN -> 23
T6: TCP ACK -> 23
T7: TCP FIN|PSH|URG -> 23
PU: UDP -> 1
T1-T4: TCP OPEN T5-T7:TCP CLOSE PU: UDP CLOSE
According to nmap reply and use the result to compare with the nmap database, the os will be revealed.
Passive detection
p0f: running in a server to monitor incoming/outgoing (TCP/UDP/ICMP) packets, establishing the differential database. p0f will help to know what the source OS is.
Network sniffing
Plain text transfer protocol: TELENT, HTTP, FTP, POP3
Linux tools: Sniffit, Tcpdump, Ettercap, Ethereal.
Windows tools: Cain & Abel, Ethereal.
Automate the installation of Active Directory tools with PowerShell
Get-WindowsFeature
Add-WindowsFeature RSAT-DNS-Server -restartAdd-WindowsFeature RSAT-ADDS-Tools -restart
Add-WindowsFeature RSAT-AD-AdminCenter -restart
Add-WindowsFeature RSAT-SNIS -restart
Note: These features require Windows to be restarted, so be advised that Windows may restart without prompting when passing the command to add these features in through PowerShell.
Saturday, 14 May 2011
SQL 2008 database Backup and Restore process
1.Full
2.Differential
3.Transaction Log
4.File and File group backup
Data critical situation level is high. We could use the backup pattern below:
Sun Mon Tue Web Thu Fri Sat
F D D D D D D
T T T T T T
F: weekly Sunday
D: daily Mon, Tue, Web, Thu, Fri, Sat
T: per office hour
Create a backup device
w/ management studio
Server object -> New backup device -> File -> input the name and the location of the backup file
w/ store procedure
use master
exec sp_addumpdevice 'disk', 'MYDATA', 'c:\backup\mydata.bak' //create
exec sp_dropdevice 'disk', 'c:\backup\mydata.bak' //delete
go
Create a backup task
w/ management studio
Server object -> backup database
Setting schedule backup
1.start the sql server agent
start -> all programs -> microsoft sql server 2008 -> configuration tools -> sql server configuration manager -> find 'sql server agent' service
-> start
-> properties -> start method -> automatic
2.start agent xps option
sp_configure 'show advanced options',
go
reconfigure
go
sp_configure 'Agent XPs', 1
go
reconfigure
go
3. create schedule task for automatic backup
w/ management studio
Manage -> Maintenance plan -> maintenance plan wizard -> next -> name 'weekly full', schedule 'change' -> setup the date you need to do the full backup -> choose backup method 'full' -> next -> choose the database you need to backup, check verify backup integrity -> finish.
w/ T-sql
backup database AdventureWorks
to mybackup
with stats = 20
with options
blocksize = if you need to burn the file on a CD, set to 2048, use with format
name = backup set name
description = set backup description
differential: do the differential only, if not set this parameter, full as default
format | no format: set if overwrite the existing backup
compression | no_compression: if need to compress the backup or not, not set as system default value
nounload | unload: set when backup is finished, need to unload the tape or not
restart: if there is a power failure when doing backup, set this option to restart the backup job
stats: sql server is 10% by default, view the backup process percentage frequency
Wednesday, 11 May 2011
讓 Windows 7、Vista 登入畫面不顯示帳號名稱
Thursday, 31 March 2011
Basic Windows PowerShell commands you should already know
1: Get-Help
The first PowerShell cmdlet every administrator should learn is Get-Help. You can use this command to get help with any other command. For example, if you want to know how the Get-Process command works, you can type:
Get-Help -Name Get-Process
and Windows will display the full-command syntax.
You can also use Get-Help with individual nouns and verbs. For example, to find out all the commands you can use with the Get verb, type:
Get-Help -Name Get-*
2: Set-ExecutionPolicy
Although you can create and execute PowerShell scripts, Microsoft has disabled scripting by default in an effort to prevent malicious code from executing in a PowerShell environment. You can use the Set-ExecutionPolicy command to control the level of security surrounding PowerShell scripts. Four levels of security are available to you:
- Restricted — Restricted is the default execution policy and locks PowerShell down so that commands can be entered only interactively. PowerShell scripts are not allowed to run.
- All Signed — If the execution policy is set to All Signed then scripts will be allowed to run, but only if they are signed by a trusted publisher.
- Remote Signed — If the execution policy is set to Remote Signed, any PowerShell scripts that have been locally created will be allowed to run. Scripts created remotely are allowed to run only if they are signed by a trusted publisher.
- Unrestricted — As the name implies, Unrestricted removes all restrictions from the execution policy.
You can set an execution policy by entering the Set-ExecutionPolicy command followed by the name of the policy. For example, if you wanted to allow scripts to run in an unrestricted manner you could type:
Set-ExecutionPolicy Unrestricted
3: Get-ExecutionPolicy
If you’re working on an unfamiliar server, you’ll need to know what execution policy is in use before you attempt to run a script. You can find out by using the Get-ExecutionPolicy command.
4: Get-Service
The Get-Service command provides a list of all the services that are installed on the system. If you are interested in a specific service, you can append the -Name switch and the name of the service (wildcards are permitted). When you do, Windows will show you the service’s state.
5: ConvertTo-HTML
PowerShell can provide a wealth of information about the system, but sometimes you need to do more than just view the information onscreen. Sometimes, it’s helpful to create a report you can send to someone. One way of accomplishing this is by using the ConvertTo-HTML command.
To use this command, simply pipe the output from another command into the ConvertTo-HTML command. You will have to use the -Property switch to control which output properties are included in the HTML file and you will have to provide a filename.
To see how this command might be used, think back to the previous section, where we typed Get-Service to create a list of every service that’s installed on the system. Now imagine that you want to create an HTML report that lists the name of each service along with its status (regardless of whether the service is running). To do so, you could use the following command:
Get-Service | ConvertTo-HTML -Property Name, Status > C:\services.htm
6: Export-CSV
Just as you can create an HTML report based on PowerShell data, you can also export data from PowerShell into a CSV file that you can open using Microsoft Excel. The syntax is similar to that of converting a command’s output to HTML. At a minimum, you must provide an output filename. For example, to export the list of system services to a CSV file, you could use the following command:
Get-Service | Export-CSV c:\service.csv
7: Select-Object
If you tried using the command above, you know that there were numerous properties included in the CSV file. It’s often helpful to narrow things down by including only the properties you are really interested in. This is where the Select-Object command comes into play. The Select-Object command allows you to specify specific properties for inclusion. For example, to create a CSV file containing the name of each system service and its status, you could use the following command:
Get-Service | Select-Object Name, Status | Export-CSV c:\service.csv
8: Get-EventLog
You can actually use PowerShell to parse your computer’s event logs. There are several parameters available, but you can try out the command by simply providing the -Log switch followed by the name of the log file. For example, to see the Application log, you could use the following command:
Get-EventLog -Log "Application"
Of course, you would rarely use this command in the real world. You’re more likely to use other commands to filter the output and dump it to a CSV or an HTML file.
9: Get-Process
Just as you can use the Get-Service command to display a list of all the system services, you can use the Get-Process command to display a list of all the processes that are currently running on the system.
10: Stop-Process
Sometimes, a process will freeze up. When this happens, you can use the Get-Process command to get the name or the process ID for the process that has stopped responding. You can then terminate the process by using the Stop-Process command. You can terminate a process based on its name or on its process ID. For example, you could terminate Notepad by using one of the following commands:
Stop-Process -Name notepad
Stop-Process -ID 2668
Keep in mind that the process ID may change from session to session.
Thursday, 17 February 2011
Transfer Outlook Express email to Windows 7
A few days back a not-so-tech-savvy friend of mine asked for my help. He had purchased a new laptop and wanted to know how to transfer all the old Outlook Express email messages to Windows 7. He promised a fresh Cuban cigar if I could come down to his office and help move the email messages. The thought of sipping excellent Cognac with a Cuban was enough to drag me out on that cold winter night.
In a few minutes I was in front of a brand new Windows 7 machine ready to transfer Outlook Express email to Windows 7. Now there are two ways to do this. The first is simpler and involves importing the messages from a backup of Outlook Express into Windows Live Mail, the Windows 7 email program. But we were really disappointed when this failed. Probably the backup process wasn't done properly, I thought. Or maybe the email folders were faulty (because my friend used to complain frequently of Outlook Express crashes). There was no option but to take the second, more complex route.
Instructions on how to transfer Outlook Express email to Windows 7 - Windows Live Mail
Since I knew Windows Live Mail could import messages from an existing installation of Outlook Express, Windows Mail and Windows Live Mail, the convoluted path I followed was this.
Get Windows Live Mail (WLM) program on the old Windows XP computer which already had Outlook Express. The newly installed email program will automatically import account settings as well as the messages from Outlook Express. Now export the email from Windows Live Mail on XP and move them to the new Windows 7 computer.

- Download Windows Live Mail on the Windows XP computer and install it.
- When Windows Live Mail installs on your XP computer it will detect Outlook Express and copy the email account settings as well as the messages. If it doesn't, read how to copy email accounts from Outlook Express to Windows 7 and then transfer the email messages.
- When all the messages have been moved from Outlook Express to Windows Live Mail on XP, use the Export function of the latter to save a back up of the email to a folder of choice. Copy this entire folder on a flash drive or a DVD. Important: Remember to also move the Outlook Express address book and the email accounts data along with the messages. Shutdown the Windows XP computer because it's work is over.
- Transfer the address book, email account information and exported Windows Live Mail messages (which were originally of Outlook Express) to the Windows 7 computer and dump them in a temporary directory.
- On the Windows 7 computer, open the Windows Live Mail program - it should be factory installed. If not, refer the instructions on how to install the Windows Live Mail.
- But before you transfer the Outlook Express email, import the email account data to avoid configuring Windows Live Mail manually. This will save you time as well as a lot of trouble if you had multiple accounts set up in Outlook Express and / or you don't remember the settings for the account (especially the password and the incoming and outgoing email server details).
- Now with the "File" -> "Export" -> "Messages" functionality, move all the email messages to Windows Live Mail on Windows 7.
As I mentioned at the start, I took this convoluted approach to transfer Outlook Express email to Windows Live Mail on Windows 7 because the O.E. backup failed (for me)... it might just work for you. So try that first - it's easier; read how to copy email from Outlook Express to Windows Live Mail for step by step instructions and screenshots.
Modify Windows Explorer Command Bar for all folders
In last week’s blog, “Use Special Codes to Add Commands to the Windows Explorer Command Bar,” I told you about special codes that exist in the registry that you can use to add commands to Microsoft Windows Explorer’s context-sensitive Command Bar and showed you where to find them. I then demonstrated how to add those special codes to a set of keys in the Registry for the different Library folders.
I also told you there is a key in the registry called Generic for all the other folders that do not appear in any of the Libraries. I then explained that to add commands to the Windows Explorer Command Bars for all the other folders that do not appear in any of the Libraries, you’ll have to do a bit more work. In short, you’ll have to change the ownership and permissions on the key and then add the TasksItemsSelected and the TasksNoItemsSelected keys manually, before you can add the codes.
In this edition of the Windows Desktop Report, I’ll show you how to modify the Generic registry key to add commands to the Windows Explorer’s Command Bar for all the other folders.
This blog post is also available in PDF format in a TechRepublic download and as a TechRepublic Photo Gallery.
Editing the Registry
It is important to keep in mind that the Windows Registry file is vital to the operating system and changing it can be dangerous if you inadvertently make a mistake. As such, you should take a few moments to back up your system by creating a system image in the Backup and Restore tool. That way if anything goes awry, you can restore your system and get right back to work.
To launch the Registry Editor, click the Start button, type Regedit in the Start Menu’s Search box, and press [Enter]. When the UAC dialog box appears, respond appropriately.
The Command Store
Don’t forget that the CommandStore key in the registry contains the codes that are the source of the commands that appear on Windows Explorer’s context-sensitive Command Bar. From within the Registry Editor, navigate to the following folder:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell
When you select shell, you’ll see all the codes that you can use to customize Windows Explorer’s context-sensitive Command Bar. Keep in mind that while each of these keys contains subkeys and other details, you need be concerned only with the names in the shell key. For example, to add the Delete command, all you need to know is the code Windows.delete.
Stay on top of the latest Microsoft Windows tips and tricks with TechRepublic’s Windows Desktop newsletter, delivered every Monday and Thursday. Automatically sign up today!
Changing the permissions
Once the Registry Editor appears, navigate to the following folder
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderTypes\{5c4f28b5-f869-4e84-8e60-f11db97c5cc7}
When you do, you’ll see that while the key is technically named {5c4f28b5-f869-4e84-8e60-f11db97c5cc7}, its CanonicalName is Generic (Figure A), which I’ll use from here on out to refer to it. You’ll also notice that the Generic key does not contain the TasksItemsSelected and the TasksNoItemsSelected keys by default. As I said, you will have to add them manually.
Figure A
The CanonicalName is Generic.
However, before you can do so, you will have to change the permissions of the Generic key. To begin, right-click on the Generic key and select the Permissions command. When you see the Permissions For dialog box, as shown in Figure B, immediately select the Advanced button to bring up the Advance Security Settings dialog box.
Figure B
When you see the Permissions For dialog box, select the Advanced button.
Now, select the Owner tab, choose Administrators from the Current Owner To panel, and click Apply. Once the Current owner is set to Administrators, as shown in Figure C, click OK to continue.
Figure C
You will need to change owner to the Administrators group.
When you return to the Permissions dialog box, choose Administrators in the Group or User Names panel and then select the Full Control check box in the Permissions panel, as shown in Figure D. Click OK to continue.
Figure D
You must set the Permissions for Administrators to Full Control so that you can make changes to the Generic key.
Editing the Generic key
Now that you have full control of the Generic key, you are ready to begin editing. To get started, right-click {5c4f28b5-f869-4e84-8e60-f11db97c5cc7} and select the New | Key command. When the new key appears, name it TasksItemsSelected. Then, choose the New | Key command again and create the TasksNoItemsSelected key. At this point, your Generic key should look like the one shown in Figure E.
Figure E
Once you finish this step, you should see both the TasksItemsSelected and the TasksNoItemsSelected keys inside the Generic key.
At this point, I’ll reuse the list of codes that I chose for last week’s article:
- Windows.delete
- Windows.navpane
- Windows.previewpane
- Windows.menubar
Since the Windows.delete code requires an item to be selected, it will be added to the TasksItemsSelected key. The Windows.navpane, Windows.previewpane, and Windows.menubar codes do not require an item to be selected, so they will go in the TasksNoItemsSelected key.
As you can see, the TasksItemsSelected key contains only the String Value titled Default, which is where we’ll put the Windows.delete code. Double-click the Default icon to access the Edit String dialog box. Then type the Windows.delete code in the text box, as shown in Figure F.
Figure F
Just type the Windows.delete code in the text box.
Now, access the TasksNoItemsSelected key, double-click the Default icon, and add the Windows.navpane, Windows.previewpane, and Windows.menubar codes in the text box, as shown in Figure G. Be sure to use semicolons to separate each command.
Figure G
Be sure to use semicolons to separate each command.
At this point, close the Registry Editor and launch Windows Explorer. When you do, you’ll see the new commands on the Command Bar in Windows Explorer when you access any folder, as shown in Figure H.
Figure H
Your new commands now appear on the Command Bar in Windows Explorer for folders that do not appear in any of the Libraries.
Ref link: http://www.techrepublic.com/blog/window-on-windows/modify-windows-explorer-command-bar-for-all-folders/3811?tag=nl.e064
Thursday, 20 January 2011
Upgrade security on Secure Shell with a few easy steps
Secure Shell is nearly always put in place as a secure replacement for telnet. It’s default behavior for any administrator. But the problem is, out of the box, Secure Shell isn’t as secure as it can be. There are plenty of ways to take this security measure to much higher levels, but which are the quickest to implement that will gain you the most security? Let’s dig in and find out.
SSH key authentication
No matter how you slice it, if you’re using a password to log in, that password can be cracked. That is a security hole in the waiting. You can get around this by using SSH key authentication. To do this you simply need to generate a key and then copy the key to the correct machines. Here are the steps for this (NOTE: These steps will be illustrated on an Ubuntu client and server):
On the local machine
Open up a terminal window and issue the command ssh-keygen -t dsa. That command will generate a public key that is then copied to your server with the command ssh-copy-id -i ~/.ssh/id_dsa.pub username@destination where username is the actual user name on the remote machine and destination is the actual address of the remote machine.
Now, when you attempt to log in to the remote machine you will be asked for the passphrase of the CERTIFICATE and not the user.
If you are using the graphic desktop you could also click on System | Preferences | Passwords and Encryptions Keys. From this GUI (see Figure A) select the My Personal Keys tab, click File | New | Secure Shell Key, and walk through the creation wizard.
Figure A
From this tool you can manage all of your passwords and your personal keys.
Once the key is created, right-click the key and select Configure Key for Secure Shell. From the new window you will need to add a computer name (the remote machine) and a login name. NOTE: You must already have the login name on the remote machine.
If you are using Windows to log into the SSH-enabled server, you can use the PuTTYgen utility. Download PuTTYgen, start it up, click the Generate button, move your mouse around (during the creation phase), save the public key, and copy the public key to the SSH server.
NOTE: As a precaution you should always enforce password-protected keys. If you allow the key authentication method, you might find some users create password-less keys (for ease of use). This is not safe.
Block root access
This one is critical and should be done on ALL machines that allow secure shell access. Open up the file /etc/ssh/sshd_config and look for the line:
PermitRootLogin
Make sure the above line is set to no. The correct line should read:
PermitRootLogin no
Once you have the file corrected and saved, issue the command:
sudo /etc/init.d/ssh restart
If you attempt to log on to the server using ssh as the root user you will be denied access.
Change the port number
I understand that security by obfuscation is not really security. But in the case of secure shell, the more the merrier. So I am a big advocate of changing secure shell from the default port 22 to a non-standard port. To do this, open up the /etc/ssh/sshd_config file and look for the line (near the top):
Port 22
Change this port number to reflect a non-standard port not in use. You will need to make sure all users that connect to this machine are made aware of this change in port number. You will also want to restart the SSH daemon after you make the change.
To connect to a non-standard port from the command line, you would use SSH like so:
ssh -p PORT_NUMBER -v -l USERNAME IPADDRESS
Where PORT_NUMBER is the non-standard port, USERNAME is the username to connect with, and IPADDRESS is the address of the remote machine.
Final thoughts
Out of the box, secure shell is a fairly secure means to connect to a remote machine. But when you can easily take the default a few steps further into the realm of very secure…the little time you will spend doing so will pay off. As a best practice standard, you should always, at a bare minimum, disable root login…everything beyond that is just icing on the proverbial cake.
Monday, 3 January 2011
The 10 most useful Windows 7 keyboard shortcuts
Along with Windows 7’s new features comes a set of new keyboard shortcuts. This little cheat sheet will help you work more efficiently with the latest version of Windows.
Note: This list is part of Greg Shultz’s comprehensive collection of Windows keyboard shortcuts, available as a PDF download.
The shortcuts
Photo Magician 大量圖檔批次轉檔、改大小工具
Photo Magician是個功能相當簡單的圖檔轉檔工具,主要就是用來批次修改大量圖檔的尺寸、檔案大小與檔案格式。透過內建的「Profile」選單,我們可以快速選擇常見的圖檔尺寸或各種行動裝置如iPhone、PSP、Microsoft Zune或HDTV..等裝置適用的大小。當然也可自行選擇、設定尺寸與縮放比例。
在轉檔之前,也可透過尺寸或檔案大小來過濾要處理或不處理的檔案,另外也提供了一個快速轉檔用的桌面小工具,只要把圖檔拉到視窗中即可快速執行事先選定的轉檔任務,把圖檔輸出到指定資料夾。
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
▇ 軟體小檔案 ▇ (錯誤、版本更新回報)
軟體名稱:Photo Magician 軟體版本:1.5.0.0 軟體語言:英文,提供多國語系介面,尚無中文 軟體性質:免費軟體 檔案大小:1.61MB 系統支援:Windows 98/2000/XP/2003/Vista/Win7 官方網站:http://www.sheldonsolutions.co.uk/photomagician/ 軟體下載:按這裡
使用方法:
第1步 安裝好並啟動Photo Magician軟體之後,先在「Input Folder」與「Output Folder」欄位中設定好輸入與輸出圖檔的資料夾。
第2步 接著我們可以從「Select a Profile」選單中點選一個你要的尺寸或規格,也可點選「Custom Width & Height」自行設定轉檔細節。
第3步 「Conversion Settings」選單中可以設定是否處理次目錄裡的其他圖檔,或者透過圖檔尺寸、圖檔大小來篩選要處理的圖檔。
第4步 「Options」選單則可設定軟體語言介面與一些圖檔格式的設定。全部設定好之後,直接按一下視窗最下方的「Process xx Image(s)」按鈕即可開始轉檔。
第5步 轉檔時會有個預覽介面,結束後關閉視窗即可。
第6步 如果想啟動快速轉檔工具的話,可以先設定好「Output Folder」與「Profile」等轉檔細節,然後再按一下視窗左上角的「Quick Convert Mode」按鈕,桌面上便會出現一個快速轉檔用的小視窗。
以後只要將圖檔拉到視窗中,便可自動透過預先設定過的轉檔方式將圖檔輸出到指定資料夾中。
Friday, 31 December 2010
Backdoor ways to reboot a Windows server
When you need to reboot a Windows server, you’ll occasionally encounter obstacles to making that happen. For instance, if remote desktop services aren’t working, how can you reboot the server? Here is a list of tricks I’ve collected over the years for rebooting or shutting down a system when I can’t simply go to the Start Menu in Windows.
- The shutdown.exe command: This gem will send a remote (or local) shutdown command to a system. Entering shutdown /r /m \\servername /f /t 10 will send a remote reboot to a system. Shutdown.exe is current on all modern Windows systems; in older versions, it was located on the Resource Kit. For more details, read this Microsoft KB article on the shutdown.exe command.
- PowerShell Restart-Computer: The equivalent of the command above in PowerShell is:
Start-Sleep 10
Restart-Computer -Force -ComputerName SERVERNAME - Hardware management device: If a device such as an HP iLO or Dell DRAC is in use, there is a virtual power button and remote screen console tool to show the system’s state regardless of the state of the operating system. If these devices are not configured with new servers, it’s a good idea to have them configured in case the mechanisms within the operating system are not available.
- Virtual machine power button: If the system in question is a virtual machine, all hypervisors have a virtual power button to reset the system. In VMware vSphere, be sure to select the option to Shut Down The Guest Operating System instead of the Power Off; this will make the call to VMware Tools to make it a clean shutdown. If that fails, the Power Off button will be the next logical step.
- Console walkthrough: In the situation where the server administrator does not have physical access to the system, walking someone through the process may be effective. For security reasons, basically a single user (domain or locally) can be created with the sole permission of rebooting the server. That person could log on as this temporary user, and then it is immediately destroyed after the local shutdown command is issued. Further, that temporary user could be created with a profile to run the reboot script on their logon to not have any interaction by the person assisting the server administrator.
- Configure a scheduled task through Group Policy: If you can’t access the system in any other mainstream way — perhaps the Windows Firewall is turned on and you can’t get in to turn it off — set a GPO to reconfigure the firewall state and slip in a reboot command in the form of the shutdown.exe command executing locally (removing the /m parameter from above). The hard part will be getting the GPO to deploy quickly.
- Enterprise system management packages: Packages such as Symantec’s Altiris and Microsoft System Center agents communicate to the management server and can receive a command to reboot the server.
- Pull the plug: This is definitely not an ideal approach, but it is effective. For physical servers, if a managed power strip with port control is available, a single system can have its power removed and restored.
What other backdoor ways have you used to reboot a Windows server? Share your comments in the discussion.
Ref: http://blogs.techrepublic.com.com/datacenter/?p=3562&tag=nl.e071
Thursday, 9 December 2010
10 Sysinternals tools you shouldn't be without
Sysinternals has been around for quite some time and was acquired by Microsoft in 2006. These are great little tools for getting some heavy-hitting Windows things done and sometimes done better than when using the built-in tools for a task. The entire suite of products is available for download. While this is the easiest way to get the tools because they are bundled together, there are some tools that I find myself using far more than others. Here’s a look at my favorite tools in the Sysinternals collection (or the ones that I use the most).
Note: This article is also available as a TechRepublic photo gallery.
1: PsList and PsKill
I listed these together because I typically use them in this order. The goal here is to see processes on a machine — with PsList, I find the process ID, and then use PsKill to terminate the process.
There are quite a few ways to return information with PsList, and the best part is that it works on local and remote machines. PsKill works similarly to PsList except it is used to terminate processes by process ID.
2: Process Explorer
Process Explorer is a great tool for digging into open files or resources. Trying to open a file, but getting a notification that it’s already open? Process Explorer can help determine which application or process has the file open. It is a GUI-based utility and can be used as a Task Manager replacement. The utility has two panes of information. The top pane shows currently active processes on your system and includes information about the name, the account that owns the process, and the CPU usage of the process.
The bottom pane has two modes of operation, handle mode and DLL mode. When handle mode is enabled, selecting a process in the top portion of the window will show you the handles that the process has open. In DLL mode, the pane displays the DLLs and memory-mapped files loaded by the selected process.
3: ZoomIt
ZoomIt is a utility for the public speaker in all of us. When presenting information, sometimes it is helpful to show a certain area of the screen, magnified to call attention to a dialog box or other item. This is what ZoomIt does. When configured, it will integrate with PowerPoint to allow macro keys to trigger functions during a presentation.
4: PsLoggedOn
PsLoggedOn uses a registry scan to look through the HKEY_USERS key to see which profiles are loaded. Looking at the keys with a user ID SID, PsLoggedOn looks up the username of the SID and displays it. This shows you who is logged on in any session to a PC. When querying remote systems, your userid will be found as a connected user session as well. The remote and local users are returned separately to help distinguish logon types.
5: Autoruns
You know how malware likes to invade the startup folder and other locations on infected systems? Seems that these are the hardest things to find and get rid of when trying to clean up spyware/malware/ infections. Autoruns can help with that. It looks through all possible locations where applications can be listed to automatically launch when Windows starts. Then, it displays them in a tabbed, easy-to-follow GUI. You can hide Microsoft-signed entries to eliminate the good items from the list of things that start up on your system.
6: Contig
Some files have trouble with disk defragmenting applications and for one reason or another, can’t be corrected. This is where you might use Contig. It is a single file defrag utility, which can be helpful if you use a file often and suspect it might be suffering from performance issues due to fragmentation.
7: Disk2vhd
Disk2vhd creates a virtual hard disk file from a physical system for use with Hyper-V or even with Windows 7 or Server 2008 R2. Disk2vhd supports Windows XP SP2 and Windows Server 2003 SP1 and higher, including 64-bit versions of these systems.
A great use of this utility might be to create a snapshot of an entire disk for backup purposes. There are also options that allow Disk2vhd to be run at the command line. You can use these options to script vhd creation. Using the utility in this way would allow you to use Task Scheduler and Disk2vhd to create a snapshot of your PC at scheduled intervals with no user intervention. One caveat: When creating vhds, be sure not to attach them to the same system you created them from if you are going to boot from the vhd.
8: MoveFile
As we all know, there are times when files need to be moved or deleted to help get things cleaned off a PC (malware/bots/viruses). Sometimes, this can’t be done because files are in use, which prevents actions on the files until they are closed or the computer is rebooted. MoveFile provides an API that marks files for move/rename/delete at the next restart of the Windows system. Doing this allows the file to be acted on before it is referenced by the system.
9: PSFile
The PStools utilities are all popular and useful, but one that I recently discovered is PSFile. This utility shows files on a system that are open by remote systems by default but that can be passed parameters to return information about remote systems as well. This tool is a good way to check for open files on file servers when users might report read-only issues or have problems getting files to open properly.
10: Sync
This utility was created to mirror a UNIX utility that will allow you to flush cached file system data to disk. Doing this can help prevent problems with lost system information in the event of a system failure and helps to ensure live system information is getting written to disk.
The way I see this being useful depends on how stable your system is. If your computer tends to crash more than you would like (or if you are testing some scenarios), you might create a scheduled task to ensure that the system info is flushed back to disk once per hour or some other predefined timeframe. Another cool thing about this sync utility is that USB or ZIP drives or other removable drives can be flushed. You will need administrative privileges to use Sync.
Sunday, 5 December 2010
Install Firesheep on Ubuntu 10.04 or 10.10
Get the Source
You’ll need to download the source code from github, which can be done using the following two commands:
git clone https://github.com/codebutler/firesheep.git
cd firesheep
git submodule update --init
These two commands will download the code required to compile Firesheep, putting the source into a new directory called “firesheep”.
Build Tools
To compile Firesheep on Ubuntu 10.04 or 10.10 you’ll need the following development packages installed. Simply copy-paste the following list of packages into your terminal:
sudo apt-get install autoconf libtool libpcap-dev libboost-all-dev libhal-dev xulrunner-1.9.2-dev
On my machine this installed quite a few packages, and while the main Firesheep website lists 10.10 specifically, I had no problems on my 10.04 installation.
Build Firesheep
You’re now ready to compile Firesheep. Run the following command and hopefully you’ll be able to build it without error:
./autogen.sh && make
Install the Plugin
If all is well you should find a new file called ‘firesheep.xpi’ in a subdirectory called build (ie; firesheep/build/). Simply drag-and-drop that file into your Addons dialog box, restart Firefox and you should be set.
I’ve been having some issues in actually capturing data on my Dell D630 with an Intel Pro/Wireless 3945ABG card. It looks like this tool is often hardware specific, so your mileage may vary. I’d be interested in anyone offering suggestions on getting it to capture properly on OS X 10.6 (macbook) or Ubuntu 10.04+.
Sunday, 21 November 2010
Westerners Vs Asians
Blue -->
Westerners
Red -->
Asians
(1) Opinion
Westerners: Talk to the point
Asians: Talk around the circle, especially if opinions are different
(2) Way of Life
Westerners: individualism, think of himself or herself.
Asians: enjoy gathering with family and friends, solving their problems, and know each other's business.
(3) Punctuality
Westerners: on time.
Asians: in time.
(4) Contacts
Westerners: Contact to related person only
.
Asians: Contact everyone everywhere, business very successful.
(5) Anger
Westerners:
S
how that I am angry.
Asians: I am angry, but still smiling... (Beware!)
(6) Queue when Waiting
Westerners: Queuing in an orderly manner
.
Asians: Queuing?! What's that?
(7) Sundays on the Road
Westerners: Enjoy weekend relaxing peacefully.
Asians: Enjoy weekend in crowded places, like going to the mall.
(8) Party
Westerners: Only gather with their own group.
Asians: All focus on the one activity that is hosted by the CEO.
(9) In the restaurant
Westerners: Talk softly and gently in the restaurant.
Asians: Talk and laugh loudly like they own the restaurant.
(10) Travelling
Westerners: Love sightseeing and enjoy the scenery.
Asians: Taking picture is the most important; scenery is just for the background.
(11) Handling of Problems
Westerners: Take any steps to solve the problems.
Asians: Try to avoid conflicts, and if can, don't leave any trail.
(12) Three meals a day
Westerners: Good meal for once a day is sufficed.
Asians: At least 3 good meals a day.
(13) Transportation
Westerners: Before drove cars, now cycling for environmental protection.
Asians: Before no money and rode a bike, now got money and drive a car
(14) Elderly in day-to-day life
Westerners: When old, there is snoopy for companionship.
Asians: When old, guarantee will not be lonely, as long as willing to babysit grandkids.
(15) Moods and Weather
Westerners: The logic is
:
rain is pain.
Asians: More rain, more prosperity
(16) The Boss
Westerners: The boss is part of the team.
Asians: The boss is a fierce god.
(17) What's Trendy
Westerners: Eat healthy Asian cuisine.
Asians: Eat expensive Western cuisine.
(18) The Child
Westerners: The kid is going to be independent and make his/her own living.
Asians: Slog whole life for the kids, the centre of your life.
Thursday, 4 November 2010
Any Video Converter 影片轉檔、切割、畫面翻轉編修工具
Free Video Converter是個操作簡單、速度也算快的影片檔轉檔軟體,主要功能就是讓我們將各種格式的影片檔轉成其他你要用的影片格式。在轉檔、輸出時,我們可以在輸出格式選單中依照影片檔、音樂檔、手機專用格式與光碟燒錄等分類,選擇你要用的格式。除了輸出成其他格式的影片之外,還可直接輸出成MP3、WAM、 agg等格式的音樂檔,或轉成一般手機用的MPEG-4檔案。可支援的影片格式有:
- 輸入格式:avi, asf, mov, rm, rmvb, flv, mkv, mpg, 3gp, m4v, vob, YouTube videos
- 輸出格式:avi, mp4, wmv, swf, flv, mkv, MPEG-1 and MPEG-2, mpg (PAL or NTSC), asf, m2ts, mp3, wma, ogg, aac, wave, m4a
除了提供包括繁體中文在內的多國語言介面之外,Free Video Converter可支援批次轉檔功能,只要先選取好檔案、調整好轉檔設定,按一下即可自動處理到好。除此之外還可支援從Google Video或Youtube下載影片、直接轉檔功能。
而Any Video Converter也提供了一個相當簡單實用的影片裁剪功能,可以讓我們把影片中不要的片段剪掉,也可支援影片合併輸出功能,將多個影片檔合併成一個。另外還有畫面切割、亮度/對比/飽和度調整等功能,還可將影片上下翻轉、鏡像翻轉、左右旋轉90度或加入雜訊、影片銳化...等等特效,相當實用。
▇ 軟體小檔案 ▇ (錯誤、版本更新回報)
軟體名稱:Any Video Converter 軟體版本:3.1.0 軟體語言:繁體中文(內建20國語言介面) 軟體性質:免費軟體(另有功能更完整的Pro付費版) 檔案大小:22.1MB 系統支援:Windows 2000/XP/2003/Vista/Win7 官方網站:http://www.any-video-converter.com/products/for_video_free/ 軟體下載:按這裡 使用方法:
第1步 開啟Any Video Converter軟體之後,直接按一下左上角的「添加視訊」按鈕,將你要轉檔、修改的影片檔拉到軟體視窗中。
![]()
第2步 接著從右上角的「輸出格式」選單點選影片輸出格式,再按一下「編碼」按鈕,即可開始轉檔。
![]()
第3步 另外Any Video Converter提供YouTube、Google Video與NicoVideo...等網站的影片下載功能,下載完可直接轉成你要用的格式。
![]()
第4步 選取影片後,可以在右邊的預覽視窗下方按「Clipping Video」或「Video Crop_Effect」等按鈕,執行影片裁剪、翻轉或套用視覺特效...等功能。
![]()
第5步 這是影片裁剪功能,我們可以自行設定啟動與終點,把你要的部份保留下來,其他的剪掉。
![]()
第6步 這是影片畫面裁切功能,可以只保留畫面中我們要的區域,使用方法很簡單,先設定「Crop Area Size」的尺寸,然後移動右邊預覽畫面中的方框,對準你要保留的部份即可,其他沒被框選住的部分則會被剪掉。
![]()
第7步 這是影片特效設定頁面,除了可以調整影片的亮度、對比與飽和度之外,還可將影片上下顛倒、鏡面翻轉或左右90度翻轉,還可加入雜訊特效、銳化特效..等等。
裁剪好影片或設定好特效之後,記得回主視窗時要再按一下「編碼」按鈕,將你調整好的影片另外編碼、輸出,轉檔完成即可使用。
Exchange 2010: How to redirect non-SSL Outlook Web App traffic to SSL
With Outlook Web App being an outwardly facing service that relies on the use of your organization’s internal credentials, it’s important to make sure that miscreants don’t get access to your security jewels — individual usernames and passwords. Using SSL for this traffic protects your organization and your users.
In this Exchange 2010 tutorial, I focus on how to make sure that users who visit http://webmail.yourorg.com are automatically redirected to https://webmail.yourorg.com/owa. I will not be covering the SSL certificate provisioning and installation process.
Step-by-step instructions
1. Log into your Exchange 2010 server with a user account that has administrative rights on the server.
2. Go to Start | Administrative Tools | Internet Information Services (IIS) Manager. This opens the IIS7 manager, which is used by Exchange’s Client Access Server role.
3. Once you’re in the IIS Manager tool, expand your computer link, choose Sites, and then select the Default Web Site option.
4. From the Features View, choose the HTTP Redirect option (Figure A).
Figure A
Choose the HTTP Redirect option
5. When you get to the HTTP Redirect page, do the following:
- Select the checkbox next to Redirect Requests To This Destination heading.
- In the box below, type in the full address - including HTTPS - for the site to which you’d like to redirect traffic. This would be the format: https://webmail.yourorg.com/owa.
- Make sure you also select the checkbox next to Only Redirect Requests To content In This Directory (Not Subdirectories). If you fail to do this, you’ll break some other functionality.
- In the Actions pane, click the Apply link to save your changes.
Your HTTP Redirect window should look like the screen in Figure B.
Figure B
The HTTP Redirect options page
This step alone, however, isn’t enough. In fact, let’s try it. Browse to http://webmail.yourorg.com. You’ll get a message indicating that access is denied. The reason: SSL is currently required for the top level directory (Figure C).
Figure C
The SSL redirect isn’t working.
In order for the redirect to work, the top level directory needs to be accessible without using SSL. In other words, it needs to be accessible via HTTP. To make that happen, you need to disable the SSL requirement on that directory. Once you do, the top-level directory is fully accessible via HTTP and then IIS can properly intercept your HTTP request and redirect you to the page that you specified earlier.
Now, follow these steps:
1. Select the top level directory - probably called Default Web Site - and browse to SSL Settings (Figure D).
Figure D
Choose the SSL Settings option
2. Double-click SSL Settings.
3. Deselect the checkbox next to Require SSL (Figure E).
4. In the Actions pane, click the Apply link to save your changes.
Figure E
Disable SSL on the top level directory
For the remaining important subdirectories, make sure that the settings are as follows.
SSL | Redirect | |
| aspnet_client | Enable SSL | Uncheck redirect |
| Autodiscover | Enable SSL | Uncheck redirect |
| ecp | Enable SSL | Uncheck redirect |
| EWS | Enable SSL | Uncheck redirect |
| Microsoft-Server-ActiveSync | Enable SSL | Uncheck redirect |
| OAB | Enable SSL | Uncheck redirect |
| PowerShell | Enable SSL | Uncheck redirect |
| Rpc | Enable SSL | Uncheck redirect |
You need to make sure that you run through each of the directory settings since some of the changes you made earlier will have propagated down through the folder structure. Figure F gives you a look at one of the settings you’ll need to change.
Figure F
Set SSL and Redirect settings on each of the folders listed above
Once you’re finished, test your new settings. As you can see in Figure G, success!
Figure G
The HTTPS redirect is working now.
Now, users can just remember webmail.yourorg.com, and you can do the heavy lifting behind the scenes to both protect them (SSL) and make their lives easier (automatic redirection).