Search This Blog

Friday, January 28, 2011

Restore SQL Database from MDF file

For ex., if you have northwind.mdf file, you can create a 
database with the following statement:
 
 
USE master
GO
CREATE DATABASE northwind
ON 
( NAME = northwind_dat,
   FILENAME = 'd:\Program Files\Microsoft SQL Server\Data\northwind.mdf',
   SIZE = 10,
   MAXSIZE = 50,
   FILEGROWTH = 5 )
LOG ON
( NAME = northwind_log,
   FILENAME = 'd:\Program Files\Microsoft SQL Server\Data\northwind.ldf',
   SIZE = 5MB,
   MAXSIZE = 25MB,
   FILEGROWTH = 5MB )
GO

Restoring SQL Server databases from .mdf files

Method One

@ Reinstall SQL Server and create a database with the same physical file name as the .mdf file that you have. For example, if you have northwind.mdf file, create a database with the following statement:
USE master
GO
CREATE DATABASE northwind
ON 
( NAME = northwind_dat,
   FILENAME = 'd:Program FilesMicrosoft SQL ServerDatanorthwind.mdf',
   SIZE = 10,
   MAXSIZE = 50,
   FILEGROWTH = 5 )
LOG ON
( NAME = northwind_log,
   FILENAME = 'd:Program FilesMicrosoft SQL ServerDatanorthwind.ldf',
   SIZE = 5MB,
   MAXSIZE = 25MB,
   FILEGROWTH = 5MB )
GO
After ensuring that database was successfully created, stop your SQL Server service. Copy the .mdf file you have from the current directory to the SQL Server data directory. When asked whether you wish to overwrite the existing file, choose "yes." Now, start your SQL Server again. SQL Server will recover all the data and schema you had in the original database.

Method Two

This method is used when you don't want to stop and restart SQL Server. WARNING: be extremely careful when running the following code. Updating system tables with incorrect values might cause your server to crash!
Copy your .mdf file and paste it to SQL Server data directory. Next, configure your server to allow changes to the system tables. This can be accomplished by running the following code in the Query Analyzer:
sp_configure 'allow_updates', '1'
RECONFIGURE WITH OVERRIDE
Now, add an entry for your database to the sysdatabases system table in the master database. First, a quick lesson about sysdatabases table is in order. This system table tracks all user-defined and system databases that reside on the server. The columns that you should be concerned with are described in the following table:
COLUMN NAME MEANING
Name Database name
Dbid Internal identifier for each database
Sid Security id for the database - hexadecimal value
Mode Used internally - do not set this value to anything other than 0
Status Status bits that inform SQL Server of the database configuration options. Some of these options can be set using sp_dboption system stored procedure.
Status2 Additional status information, also in bit format
Reserved Reserved for future use. Contains '1/1/1900' for all databases except model.
Crdate The date the database was created
Category Bitmap of the replication option used with the database
Cmptlevel The database compatibility level; with SQL Server 2000, this could be 65, 70 or 80
Filename The physical path to where the file is stored
The following code snippet shows you the statement that can be used to populate the sysdatabases table with an entry for the new database:
INSERT master..sysdatabases (name, dbid, sid, mode, status, status2, 
       crdate, reserved, category, cmptlevel, filename)
VALUES ('northwind', 10, 0x01, 0, 24, 1090519040, getdate(), '1/1/1900', 
        0, 80, 'd:Program FilesMicrosoft SQL ServerDatanorthwind.mdf')
Of course, if dbid of 10 is already taken, please choose another available identifier. You should examine sysdatabases table before adding any records to it. Now, reset your server to disallow updates to system tables:
sp_configure 'allow_updates', '0'
RECONFIGURE
Your database is now ready to be used. Again, please be extremely careful while making changes to sysdatabases system table (or any other system table for that matter). Inexperienced SQL Server users should use Method One.

Cyber Crime Investigators Field Guide for Winmobile Pocket PC

Computer crime field guide with tools investigators use, how to use them, and which procedures to follow.
Long gone are the days when a computer took up an entire room. Now we have computers at home, laptops that travel just about anywhere, and data networks that allow us to transmit information from virtually any location through the Internet in a timely and efficient manner. What have these advancements brought us? Another arena for criminal activities, including identity theft, spam emails and computer viruses. If someone wants to focus and target something, more than likely they will obtain what they want. We shouldn't expect it to be any different in cyberspace.
Designed as a field guide for law-enforcement, the Cyber Crime Investigator's Field Guide describes how to investigate a computer crime from beginning to end, covering everything from what to do upon arrival at the scene until the investigation is complete, including chain of evidence.
The product includes:
  • tools investigators use
  • how to use those tools
  • which procedures to follow
Topics include:
  • questions to ask the client
  • evidence collection procedures
  • password cracking
  • key Unix/Linux commands
  • a glossary of commonly used terms
  • Cisco firewall data and commands
  • attack signatures
  • a port number reference
  • other items to aid the field investigator in efficiently handling computer security incidents
