Through the IT forum jungle: an example with an Android smartphone

Daring upgrading an Android-based smartphone even if your carrier left you alone? Let's try, it is really worthy.

Firstly, if it is not automatically detected, you will need this step so that your Linux box can read the SD card as any other USB connected storage device.
http://wiki.cyanogenmod.com/wiki/Udev#HTC_All_Models

Secondly, you will need to install the android SDK and JRE. For that, go to
http://developer.android.com/sdk/installing.html and download a tgz for Linux

from http://developer.android.com/sdk/index.html

Thirdly, you will need to configure a graphical downloader typing android in the tools folder created in the second step above mentioned.

Fourthly, if Java is still not installed, you can download it from http://www.oracle.com/technetwork/java/javase/downloads/index.html

Let's take now, as an example our good old friend HTC Tattoo/Click:

http://wiki.cyanogenmod.com/wiki/HTC_Tattoo:_Full_Update_Guide
is a good guide but with some inaccuracies that will take extra time to overcome, here you are some tips:

- We encountered a showstopper, and we found that we were not the only ones having the same experience
http://forum.xda-developers.com/showthread.php?t=1060516

- However, after some time trying to implement the solution they propose, we realised that there was an easier way, using lateral thinking ;-)

If we cannot exit from ADB, then let's not exit and use two different ADB sessions, one using adb push to inject the required files and the other session adb shell where we reach the # prompt, i.e. we are root

Morale of the story: sometimes with the elements you have and your experience, you can solve a showstopper quicker than going deeper through confusing pages and pages of experiences from different users in IT forums.

As extra tips, try to make an application backup, as a possibility you can use http://www.androidpit.de/de/android/market/apps/app/com.metago.astro/ASTRO-File-Manager
or
http://www.androidpit.de/de/android/tests/test/391622/Titanium-Backup-root-wirklich-alle-Apps-sichern

For some versions of android 1.6 the universal androoter app is an option to root the device
http://www.androidpit.de/de/android/market/apps/app/com.uabeta/Universal-Androot

Little piece of advice, don't try both rooting possibilities simultaneously
they interfere between each other

And finally, two last hiccups

- One of the flashing files was too updated to work with an android 1.6 and we found the way forward in the following link (from the foum site of cyanogenmod themselves!)
http://forum.cyanogenmod.com/topic/33100-rooting-stock-tattoo-su-permission-denied/

- We were not able to find the sdcard root folder, the previous page also solves that, we need to connect the device in a non-USB mode so that the sdcard folder is mounted.

Finally, a tip from a colleague of mine, do not forget this app ;-) (thanks!)
https://market.android.com/details?id=com.googlecode.droidwall.free

Happy June labs!

Update your machine before it goes to a museum



Network detective

Here you are 3 "network detective" activities

Scenario 1: There is a Ubuntu Linux box connected to a shared LAN. There is a need to know whether that computer has had a network outage e.g. during the night or during the time when we are not looking at the screen. A network outage would mean that, for any given period of time, there was no network connectivity from the computer to the neighboring edge network device, a router, a switch or a hub, that it is connected to. What to do with no additional tools?

Quick solution:
$ grep -i networkmanager /var/log/syslog
and it will be a output similar to this:

Dec 25 10:55:30 aware NetworkManager[2520]: (wlan0): bringing up device.
Dec 25 10:55:30 aware NetworkManager[2520]:
(wlan0): supplicant interface state: starting -> ready
Dec 25 10:55:30 aware NetworkManager[2520]:
(wlan0): device state change: unavailable -> disconnected (reason 'supplicant-available') [20 30 42]
Dec 25 10:55:30 aware NetworkManager[2520]:
(wlan0): supplicant interface state: ready -> inactive
Dec 25 10:55:31 aware NetworkManager[2520]:
WiFi now disabled by radio killswitch
Dec 25 10:55:31 aware NetworkManager[2520]:
(eth0): device state change: activated -> disconnected (reason 'user-requested') [100 30 39]
Dec 25 10:55:31 aware NetworkManager[2520]:
(wlan0): device state change: disconnected -> unavailable (reason 'none') [30 20 0]
Dec 25 10:55:31 aware NetworkManager[2520]:
(wlan0): deactivating device (reason 'none') [0]
Dec 25 10:55:31 aware NetworkManager[2520]:
Policy set 'Wired connection 1' (eth0) as default for IPv4 routing and DNS.
Dec 25 10:55:31 aware NetworkManager[2520]:
Policy set 'Wired connection 1' (eth0) as default for IPv4 routing and DNS.

