Thursday, December 13, 2012

15 Greatest Open Source Terminal Applications Of 2012

http://www.cyberciti.biz/open-source/best-terminal-applications-for-linux-unix-macosx


Linux on the desktop is making great progress. However, the real beauty of Linux and Unix like operating system lies beneath the surface at the command prompt. nixCraft picks his best open source terminal applications of 2012.

Most of the following tools are packaged by all major Linux distributions and can be installed on *BSD or Apple OS X.

#1: siege - An HTTP/HTTPS stress load tester


Fig.01: siege in action
Fig.01: siege in action

Siege is a multi-threaded http or https load testing and benchmarking utility. This tool allows me to measure the performance of web apps under duress. I often use this tool test a web server and apps. I have had very good results with this tool. It can stress a single url such as example.com/foo.php or multiple urls. At the end of each test you will get all data about the web server performance, total data transferred, latency, server response time, concurrency and much more.

#2: abcde - A better CD encoder

Usually, the process of grabbing the data off a CD and encoding it, then tagging or commenting it, is very involved. abcde is designed to automate this. It will take an entire CD and convert it into a compressed audio format - Ogg/Vorbis, MPEG Audio Layer III, Free Lossless Audio Codec (FLAC), Ogg/Speex, MPP/MP+(Musepack) and/or M4A (AAC) format(s). It will do a CDDB query over the Internet to look up your CD or use a locally stored CDDB entry.

#3: ngrep - Network grep


Fig.02: ngrep in action
Fig.02: ngrep in action

Ngrep is a network packet analyzer. It follows most of GNU grep's common features, applying them to the network layer. Ngrep is not related to tcpdump. It is just an easy to use tool. You can run queries such as:
## grep all HTTP GET or POST requests from network traffic on eth0 interface  ##
sudo ngrep -l -q -d eth0 "^GET |^POST " tcp and port 80
 
I often use this tool to find out security related problems and tracking down other network and server related problems.

#4: pv


Fig.03: pv command in action
Fig.03: pv command in action

The pv command allows you to see the progress of data through a pipeline. It provides the following info:
  1. Time elapsed
  2. Percentage completed (with progress bar)
  3. Current throughput rate
  4. Total data transferred
  5. ETA
See how to install and use pv command under Linux. Or download pv by visiting this page.

#5: dtrx


Fig.04: dtrx in action
Fig.04: dtrx in action

dtrx is an acronmy for "Do The Right Extraction." It's a tool for Unix-like systems that take all the hassle out of extracting archives. As a sysadmin, I download source code and tar balls. This tool saves lots of time.
  • You only need to remember one simple command to extract tar, zip, cpio, deb, rpm, gem, 7z, cab, lzh, rar, gz, bz2, lzma, xz, and many kinds of exe files, including Microsoft Cabinet archives, InstallShield archives, and self-extracting zip files. If they have any extra compression, like tar.bz2 files, dtrx will take care of that for you, too.
  • dtrx will make sure that archives are extracted into their own dedicated directories.
  • dtrx makes sure you can read and write all the files you just extracted, while leaving the rest of the permissions intact.
  • Recursive extraction: dtrx can find archives inside the archive and extract those too.
  • Download dtrx

#6:dstat - Versatile resource statistics tool


Fig.05: dstat in action
Fig.05: dstat in action

As a sysadmin, I heavily depends upon tools such as vmstat, iostat and friends for troubleshooting server issues. Dstat overcomes some of the limitations provided by vmstat and friends. It adds some extra features. It allows me to view all of my system resources instantly. I can compare disk usage in combination with interrupts from hard disk controller, or compare the network bandwidth numbers directly with the disk throughput and much more.

#7:ffmpeg - Record, convert, stream and play multimedia content


Fig.06: ffmpeg in action (ogv to mp4 conversion)
Fig.06: ffmpeg in action (ogv to mp4 conversion)