Cyber Crime Investigator's Field Guide provides the investigative framework, a knowledge of how cyberspace really works, and the tools to investigate cyber crime...tools that tell you the who, where, what, when, why, and how.

10 Best Security Live CD Distros (Pen-Test, Forensics & Recovery)

1. BackTrack
The newest contender on the block of course is BackTrack, which we have spoken about previously. An innovative merge between WHax and Auditor (WHax formely WHoppix).
BackTrack is the result of the merging of two Innovative Penetration Testing live Linux distributions Whax and Auditor, combining the best features from both distributions, and paying special attention to small details, this is probably the best version of either distributions to ever come out.
Based on SLAX (Slackware), BackTrack provides user modularity. This means the distribution can be easily customised by the user to include personal scripts, additional tools, customised kernels, etc.
Get BackTrack Here.
2. Operator
Operator is a very fully featured LiveCD totally oriented around network security (with open source tools of course).
Operator is a complete Linux (Debian) distribution that runs from a single bootable CD and runs entirely in RAM. The Operator contains an extensive set of Open Source network security tools that can be used for monitoring and discovering networks. This virtually can turn any PC into a network security pen-testing device without having to install any software. Operator also contains a set of computer forensic and data recovery tools that can be used to assist you in data retrieval on the local system.
Get Operator Here
3. PHLAK
PHLAK or [P]rofessional [H]acker’s [L]inux [A]ssault [K]it is a modular live security Linux distribution (a.k.a LiveCD). PHLAK comes with two light gui’s (fluxbox and XFCE4), many security tools, and a spiral notebook full of security documentation. PHLAK is a derivative of Morphix, created by Alex de Landgraaf.
Mainly based around Penetration Testing, PHLAK is a must have for any pro hacker/pen-tester.
Get PHLAK Here (You can find a PHLAK Mirror Here as the page often seems be down).
4. Auditor
Auditor although now underway merging with WHax is still an excellent choice.
The Auditor security collection is a Live-System based on KNOPPIX. With no installation whatsoever, the analysis platform is started directly from the CD-Rom and is fully accessible within minutes. Independent of the hardware in use, the Auditor security collection offers a standardised working environment, so that the build-up of know-how and remote support is made easier.
Get Auditor Here
5. L.A.S Linux
L.A.S Linux or Local Area Security has been around quite some time aswell, although development has been a bit slow lately it’s still a useful CD to have. It has always aimed to fit on a MiniCD (180MB).
Local Area Security Linux is a ‘Live CD’ distribution with a strong emphasis on security tools and small footprint. We currently have 2 different versions of L.A.S. to fit two specific needs – MAIN and SECSERV. This project is released under the terms of GPL.
Get L.A.S Linux Here
6. Knoppix-STD
Horrible name I know! But it’s not a sexually trasmitted disease, trust me.
STD is a Linux-based Security Tool. Actually, it is a collection of hundreds if not thousands of open source security tools. It’s a Live Linux Distro, which means it runs from a bootable CD in memory without changing the native operating system of the host computer. Its sole purpose in life is to put as many security tools at your disposal with as slick an interface as it can.
Get Knoppix-STD Here 
7. Helix
Helix is more on the forensics and incident response side than the networking or pen-testing side. Still a very useful tool to carry.
Helix is a customized distribution of the Knoppix Live Linux CD. Helix is more than just a bootable live CD. You can still boot into a customized Linux environment that includes customized linux kernels, excellent hardware detection and many applications dedicated to Incident Response and Forensics.
Get Helix Here
8. F.I.R.E
A little out of date, but still considered the strongest bootable forensics solution (of the open-source kind). Also has a few pen-testing tools on it.
FIRE is a portable bootable cdrom based distribution with the goal of providing an immediate environment to perform forensic analysis, incident response, data recovery, virus scanning and vulnerability assessment.
Get F.I.R.E Here
9. nUbuntu
nUbuntu or Network Ubuntu is fairly much a newcomer in the LiveCD arena as Ubuntu, on which it is based, is pretty new itself.
The main goal of nUbuntu is to create a distribution which is derived from the Ubuntu distribution, and add packages related to security testing, and remove unneeded packages, such as Gnome, Openoffice.org, and Evolution. nUbuntu is the result of an idea two people had to create a new distribution for the learning experience.
Get nUbuntu Here
10. INSERT Rescue Security Toolkit
A strong all around contender with no particular focus on any area (has network analysis, disaster recovery, antivirus, forensics and so-on).
INSERT is a complete, bootable linux system. It comes with a graphical user interface running the fluxbox window manager while still being sufficiently small to fit on a credit card-sized CD-ROM.
The current version is based on Linux kernel 2.6.12.5 and Knoppix 4.0.2
Get INSERT Here
Extra – Knoppix
Remember this is the innovator and pretty much the basis of all these other distros, so check it out and keep a copy on you at all times!
Not strictly a security distro, but definately the most streamlined and smooth LiveCD distribution. The new version (soon to be released – Knoppix 5) has seamless NTFS writing enabled with libntfs+fuse.
KNOPPIX is a bootable CD or DVD with a collection of GNU/Linux software, automatic hardware detection, and support for many graphics cards, sound cards, SCSI and USB devices and other peripherals. KNOPPIX can be used as a productive Linux desktop, educational CD, rescue system, or adapted and used as a platform for commercial software product demos. It is not necessary to install anything on a hard disk.
Get Knoppix Here
Other Useful Resources:
SecurityDistros
FrozenTech LiveCD List
DistroWatch
Others to consider (Out of date or very new):
SlackPen
ThePacketMaster
Trinux
WarLinux
Network Security Toolkit
BrutalWare
KCPentrix
Plan-B
PENToo