Network events will be identified e.g. in line number 6 the log says
activated -> disconnected (reason 'user-requested')


Scenario 2: There is a Ubuntu Linux box in a LAN. There is also the need to have a first approximation on the kind of traffic and IPs flowing through
the LAN e.g. the type of traffic, IP addresses that are chatting, packet sizes, and the like.

Quick solution:
# apt-get install iptraf
# iptraf

A character-based application will appear in the xterm window. Using the keyboard, there is the possibility to get a first glimpse of the data we mentioned we need in this scenario.

Scenario 3: There is a Ubuntu Linux box. There is also the need to have a fully fledged web-based network monitoring app running in localhost with statistics, graphs, apple pies and a myriad of possible functionalities.

Solution (based on http://www.cyberciti.biz/faq/debian-ubuntu-install-ntop-network-traffic-monitoring-software/)
# apt-get install ntop
# ntop (and choose an admin password to access the web interface)
# /etc/init.d/ntop restart

check that ntop is running at local port 3000
# netstat -tulpn | grep :3000
and connect via a browser to http://0.0.0.0:3000
Now the only required ingredient is time to fine tune ntop and to get the most of it!

By the way, if there is no need to start ntop at bootup time, just rename /etc/init.d/ntop to e.g. /etc/init.d/ntop.notnow

Happy network detective activities!


The evil is in the details ;-)



Book Review - Surviving Cyberwar by Richard Stiennon

In 2011 I had the opportunity to share some hours with Richard Stiennon, author of the book titled "Surviving Cyberwar". This post is a personal summary/overview on this light (not related to thought depth but to physical weight) book,  on the use of IT systems to endanger nations' resources as a developing threat. As always, a modest disclaimer, this summary does not replace the reading of the book but rather encourages it.

chapter 1
The first chapter provides some clues about the hazardous life of a cyber warrior, often endangering their personal balance and/or their social relations. Preparing, performing and even reporting cyber attacks is usually a lonely task. As an example, he referes to the "Titan Rain" operation.

chapter 2
This chapter explains the difference in activities among CIA, tasked with infiltrating into foreign organisations to protect US interests, the NSA, tasked, among other things, with intercepting hostile communications and the FBI, devoted to US internal affairs. In this chapter, the reader starts to receive the message that some countries are not equipped to monitor, detect or respond to cyber attacks in a comprehensive and coordinated manner.
Richard also provides some evidences of the real existence of cyber attacks, some of them synchronised with specific events in the physical world, like the ones happening between China and the US in 2001 (related to a Chinese fighter jet and a US reconnaisance plane).
In this chapter, there is also a reference to the popular Sun Tzu's book "The Art of War" and how it presents the spirit of current national intelligence activities i.e. counter-intelligence, psychological warfare, deception, security and fabrication. And, to make things even more interesting, in our current IT systems, there is not even the need to find a vulnerability. All is needed is for a recipient, e.g. of an email, to be induced to install a piece of SW in their computer.

chapter 3
This chapter presents a clear concept, the essence of spionage is access. Let's have this piece of wisdom in mind. Depending on what we assume that is hostile in our environment, we have different scenarios: simple traditional security assumes that endpoints are hostile, but the network can also be hostile, and even the user. This is why the concept of activity monitoring is so crucial.

chapter 4 
Here we read why email servers have been and are important elements in cyber attacks (example mentioned from reality: "ghost net")

chapter 5 
Let's highlight only one figure: The US pentagon spent 100$ million: a clear demonstration that cyberattacks are happening.

chapter 6 
Where is real innovation is happening? In regional conflicts between opposing nations. They have a link with kinetic attacks and all potential adversaries learn from them.