Recently, I started a youtube channel for nixCraft. I need to convert video and audio in various format such as Youtube HD web streaming format. This tool saves lots of my time. I often use this tool for audio/video conversion. This is the best tool for converting Audio, AVI, MP4, Ipod, Mobile phone, PSP, Quicktime, Rockbox, Web (Flash), WMV and much more.

#8:mtr - Traceroute+ping in a single network diagnostic tool


Fig.07: mtr in action
Fig.07: mtr in action

The mtr command combines the functionality of the traceroute and ping programs in a single network diagnostic tool. Use mtr to monitor outgoing bandwidth, latency and jitter in your network. A great little app to solve network problems. If you see a sudden increase in packetloss or response time is often an indication of a bad or simply overloaded link.

#9:multitail - Tail command on steroids


Fig.08: multitail in action (image credit - official project)
Fig.08: multitail in action (image credit - official project)

MultiTail is a program for monitoring multiple log files, in the fashion of the original tail program. This program lets you view one or multiple files like the original tail program. The difference is that it creates multiple windows on your console (with ncurses). I often use this tool when I am monitoring logs on my server.

#10: curl - Transfer data and see behind the scenes


Fig.09: curl command in action
Fig.09: curl command in action

Curl is a command line tool to transfer data from or to a server, using one of the supported protocols. The command is designed to work without user interaction. curl offers a busload of useful tricks like proxy support, user authentication, FTP upload, and much more. I often use curl command to:
  1. Troubleshoot http/ftp/cdn server problems.
  2. Check or pass HTTP/HTTPS headers.
  3. Upload / download files using ftp protocol or to cloud account.
  4. Debug HTTP responses and find out exactly what an Apache/Nginx/Lighttpd/IIS server is sending to you without using any browser add-ons or 3rd party applications.
  5. Download curl

#11: netcat - TCP/IP swiss army knife


Fig.10: nc server and telnet client in action
Fig.10: nc server and telnet client in action

Netcat or nc is a simple Linux or Unix command which reads and writes data across network connections, using TCP or UDP protocol. I often use this tool to open up a network pipe to test network connectivity, make backups, bind to sockets to handle incoming / outgoing requests and much more. In this example, I tell nc to listen to a port # 3005 and execute /usr/bin/w command when client connects and send data back to the client:
$ nc -l -p 3005 -e /usr/bin/w
From a different system try to connect to port # 3005:
$ telnet server1.cyberciti.biz.lan 3005

#12: nmap - Offensive and defensive network security scanner


Fig.11: nmap in action
Fig.11: nmap in action

Nmap is short for Network Mapper. It is an open source security tool for network exploration, security scanning and auditing. However, nmap command comes with lots of options that can make the utility more robust and difficult to follow for new users.

#13: openssl command line tool

The openssl command is used for the various cryptography functions of OpenSSL's crypto library from the shell. I often use this tool to encrypt files, test/verify ssl connections, and check the integrity of downloaded files. Further, openssl can be used for:
  1. Creation of RSA, DH and DSA key parameters
  2. Creation of X.509 certificates, CSRs and CRLs
  3. Calculation of Message Digests
  4. Handling of S/MIME signed or encrypted mail
The following few examples demonstrate the power of openssl command:

File integrity verification (cryptographic hashing function)

Verify that a file called financial-records-fy-2011-12.dbx.aes has not been tampered with:
 
openssl dgst -sha1 -c financial-records-fy-2011-12.dbx.aes
openssl dgst -ripemd160 -c financial-records-fy-2011-12.dbx.aes
openssl dgst -md5 -c financial-records-fy-2011-12.dbx.aes
 
Sample outputs from the last command:
MD5(financial-records-fy-2011-12.dbx.aes)= d4:1d:8c:d9:8f:00:b2:04:e9:80:09:98:ec:f8:42:7e

Encryption and Decryption with Ciphers (files)

 
## encrypt file ##
openssl aes-256-cbc -salt -in financial-records-fy-2011-12.dbx   -out financial-records-fy-2011-12.dbx.aes
## decrypt file ##
openssl aes-256-cbc -d -in financial-records-fy-2011-12.dbx.aes -out financial-records-fy-2011-12.dbx
 

