Tuesday, March 31, 2009

SQLFury - An SQL injection scanner, using blind SQL injection techniques to extract information from a target database

SQL Injection Scanner:
An SQL injection scanner, using blind SQL injection techniques to extract information from a target database. 

Database Support:
MySQL
PostgreSQL
Oracle
Microsoft SQL Server


Extract from database:
Database version.
Current database user.
All database users.
Database name.
All database names.
All table names.
All columns names.
Entire columns.

Monday, March 30, 2009

How to back up Hyper-V virtual machines from the parent partition on a Windows Server 2008-based computer by using Windows Server Backup

This article describes how to back up Hyper-V virtual machines from the parent partition on a Windows Server 2008-based computer by using Windows Server Backup.

To back up Hyper-V virtual machines from the parent partition on Windows Server 2008 by using Windows Server Backup, you must register the Microsoft Hyper-V VSS writer with Windows Server Backup.

To register the Hyper-V VSS writer with Windows Server Backup, follow these steps.

Friday, March 20, 2009

EventTracker PULSE

EventTracker PULSE is a smart search engine for log data. Available as a free software download, it automates the real-time collection and long term archival of all log data from Windows (servers and workstations), Unix/Linux, Cisco devices, applications and any syslog source. A Google-like interface provides searching across hundreds of gigiabytes of data, allowing users to pinpoint critical data in a matter of seconds. Hundreds of preconfigured knowledge categories help users find common events such as Cisco authentication failures or Windows logon failures. In addition, an optional Windows agent provides monitoring of CPU usage, network connections, disk space utilization, capacity utilization, user activity etc.

The benefits of Log Search limitless for system administration and security. For instance, users can quickly identify root cause of service degradations or IT failures for remediation, or in the event of an internal breach, pinpoint who did what and when and plug security holes.

EventTracker PULSE installs on any Windows server or workstation. Key features include:

  • No limit on collection and archival of log data
  • Real-time collection from Windows (servers and workstations), Unix/Linux, Cisco devices, applications and any syslog source
  • Compressed, secure (SHA1) storage of data
  • Easy to use Google-like interface with options for free-form searching using keywords, exact phrases, operators, wildcard characters or a combination of all for complex queries
  • Endless refine to extract precise matches from large volumes
  • Hundreds of preconfigured knowledge categories
  • One-click access to the Prism KnowledgeBase for helpful descriptions on over 20,000 events
  • Agent-optional architecture; centralized agent configuration
More details and download availabile here: http://pulse.prismmicrosys.com/

Wednesday, March 18, 2009

Dealing with Windows 64bit "I want SIGNED drivers!"

Solving 64-Bit Windows' "I Only Want Signed Drivers!" Tantrums

I love 64-bit Windows.  I love the ability to stick 8 gigs of RAM on a laptop, allowing me to run several virtual servers, each of which I can equip with 1.5 GB of RAM.  (Life's too short to wait for Server 2008 to get things done in 512 MB of RAM, y'know?)  I love how much snappier Adobe Lightroom is when it's no longer shackled to the 2 GB limits that 32-bit Windows requires.  And I especially love that the main problem with 64-bit Windows -- the lack of 64-bit drivers -- is largely a thing of the past, save for those cases where vendors use the new architecture as a way to force you to upgrade (and yes, I am talking to you, HP printer division and Cisco VPN folks).

Once in a while, though, I run up against the the thing that I most don't like about 64-bit Windows:  the iron rule of driver signing.  Ever since XP and 2003, the 64-bit versions of Windows have refused to load kernel executables or device drivers unless those executables and drivers are digitally signed.  Load a driver that's not signed, and 64-bit Windows pops up some scary-looking message essentially saying, "take a walk, buddy, and take your unsigned driver with you... I mean you don't really know where this thing's been, do you?"  You can get around it by pressing F8 every time you boot and disabling driver signing, but that's a pain.  There was once, briefly, a setting in bcdedit that would let you tell Windows to always skip driver signing, but Vista SP1 put an end to that -- and besides, I don't want Windows to ignore checking the signatures on all drivers, I just want it to allow me to run the occasional unsigned driver.

Look, I understand the whole thought process behind this totalitarian approach, which I understand runs something like this:

  • Unsigned drivers cause the vast majority of Windows bluescreens.
  • Unknowing users don't know that, and so blame Microsoft for blue screens
  • This really irritates people at Microsoft and in particular Dave Cutler, Windows' Architectus Maximus
  • Dave wants to make it easy to finger the culprit of any given blue screen
  • Signing a driver carries with it something of a statement of personal confidence in that driver (and here, I feel, is where the whole thing falls down a bit:  signing a driver says you wrote it, not that it lacks bugs), so...
  • 64-bit Windows requires that all drivers and kernel executables be signed.

It all just seems a bit heavy-handed for my taste -- sort of like, oh, say, scaring a large room full of people into thinking that you've just released a bunch of malaria-infected mosquitoes into the air to make a point about poverty.  Anyway, this month I wanted to offer a workaround for those who run 64-bit systems and really need to run an unsigned driver now and then.  The workaround?  Create your own driver signing certificate and sign the driver or application yourself!  Here are the steps.

