Established in 2008,Indira Bali was created with the aim to help improving and strengthen both local and national economic
growth by creating more job opportunities for the young generation through communication and information technology.
Indira Bali offers you a complete solutions for your business which includes:
web design, website development, software development and maintenance, as well as photo and videography.
Together we can create a sustainable and ongoing progress for the society through communincation and information technology.

Search This Blog

Wednesday, June 14, 2017

Securing Your Linux System Bit by Bit

Securing Your Linux System Bit by Bit

As daunting as securing your Linux system might seem, one thing to remember is that every extra step makes a difference. It’s almost always better to make a modest stride than let uncertainty keep you from starting.
Fortunately, there are a few basic techniques that greatly benefit users at all levels, and knowing how to securely wipe your hard drive in Linux is one of them. Because I adopted Linux primarily with security in mind, this is one of the first things I learned. Once you have absorbed this lesson, you will be able to part with your hard drives safely.
As you might have deduced, the usual way of deleting doesn’t always cut it. The most often-used processes for deleting files — clicking “delete” in the operating system or using the “rm” command — are not secure.
When you use one of these methods, all your hard drive does is mark the area where the deleted file used to be as available for new data to be written there. In other words, the original state of the bits (1s and 0s) of the deleted file are left intact, and forensic tools can recover the files.
This might seem like a bad idea, but it makes sense. Hard drives are designed to optimize hardware integrity, not security. Your hard drive would wear out very quickly if it reset the bits of a deleted file to all 0s every time you deleted a file.
Another process devised with hard drive lifespan in mind is “wear leveling,” a firmware routine that saves each new file in a random location on the drive. This prevents your drive from wearing out data cells, as those near the beginning of the drive would suffer the most wear if it saved data sequentially. However, this means it is unlikely that you ever would naturally overwrite a file just through long-term use of the drive.
So, what does it mean to “securely wipe” a hard drive?

Moving Raw Bits

Secure deletion involves using a program to overwrite the hard drive manually with all 0s (or random data). This useless data overwrites the entire drive, including every bit of every saved and deleted file. It even overwrites the operating system, leaving nothing for a malicious actor to exploit.
Since the command line is usually the simplest way of going about manual operations like this, I will go over this method. The best utility for this is the “dd” command.
The “dd” commamd can be used for many things besides secure deleting, like making exact backups or installing Linux distributions to USB flash drives, but what makes it so versatile is that whereas commands like “mv” and “cp” move around files as file objects, “dd” moves data around as a stream of raw bits. Essentially, while “mv” and “cp” see files, “dd” only sees bits.
What “dd” does is very simple: It takes an input and sends it to an output. Your Linux system has a stream of 0s it can read located at /dev/zero. This is not a normal file — it’s an endless stream of 0s represented as a file.
This will be our input for a wipe operation, for the purpose of this tutorial. The output will be the device to be overwritten. We will not be overwriting an actual running system, as 1) you probably wouldn’t want to; and 2) it actually wouldn’t work, because your system would overwrite the part of the system responsible for performing the overwrite before the overwrite was complete.
Securely erasing external storage devices, like USB flash drives and external hard drives is pretty straightforward, but for wiping your computer’s onboard hard drive, there are some extra steps involved.

The Live-Boot Option

If you can’t use a running system to wipe an onboard drive, how do you perform the operation? The answer is live-booting. Many Linux distributions, including those not explicitly specialized for the purpose, can be loaded and run on a computer from a connected USB drive instead of its onboard drive. When booted this way, the computer’s onboard drive is not accessed at all, since the system’s data is read entirely from the USB drive.
Since you likely installed your system from a bootable USB drive, it is best to use that. To live-boot, we have to change the place where the computer checks to find an operating system to run by entering the BIOS menu.
The BIOS is the firmware code that is loaded before any part of any OS is run, and by hitting the right key at boot time, we can access its menu. This key is different on different computers. It’s usually one of the “F” keys, but it might be something else, so it might take a few tries to figure it out, but the first screen that displays should indicate where to look.
Once you find it, insert the live-boot USB, reboot the computer directly into the BIOS menu, and select the option to change the boot order. You should then see a list of storage devices, including the inserted USB. Select this and the live system should come up.

Locating the Right Address

