Home Blog Page 987

Meet Solu, a Gorgeous and Revolutionary Mini PC Powered by Linux – Video

meet-solu-a-gorgeousA group of Finnish developers think that Solu, a revolutionary, beautiful, and minimalist computer, will change the way you think about computing.

Powered by SoluOS, a Linux kernel-based operating system (confirmed by the Solu Machines – see tweet at the end of the article) designed around social networking and collaboration, the Solu computer has a minimal design made of wood, it fits in the palm of your hand, and can be easily connected to any LCD monitor where a keyboard is attached. However, because it stores all of its data in the cloud, you can use it on the go…

Linus Torvalds Is “Really Happy” with Linux Kernel 4.3 Release Candidate 6

It’s Sunday evening for many of us Linux users, so the release of a new RC (Release Candidate) build of the upcoming Linux 4.3 kernel is “in plan” for some overnight testing.

Just a few minutes ago, Linus Torvalds announced that the sixth Release Candidate of Linux kernel 4.3 is available for download and testing from the usual places, and it appears that things are calming down very well for this release, which makes Mr. Torvalds really happy. “Things continue to be calm, and in fact have gotten progressively calmer. All of which makes me really happy…” says Linus Torvalds.

Fun with e2fsck and debugfs

Hello there, 
We are going to corrupt the system and then repair, restore sanity. Things we are going to do:

 

  • fun1 → Corrupt the superblock.
  • fun2 → Multiply owned block.
  • fun3 → Corrupted inode.
  • fun4 → Orphaned inode.

Lets begin with perfectly working file system, which has say 10 files. 
mkfs.ext3 /dev/xvdb 

 

 Superblock backups stored on blocks:                                            
        32768, 98304, 163840, 229376, 294912, 819200, 884736   
 

Go ahead and mount it then create 10 files. 
mount /dev/xvdb /mnt 

for i in {1..10}; do echo "this is file$i" > /mnt/file$i.txt ; done 
Verify everything looks fine on mount point. Let the fun begin!

Fun1: Attack Super block

Our first task is to corrupt the super block. Run following command which will zero-out super block! 
dd if=/dev/zero of=/dev/xvdb count=1 bs=1024 seek=1 
above command,writes 0’s on superblock location at offset 1024! Now lets try to mount it : 
umount /mnt && mount /dev/xvdb /mnt 

 mount: you must specify the filesystem type   
 

failed right? that’s what we wanted 🙂 Now how to fix this ? For cases like this ext3 has backup superblock (have look at above mkfs.ext3 output more closely!) All you need to do is tell mount command to use that copy of superblock. 
mount command expects block address in 1KB. so we need to convert our address like 98304 * 4 = 393216 we will try again with alternate superblock option “-o sb=” now: 
mount -o sb=393216 /dev/xvdb /mnt 
Worked! Just go ahead and explore everything is fine on mountpoint! 

Fun 2: Multiply owned blocks – No, Its MY block!

a Lets check out our existing file contents. 
cat /mnt/file1.txt /mnt/file2.txt 

this is file1                                                                   
this is file2

We are going to corrupt file system in such way that file2.txt will also point to file1.txt content!!!! 
To modify file system structure, we will a command called debugfs – an ext2/ext3/ext4 file system debugger 

First fetch the data block address of file1.txt (i.e where ‘this is file1’ is stored). 
debugfs -s 98304 -b 4096 /dev/xvdb -w 
debugfs: stat file1.txt 

 Inode: 12   Type: regular    Mode:  0644   Flags: 0x0                           
Generation: 1325309953    Version: 0x00000000                                   
User:     0   Group:     0   Size: 14                                           
File ACL: 0    Directory ACL: 0                                                 
Links: 1   Blockcount: 8                                                        
Fragment:  Address: 0    Number: 0    Size: 0                                   
ctime: 0x561ff500 -- Thu Oct 15 18:48:32 2015                                   
atime: 0x561ff7f1 -- Thu Oct 15 19:01:05 2015                                   
mtime: 0x561ff500 -- Thu Oct 15 18:48:32 2015  
BLOCKS:                                                                         
(0):2048                                                                        
TOTAL: 1 
 

Okay, debugfs stat output tells us the file1.txt data block address is 2048 

Now lets point file2.txt to this block with another debugfs command named mi which is powerful command. It gives up ability to modify inode contents! run 

debugfs: mi file2.txt 
and keep pressing the enter key

 
                       Mode    [0100644]                                     
                       User ID    [0]                                           
                      Group ID    [0]                                           
                          Size    [14]                                          
                 Creation time    [1444934912]                                  
             Modification time    [1444934912]                                  
                   Access time    [1444935703]                                  
                 Deletion time    [0]                                           
                    Link count    [1]                                           
              Block count high    [0]  
                