SSL/TLS client and server tests

## connect to gmail mail server for testing purpose ##
openssl s_client -connect smtp.gmail.com:995
openssl s_client -connect smtp.gmail.com:995 -CApath /etc/ssl
 

#14: lftp: A better command-line ftp/http/sftp client

This is the best and most sophisticated sftp/ftp/http download and upload client program. I often use this tool to:
  1. Recursively mirroring entire directory trees from a ftp server
  2. Accelerate ftp / http download speed
  3. Location bookmarks and resuming downloads.
  4. Backup files to a remote ftp servers.
  5. Transfers can be scheduled for execution at a later time.
  6. Bandwidth can be throttled and transfer queues can be set up.
  7. Lftp has shell-like command syntax allowing you to launch several commands in parallel in background (&).
  8. Segmented file transfer, that allows more than one connection for the same file.
  9. And much more.
  10. Download lftp

#15: Irssi - IRC client


Fig.#12: irssi in action (image credit wikipedia)
Fig.#12: irssi in action (image credit wikipedia)

Irssi is a modular Internet Relay Chat client. It is highly extensible and very secure. Being a fullscreen, termcap based client with many features, Irssi is easily extensible through scripts and modules. I often use this client to get help about certain problmes from IRC rooms or just to hang out with old buddies.

#16: Rest...

  • Mutt - Email client and I often use mutt to send email attachments from my shell scripts.
  • bittorrent - Command line torrent client.
  • screen - A full-screen window manager and must have tool for all *nix admins.
  • rsync - Sync files and save bandwidth.
  • sar - Old good system activity collector and reporter.
  • lsof - List open files.
  • vim - Best text editor ever.
  • elinks or lynx - I use this browse remotely when some sites (such as RHN or Novell or Sun/Oracle) require registration/login before making downloads.
  • wget - Best download tool ever. I use wget all the time, even with Gnome desktop.
  • mplayer - Best console mp3 player that can play any audio file format.
  • newsbeuter - Text mode rss feed reader with podcast support.
  • parallel - Build and execute shell command lines from standard input in parallel.
  • iftop - Display bandwidth usage on network interface by host.
  • iotop - Find out what's stressing and increasing load on your hard disks.

Conclusion

This is my personal FOSS terminal apps list and it is not absolutely definitive, so if you've got your own terminal apps, share in the comments below.

Samba Team Releases Samba 4.0

https://www.samba.org/samba/news/releases/4.0.0.html

The Samba Team is proud to announce the release of Samba 4.0, a major new release of the award-winning Free Software file, print and authentication server suite for Microsoft Windows® clients.

The First Free Software Active Directory Compatible Server

As the culmination of ten years' work, the Samba Team has created the first compatible Free Software implementation of Microsoft’s Active Directory protocols. Familiar to all network administrators, the Active Directory protocols are the heart of modern directory service implementations.
Samba 4.0 comprises an LDAP directory server, Heimdal Kerberos authentication server, a secure Dynamic DNS server, and implementations of all necessary remote procedure calls for Active Directory. Samba 4.0 provides everything needed to serve as an Active Directory Compatible Domain Controller for all versions of Microsoft Windows clients currently supported by Microsoft, including the recently released Windows 8.
The Samba 4.0 Active Directory Compatible Server provides support for features such as Group Policy, Roaming Profiles, Windows Administration tools and integrates with Microsoft Exchange and Free Software compatible services such as OpenChange.
The Samba 4.0 Active Directory Compatible Server can also be joined to an existing Microsoft Active Directory domain, and Microsoft Active Directory Domain Controllers can be joined to a Samba 4.0 Active Directory Compatible Server, showing true peer-to-peer interoperability of the Microsoft and Samba implementations of the Active Directory protocols.
Acknowledging the value of the interoperability of the Samba 4.0 Active Directory Compatible Server, Steve van Maanen, the co-founder of Starsphere LLC, an IT services company in Tokyo, said:
"Thanks to Samba 4, I have two fully replicating Active Directory Domain controllers that boot in under 10 seconds ! It is nice to have alternatives, and Samba 4 is a great one."
Upgrade scripts are also provided for organizations using the previous Microsoft Windows NT Domain Controller functionality in Samba 3.x, to allow them to migrate smoothly to Samba 4.0.
Suitable for low-power and embedded applications, yet scaling to large clusters, Samba 4.0 is efficient and flexible. Its Python programming interface and administration toolkit help in enterprise deployments.