chapter 7
An introduction to a key player, Barret Lyon, a guru in DDOS defence, DDOS today can reach 60GB throughput! and we currently relay on ad-hoc responses. Certainly, there is also a reference to the BGP routing protocol, a real threat vector that needs to be secured.

chapter 8
These pages present a powerful concept: the power of crowdsourcing cyber attacks, based on ancient military school strategies. Almost everything can be crowdsourced e.g. the naming of a whale by Greenpeace. We also read about the use of twitter as a mobilisation tool. By the way, in some countries, the provision of an IP address owner can mean a 10-year sentence for that IP address user e.g. if they sent an email instrumental for an attack or a crime to succeed.
This chapter finalises presenting that some big countries have armies of blog commentators and practice web site censorship.

chapter 9 
This chapter deals with an interesting case study: cyber attacks targeting Estonia in 2007. It also presents a secondary effect: by blocking attacks, a country can cut itself off the Internet. A last point mentioned on these pages: how content management web servers are easier to DDOS that less complex web servers.

chapter 10
From this chapter, two details are worth stressing: opponents at war try to silence each other's Internet sites and cyber events are synchronised with events happening in the physical world.

chapter 11
It is now time to go deeper into the link between kynetic and cyber attacks. The author mentions that this has already happened. Additionally, an example of collateral damage worth mentioning is an unwanted DDOS against a site that shares resources with the initially targeted one. We read in this chapter thath we have to assume that any future military conflict will bring along cyber attacks. Until some years ago, armies lacked cyber response or attack capabilities, the question now is how can armies attract security experts? Richard Stiennon proposes, as a first step, the use of a similar method to the one used by medical staff in the military to attract good professionals.
Some additional ideas are that we need to experiment and to create security labs and also new international treaties e.g. will the NATO help their members only using cyber resources in case of a cyber attack against one member country? The problem with this is again, attribution, not easy at all!

chapter 12
Around the most important topic of this book, we read that IT warfare is an "just" an extension of the evolution of warfare. So far, the author highlights that there has been a mostly reactionary approach towards cyber attacks. He claims that there is a lot to learn from studying previous attacks. For example,
most of the current security measures such as patching IPS, etc come from the experience gathered in past criminal attacks. Subsequently, we read a strong statement: the decision by banks to guarantee customers' funds when they suffer an attack, more than to improve security, is a way to fund new criminal hackers. This is an reflection-deserving thought. A new angle to daily incident management business.
In this chapter we can also read that espionage and DDOS are the two new open fronts. The author touches upon some still open questions such us how to organise a cyber security operation or how to organise resilience in critical infrastructures?

chapter 13
According to Richard Stiennon, the 4 pillars of cyberwar are intelligence, technology, logistics and command. The goal of these cyber attacks is information dominance. In the 1980s, some cyber attacks were already succesful. This chapter also mentions a foundational concept: every party needs to understand each other's way of thinking. Therefore, monitoring communications, activity so close to signal analysis, is essential. He also mentions three steps in a cyber espionage activity: reconnaisance, acquisition and analysis.
These pages finalise refering to concepts like vulnerability discovery, exploitation, automation, malware, rootkits, backdoors, DDOS, SCADA, DNS and BGP attacks.

chapter 14
We start reading a clear fact: human beings and organisations like states are slow to recognise the need for preparedness. Throughout this chapter, we read how different countries e.g. USA Germany Estonia... are preparing (or have prepared) themselves for cyber warfare (e.g. Estonia aims at a public-private sector collaboration). An element of this preparation is the creation of CERTs in different countries.

chapter 15
This last chapter talks about repercusions of this new scenario. Apart from improving IT systems in military organisations and the use of cyber attacks as deterrent measures, there are broader consequences. Some of them are good, like more secure companies and infrastructures, together with intrnational
cooperation, but some others are negative, like more control exerted to citizens by states and business being also victims of these attacks.

All in all, a book that everyone interested in geopolitics, even if they are not IT literate, will find worth reading. Thank you Richard for this book!

Happy reading!

New attack instruments

Tweet this post to your reader colleagues!

The Economics of Security - A talk by Ross Anderson in 2011 AusCERT

