10 Best Free Web Application Frameworks

Posted by Unknown Minggu, 27 Mei 2012 0 komentar
http://www.linuxlinks.com/article/20120525000054705/ApplicationFrameworks.html


A web application framework is a type of software framework that supports the development of dynamic websites, web services, and web applications. The purpose of this type of framework is to enable developers to build web applications and focus on the interesting stuff, alleviating the repetitive overhead associated with common Web development patterns. The types of core functionality common to most web application frameworks include templating systems, user session management, common interfaces to disk or database storage of cached content, and data persistence. Typically, web application frameworks also promote reusability and pluggability of components, as well as promoting code reuse, and libraries for database access.
The best application frameworks are particularly good at organising large projects, yet at the same time trying to stay out of the way, and not impose themselves on the project.
The most well-known overall design pattern of web application frameworks is the Model-View-Controller (MVC) architecture. A model is an object representing data or even activity, such as a database table. A view is some type of visualization of the state of the model, and a controller offers facilities to change the state of the model.
There is a wide range of web application frameworks available for Linux that are released under an open source license. To provide an insight into the software that is available, we have compiled a list of 10 high quality web application frameworks. We have selected frameworks that cover a number of programming languages including Ruby, PHP, and Python.
Now, let's explore the 10 web application frameworks at hand. For each title we have compiled its own portal page, a full description with an in-depth analysis of its features, together with links to relevant resources and reviews.
Web Application Frameworks
Ruby on Rails MVC ruby based framework geared for web application development
CodeIgniter Powerful PHP framework with a very small footprint
Django Python framework which encourages rapid development and clean design
CakePHP MVC rapid application development framework for PHP
Zend Framework Simple, straightforward, open-source software framework for PHP 5
Yii High-performance component-based PHP framework
Pylons Python web framework emphasizing flexibility and rapid development
Catalyst Elegant MVC Web Application Framework
Symfony Full-stack framework
TurboGears Next generation TurboGears built on Pylons

Baca Selengkapnya ....

fail2ban Intrusion Prevention Framework

Posted by Unknown 0 komentar
http://www.linuxpromagazine.com/Online/Features/fail2ban-Intrusion-Prevention-Framework