until you reach Direct Block #0 
Here type file1.txt block address here (2048)

             Direct Block #0    [2049] 2048                                   

Now just press enter until debugfs 

debugfs: quit 
and quit. To summarize, we figure-out the block address (2048) of file1.txt with debugfs-stat command, then replaced file2.txt block address 2049 with 2048. 
By following unmounting and remounting – we ensure our above changes written to disk.
umount /mnt 

mount -o sb=393216 /dev/xvdb /mnt -t ext3 
Now go head print file1.txt file2.txt 
cat /mnt/file1.txt /mnt/file2.txt 

this is file1                                                                   
this is file1

I hope you can spot the difference between our previous file1.txt and file2.txt output ans this one, right? Now lets run fsck to repair this. Since we can’t run file system checker (fsck) on mounted partitions 
umount /mnt 
e2fsck /dev/xvdb 

 e2fsck 1.41.12 (17-May-2010)                                                    
e2fsck: Superblock invalid, trying backup blocks...                             
/dev/xvdb was not cleanly unmounted, check forced.                              
Pass 1: Checking inodes, blocks, and sizes                                      
                                                                                
Running additional passes to resolve blocks claimed by more than one inode...   
Pass 1B: Rescanning for multiply-claimed blocks                                 
Multiply-claimed block(s) in inode 12: 2048                                     
Multiply-claimed block(s) in inode 13: 2048                                     
Pass 1C: Scanning directories for inodes with multiply-claimed blocks           
Pass 1D: Reconciling multiply-claimed blocks                                    
(There are 2 inodes containing multiply-claimed blocks.)                        
                                                                                