The following is a personal summary of a conference/lecture given by Mr. Anderson in the most recent AusCERT event. This summary is just a collection of un-connected (and wrongly interpreted?) thoughts. It does not replace the pleasure to listen to the lecture itself.
I listened to the audio via the Risky Business podcast. Here is the link to the mp3 file. The topic of the talk was "the economics of security".

The Economics of Security

system engineering is not enough
10000 years ago human beings invented agriculture. Soon after, human organisations, driven by people, created the civil service function. This was organised by individuals at the local level, this is why it was kept simple. As an example, he mentions a system that is still being run in Bombay to deliver packed lunches (with more than 20000 people in the system). Now this has become a complex system. The world is changing. We now have people plus software, and this is the novelty. Software adds complexity.

Facebook has reached 600 million users. How do you deal with competition among members? with conflict? All this is a new scenario.

Initially security was seen as an external boundary problem. By that time, all the systems related were under the same chief executive. Today the world works differently, there is a market and a supposed equilibrium. A traditional system engineering approach is required, but unfortunately this is not enough to manage this security effectively.

First thought: In the UK, banks are more protected than customers in case of a conflict between them. In the US, the situation is the opposite. So, we would think that security in US banks would be higher. However, it is the other way round.

Second thought: Will Internet users pay an antivirus (AV) to protect, not their PCs, but other systems such as Amazon clouds and the like?

the role of incentives
Things need to be very dependable. Things go wrong because the incentives are not right e.g. the triode customer, merchant and bank or why should an electricity company invest in extra capacity (to offer a more dependable service) if that would also benefit a competitor electricity company?

Third thought: Security and Insecurity are often an externality - it is not a result of a direct effort but a side effect of what people do globally.

Can governments do something about cybercrime? It seems so. See the recommendations below.

the economics of information related markets
The distinguishing features:
- The network effect, the more people use it, the more useful it is for each user - e.g. email and fax - the winner in the market gets all - after the tipping point.
- Fixed costs are high and marginal costs very low.
- Information likes to be free - At the margin information products cost zero - you need to find a distinguishing feature that is not price (e.g. compatibility).
- Switching costs - your price should consider them and adjust to that - this is why many security mechanisms are there to control users and not to protect users - e.g. lock-in mechanisms.

With all this, the likelihood of a monopoly is really really high.

enticing users through iterations
Getting it right in version 3 - this is how the world turns - the vendor need to be quick and to follow a recurring pattern in their value proposal. This is why, in every platform market, vendors first launch the platform, as open as possible, even if it is insecure... to make it easy for people to build apps there. Then they lock it out later.
Mr Anderson mentions that exactly the same happens with payment networks e.g. this is why we use SSL and not SET. it was very quickly deployed (even if it is suboptimal).

asymmetric information
The example of 100 cars, 50 are great and 50 are lemons - the good ones cost 2000 and the bad ones 1000. Will the price in the market be 1500? Nope, no one would buy a good one for 1500. In second-hand markets, nobody knows if it is a lemon or not - this affect the security product market e.g. how could we tell the difference between a good and a not so good encryption product? We can't. This is why the IT market went through the path of providing a pile of features, basing sales on a long list of irrelevant features.

adverse selection
E.g. sick people buy more insurance. If we apply this fact to trust, we see that websites with any sort of certification are twice as likely to be malicious that those with no seal at all e.g. in google, the paid search result is twice as probable to be malicious than the non-paid top result. This means that certification schemes work in rather unexpected ways.

In conclusion, without the proper incentive, there is no right security.

what do we then need as citizens?
Security breach notification laws, publication of fraud and malware statistics, sheding light on who is good and who is bad. There is a clear a role for governments on this topic. Google and similar names do not publish those data to avoid lawsuits (only 3 out of the 27 EU members publish those statistics),

An additional measure could be the issuance of cybersecurity checks/certifications in products before they are released (e.g. do they offer the possiblity to be regularly updated in an easy manner?).

Together with security engineering, we need to touch upon adjacent knowledge fields such as game theory, psychology and business to understand security.

In terms of security resilience, we need to collect long term network performance data and to create regulation to build extra capacity (a big issue will be who pays for it?) so that we provide the appropriate incentives to deploy measures such as  BGPsec or DNSsec.