For its size, fail2ban, a utility that scans logfiles and bans suspicious IP addresses, punches well above its weight.
I dare say that only a few sys admins haven’t heard of fail2ban – maybe those starting out or those who have focused on different areas. In my experience, it’s quite rare that really small utilities can affect the way you run your servers to the extent that fail2ban has. It certainly explains its popularity.
fail2ban is a feather-weight set of scripts that can easily integrate with popular firewalls and, amongst many other things, catch any failed logins for services that you’re running and then ban the IP address after a certain number of failed attempts. Admittedly that sounds like quite simple functionality, but when you get down to the innards of the software, it’s a truly powerful tool.
I had been using fail2ban on SSH login failures, probably it’s most common usage, before I became increasingly annoyed with web server logs filling up with nefarious probes attempting to compromise PHP with remote exploits (and a myriad of other HTTP attacks). It got to the point at which a large proportion of the Apache logs were failed attempts to find hidden directories or non-existent Joomla installations among the legitimate hits on the websites.
I also ran a few mail servers that allowed mail relaying via SASL password authentication, which (and there are other ways of running the authentication side) had system user accounts with PAM checking for correct passwords. I had set the SASL user accounts so that a shell login couldn’t be used to access the server, but I was still more than aware than having a piece of software so readily open to abuse by brute force was far from ideal. So, fail2ban stepped forward yet again; I could simply ban any IP that entered the wrong password three times for as long as I wanted.
From the scenarios above, I hope you will agree that fail2ban can be applied in all sorts of ways. To give you a head start in this article, I’ll offer some examples, ranging from those straight out of the documentation to those that were hard won. (Those of you who speak regular expressions, or regex, as your second language would have found them easy, I’m sure, but I prefer a cogent language that doesn’t involve an aching head coupled with eye strain!)
It Must Be Magic
Rather than the smoke and mirrors that some pieces of software employ to keep their workings secret, fail2ban is transparent in the work it does behind the scenes.
In simple terms fail2ban keeps a close eye on your logfiles, and when a specific pattern is matched within those logs, it triggers an action that you’ve predefined within its “action” config files. The distinction between its filters and actions in the directory structure is clear once you’ve installed it.
Script Kiddies and Port 22
As I mentioned, the most popular usage of fail2ban is stopping probes that try every username ever conceived by mankind on your poor SSH server on port 22. Not only is it a logging irritation, but it is highly insecure, allowing people limitless tries at guessing your username and password combinations. Now is not the time to detail how to secure your SSH server, but for goodness sake, move it to a port other than port 22, and unless you’ve got a really, really good reason, then permit access by IP address with TCP Wrappers. Either way, you should consider banning failed logins for a short time in case a poor configuration mistake gives miscreants access inadvertently.
By my reckoning, for user-accessible services on a server, any user who gets a password wrong more than three times is going to need a new password (from a Support Department most likely), so I’d prefer not to allow nefarious types to keep trying repeatedly until they give up. Bear in mind that some scripts attack a port several times a second, so in a minute, they could have just about exhausted all popular logins beginning with the first letter of the alphabet!
Figure 1: An example from the fail2ban site of how a standard SSH logfile might look and what to look for when it reports failed login attempts.
Figure 1 shows an SSH logfile example of failed logins. All you have to do (and please bear in mind my comments about eye-strain and regex earlier) is create a regular expression to catch those failed login attempts so you can trigger a response when they’re spotted in the logs.
Thankfully, a few useful examples are already available post-installation, with a couple of handy tags to save you from figuring out other ways of spotting patterns – one such tag being . If you’re sitting comfortably, the pattern below matches an SSH login attempt failure which, on a Debian box, lives in the /etc/fail2ban/filter.d/sshd.conf file. Don’t worry this first example isn’t too trying. The two salient lines in the config file are as follows:
failregex = ^%(__prefix_line)sFailed (?:password|publickey) for .* from (?: port \d*)?(?: ssh\d*)?$
ignoreregex =
By comparing that regex with the logfile in Figure 1, I hope you get the gist of how it pieces together. As I said, don’t be too perturbed by the regex complexity; thankfully, several solid examples are included at installation time.
Fortunately, fail2ban is flexible – not just in the services it can monitor but also across different operating systems, all of which have many versions themselves. So, understanding your potential regex pain, the developers, even in the standard SSH config file, have included a number of failregex examples, which should match your system’s logfile format. The examples shown below are originally commented out in the config file, ready for you to choose one entry to copy and paste in place of the uncommented line:
failregex = ^%(__prefix_line)s(?:error: PAM: )?Authentication failure for .* from \s*$
^%(__prefix_line)s(?:error: PAM: )?User not known to the underlying authentication module for .* from\s*$
^%(__prefix_line)sFailed (?:password|publickey) for .* from (?: port \d*)?(?: ssh\d*)?$
^%(__prefix_line)sROOT LOGIN REFUSED.* FROM \s*$
^%(__prefix_line)s[iI](?:llegal|nvalid) user .* from \s*$
^%(__prefix_line)sUser .+ from not allowed because not listed in AllowUsers$
^%(__prefix_line)sauthentication failure; logname=\S* uid=\S* euid=\S* tty=\S* ruser=\S* rhost=(?:\s+user=.*)?\s*$
^%(__prefix_line)srefused connect from \S+ \(\)\s*$
^%(__prefix_line)sAddress .* POSSIBLE BREAK-IN ATTEMPT!*\s*$
^%(__prefix_line)sUser .+ from not allowed because none of user’s groups are listed in AllowGroups\s*$
I still need to explain the ignoreregex line in the first example. I hope it’s clear, though, what the setting in that line, again written in hieroglyphics (sorry regex), would produce: an IP address or hostname match that should NOT trigger an action if it’s spotted within that failregex pattern in the logfiles. I’ll give you some ignoreregex examples a little later.
SASL
I briefly touched on SASL and mail server password authentication earlier, as well as my concerns about opening up a username and password combination from /etc/shadow to the Internet as a serious hole for abuse. To allay my fears, a simple fail2ban instance is now configured to catch bad logins in a highly efficient manner.
Here is the failregex line for SASL login attempts from the config file /etc/fail2ban/filter.d/sasl.conf:
failregex = (?i): warning: [-._\w]+\[\]: SASL (?:LOGIN|PLAIN|(?:CRAM|DIGEST)-MD5) authentication failed: authentication failure
A quick hunt through my /var/log/mail.log files reveals:
Dec 20 22:59:16 Ganymede postfix/smtpd[26681]: warning: a-not-so-innocent.ip-has-been-disguised.com[20.666.92.40]: SASL LOGIN authentication failed: authentication failure
If you squint long enough at the failregex and the mail server log format (Postfix, in this case), you can see that they should probably tie in with each other. After some testing, you should be confident that they do.
Lay of the Land
Now I’ll look a bit closer at how the config files are laid out in fail2ban’s directory structure. The above configuration files live in the filter.d/ directory. A quick ls shows a lot of out-of-the-box fail2ban filter examples. A quick warning: if they don’t fit your operating system perfectly, you might be using the search engines for a while, unless you have a diploma in regex. For many scenarios, though, the main site http://www.fail2ban.org has how-tos, as well as the bundled examples:
apache-404.conf      apache-nohome.conf     courierlogin.conf   pam-generic.conf    pure-ftpd.conf       sieve.conf           vsftpd.conf
apache-auth.conf apache-noscript.conf couriersmtp.conf gssftpd.conf php-url-fopen.conf qmail.conf sshd.conf webmin-auth.conf
apache-badbots.conf apache-overflows.conf cyrus-imap.conf lighttpd-fastcgi.conf postfix.conf sasl.conf sshd.conf.dpkg-dist wuftpd.conf
apache-misc.conf common.conf exim.conf named-refused.conf proftpd.conf sasl.conf.dpkg-dist sshd-ddos.conf xinetd-fail.conf
As you can see, a multitude of examples are ready to go, including a few Apache config files.
The main configuration file is called jail.conf, and it’s commented with lots of helpful instructions. The ignoreip setting can take CIDR IP address formats or just single IP addresses, so the Admin doesn’t get locked out accidentally; also, that’s really handy for testing. Additionally, a default setting that applies to all jails (a brief set of rules about a particular service) that don’t have the ignoreip setting explicitly configured is:
bantime  = 1
maxretry = 3
Here, it’s referring to how many opportunities a visitor has to trigger the filter; in this case, it’s set really tight and is probably impractical for most services for which users occasionally make mistakes.
The next setting is which back-end daemon to use for polling the logfiles. In Debian’s case, I set it to gamin, which is great at checking files like mailboxes and logfiles really frequently without putting system load up.
Finally, the actions.d directory contains what actions to take and with which firewall. In the jail.conf file, other than the level of action required, to all intents and purposes, the remainder of the file is filled with a short config for each service (a jail), switched on or off with true or false. Here’s the entry for SASL:
[sasl]