File /file1.txt (inode #12, mod time Thu Oct 15 18:48:32 2015)                  
  has 1 multiply-claimed block(s), shared with 1 file(s):                       
        /file2.txt (inode #13, mod time Thu Oct 15 18:48:32 2015)               
Clone multiply-claimed blocks? yes 
 

Hey! see it figures our file1.txt and file2.txt has shared block 2038 which is wrong. It prompts how to deal with this case, we indeed cloned it.
Now it go on to update other book keeping entries: Just say yes to them. 

 
lock bitmap differences:  -2049                                                
Fix? yes                                                                     
Free blocks count wrong for group #0 (31863, counted=31853).                    
Fix? yes                                                                     
Free blocks count wrong (1512305, counted=1512295).                             
Fix? yes                                                                     
Free inodes count wrong for group #0 (8181, counted=8171).                      
Fix? yes                                                                     
Free inodes count wrong (393205, counted=393195).                               
Fix? yes           
 

Fun 3: Corrupt permission/type – can you fix it?

Lets use debugfs again, open the drive with debugfs -this time we are going corrupt file ‘mode’ with modify inode option. 
debugfs: mi file3.txt 

Mode    [0100644] 0
//keep pressing enter key

and then quit debugfs. 
debugfs: quit 
unmount and mount again if needed, and do: 
ls -l /mnt/file3.txt 

 ?---------. 1 root root 14 Oct 15 18:48 /mnt/file3.txt  
 

hihi 🙂 can you see that, we corrupted file permission!!! 
I want you to fix this ‘mode’ with debugfs mi. If you are wondering what values to put, just look above..no,not the sky :p just scroll above for original mode values

Fun 4: Sad, Orphaned inodes

You might have seen this error message sometimes, lets recreate it. we will create 2 files on a new directory ‘dir1’ 
mkdir /mnt/dir1 

 echo "this is file-a" > /mnt/dir1/a
echo "this is file-b" > /mnt/dir1/b
 

with the help of debugfs,we will corrupt dir1 entries! 
debugfs clri dir1 

what this will do is unlink the chain between directory and its file. Now go back and list ls -l /mnt/dir1 won’t show this file. You get error like

ls: cannot access /mnt/dir1: Input/output error

Remember file ‘a’ and ‘b’ are not deleted. Its laying on our file system without any directory pointing to it. 
If we run e2fcck now, it will find these orphaned inodes and put it under lost+found . So ahead and run it, you get message like 

 Pass 4: Checking reference counts                                               
Inode 2 ref count is 4, should be 3.  Fix? yes                               
 Unattached inode 32770          
Connect to /lost+found? yes                                                  
Inode 32770 ref count is 2, should be 1.  Fix? yes                           
Unattached inode 32771                                                          
Connect to /lost+found? yes  
Inode 32771 ref count is 2, should be 1.  Fix? yes  

e2fsck has done its job, lets go ahead and explore the end result. 
ls -l /mnt/lost+found/ 

 total 8                                                                         
-rw-r--r-- 1 root root 15 Oct 15 20:28 #32770                                   
-rw-r--r-- 1 root root 15 Oct 15 20:28 #32771         

Verify the content of files: 
cat #32770 

 this is file-a

cat #32771 

 this is file-b

Can you guess the how these filename are created? 

Think..think..

hmm..No? Have a close look at our e2fsck output. Yes, these the inode numbers of ‘a’ and ‘b’. 

That’s it, I hope you learned new corruption tricks, please feel free try these corruption on your production system^ 

^  Disclaimer : I’m not responsible, if you get fired!  

 

The First Malicious App Enters The Ubuntu Touch Store & Quickly Removed


First malicious app entered the ubuntu touch app store

If you’re using Ubuntu Touch then this is for you. Recently the first malicious app has entered into the Ubuntu touch store by bypassing the security measurements. The app does some malicious activities and changes the default flash screen without any permission. Fortunately, the app called “test” has been quickly removed from the store after being noticed.

Read At LinuxAndUbuntu

BackBox 4.4 Released With Updated Packages And New Tools, Upgrade To BackBox 4.4


BackBox 4.4 released

Backbox Linux is a free, open-source Linux distribution based on Ubuntu. Backbox is one of the most popular Linux distros designed to perform security assessments and penetrations tests. The team recently released the new version 4.4. The version includes all the latest packages that have been recently released and some of the new features that improve BackBox strength.

Read At LinuxAndUbuntu

Droid Turbo 2 Will Feature “Shatterproof” Display and Moto Maker Customization

Motorola and Verizon have already announced that we’ll be seeing the next Droid smartphones on October 27th. But with that unveiling still over a week away, Droid Life has published leaked print ads for the phones that spell out some of their features.

The boldest and most interesting claim is that the Droid Turbo 2 will include a “shatterproof” screen. We still have no idea how Motorola has managed to accomplish this, or exactly which materials have made the latest Droid’s display so durable. Both companies must be pretty confident of the phone’s toughness if they’re willing to make “shatterproof” an actual selling point. 

Read more at The Verge

IBM, Carnegie Mellon Team on Cognitive App for the Blind

IBM teams with Carnegie Mellon’s Robotics Institute to deliver a platform for building cognitive assistance apps for the blind. Scientists from IBM Research and Carnegie Mellon University (CMU) recently announced a new open platform to support the creation of smartphone apps that can enable the blind to better navigate their surroundings.IBM partnered with CMU’s famed Robotics Institute to create a pilot app called NavCog that draws on existing sensors and cognitive technologies to inform blind people on the CMU campus about their surroundings by “whispering” into their ears through ear buds or by creating vibrations on smartphones.

Read more at eWeek

Switching to Dashboard Spice Console on RDO Liberty (RC3) AIO installation on CentOS 7.1

Current post briefly describes conversion to dashboard Spice console along with enabling spice console features as sound and cut&&paste via slightly updated patches of Y.Kawada ( and converted from pdf to raw format). To get this features working using  any spice-gtk tools ( spicy, virt-manager ) requires ports 5900,…,590(X) to be opened via ipv4 iptables firewall on node running openstack-nova-compute.

Complete post is available here

 

Youtube-DL A Command-Line & GUI Youtube, Facebook, Dailymotion Videos Downloading Tool For Linux


youtube-dl command-line & gui video downloader for linux

Youtube-DL is a command line tool, developed in Python to download videos from various popular websites including Youtube, Dailymotion, facebook, photobucket and many others. A list of supported video sites is available here. Youtube-dl downloads videos right from the terminal with simply understandble commands. If you like to work with terminal then I am sure you’ll like youtube-dl.

Read At LinuxAndUbuntu

This Week in Linux News: Jim Zemlin on Preventative Internet Security & More

This week in Linux headlines, Linux Foundation Executive Director Jim Zemlin tackles the topic of preventative Internet security for The New York Times, and more! Here’s your weekly Linux news briefing:

1) Jim Zemlin comments on preventative measures for Internet security.

Hacking for Security, and Getting Paid for It– The New York Times

2) Google gets rid of notification center bundled with Chrome due to low usage. 

Google dumps Chrome’s notification center on Windows, Linux, and Mac– PCWorld

3) Disney Reaserchers use Linux in latest light bulb breakthrough.

Linux LightBulb Pioneers LED Light Communication for IoT– ElectronicsWeekly

Our post on the topic from last month: Disney Lights Up IoT With Linux Light Bulb

4) The ONOS Project joins the Linux Foundation as a collaborative project.

ONOS SDN Project Joins Linux Foundation– eWeek