We find more details on Mr Anderson's recommendations in an ENISA paper titled "resilience of the internet interconnection ecosystem" (or in the executive summary). The headlines are the following:

1 - Incident Investigation - An independent body should thoroughly investigate all major incidents and report publicly on the causes, effects and lessons to be learned.
2 - Data Collection of Network Performance Measurements
3 - Research into Resilience Metrics and Measurement Frameworks
4 - Development and Deployment of Secure Inter‐domain Routing
5 - Research into AS Incentives that Improve Resilience
6 - Promotion and Sharing of Good Practice on Internet Interconnections
7 - Independent Testing of Equipment and Protocols
8 - Conduct Regular Cyber Exercises on the Interconnection Infrastructure
9 - Transit Market Failure

Happy reading!

Security economics: Keeping the house protected and open
Tweet this post to your friend economists ;-)

Robin Dreeke on building rapport - A new pill of wisdom from the SE podcast

The Social-Engineer.org crew always provide really useful information on human behaviour. This time I highlight a podcast about how to build rapport, where they interview Robin Dreeke, FBI agent specialised on these powerful topics. If you have 77 free minutes, listen to the entire podcast. If you don't, at least browse through the bullet points below, they are a very personal summary of the interview (some topics repeat themselves given their importance).
  • Building rapport: You can't fake it. It needs to be real (minute 20).
  • Stay within reality, send a congruent message with your words and non-verbals (minute 20).
  • How to defeat anxiety and stress when talking in public? Think that you are doing it to help a friend (minute 21).
  • Pre-text yourself: Offer something that your audience (or your interlocutor) would enjoy and like. Imagine they are your friends and you would like to share something with them. Be ready to trigger a good feeling in them (minutes 22 and 23).
  • Focus on making your interlocutor feel very well while you are pursuing your goals (minute 23).
  • Key aspects to consider when talking to someone: Don't try to impress, suspend your ego, downplay yourself, use the technique of sympathy to elicit help and reciprocal altruism (minute 25).
  • Make a quick smile, a quick glance and then glance away. Don't stare at them! (minute 26).
  • Keep your tempo slow, don't over speak, don't over sell, be confident but remember, you are seeking help (minute 27).
  • Appeal to their sense of humanity, seek help, seek their opinions, let them know that you value their opinions, make them believe that they are experts on their topic, open up to them (minute 28).
  • Get people's shields down by talking about dates and birthdays. Prepare your pocket of things about yourself and share it with them. Once you are done, they will open up to you (minute 32).
  • Send out an artificial time constraint, verbally or even better, non verbally (e.g. talk to them over the shoulder - talking at an angle, your feet and hips should be pointed like your are going to leave, keep the chin a little bit down and mention that you only have a few minutes - minute 33).
  • Start threading on the context they give you as a response. Be patient.
  • Accept people for who they are and validate their choices. Don't be judgmental. Don't pass judgement. 
  • How to do it when you don't agree? Be fascinated about them. Try to understand every aspect of their answer. Answer with "what an amazing thing you did!".
  • Constantly practice all the time, it is a muscle you need to train (minute 39). Talk to a stranger every day (get a little adrenalin rash).
  • People love talking about themselves. People don't care about you (hard but real fact).
  • Never argue with someone you try to social engineer. Ask them the question to them and let them answer.
  • Let the people filling the thoughts, the gaps in a conversation for you. Silence with little non-verbal confirmations are great.
  • Every generation has their own nuances.
  • If you don't have kids, reflect about friends who have them or even your own experiences when you were a kid.
  • If your interlocutor has a bad day, validate them and offer your help. People will start opening up (minute 49).
  • If you appear threatening, make a little joke and refer to that appearance in a critical way. Upper your chin a little bit.
  • People love the fact that you are trying to accommodate them.
  • As soon as you say "hey, I am not a bugger", people will believe. People take you at your face value.
  • Most people will go out a long way not to lie. Lying is a very uncomfortable thing to do. People generally don't want to lie.
  • Reciprocal altruism: Never try to impress but seek help. People are willing to help.
Thanks again to the Social Engineer crew!

Sides of human beings

Tweet this post to those in need of building rapport ;-)