enabled = true
port = smtp
filter = sasl
logpath = /var/log/mail.log
Aside from inheriting the bantime and maxretry default setting from above, all you have to think about now is the action setting in jail.conf, which is relatively straightforward. Also, you can calm fail2ban’s reaction to a trigger; however, I prefer all guns blazing, with all the offending log entries and a whois lookup of the banned IP address mailed to me:
# ban the IP & send an e-mail with whois report and include relevant log lines to the destemail
action_mwl = %(banaction)s[name=%(__name__)s, port="%(port)s", protocol="%(protocol)s]
%(mta)s-whois-lines[name=%(__name__)s, dest="%(destemail)s", logpath=%(logpath)s]
Lights, Camera, Action
Now that we know what to send and when to send it, we simply need to know how to ban the offending IP address. I’ll use the most popular iptables, the kernel’s Netfilter firewall. The file /etc/fail2ban/action.d/iptables-multiport.conf has these key config lines present:
Actionban: actionban = iptables -I fail2ban- 1 -s  -j DROP

Actionunban: actionunban = iptables -D fail2ban- -s -j DROP
To anyone familiar with iptables, the commonplace switches -I for INSERT and -D for DELETE for the ban and unban settings should be pretty clear. These are editable, as you’d expect if you want to log further to manipulate iptables in some other way.
Apache
Several configurations are already in place for Apache, in-hand with the mail POP3/IMAP and FTP services, but I needed a mishmash of the examples, and admittedly it took me ages to get the regex correct.
I had a very specific requirement that I knew no pages were missing on the websites on the web server (which might generate HTTP status response 404s), but I also needed to ignore explicitly some files and directories.
Any other traffic to the web server that I did not specifically allow could therefore be banned if it attempted to access files that didn’t exist or probe other parts of the server looking for PHP exploits, for example. Inside my filter.d/ directory, I created a filter called apache-misc. I’ve shortened the example a little so it’s readable, but the first line of the failregex after the [A-Z] part effectively drops any request to Apache that doesn’t include a forward slash. You might be surprised that pretty much everything legitimate should.
After the slash and inside the brackets are entries for what requests I want banned. The next line down (which is still part of the same failregex) beginning with looks for matches, including the ever-common 404 errors. Finally the ignoreregex works beautifully, giving some leeway when it’s needed.
[Definition

failregex = .*"[A-Z]* /(cms|user|muieblackcat|db|cpcommerce|wp-login|joomla|awstatstotals|wp-content|wp-includes|pma|phpmyadmin|myadmin|mysql|mysqladmin|sqladmin|mypma|admin|xampp|mysqldb|pmadb|phpmyadmin1|phpmyadmin2).*"
.*\" (502|500|417|416|415|414|413|412|404|405|403|401|400)

ignoreregex = .*\"GET \/(press|mailto|domestic|word).*
The result of applying this filter to Apache is, whereas formerly I might have had a hundred attempts per IP probing the server, now I only have three entries in the logs (which all happened in the first second before gamin read the logfile and added the iptables rule). I’m delighted with the lack of unwanted logfile noise, and my web servers are safer! If the config is too strict for you, try and remove the 404 entry from the second failregex line and up the bantime and maxretry numbers to see how you get on.
I’ve barely scratched the surface of this topic here, but I hope it will inspire you to look further into how fail2ban can help secure your servers. After you’ve installed it, have a look at how many IP addresses are “already banned” in the fail2ban logfile, /var/log/fail2ban.log, and see how many attempts you’ve successfully blocked in a day. With its level of reporting and the inherently efficient and controllable configuration, to my mind, it’s a knockout piece of software that should help out any sys admin greatly.

Baca Selengkapnya ....

How To Configure Apache To Use Radius For Two-Factor Authentication On Ubuntu 12.04

Posted by Unknown Jumat, 25 Mei 2012 0 komentar
http://www.howtoforge.com/how-to-configure-apache-to-use-radius-for-two-factor-authentication-on-ubuntu-12.04


It is also recommended that you consider using mutual https authentication for web applications that are worthy of two-factor authentication. Strong mutual authentication means that the targeted website is authenticated to the user in some cryptographically secure manner, thwarting most man-in-the-middle attacks.
The WiKID open-source software token performs mutual authentication by retrieving a hash of the website's SSL certificate from the WiKID server and comparing a hash of the downloaded SSL certificate. If the two match, the token will launch the default browser to the target site for the user. If they don't match an error will be displayed, much like SSH. To configure mutual authentication for web applications, see this tutorial.
Our configuration was as follows:
Here's how it will work, when the user clicks on a two-factor protected link, they will be prompted for a username and password. The user generates the one-time passcode on their WiKID token and enters it into the password prompt. Apache will route the username and one-time password to the WiKID server via mod_auth_radius. If the username and one-time password match what WiKID expects, the server will tell Apache to grant access. First, we add Apache to the WiKID Strong Authentication Server as a network client, then add radius to Apache. I assume you already have a WiKID domain and users setup.
So, start by adding a new Radius network client to the WiKID server for your web server:
  • Log into WiKID server web interface (http://yourwikidserver/WiKIDAdmin).
  • Select Network Clients tab.
  • Click on Create New Network Client.
  • Fill in the requested information.
    • For the IP Address, use the web server IP address.
    • For Protocol, select Radius.
    • Hit the Add button, and on the next page, enter a shared secret.
    • Do not enter anything into the Return Attribute box.
  • From the terminal or via ssh, run 'stop' and then 'start' to load the network client into the built-in WiKID radius server.
That is it for the WiKID server.
Now to get Apache ready for two-factor authentication. I started from a fresh Ubuntu 12.04 install so I had to install both apache and mod_auth_radius.
$ sudo apt-get install apache2 libapache2-mod-auth-radius
Ubuntu now has Apache's configuration files separated by virtual hosts.  For this example, I edited /etc/apache2/sites-available/default.
Create a directory that will be protected by two-factor authentication. In this case, /secure. Enter this into your sites-available/default:

AddRadiusAuth 10.100.0.109:1812 apache_secret 5:3
AddRadiusCookieValid 5


AuthType Basic
AuthName "WiKID two-factor authentication for default site"
AuthBasicProvider radius
AuthRadiusCookieValid 5
AuthRadiusActive On
require valid-user
Note radius_auth_module.  To validate that the module is loaded use this command:
 sudo apachectl -M | grep radius
You will want to change wikid_server_address to the IP address of the WiKID server and wikidserver_shared_secret to the shared secret you configured above in the WiKID server. Note that the the AddRadiusAuth line ends with 5 and not 5:3. The 3 in the later setting is for the number of times to attempt a password use. For one-time passwords, we only want them tried once, therefore we leave it empty. The 5 is for a 5 second time out. The AuthRadiusCookieValid directive is set for 60 minutes.
That should be all you need. You can use a .htaccess file, but that is frowned upon. The Location method is deemed more secure.

Links


Related Tutorials


Baca Selengkapnya ....

Remote Desktop Options for Linux

Posted by Unknown 0 komentar
http://www.datamation.com/open-source/remote-desktop-options-for-linux-1.html


Ask any long-term Linux enthusiast, and they'll be the first to tell you there isn't much you can do with another operating system that you can’t do with Linux. Oh sure, there are always going to be those legacy applications that some may people depend on. For the most part though, everything you need is readily accessible with today's modern Linux distros.
One of my favorite examples of desktop Linux readiness is the various options available to control a computer remotely. Despite what newer Linux users might think, there are indeed a number of open source and closed source options available for remote PC access. In this article, I'll be exploring the best of both options from each sector of software licensing.
Vinagre (VNC based): My go-to application for running local VNC based connections tends to be Vinagre. It's simple and it provides a very consistent experience on the GNOME desktop. Some of the best features of using Vinagre include the following.
  • Connect to multiple PCs at once. If you're bouncing between computers, this is can be very helpful.
  • Vinagre remembers your last connection(s). Forget about looking up the last machine you connected to, let Vinagre do it for you.
  • Browsing for PCs made easy thanks to the network discovery options.
  • GNOME keyring compatible; no more entering your password each and every time.
  • Accepts reverse connections. This is helpful when offering remote support on your LAN or when you're behind a firewall.
  • With SSH setup ready to go, you can also use a terminal window to run Vinagre with SSH.
For the complete article read it at http://www.datamation.com/open-source/remote-desktop-options-for-linux-1.html

Baca Selengkapnya ....

OpenVAS – Open Source Vulnerability Scanner

Posted by Unknown Rabu, 23 Mei 2012 0 komentar
http://linuxaria.com/recensioni/openvas-open-source-vulnerability-scanner?lang=en


I thank Maurizio Pagani for allowing me to publish and translate his interesting presentation, published on http://babel.it.
OpenVAS is a framework that includes services and tools for scanning and the complete managment of vulnerability.
A vulnerability scanner is a tool that allows you to scan a target system (IP/HOSTNAME) based on a range of ports and a set of policies. The tool is supported by a database that is used from the vulnerability scanner to analyze possible problems whenever you find a listening service. The tool that scans receives daily updates from the database Network Vulnerability Tests “NVTs”.



The following illustration shows the logical architecture of the OpenVAS framework:
openvas1
We explain briefly the different components:
OpenVAS CLI: is a set of tools that allow administration of OpenVAS through the shell. This allows you to perform scanning, manage and create reports of various VA made​​.
Greenbone Security Assistant: is a web-based tool with an intuitive interface from which you can do the reporting/scan, manage and monitor the scanning profiles of various VA that you are making.
Greenbone Desktop Security: Like OpenVAS CLI, and Greenbone Security Assistant, is the tool that allows us to manage everything through the GUI interface on the desktop.
OpenVAS Scanner: is the component that allows us the scan of hostname/ip, port range “from-to” or entire networks such as “192.168.1.0/28″. Scanning can be initiated at various levels. By default OpenVAS has four scanning options:
  • Full and fast - Exploits the majority of NVT’s. And is optimized through the use of information previously collected.
  • Full and fast completed - Exploits the majority of NVT’s, between them there are some that may cause a shutdown of the service/remote system. This profile is optimized by the use of information previously collected.
  • Full and very deep - Exploits most of NVT’s but is slower because it doesn’t uses the information previously collected.
  • Full and very deep ultimate - Exploits the majority of NVT’s, between them there are some that may cause a shutdown of the service/remote system. This profile is slower because it doesn’t uses the information previously collected.


OpenVAS Manager: is the heart of OpenVAS, the manager receives task/information from the OpenVAS Administrator and the various administration tools CLI/WEB/GUI, then use the OpenVAS Scanner that will perform the Vulnerability Assessment. Also includes component that processes the results of the scans, so it also generates the final report.
OpenVAS Administrator: is the component through which users can manage and the feed (ie the updates).
NVT’s: it is the container of feed, ie test cases that detect the vulnerabilities, which are currently over 20,000.
Results, config: is the database (PostgreSQL) where reports are collected and where the entire configuration of OpenVAS is stored.

Administration

Now we see how to scan using the management tools included in OpenVAS. The system that i’m using in this examples s installed on a local virtual machine on which the OpenVASis already installed. First of all if you have already installed OpenVAS run this command to verify that everything is
ok:
openvas2
In this screenshot the steps are only 4 but in reality it will proceed with the verification in 9 step.
Now we enter in the graphical web browser and as url we type http://YOUR-IP:9392
After logging just go in the Configuration and click on “New Target”.
openvas3
The example in the screenshot shows how to insert a new target on which to run a Vulnerability Assessment. Click on “Create Target” and then “New Task”:
openvas4
The task requires the inclusion of a “Name”, the scan type (in this case, Full and Fast) and finally the target to scan. Create your own Task and go the Tasks Window :
openvas5
Here is the list of targets on which perform a Vulnerability Assessment. Now click on the green icon on the left to start the scan on that target, according to the type of scan that you chose to do, the time to complete the Assesment can vary greatly.
Once finished it will give you as report like this one:
openvas6
Fortunately the “Win 7″ in the example does not have vulnerabilities because all services are closed, as you can see there is “localhost” or the linux hosting OpenVAS that is “High”, open this scan and analyze the report:
openvas7
The screenshot does not show all the reports but simply serves to provide a preview on the output that OpenVAS generates when it finish a scan.
In the upper part of the report you have a summary of the vulnerability classes divided into “High/Medium/Low”:
openvas8
In the bottom right under “Downloads” there is an useful option to download the OpenVAS report in various formats for example PDF. The report includes an index created inside it, so it’s easy to find the vulnerability without having to read the whole document that usually is composed by numerous pages.
openvas9
That is the screenshot of the PDF generated by OpenVAS.
NOTES:
The database is postgresql, so you can browse and analyze the various fields that interest you. As mentioned before it is updated every day.
The target systems are operating systems (but I never tried if you can even scan of appliances, eg. Pix firewall)
The scans, based on the choice you do are more or less invasive, eg. “Full and Very Deep ultimate” could even broke the connection on the remote server.
The product is available on linux as server while the client can either be installed on linux and windows.

Baca Selengkapnya ....

How to Securely Delete Data from Hard Drives

Posted by Unknown 0 komentar
http://www.esecurityplanet.com/windows-security/how-to-securely-delete-data-from-hard-drives.html


What happens to the confidential data on hard drives and other storage media in your organization when you replace them? It's a vital question to ask – because unless the data is completely erased, there's a good chance that it could come back to haunt you. As a quick Google search will confirm, there's no shortage of stories of valuable data found on hard drives bought second-hand or salvaged from the garbage.
An incident like this can be embarrassing and harm the reputation of your company – and if confidential business information is leaked, it could have serious negative financial consequences. There are also numerous state and federal regulations, as well as specific industry regulations such as the health Insurance Portability and Accountability Act (HIPAA) and the Payment Card Industry Data Security Standard (PCI DSS), which require personal and other information be securely deleted before storage media are discarded or reused.
When Windows "deletes" files, it simply moves those files to the recycle bin so that they can be easily retrieved. Even if you bypass or empty the recycle bin, the data is not physically deleted: The space on the disk where the data is stored is marked as available for reuse, but the old data will remain there until the space is reclaimed to store new information. Files that have been deleted and not yet overwritten can easily be "undeleted" using freely available undelete utilities such as Recuva.
The National Institute of Standards and Technology's Guidelines for Media Sanitization (PDF; NIST Special Publication 800-88) recommends three different ways to "sanitize" a hard drive:
Clearing: Overwriting the entire drive with new data so that the old data is no longer readable by a computer, although it may be possible to retrieve some data in a laboratory using signal processing equipment and specially trained personnel.
Purging: Removing the data at a more fundamental level, either using the drive's own controller electronics to carry out the task, or by degaussing (placing the drive in a machine that generates a strong magnetic field). Purging should remove all traces of data so that it is impossible to recover even if the storage medium is analysed in a laboratory.
Destroying: Physical destruction can be accomplished using a variety of methods, including disintegration, incineration, pulverizing, shredding, and melting.
Let's take a look at each of these methods in turn.
Method # 1: Clearing Data from Your Drive
Overwriting the entire contents of a drive with 0s, 1s, or random data is a technique used to make the original contents unreadable. To be sure that this is as effective as possible, some agencies recommend overwriting multiple times, using 1s, then 0s, and then random data – but recent research suggests that a single overwrite is in fact sufficient. The de facto standard for overwriting data on a hard drive is an open source program called Darik's Boot and Nuke.
How to clear data from your hard disk drive using Darik's Boot and Nuke (DBAN):
  • To use DBAN you first need to download the ISO image and burn it to a CD to make a DBAN boot CD.
  • Next, connect any drives you want to clear to a PC, and boot the PC from the CD
DBAN
  • At the boot: prompt, type the command autonuke. This will overwrite all drives connected to the computer. Alternatively, press Enter at the boot: prompt to select specific drives to clear, and options including the number of times you want each drive to be overwritten.
Note: You can also boot DBAN from a USB drive. To make a DBAN bootable USB drive follow the instructions at Pendrivelinux, selecting DBAN 2.2.6 as your Linux distribution.
DBAN provides an easy way to clear all the disks on a PC before disposal of the PC, or to create a "sanitizing station" used to clear drives connected to it before the drives are disposed of.
Important Note: Clearing data from a disk using DBAN is not an ideal solution in all cases. DBAN can take hours or even days to run, especially if multiple overwriting is selected. Furthermore, DBAN is unable to work on damaged drives or sectors, or to overwrite sectors that have been detected as bad and swapped out of service. For this second reason alone, clearing is only suitable for disks that contain no sensitive information. Disks with sensitive information should be purged or destroyed.
Method # 2: Purging Data from Your Drive
The easiest way to purge a drive – either a conventional spinning SATA or PATA hard drive or SSD drive – is to use the Secure Erase command built in to the firmware of any ATA drive made in the last 10 years or so. To invoke the command you need to use a program that can interact with the firmware, such as the open source Parted Magic.
How to use Parted Magic:
  • Download the Parted Magic ISO file from SoureForge and burn it to a CD or create a bootable Parted Magic USB stick by following the instructions at Pendrivelinux.
  • Start your computer from the CD or USB drive, and once Parted Magic boots, select option 1 to run using default settings.
  • At the bottom of the screen, choose System Tools - Erase Disk
  • Select the final option to use Secure Erase
Parted Magic
Secure Erase can also be invoked using a DOS-based utility called HDDErase, which you can download from the Center for Magnetic Recording Research.
How to use HDDErase:
  • Copy hdderase.exe onto bootable DOS floppy disk, CD, DVD or USB stick and boot the system which has the drive you want to purge
  • Type "hdderase" at the DOS prompt to run HDDerase.exe.
  • At the prompt, select the drive you want to purge
  • Type "y" to proceed to the options menu
  • Select secure erase (or enhanced secure erase if it is available)
  • Type "y" to proceed with the secure erase.
HDDErase
Hardware options for purging data:
If you are planning on purging a large number of disks, you may find it more convenient to use a hardware device into which you plug one or more disks. These have the advantages of not tying up a PC, and some can create printable certificates that data has been purged for audit purposes.
Drive eRazer Ultra ($249). This small device can purge one drive at a time using Secure Erase.
Aleratec Sanitizer ($1,049). This unit can purge up to 6 drives at a time using Secure Erase.
Digital Shredder (approx. $10,000). This industrial-strength unit can purge up to three drives at a time using Secure Erase.
Purging data by degaussing:
A degausser creates a strong magnetic field. When any magnetic media such as a hard disk drive, floppy disk, magnetic tape, or Zip drive is inserted and the machine activated, the media are completely erased and rendered permanently inoperable in a matter of a few seconds. Degaussers typically cost about $20,000 and can also be rented for short periods.
One problem with degaussing is that as the data on magnetic disks become more densely packed to produce higher capacity disks, the magnetic coercivity (the magnetic fields needed to write or delete bits on the disks) rises in value. That means that older degaussers may not be powerful enough to delete newer disks. Technology such as thermally assisted magnetic recording (TAMR), which uses lasers to heat disks as they are written to momentarily reduce their magnetic coercivity, may make degaussing impossible in the future.
Another perhaps more fundamental problem with degaussing is that it only works on magnetic media, and can't be used on solid state drives. It is important to remember that hybrid drives that include a solid state write cache or an element of permanent storage as well as traditional magnetic disks are becoming increasingly common, and attempting to degauss a hybrid drive would result in unerased data on the solid state portion.
Method # 3: Physically Destroying Your Drive
Destroying a storage medium ensures that its data is unreadable. Typically this is carried out at an outsourced metal destruction or incineration facility with specific capabilities to perform these activities effectively, securely, and safely. Paper shredders can also be used to destroy media such as CDs and floppy disks once they have been removed from their containers.
Surprisingly, damaging disks by bending the platters by as little as a few millimeters has been found to destroy the disks beyond any form of practical data recovery – even though the data is still intact on them.
Happy deleting!

Baca Selengkapnya ....

PostgreSQL Administration for MySQL Admins

Posted by Unknown Selasa, 22 Mei 2012 0 komentar
http://olex.openlogic.com/wazi/2012/postgresql-administration-for-mysql-admins


When people think about deploying an open source web ecosystem, they often choose Linux, along with Apache, PHP, and the MySQL database. However, MySQL isn’t the only mature and feature-rich open source option; rival PostgreSQL can be an equally good choice. While the two are both relational databases, they differ when it comes to implementation details. But don’t worry – if you know how to manage MySQL, you can learn how to handle PostgreSQL fairly quickly.
PostgreSQL runs on all major operating systems, including Linux, FreeBSD, Solaris, Mac OS X, and Windows. It is ACID-compliant, highly scalable (there are live PostgreSQL systems with in excess of 4 terabytes of data), and offers database functions such as foreign keys, triggers, and stored procedures. It also has native APIs for C/C++, Java, .Net, and PHP.
One reason PostgreSQL may be more attractive for some organizations than MySQL is that it uses a different license. PostgreSQL’s license, like the BSD and MIT licenses, grants the right to use, copy, modify, and distribute the software as long as the relevant copyright notices are maintained. MySQL, meanwhile, is licensed under several licenses, open and commercial, including the GPL. MySQL is free to use under the GPL if and only if you are developing and distributing open source applications which themselves are under an open source license. In terms of freedom for the end user, PostgreSQL offers the better choice.

Getting Started

On a CentOS 6 system, installing PostgreSQL is straightforward using the yum command: yum install postgresql postgresql-server. However, unlike MySQL, you must initialize and configure the database after installation, which you can do with the command service postgresql initdb. After that you can start and stop the database server using the service command: service postgresql start.
MySQL installations have a root user, and one of the normal installation tasks is to configure the password for this user. PostgreSQL uses a different approach, as explained in the Client Authentication section in the PostgreSQL documentation. It allows for a variety of client authentication methods. You can configure the server to authenticate clients based on explicit trust, or using a password, or using a more advanced network authentication method such as LDAP or Kerberos. You can configure the different methods in the file /var/lib/pgsql/data/pg_hba.conf.
With the default authentication method, each user needs to be added to the internal PostgreSQL users database. You can do this as the default user, postgres, which is like the root user under MySQL. First become superuser (su -), then switch to the postgres user with the command su – postgres. You can then use the PostgresSQL createuser command to add another user:
$ createuser joe
Shall the new role be a superuser? (y/n) n
Shall the new role be allowed to create databases? (y/n) y
Shall the new role be allowed to create more new roles? (y/n) n
Under MySQL you can use the mysqladmin command for most administration tasks. PostgreSQL, by constrast, provides a number of native commands for administration, such as createdb, dropdb, and createuser. A user who has previously been added to the internal users database using the createuser command can enter createdb at the Linux command prompt to create a database with the same name as their username. createdb mydb can be used to create a database called mydb, and so on. To delete a database, use the dropdb command.
Where you use mysql to enter the MySQL environment, you use psql with PostgreSQL, but the two environments differ in many ways. To get help from within the PostgreSQL shell, use \h, and to quit use \q. To see a list of users created with the createuser command, use \du. To see a list of databases, use \l. To find out which tables exist, use \d.
Standard SQL commands such as SELECT current_date; and SELECT version() work equally well in MySQL and PostgreSQL. The SQL commands to create a table, insert a row, and query the PostgreSQL database will be familiar to any MySQL administrator. Here is a small set of SQL commands that work equally on MySQL and PostgreSQL (with the output shown from PostgreSQL):
CREATE TABLE birthdays (
firstname varchar(80),
surname varchar(80),
dob date
);

INSERT INTO birthdays (firstname, surname, dob) VALUES ('Fred', 'Smith', '1989-05-02');

SELECT * FROM birthdays;

firstname | surname | dob
-----------+---------+------------
Fred | Smith | 1989-05-02
(1 row)
A well-used tool in the MySQL admin’s toolbox is the mysqldump command, which dumps a database, as SQL, into a text file. PostgreSQL has a similar command called pg_dump. Like the MySQL equivalent, it takes a database name as the first parameter (otherwise the username is assumed as the database name), but to dump a certain table you must use the -t parameter:
$ pg_dump -t birthdays joe

--
-- Name: birthdays; Type: TABLE; Schema: public; Owner: joe; Tablespace:
--

CREATE TABLE birthdays (
firstname character varying(80),
surname character varying(80),
dob date
);

...
The output, of course, can be redirected to a file using > or the -f option.
pg_dump dumps the contents of a single database, and it does not include information about the database users. To dump the entire contents of all the databases, use pg_dumpall, which is akin to the MySQL mysqldump –all-databases command.
Most MySQL administrators are familiar with the phpMyAdmin web-based administration tool. The equivalent for PostgreSQL is phpPgAdmin. It is open source, under active development (the most recent release was in March 2012), and supports PostgreSQL 7.4.x, 8.0.x, 8.1.x, 8.2.x, 8.3.x, 8.4.x, and 9.0.x.
Since PostgreSQL comes with all the command-line tools needed to deploy it on a server and offers APIs for a variety of programming languages, it is a good choice when you want to develop a new application that needs a database back end. However, some existing third-party web applications lack support for PostgreSQL. WordPress, for instance, remains firmly a MySQL-only product, but other popular web platforms, such as Joomla and Drupal, support PostgreSQL (from version 2.5 and 7 respectively).
Speaking of versions, like all active products, PostgreSQL is always being improved with new features. The current version shipping with CentOS 6 is PostgreSQL 8.4, which will be maintained by the PostgreSQL team until July 2014. The latest stable release is 9.1, which is earmarked for end of life in 2016. PostgresSQL 9.1 adds new features such as synchronous replication and k-nearest-neighbor indexing. The PostgreSQL project provides RPM packages for 9.1 for RHEL 6, Scientific Linux 6, and CentOS 6 for organizations that wish to use the latest version.

Summary

PostgreSQL offers a worthy alternative to MySQL in both technical terms and in terms of its licensing model. If you want to deploy your own web platform, PostgreSQL might be the more advantageous choice, as it doesn’t use the GPL. For those using popular web applications like Joomla or Drupal, PostgreSQL can be used as a drop-in replacement. In terms of functionality and scalability, PostgreSQL is a serious contender.

Baca Selengkapnya ....
Trik SEO Terbaru support Online Shop Baju Wanita - Original design by Bamz | Copyright of android japan.