Tuesday, March 10, 2009

Installing SQL Server 2008 on a Windows Server 2008 Cluster

In a previous tip on SQL Server 2008 Installation Process, we have seen how different SQL Server 2008 installation is from its previous versions. Now, we have another challenge to face: installing SQL Server 2008 on a Windows Server 2008 Cluster. Windows Server 2008 has a lot of differences from its previous versions and one of them is the clustering feature. How do I go about building a clustered SQL Server 2008 running on Windows Server 2008?

Effective PowerShell: The Free eBook

PowerShell MVP and prodigious PowerShell blogger Keith Hill has converted his very popular Effective PowerShell blog series into a FREE Ebook.  You can download it HERE.

Here is a taste of you'll you'll get:

Table of Contents

Introduction 1 
Item 1: Four Cmdlets that are the Keys to Discovery within PowerShell 1 
Key #1: Get-Command 1 
Key #2: Get-Help 2 
Key #3: Get-Member ..5 
Key #4: Get-PSDrive .6 
PowerShell 2.0 Update 7 
Item 2: Understanding Output 8 
Output is Always a .NET Object 8 
Function Output Consists of Everything That Isn't Captured 9 
Other Types of Output That Can't Be Captured .. 11 
Item 3: Know What Objects Are Flowing Down the Pipeline  12 
Item 4: Output Cardinality - Scalars, Collections and Empty Sets - Oh My! .. 15 
Working with Scalars  15 
Working with Collections .. 16 
Working with Empty Sets .. 17 
Item 5: Use the Objects, Luke. Use the Objects!  19 
Item 6: Know Your Output Formatters . 22 
Item 7: Understanding PowerShell Parsing Modes  31 
Item 8: Understanding ByPropertyName Pipeline Bound Parameters  35 
Item 9: Understanding ByValue Pipeline Bound Parameters  38 
Item 10: Regular Expressions - One of the Power Tools in PowerShell .. 42 
PowerShell 2.0 Update  43 
Item 11: Comparing Arrays  43 
Item 12: Use Set-PSDebug -Strict In Your Scripts - Religiously . 45 
PowerShell 2.0 Update  47 
Item 13: Commenting Out Lines in a Script File .. 47 
PowerShell 2.0 Update  48

Monday, March 9, 2009

Blocking Users by IP