Before we do any deleting, we have to figure out which address our system assigns to the drive to be deleted (i.e., the target drive). To do that, we will use the “lsblk” command, for “list block devices.” It returns information about attached block devices, which are essentially hard drive-type devices.
Before running the command, take note of the target drive’s storage size, and detach all devices connected to your computer EXCEPT the drive storing the system you are live-booting from. Then, run “lsblk” with no arguments or options.
$ lsblk
The only device that should appear is your onboard hard drive and the live-booted USB. You will notice that “lsblk” returns a name (under “NAME”) beginning with “sd” and then a letter, with branching lines to the same name appended with a number. The name the branches originate from is the name of the “file” serving as the address of the drive in the /dev directory, a special directory that represents devices as files so the system can interact with them.
You should see an entry with the size of the USB drive hosting the live-boot system and a path under “MOUNTPOINT”, and (only) one other entry with the size of your target drive with no mount point listed. This second entry gives you the address for the output of “dd”. For instance, if your target drive corresponds to the name “sdb”, then that means /dev/sdb is the address.
However, to identify the address of an external drive you want to delete, run “lsblk” once with no device attached, check the (single) entry against your onboard drive’s size and make a note of its address, connect your target drive, run “lsblk” again, and check that its size corresponds to that of one of the entries in the output.
The output of the second “lsblk” command should now return two entries instead of one, and one of them should match target’s size. If your system is configured to automatically access inserted drives, you should see a path including “/media” under “MOUNTPOINT”, but otherwise the target drive should list nothing in that column.
As these addresses correspond to hard drives, it is important to be EXTREMELY careful to give the right one, because otherwise you will delete the wrong drive. As I noted earlier, if you accidentally give the address of your running system as the output, the command will immediately start writing zeros until you stop it (by hitting “Ctrl-c”) or your system crashes, resulting in irrecoverable data loss either way.
For example, since the letters are assigned alphabetically starting (usually) with the running system, if a single connected external drive is the target, it probably will be addressed as /dev/sdb. But, again, check this carefully, because it may be different for you.

Foiling Identity Thieves

Now we’re ready to delete. All we do is invoke “dd,” give /dev/zero as the input, and give our target (for this example, /dev/sdb) as the output. “dd” is an old command from the time before Linux, so it has a somewhat odd syntax. Instead of options prepended with dashes (“-“), it uses “if=” for “input file” and “of=” for “output file.” Our command, then, looks like this.
$ dd if=/dev/zero of=/dev/sdb
Depending on how big the target drive is, and how fast your processor is, this could take a while. With a powerful processor wiping a 16-GB flash drive, this could take as little as 10 minutes. For an average processor writing over a 1-TB drive, though, it could take a whole day. You can do other things with your computer (though not with that terminal), but they probably will be slower, as this is a comparatively processor-intensive task.
Though this is probably not something you’ll do often, knowing how definitely will serve you well in the rare instances when need to. Identity theft from forensically analyzing discarded drives happens all the time, and this simple procedure will go a long way toward defending against it.


What Einstein’s quirky habits teach us

Albert Einstein

Celebrated inventor and physicist Nikola Tesla swore by toe exercises – every night, he’d repeatedly ‘squish’ his toes, 100 times for each foot, according to the author Marc J Seifer. While it’s not entirely clear exactly what that exercise involved, Tesla claimed it helped to stimulate his brain cells.

The most prolific mathematician of the 20th Century, Paul Erdos, preferred a different kind of stimulant: amphetamine, which he used to fuel 20-hour number benders. When a friend bet him $500 that he couldn’t stop for a month, he won but complained “You’ve set mathematics back a month”.

Newton, meanwhile, bragged about the benefits of celibacy. When he died in 1727, he had transformed our understanding of the natural world forever and left behind 10 million words of notes; he was also, by all accounts, still a virgin (Tesla was also celibate, though he later claimed he fell in love with a pigeon).
Like it or not, our daily habits have a powerful impact on our brains

Many of the world’s most brilliant scientific minds were also fantastically weird. From Pythagoras’ outright ban on beans to Benjamin Franklin’s naked ‘air baths’, the path to greatness is paved with some truly peculiar habits.

But what if these are more than superficial facts? Scientists are increasingly realising that intelligence is less about sheer genetic luck than we tend to think. According to the latest review of the evidence, around 40% of what distinguishes the brainiacs from the blockheads in adulthood is environmental. Like it or not, our daily habits have a powerful impact on our brains, shaping their structure and changing the way we think.