Sunday, January 23, 2011

Toll Free Number for Cyber Crime



Agape India, a computer and mobile forensics specialist, plans to launch a special toll-free number to enable instant reporting of cyber crimes and mobile offences. The service will be activated on the 17th of this month.

Sufferers of cyber crimes such as online fraud, phishing, or even threat mails, and those affected by mobile related offences like unsolicited calls or pornographic MMS, can now call 1800 209 6789 and seek professional and individual assistance for free.

Agape has also launched the National Institute of e-Forensic (NIEF) in Mumbai. The purpose of this institute is to provide specialized computer and mobile forensic training programs to meet the growing demand of law enforcement agencies, corporates, individuals, and government bodies.

NIEF has set up 2 special e-Forensics training labs, while 3 more are expected to be set up in a year's time.

According to CERT IN (Indian Computer Emergency Response Team), hackers have become more active in India this year, breaking into over 2340 websites up to the end of May, as against 5200 in the entire year of 2006.

Sachin Pandey, CEO of NIEF observed, "With the growing market of PDAs and mobiles, related crimes in this sector have also witnessed an increase. Computer misuse has become so common that detection and effective monitoring of electronic activity as part of a solid computer usage and monitoring policy, should now be a cornerstone of any IT or personnel policy of the company."

The company said, NIEF will train students to combat various types of cyber crimes namely, credit card scams, e-mail related crimes like spoofing/ bombing, threat, defamation, fraud; and even phishing, software piracy, SMS hacking, cloning of mobiles, etc.

According to NIEF, the technology to combat these issues is present in the country, but there are very few people who are skilled to bring the existing technology in use.

Therefore, NIEF is offering a 1-year advanced course for imparting training in e-forensics. The cost of this course will approximately be Rs. 2.5 lakh; while short term courses will cost upwards of Rs. 15,000.

Presently, the institute has 6 trained cyber crime experts who will train the students at their Mumbai institute, but 3 more institutes have been planned to commence operation in the nation's metropolitans by the end of this financial year.

NIEF also has a mobile forensic lab that will travel across the length and breadth of India to educate the masses on cyber crime and make them aware of mobile malpractices.

Tuesday, January 18, 2011

Pinguy OS: Out-of-the-box Linux Operating System for Everyone



Pinguy OS an out-of-the-box working Linux operating system for everyone, not just geeks.
This OS is for people that have never used Linux before or for people that just want an out-of-the-box working OS without doing all the tweaks and enhancements that everyone seems to do when installing a fresh copy of Ubuntu or other Linux based Distro's.
Pinguy OS is an optimized build of Ubuntu 10.10 Minimal CD with added repositories, tweaks and enhancements that can run as a Live DVD or be installed. It has all the added packages needed for video, music and web content e.g. flash and java, plus a few fixes as well. Like fixing the wireless problems, gwibber’s Facebook problem and flash videos in full-screen.
Nautilus has been replaced for Elementary-Nautilus with added plug-ins so it can get music and video art from the web. The default theme is Elementary using ttf-droid font with Docky and a custom Conky.

It also has DVB support to Totem for anyone with a TV card that wants to watch tv on their PC but doesn't want to install a dedicated program like myth-tv.
All the programs in Pinguy OS have been chosen because of their ease of use and functionality, Every file type have also been changed to open with the right program, like for some reason by default .iso are opened with Archive Manager so it has been changed that to Brasero Disc Burner.
Download Link

Google Android Hidden Secret Codes

  • Fast Boot mode 
  • Download mode
  • Recovery mode
WARNING: All these modes are used to flash/reset phone firmware. Think twice before entering in these modes.
Fast Boot Mode
This mode is used to flash the phone firmware using command line tools. To access this mode:
  • Power off your phone.
  • Press and hold Call and End Call/Power keys.
Download Mode
This mode is also used to flash the phone firmware. Mostly this mode is used by GUI tools for easier and quicker flashing. To access this mode:
  • Power off your phone.
  • Press and hold Volume Down, OK and End Call/Power keys.
Recovery Mode
This mode is used for recovery purposes like to reset the phone firmware. To access this mode:
  • Power off your phone.
  • Press and hold Volume Down, Call and End Call/Power keys.
Once the alert triangle is shown on screen, press "Menu" key to reset the firmware or press "Home" and "End Call/Power" keys to show recovery menu.