One of the things I like about MySQL is the built-in control over what hosts/IP addresses are allowed to connect into the server. This is granular down to the user (equivalent to SQL Server's login/server principal).

Unfortunately, SQL Server doesn't have the same capabilities with respect to specifying what IPs or hosts a login can come in from, at least nothing built-in that's as clear and simple as with MySQL. I'd like to see something similar to the way MySQL handles it. But until then, there is a way to do this using logon triggers which some folks have hit upon. If you're not familiar with logon triggers, they are similar to DDL triggers, except they fire on a logon event (such as when someone connects to SQL Server). They were quietly introduced in SQL Server 2005 SP2, and they give us the ability to rollback a connection, thereby effectively terminating it. If you're still supporting SQL Server 2000 or below servers, you'll have to use another means to control connections.

Friday, March 6, 2009

SQL Server Reporting Services Fast Guide

Microsoft integrated significant business intelligence reporting enhancements into SQL Server 2005, providing DBAs and company decision makers with all the data they need at their fingertips. This collection of resources will help you on your way to mastering Reporting Services (SSRS) for SQL Server 2005, with tips on proper SSRS installation, performance best practices and more. You'll also find details on what's new with Reporting Services in Microsoft's latest database management system – SQL Server 2008.

Row Level Versioning

The first time I heard the term Row Level Versioning in SQL Server 2005, I had mixed feelings about it. I was a bit confused and I had a pre conceived notion of what it was. When I read more about it I found out I was totally wrong. But I am a type of person who does not take the word of anyone when I can actually try to find out if it is true or not. We will first look at what is Row Level versioning. How it works and what are the advantages. After that, we will try to see if Row Level Version actually works like Microsoft claims.

Thursday, March 5, 2009

Introduction to SQL Server 2008 Report Builder 2.0

Problem
I have heard that there is a new version of Report Builder in SQL Server 2008.  Can you provide some details and examples?  What is new with Report Builder 2.0?  How does the new interface look?  What is the learning curve with this tool?

Solution

SQL Server 2008 includes a brand new version of the Report Builder which was first introduced in SQL Server 2005.  The key new features in Report Builder 2.0 are:

  • A completely new user interface that conforms to the Office 2007 look and feel
  • A local client install rather than a click-once application that you download and install from Report manager
  • Supports running reports locally or on the server
  • A Report Model is not required; you can create your own queries using a query designer, import queries from existing reports, or manually type in your queries
  • A Tablix report type which is a combination of the matrix and table reports

In this tip we will review installing Report Builder 2.0, the new user interface, developing a sample report, and deploying the report to a SQL Server 2008 report server.  I'll cover the new Tablix report in a future tip.

Wednesday, March 4, 2009

Importing and exporting bulk data with SQL Server's bcp utility

The Bulk Copy Program (bcp) utility in Microsoft SQL Server enables database administrators to import bulk data into a table or export it from a table into a file. It also supports several options that define how data will be exported, where it will be imported and which data will be loaded.

This tip discusses several examples of bcp commands to bulk-copy data in and out of SQL Server tables. The examples have been tested on SQL Server 2005 and SQL Server 2008, and for all examples I used the AdventureWorks sample database.

Perils of adding fields to database tables

Adding a field to a database table is sometimes not as simple as it may seem. If certain situations are not considered when adding fields, you may find yourself looking at some long nights fixing database code. Today, database consultant Tim Chapman looks at two such scenarios, and how you can plan for their occurrence.

Tuesday, March 3, 2009

New Infrastructure Planning and Design Guide: Microsoft SQL Server 2008

The Infrastructure Planning and Design team has released a new guide, Microsoft SQL Server 2008. When used in conjunction with product documentation, this guide will help companies confidently plan the implementation of a SQL Server 2008 infrastructure. Fundamental tasks are addressed to help identify which SQL Server roles will be needed as well as to determine the infrastructure's components, server placement, and the fault-tolerance configuration to meet necessary requirements.

iSCSI configuration in Hyper-V Server 2008 R2

iSCSIcli in Hyper-V Server 2008

In Hyper-V Server 2008 and Server Core Installations of Windows Server 2008 to connect to SAN storage you would use the iscsicli.exe tool. This is the command line equivalent of the iSCSI client configuration tool. This command line tool requires you to utilize your asterisk button a lot. (to accept default values)

iSCSIcpl in Hyper-V Server 2008 R2

To make this crucial step in your cluster setup progress a bit easier, Microsoft has included the graphical version of the iSCSI client configuration tool in Hyper-V Server 2008 R2 and Server Core installations of Windows Server 2008 R2. You no longer have to workiscsicli.exe magic to connect to your SAN; you can click your way through now! Of course, for die hard command line freaks and scripters of all sorts the iscsicli.exe command is still available!

http://blogs.dirteam.com/blogs/sanderberkouwer/archive/2009/02/26/iscsi-configuration-in-hyper-v-server-2008-r2.aspx

Virtual Machine Disk Options

A review of the virtual machine disk options that are available on Microsoft Windows Server 2008 Hyper-V.

In order to make virtual machine storage portable while also delivering performance, Microsoft developed the Virtual Hard Disk (VHD) Image Format Specification which includes details of how to read and modify data contained in a VHD file. Microsoft provides the VHD file format specification to third-party developers under a royalty-free license, and many vendors, including Citrix, have adopted and use the format for their virtualization products. If you are interested in obtaining more details on the VHD file format, you can download the specification file from the Microsoft website.

Microsoft Windows Server 2008 Hyper-V uses the VHD format to encapsulate virtual machine data (operating system, application, and data files) into one or more files that are equivalent to physical drives associated with a traditional server. Therefore, if you browse the virtual machine folders on a Hyper-V server, a virtual hard disk is simply stored as a file with a .vhd extension on an attached physical disk. Virtual machines connect to a virtual hard disk through a virtualized IDE or SCSI adapter, and Hyper-V provides the mapping between the virtual hard disk and the .vhd file on the physical disk. A VHD can be stored on any IDE, SCSI, iSCSI, SAN, or NAS storage system supported by the Windows Server 2008 operating system.

You can use the Hyper-V Manager MMC or the WMI API to create new virtual hard disks. A virtual machine running on Hyper-V can support a maximum of 260 virtual hard disks through a combination of 4 IDE and 256 SCSI-connected VHDs. The bus type (IDE or SCSI) used to attach a VHD to a virtual machine imposes a size limitation on virtual hard disks. Specifically, IDE-attached VHDs cannot exceed 127 GB, while SCSI-attached VHDs cannot exceed 2 TB.


HYPER-V CERTIFICATE EXPIRATION AND RESOLUTION

For those of you who’ve enabled the Hyper-V role in WS08. It has been determined that a certificate error can occur resulting in the inability to start or connect to virtual machines running on Windows Server 2008 or Microsoft Hyper-V Server 2008.  The Hyper-V virtualization host and the existing virtual machines will continue to operate without disruption.  A hotfix designed to prevent/resolve this error has been created and is available for download starting today.  The following is a brief description of the issue as well as a link to the KB Article that provides the resolution.  Even if you are not currently experiencing this issue, we recommend you download and install this update.
 
THIS APPLIES TO THE FOLLOWING:
  • Windows Server 2008, Standard (Hyper-V role enabled)
  • Windows Server 2008, Enterprise (Hyper-V role enabled)
  • Windows Server 2008, Datacenter (Hyper-V role enabled)
  • Microsoft Hyper-V Server 2008
 
SYMPTOMS AND RESOLUTION:
  • You may be unable to start or connect to virtual machines running on Windows Server 2008 or Microsoft Hyper-V Server 2008. This occurs when connecting using vmconnect. Connections made using remote desktop won't be affected.  
  • KB Article 967902 has been created that details the symptoms and resolution.  This KB article provides a direct link to download the quickfix to resolve this error.