Of all history’s great minds, arguably the master of combining genius with unusual habits was Albert Einstein – so what better person to study for clues to mind-enhancing behaviours to try ourselves? He taught us how to squeeze energy out of atoms, so maybe, just maybe, he might be able to teach us a thing or two about how to squeeze the most out of our tiny mortal brains. Could there be any benefits in following Einstein’s sleep, diet, and even fashion choices?


It’s common knowledge that sleep is good for your brain – and Einstein took this advice more seriously than most. He reportedly slept for at least 10 hours per day – nearly one and a half times as much as the average American today (6.8 hours). But can you really slumber your way to a sharper mind?

The author John Steinbeck once said: “It is a common experience that a problem difficult at night is resolved in the morning after the committee of sleep has worked on it.”

Many of the most radical breakthroughs in human history, including the periodic table, the structure of DNA and Einstein’s theory of special relativity, have supposedly occurred while their discoverer was unconscious. The latter came to Einstein while he was dreaming about cows being electrocuted. But is this really true?

Back in 2004, scientists at the University of Lubeck, Germany, tested the idea with a simple experiment. First they trained volunteers to play a number game. Most gradually got the hang of it with practice, but by far the quickest way to improve was to uncover a hidden rule. When the students were tested again eight hours later, those who had been allowed to sleep were more than twice as likely to gain insight into the rules than those who had remained awake.

Those who have more spindle events tend to have greater ‘fluid intelligence’

When we fall asleep, the brain enters a series of cycles. Every 90-120 minutes the brain fluctuates between light sleep, deep sleep and a phase associated with dreaming, known as Rapid Eye Movement (REM), which until recently was thought to play the leading role in learning and memory. But this isn’t the full story. “Non-REM sleep has been a bit of a mystery, but we spend about 60% of our night in this type of sleep,” says Stuart Fogel, a neuroscientist at the University of Ottawa.

Non-REM sleep is characterised by bursts of fast brain activity, so called ‘spindle events’ because of the spindle-shaped zigzag the waves trace on an EEG. A normal night’s sleep will involve thousands of these, each lasting no longer than a few seconds. “This is really the gateway to other stages of sleep – the more you sleep, the more of these events you’ll have,” he says.

Spindle events begin with a surge of electrical energy generated by the rapid firing of structures deep in the brain. The main culprit is the thalamus, an oval shaped region which acts as the brain’s main ‘switching centre’, sending incoming sensory signals in the right direction. While we’re sleeping, it acts like an internal earplug, scrambling external information to help you stay asleep. During a spindle event, the surge travels up to the brain’s surface and then back down again to complete a loop.

Intriguingly, those who have more spindle events tend to have greater ‘fluid intelligence’ – the ability to solve new problems, use logic in new situations, and identify patterns – the kind Einstein had in spades. “They don’t seem related to other types of intelligence, such as the ability to memorise facts and figures, so it’s really specific to these reasoning skills,” says Fogel. This ties in nicely with Einstein’s disdain for formal education and advice to “never memorise anything which you can look up”.

And though the more you sleep, the more spindle events you’ll have, this doesn’t necessarily prove that more sleep is beneficial. It’s a chicken and egg scenario: do some people have more spindle events because they are smart, or are they smart because they have more spindle events? The jury is still out, but a recent study showed that night-time sleep in women – and napping in men – can improve reasoning and problem solving skills. Crucially, the boost to intelligence was linked to the presence of spindle events, which only occurred during night-time sleep in women and daytime slumbers in men.

It’s not yet known why spindle events would be helpful, but Fogel thinks it may have something to do with the regions which are activated. “We’ve found that the same regions that generate spindles – the thalamus and the cortex [the brain’s surface] – well, these are the areas which support the ability to solve problems and apply logic in new situations,” he says.

Luckily for Einstein, he also took regular naps. According to apocryphal legend, to make sure he didn’t overdo it he’d recline in his armchair with a spoon in his hand and a metal plate directly beneath. He’d allow himself to drift off for a second, then – bam! – the spoon would fall from his hand and the sound of it hitting the plate would wake him up.


Einstein’s daily walk was sacred to him. While he was working at Princeton University, New Jersey, he’d walk the mile and a half journey there and back. He followed in the footsteps of other diligent walkers, including Darwin who went for three 45 minute walks every day.

These constitutionals weren’t just for fitness – there’s mountains of evidence that walking can boost memory, creativity and problem-solving. For creativity at least, walking outside is even better. But why?

Go for a walk! Einstein recommends it