Created Using Microsoft Documentation

The Samba 4.0 Active Directory Compatible Server was created with help from the official protocol documentation published by Microsoft Corporation and the Samba Team would like acknowledge the documentation help and interoperability testing by Microsoft engineers that made our implementation interoperable.
"Active Directory is a mainstay of enterprise IT environments, and Microsoft is committed to support for interoperability across platforms," said Thomas Pfenning, director of development, Windows Server. "We are pleased that the documentation and interoperability labs that Microsoft has provided have been key in the development of the Samba 4.0 Active Directory functionality."

Introducing SMB2.1 File Serving Support

Samba 4.0 includes the first Free Software implementation of Microsoft's SMB2.1 file serving protocol. Building on the success of the SMB2.0 server in Samba 3.6, the Samba 4.0 file server component is an evolution of the trusted Samba file serving code that is used worldwide by vendors of file servers, such as IBM's clustered Scale Out Network Attached Storage (SONAS), and many other commercial products.
In addition, the Samba 4.0 file server contains an initial implementation of SMB3, which will be further developed in later Samba 4 releases into a fully-featured SMB3 clustered file server implementation.
Future developments of our SMB3 server and client suite, in combination with our expanding number of SMB3 tests, will keep driving the performance improvements and improved compatibility with Microsoft Windows that Samba users have come to expect from our software.

Integrated Clustered File Server Support

Building on our success as the first commercial implementation of a clustered SMB/CIFS server, Samba 4.0 provides industry-leading scalability and performance as a clustered SMB2/SMB/CIFS file server, using our "clustered tdb" (ctdb) technology - also available as Free Software.
Clustered Samba provides a "Single Server" view of clustered file storage, allowing clients to connect to the least loaded server and still providing a completely coherent view of the underlying clustered file system.
Written and tested to be compatible with most clustered file systems, both Free Software and proprietary, Samba 4.0 with ctdb provides a scalable clustered file server solution with full Windows file sharing semantics.
Samba and ctdb have been shipping in production file serving products for many years, to some of the most demanding customers in the world.

Easy Integration into Existing Directory Services

Samba 4.0 ships with an improved winbind, which allows Samba 4.0 file servers to easily integrate into existing Active Directory services as member servers. Both Microsoft Active Directory and Samba 4.0 Active Directory Compatible servers are supported.

Stability, Security and Performance

Samba 4.0 has been tested using our widely accepted smbtorture test suite, created by the Samba Team to test Samba itself and now used by most of the companies writing SMB3/SMB2/SMB/CIFS file server software to test their own products. We also regularly test interoperability with other major vendors at plug-fest events to make sure Samba 4.0 deployments work correctly with existing customer equipment.
In addition, Samba is one of eleven open source projects that leading software integrity vendor Coverity has certified as "secure" and has reached Coverity "Integrity Rung 2" certification.
The Samba Team provides immediate responses to any security vulnerabilities, and provides fixes to all vendors using the Samba code in coordination with industry standard security reporting agencies.

A Modular Toolbox for OEM Vendor Needs

As Free Software, Samba 4.0 is the ideal choice for Original Equipment Manufacturers (OEMs) to use for their file, print and authentication products. It is easily integrated into a whole host of different tasks, and can be customized at will by the vendor to satisfy their needs.
In addition, Samba 4.0 includes a modular "Virtual File System" (VFS) interface that vendors can use to quickly and efficiently customize Samba to take advantage of any specific features of their underlying technology without having to modify any of the core Samba code. From advanced file systems to network traffic analysis, the Samba VFS layer allows external code to be easily integrated with Samba. Example modules are provided as source code for vendors to customize as they wish.