When you think about it, it doesn’t make a lot of sense. Walking distracts the brain from more cerebral tasks, and forces it to focus on putting one foot in front of the other and not falling over. Enter ‘transient hypofrontality’ – translated into basic English, this impressive mouthful basically means temporarily toning down the activity in certain parts of the brain. In particular, the frontal lobes, which are involved in higher processes such as memory, judgement and language.

By turning it down a notch, the brain adopts a totally different style of thinking – one which may lead to insights you wouldn’t get at your desk. There isn’t any evidence for this explanation of walking’s benefits yet, but it’s a tantalising idea.


So what do geniuses eat? Alas, it’s not clear what fuelled Einstein’s extraordinary mind, though the internet somewhat dubiously claims it was spaghetti. He did once joke that his favourite things about Italy were “spaghetti and [mathematician] Levi-Civita”, so we’ll go with that.

Though carbohydrates have got a bad rep, as always, Einstein was spot on. It’s well known that the brain is a food-guzzling greedy guts, consuming 20% of the body’s energy though it only accounts for 2% of its weight (Einstein’s may have been even less – his brain weighed just 1,230g, compared to an average of around 1,400g). Just like the rest of the body, the brain prefers to snack on simple sugars, such as glucose, which have been broken down from carbohydrates. Neurons require an almost-contunuous supply and will only accept other energy sources when it’s really desperate. And therein lies a problem.

Despite this sweet tooth, the brain has no way of storing any energy, so when blood glucose levels drop, it quickly runs out. “The body can release some from its own glycogen stores by releasing stress hormones such as cortisol, but these have side-effects,” says Leigh Gibson, a lecturer in psychology and physiology at the University of Roehampton.

These include the familiar light-headedness and confusion we feel when we skip dinner. One study found that those on low carbohydrate diets have slower reaction times and reduced spatial memory – though only in the short-term (after a few weeks, the brain will adapt to salvaging energy from other sources, such as protein).

Sugars can give the brain a valuable boost, but unfortunately this doesn’t mean binging on spaghetti is a good idea. “Typically the evidence suggests that about 25g of carbohydrate is beneficial, but double that and you may actually impair your ability to think,” says Gibson. For perspective, that’s around 37 strands of spaghetti, which is a lot less than it sounds (around half as much as the recommended portion). “It’s not as simple a story as it sounds,” says Gibson.


Today, the many health risks of smoking are widely known, so this is not a habit that it would be wise to follow. But Einstein was a hardened pipe smoker, known as much around campus for the cloud of smoke which followed him as for his theories. He famously loved to smoke, believing it “contributes to a somewhat calm and objective judgment in all human affairs.” He’d even pick cigarette butts off the street and stuff the remaining tobacco into his pipe.

Not really the behaviour of a genius, but in his defence, though evidence had been mounting since the 1940s, tobacco wasn’t publicly linked to lung cancer and other illnesses until 1962 – seven years after his death.

Today the risks are no secret – smoking stops brain cells forming, thins the cerebral cortex (the wrinkled outer layer responsible for consciousness) and starves the brain of oxygen. It’s fair to say that Einstein was clever despite this habit – not because of it.

But there is one final mystery. An analysis of 20,000 adolescents in the United States, whose habits and health were followed for 15 years, found that irrespective of age, ethnicity or education, more intelligent children grow up to smoke more cigarettes, more frequently, than the rest of us. Scientists still don’t know why this is, though intriguingly it’s not true everywhere – in the UK, smokers tend to have lower IQs.


No list of Einstein’s eccentricities would be complete without a mention of his passionate aversion to socks. “When I was young,” he wrote in a letter to his cousin – and later, wife – Elsa, “I found out that the big toe always ends up making a hole in a sock. So I stopped wearing socks.” Later in life, when he couldn’t find his sandals he’d wear Elsa’s sling backs instead.

As it turns out, rocking the hipster look probably didn’t do Einstein any favours. Regrettably, there haven’t been any studies looking directly at the impact of going sockless, but changing into casual clothing, as opposed to a more formal outfit, has been linked to poor performance on tests of abstract thinking.

And what better way to end that with some advice from the man himself. “The important thing is not to stop questioning; curiosity has its own reason for existing,” he told LIFE magazine in 1955.


Tech, Technology, tech, apple, windows, electronics, design, mobile, first, speed, up, nine, project, macbookair, sublime, bootstrap, html5, css3, javascript, responsive, design, branding, logo, brand, graphic, desain, illustration, typography, love, artwork, graphics, computer, indirabali