Samba is the leading choice for Microsoft Windows connectivity

Samba is the leading technology choice for Windows file serving on Linux and UNIX platforms and in embedded Network Attached Storage (NAS) solutions. Samba is used by vendors selling NAS solutions ranging from high end clustered business-critical systems, to low end consumer devices, and everything in between. Samba is fully IPv6 enabled and meets all mandates for modern network interoperability.
Commercial support is available for Samba from many different vendors.

Getting Samba 4.0

Samba 4.0 source code is available now from the Samba Web site.

About Active Directory

Microsoft Windows and Active Directory are trademarks of Microsoft Corporation.

About the Samba Team

The Samba Team is a worldwide group of computer professionals working together via the Internet to produce the highest quality Free Software Windows (SMB3/SMB2/SMB/CIFS) server and client software. We are the undisputed experts in providing interoperability with computers running Microsoft Windows. Members of the Samba Team work for many of the largest companies in the software Industry and even helped Microsoft produce the protocol documentation that fully specifies the SMB/CIFS protocol.

Tuesday, December 11, 2012

How to turn any phone into a spy device with hardware hack

http://securityaffairs.co/wordpress/10693/hacking/how-to-turn-any-phone-into-a-spy-device-with-hardware-hack.html?goback=%2Egde_46315_member_191239730


No peace for mobile environment that due its impressive increase is attracting cyber criminals and hackers like never before.
The researcher Atul Alex has presented at last edition of International Malware Conference (MalCon) how it is possible to attack every mobile devices with a special hardware designed using common electronic components.
Atul Alex presented a paper that covers “abusing voice dialing and combining Arduino / Microcontroller to steal private data on iphone, Android, Windows Phone and Blackberry using only the Audio jack.
Mobile devices are sophisticated devices that manage a huge quantity user’s information and their exploit could open the door to a mine of sensible data, due this reason the expert provides that in incoming months defense system will be reinforced and it will be more  difficult in the future software based attacks.
It must be considered that an efficient attack on large scale against mobile world have to be able to infect multi platform devices.
During its presentation Atul Alex explained how to transform any mobile device into a spy tool, avoiding the installation of any malicious software on it, abusing voice dialing feature which is enabled by default on all mobile platforms.
Modern devices are equipped with powerful software able to interpret user’s vocal commands, the hardware device proposed by Alex Atul is able to mimic them to give orders to the device. The functionality opens future scenarios in which hackers are able to control phone simply sending unauthorized text messages to steal sensible data.
Almost all events on the mobile are notified to the user with the help of corresponding tones/sounds, the researched has demonstrated that adding a microcontroller to the headset’s circuit is possible to:
  • Initiate phone calls without user interaction.
  • Note duration of phone calls.
  • Detect incoming/outgoing calls,  sms & so on.
In the future versions the hardware could also integrate more complex functionalities such as recording of phone calls or remote activation of the device.
For sure similar devices will represent in the future a privileged option for cyber espionage operations and more in general for cyber operations. Many governments are working or financing projects for development of new cyber tools. Government agencies have massively invested in programs to “violate” citizen’s privacy in the name of national security, world is changed from 11/9 and the risk of a new dramatic cyber attack is high.
The Defense Advanced Research Projects Agency (DARPA) is one of the most advanced agency in this sense, it is responsible for the development of new technologies for use by the military and recently it has proposed a device called thePower Pwn designed by Pwnie Express company that apparently look like a surge protector, but it’s a powerful tool to infiltrate networks allowing remote access to every  machine.
How to defend our device from similar attacks? In the future every interface of mobile device have to be properly designed, every input must be validated by a specially designed circuitry.
Another factor to consider as critical is the qualification of hardware for devices similar to the one described in the research , different compromised components may invade the consumer market with disastrous consequences, it is necessary a great effort to avoid dangerous incidents.
Pierluigi Paganini