Τετάρτη 2 Νοεμβρίου 2016

There is no place like home



Surely you've heard of 127.0.0.1. Additionally, you may know that 127.0.0.1 pointing to localhost. But, why is 127.0.0.1 the IP address of localhost and not something else?
Before trying to answer this question, let's talk a little about how things work. This address is used to establish a connection to the very same computer used by the end user. When dealing with IPv6 address, is set to use the concept :: 1:. As IPv6 addresses are entered into the game, the localhost became known as 0: 0: 0: 0: 0: 0: 0: 1.

How does 127.0.0.1? Why is it called so?
Often developers use 127.0.0.1 to test their applications. When you try to create a network connection to the loopback address 127.0.0.1, it works the same way as trying to make a connection to any remote device. However, you avoid connecting to the local network hardware interface.

But why the localhost IP address starts with 127?
Well, the 127 is the last network number in a class A network. It has a subnet mask 255.0.0.0. So the first assigned subnet address is 127.0.0.1. However, if you use any other number of the host portions, should work fine and return to 127.0.0.1. So you can ping to 127.1.0.1, if you want.

You may also have wondered why the last number of the network was chosen for this implementation. Well, the earliest referance of 127 as loopback is dating back to November 1986 RFC 990. And, by 1981, the 0 and 127 were the only reserved Class A networks.

The Class A network number 127 is assigned to the "loopback" function, ie, a datagram sent by a higher level protocol to a network 127 where the address should returns back to the host. Any IP datagram with a source or destination address set to a loopback address must not appear outside of a computing system, or be routed by any routing device. Packets received on an interface with a loopback destination address must be dropped. Such packets are sometimes referred to as Martian packets

IPv4 network standards reserve the entire 127.0.0.0/8 address block for loopback purposes. That means any packet sent to one of those 16,777,214 addresses (127.0.0.1 through 127.255.255.254) is looped back. IPv6 has just a single address, ::1.

As 0 was used for a particular host, the 127 stayed for loopback. Some would consider it more sensible to have selected 1.0.0.0 for loopback, but had already given to the BBC Packet Radio Network.

Δευτέρα 12 Ιανουαρίου 2015

"The Gold Bug", Poe on Encryption

Recognized today as the undisputed master of the American Gothic horror story, Edgar Allan Poe (1809–1949) revealed his genius in tales of death, terror, evil, and perversity. Highly skilled in achieving a calculated psychological effect, Poe created chilling fictional nightmares permeated by mysterious forces, grotesque creatures, and improbable hallucinations.

"The Gold-Bug" is a short story by Edgar Allan Poe. Set on Sullivan's Island, South Carolina, the plot follows William Legrand, who was recently bitten by a gold-colored bug. His servant, Jupiter, fears Legrand is going insane and goes to Legrand's friend, an unnamed narrator, who agrees to visit his old friend. Legrand pulls the other two into an adventure after deciphering a secret message that will lead to a buried treasure.

The story involves cryptography with a detailed description of a method for solving a simple substitution cipher using letter frequencies. The cryptogram is:
53‡‡†305))6*;4826)4‡.)4‡);806*;48†8
¶60))85;;]8*;:‡*8†83(88)5*†;46(;88*96
*?;8)*‡(;485);5*†2:*‡(;4956*2(5*—4)8
¶8*;4069285);)6†8)4‡‡;1(‡9;48081;8:8‡
1;48†85;4)485†528806*81(‡9;48;(88;4
(‡?34;48)4‡;161;:188;‡?;

The decoded message is:
A good glass in the bishop's hostel in the devil's seat
twenty-one degrees and thirteen minutes northeast and by north
main branch seventh limb east side shoot from the left eye of the death's-head
a bee line from the tree through the shot fifty feet out.

(The actual decoded message omits spaces and capitalization)

In cryptography, a substitution cipher is a method of encoding by which units of plaintext are replaced with ciphertext, according to a regular system; the "units" may be single letters (the most common), pairs of letters, triplets of letters, mixtures of the above, and so forth. The receiver deciphers the text by performing an inverse substitution.
Traditionally, the ciphertext is written out in blocks of fixed length, omitting punctuation and spaces; this is done to help avoid transmission errors and to disguise word boundaries from the plaintext. These blocks are called "groups", and sometimes a "group count" (i.e., the number of groups) is given as an additional check. Five letter groups are traditional, dating from when messages used to be transmitted by telegraph.

Poe played a major role in popularizing cryptograms in newspapers and magazines in his time period and beyond. "The Gold-Bug" also includes the first use of the term "cryptograph" (as opposed to "cryptogram"). To most people in the 19th century, cryptography was mysterious and those able to break the codes were considered gifted with nearly supernatural ability. Poe had drawn attention to it as a novelty over four months in the Philadelphia publication Alexander's Weekly Messenger in 1840. He had asked readers to submit their own substitution ciphers, boasting he could solve all of them with little effort. The challenge brought about, as Poe wrote, "a very lively interest among the numerous readers of the journal. Letters poured in upon the editor from all parts of the country." In July 1841, Poe published "A Few Words on Secret Writing" and, realizing the interest in the topic, wrote "The Gold-Bug" as one of the few pieces of literature to incorporate ciphers as part of the story. Poe's character Legrand's explanation of his ability to solve the cipher is very like Poe's explanation in "A Few Words on Secret Writing". 

William F. Friedman, America's foremost cryptologist, initially became interested in cryptography after reading "The Gold-Bug" as a child—interest he later put to use in deciphering Japan's PURPLE code during World War II.

Πέμπτη 20 Νοεμβρίου 2014

The Imitation Game: Historical Figures of Cryptanalysis

The Imitation Game was released in the United Kingdom on 14 November 2014, and will be released theatrically in the United States on 28 November 2014. The film portrays the race against time by Alan Turing and his team of code-breakers at Britain's top-secret Government Code and Cypher School at Bletchley Park, during the darkest days of World War II. The motley group of scholars, mathematicians, linguists, chess champions and intelligence officers had a powerful ally in Prime Minister Winston Churchill who authorized the provision of any resource they required. The film spans the key periods of Turing's life: his unhappy teenage years at boarding school; the triumph of his secret wartime work on the revolutionary electro-mechanical bombe that was capable of breaking 3,000 Enigma-generated naval codes a day; and the tragedy of his post-war decline following his conviction for gross indecency, a now-outdated criminal offence stemming from his admission of maintaining a homosexual relationship.

As you can understand rating films is not in the scope of this blog, so we will deal with two of the characters that are legends in information security history.

Alan Turing (Benedict Cumberbatch)

Alan Mathison Turing, OBE, FRS  [Order of the British Empire] [Fellows of the Royal Society] (23 June 1912 – 7 June 1954) was a British mathematician, logician, cryptanalyst, philosopher, pioneering computer scientist, mathematical biologist, and marathon and ultra distance runner. He was highly influential in the development of computer science, providing a formalisation of the concepts of "algorithm" and "computation" with the Turing machine, which can be considered a model of a general purpose computer. Turing is widely considered to be the father of theoretical computer science and artificial intelligence.

During World War II, Turing worked for the Government Code and Cypher School (GC&CS) at Bletchley Park, Britain's codebreaking centre. For a time he led Hut 8, the section responsible for German naval cryptanalysis. He devised a number of techniques for breaking German ciphers, including improvements to the pre-war Polish bombe method, an electromechanical machine that could find settings for the Enigma machine. Winston Churchill said that Turing made the single biggest contribution to Allied victory in the war against Nazi Germany. Turing's pivotal role in cracking intercepted coded messages enabled the Allies to defeat the Nazis in several crucial battles. It has been estimated that Turing's work shortened the war in Europe by as many as two to four years.

After the war, he worked at the National Physical Laboratory, where he designed the ACE, among the first designs for a stored-program computer. In 1948 Turing joined Max Newman's Computing Laboratory at Manchester University, where he assisted development of the Manchester computers and became interested in mathematical biology. He wrote a paper on the chemical basis of morphogenesis, and predicted oscillating chemical reactions such as the Belousov–Zhabotinsky reaction, first observed in the 1960s.

Turing was prosecuted in 1952 for homosexual acts, when such behaviour was still criminalised in the UK. died in 1954, 16 days before his 42nd birthday, from cyanide poisoning. An inquest determined his death a suicide; his mother and some others believed it was accidental. On 10 September 2009, following an Internet campaign, British Prime Minister Gordon Brown made an official public apology on behalf of the British government for "the appalling way he was treated." The Queen granted him a posthumous pardon on 24 December 2013.

Joan Clarke (Keira Knightley)

Joan Elisabeth Lowther Murray, MBE [Member of the Most Excellent Order of the British Empire] (née Clarke; 24 June 1917 – 4 September 1996) was an English cryptanalyst and numismatist. She worked as a code-breaker at Bletchley Park during World War II. Joan Elisabeth Lowther Clarke was born on 24 June 1917 in West Norwood, London, the youngest child of Dorothy (née Fulford) and the Rev William Kemp Lowther Clarke, a clergyman. She had three brothers and one sister.

She attended Dulwich High School for Girls in south London and won a scholarship to attend Newnham College, Cambridge where she gained double first degree in mathematics and was a Wrangler.

Clarke and fellow code-breaker Alan Turing became very good friends at Bletchley Park. Turing would arrange their shifts so they could be working together, as well as spending a lot of their free time together. In the spring of 1941, Turing proposed marriage to Clarke and subsequently introduced her to his family. After admitting his homosexuality to his fiancée, who was reportedly "unfazed" by the revelation, Turing decided that he could not go through with the marriage and he broke up with Clarke in the summer of 1941. After the war Clarke worked for GC&CS where she met Lieutenant-Colonel John Kenneth Ronald Murray and got married. Shortly after their marriage John Murray retired from GC&CS due to ill health and the couple moved to Crail in Scotland. They returned to work at GC&CS in 1962 where Clarke remained until 1977 when she retired aged 60.

Following her husband's death in 1986, Clarke moved to Headington, Oxfordshire, where she continued her research into coinage. During the 1980s she assisted Sir Harry Hinsley with the appendix to volume 3, part 2 of British Intelligence in the Second World War. She assisted historians studying war-time code breaking at Bletchley Park. Due to continuing secrecy among cryptanalysts, the full extent of her accomplishments remains unknown. On 4 September 1996, Joan Clarke Murray died at her home in Headington.

Σάββατο 11 Οκτωβρίου 2014

History of Major Information Security Incidents

Since the early days of communication, diplomats and military commanders understood that it was necessary to provide some mechanism to protect the confidentiality of correspondence and to have some means of detecting tampering. Modern computer history is filled with information security incidents. But what are the major incidents that changed our view on staying safe online? It all started in mid 40s...

Σάββατο 4 Οκτωβρίου 2014

Six Notorious Hackers

Robert Tappan Morris - The Pioneer
Morris was born in 1965. His father, Robert Morris, was a computer scientist at Bell Labs, where he helped design Multics and Unix. He later became the chief scientist at the National Computer Security Center, a division of the National Security Agency (NSA)

Morris Jr. attended Harvard University, and later went on to graduate school at Cornell. During his first year there, he designed a computer worm that disrupted many computers on what was then a fledgling internet. This landed him in court a year later.

Morris' worm was developed in 1988, while he was a graduate student at Cornell University. He said it was designed to gauge the size of the Internet. He released the worm from MIT, rather than from Cornell. The worm exploited several vulnerabilities to gain entry to targeted systems, including:
  • a hole in the debug mode of the Unix sendmail program,
  • a buffer overrun hole in the fingerd network service,
  • the transitive trust enabled by people setting up rexec/rsh network logins without password requirements.
The worm was programmed to check each computer it found to determine if the infection was already present. However, Morris believed that some administrators might try to defeat his worm by instructing the computer to report a false positive. To compensate for this possibility, Morris directed the worm to copy itself anyway, 14% of the time, no matter what the response to the infection-status interrogation.

This level of persistence was a design flaw: it created system loads that not only brought it to the attention of system administrators, but also disrupted the target computers. During the ensuing trial, it was estimated that the cost in "potential loss in productivity" caused by the worm and efforts to remove it from different systems ranged from $200 to $53,000.

Morris' stated motive during the trial was "to demonstrate the inadequacies of current security measures on computer networks by exploiting the security defects [he] had discovered." He completed his sentence as of 1994.


Kevin David Mitnick - The Star

Mitnick was born in 1963 and grew up in Los Angeles and attended James Monroe High School. He was enrolled at Los Angeles Pierce College and USC. For a time, he worked as a receptionist for Stephen S. Wise Temple.

At age 15, Mitnick used social engineering and dumpster diving  to bypass the punch card system used in the Los Angeles bus system. After a friendly bus driver told him where he could buy his own ticket punch, he could ride any bus in the greater LA area using unused transfer slips he found in the trash. Social engineering later became his primary method of obtaining information, including user-names and passwords and modem phone numbers.

Mitnick first gained unauthorized access to a computer network in 1979, at 16, when a friend gave him the phone number for the Ark, the computer system Digital Equipment Corporation (DEC) used for developing their RSTS/E operating system software. He broke into DEC's computer network and copied their software, a crime he was charged with and convicted of in 1988. He was sentenced to 12 months in prison followed by three years of supervised release. Near the end of his supervised release, Mitnick hacked into Pacific Bell voice mail computers. After a warrant was issued for his arrest, Mitnick fled, becoming a fugitive for two and a half years.

According to the U.S. Department of Justice, Mitnick gained unauthorized access to dozens of computer networks while he was a fugitive. He used cloned cellular phones to hide his location and, among other things, copied valuable proprietary software from some of the country's largest cellular telephone and computer companies. Mitnick also intercepted and stole computer passwords, altered computer networks, and broke into and read private e-mail. Mitnick was apprehended on February 15, 1995, in Raleigh, North Carolina. He was found with cloned cellular phones, more than 100 clone cellular phone codes, and multiple pieces of false identification.

In 1999, Mitnick pleaded guilty to four counts of wire fraud, two counts of computer fraud and one count of illegally intercepting a wire communication, as part of a plea agreement before the United States District Court for the Central District of California in Los Angeles. He was sentenced to 46 months in prison plus 22 months for violating the terms of his 1989 supervised release sentence for computer fraud. He admitted to violating the terms of supervised release by hacking into PacBell voicemail and other systems and to associating with known computer hackers, in this case co-defendant Lewis De Payne.

Mitnick served five years in prison—four and a half years pre-trial and eight months in solitary confinement—because, according to Mitnick, law enforcement officials convinced a judge that he had the ability to "...start a nuclear war by whistling into a pay phone", meaning that law enforcement told the judge that he could somehow dial into the NORAD modem via a payphone from prison and communicate with the modem by whistling to launch nuclear missiles. He was released on January 21, 2000. During his supervised release, which ended on January 21, 2003, he was initially forbidden to use any communications technology other than a landline telephone. Mitnick fought this decision in court, eventually winning a ruling in his favor, allowing him to access the Internet.

Since 2000, Kevin has been a professional security consultant, public speaker and author. He does security consulting for Fortune 500 companies, performs penetration testing services for the world’s largest companies and teaches Social Engineering classes to dozens of companies and government agencies. He is the author of a dozen books that have been translated into many languages, including "The art of deception" and "The Art of Intrusion".


Adrian Lamo - The Snitch

Lamo was born in Boston, Massachusetts in 1981. He does not have a high school diploma. According to Jennifer Kahn of Wired, Lamo was known as the "Homeless Hacker" for his supposedly transient lifestyle. Lamo has claimed that he has spent much of his travels couch-surfing, squatting in abandoned buildings and traveling to Internet cafes, libraries and universities to investigate networks, and sometimes exploiting security holes. Despite performing authorized and unauthorized vulnerability assessments for several large, high-profile entities, Lamo has claimed he refused to accept payment for his services.

As of March 2011, Lamo was allegedly "in hiding," claiming that his "life was under threat" after turning in Manning.

In December 2001, Lamo was praised by Worldcom for helping to fortify their corporate security. In February 2002 he broke into the internal computer network of The New York Times, adding his name to the internal database of expert sources, and using the paper's LexisNexis account to conduct research on high-profile subjects. The New York Times filed a complaint, and a warrant for Lamo's arrest was issued in August 2003 following a 15-month investigation by federal prosecutors in New York. At 10:15 am on September 9, after spending a few days in hiding, he surrendered to the local authorities of California. He re-surrendered to the FBI in New York City on September 11, and pled guilty to one felony count of computer crimes against Microsoft, LexisNexis and The New York Times on January 8, 2004.

Later in 2004, Lamo was sentenced to six months detention at his parents' home plus two years probation, and was ordered to pay roughly $65,000 in restitution. He was convicted of compromising security at The New York Times and Microsoft, Yahoo!  and WorldCom.

At his sentencing, Lamo expressed remorse for harm he had caused through his intrusions, with the court record quoting him as adding "I want to answer for what I have done and do better with my life."

In February 2009, a partial list of the anonymous donors to the WikiLeaks not-for-profit website was leaked and published on the WikiLeaks website. Some media sources indicated at the time that Lamo was among the donors on the list.

In May 2010, Lamo reported to U.S. Army authorities that Manning had claimed to have leaked a large body of classified documents, including 260,000 classified United States diplomatic cables. Lamo stated that Manning also "took credit for leaking" the controversial video footage of the July 12, 2007 Baghdad airstrike, which has since come to be known as the "Collateral Murder" video.

Lamo has stated that he would not have turned Manning in "if lives weren't in danger... [Manning] was in a war zone and basically trying to vacuum up as much classified information as he could, and just throwing it up into the air." WikiLeaks responded by denouncing Lamo and Wired Magazine reporter Kevin Poulsen as "notorious felons, informers & manipulators" and said that "journalists should take care."

Lamo has been criticized by fellow hackers such as those at the Hackers on Planet Earth conference in 2010, who called him a "snitch". Another commented to Lamo following his speech during a panel discussion saying: "From my perspective, I see what you have done as treason."

WikiLeaks founder Julian Assange calls Lamo "a very disreputable character", and says that Lamo's monetary support for WikiLeaks amounted to only 20 U.S. dollars on one occasion. Assange says that it is "not right to call [Lamo] a contributor to WikiLeaks", and questions the electronic record associated with the Manning–Lamo chats, because, according to Assange, Lamo has "strange motivations" and "had been in a mental hospital three weeks beforehand".

Lamo has been critical of media coverage of the hacker collective Anonymous, claiming that media outlets have over-hyped and mythologised the group. He also said that Anonymous is not the 'invulnerable' group it is claimed to be, and can see "no rational point in what they're doing."


Gary McKinnon - The Autistic Hacker
Gary McKinnon, born in 1966, is a Scottish systems administrator and hacker who was accused in 2002 of perpetrating the biggest military computer hack of all time, has been diagnosed of Asperger's Syndrome .

McKinnon is accused of hacking into 97 United States military and NASA computers over a 13-month period between February 2001 and March 2002, at his girlfriend's aunt's house in London, using the name 'Solo'.

The US authorities claim he deleted critical files from operating systems, which shut down the United States Army’s Military District of Washington network of 2,000 computers for 24 hours. McKinnon also posted a notice on the military's website: "Your security is crap". After the September 11 attacks in 2001, he deleted weapons logs at the Earle Naval Weapons Station, rendering its network of 300 computers inoperable and paralyzing munitions supply deliveries for the US Navy's Atlantic Fleet. McKinnon is also accused of copying data, account files and passwords onto his own computer. US authorities claim the cost of tracking and correcting the problems he caused was over $700,000.

Raphael Gray - The 'Saint'

Raphael Gray, born in 1982, is a computer hacker who, at the age of 19, hacked computer systems around the world over a period of six weeks between January and February 1999 as part of a multi-million pound credit card mission. He then proceeded to publish credit card details of over 6,500 cards as an example of weak security in the growing number of consumer websites.

Gray was able to break into the secure systems using an $500 computer he bought in his home town Clynderwen, Pembrokeshire, Wales. After publishing the credit card info on his websites, Gray posted a personal message saying law enforcers would never find him "because they never catch anyone. The police can't hack their way out of a paper bag." He was dubbed the "Bill Gates Hacker", when he sent Viagra tablets to Gates' address and then published what he claimed to be the billionaire's own number.

He was tracked down by ex-hacker Chris Davis who was insulted by Gray's "arrogance". It took Davis under a day to find Gray's information, which he then forwarded to the FBI. "The FBI was actually quite easy to deal with, although technically, they didn't really understand what it was I was explaining to them. The local police were also very polite, but they didn't understand it," said Davis. Gray was arrested when FBI agents and officers from the local Dyfed Powys Police turned up at the door of his home, which he shared with his mother and two sisters, in March 2000.


Aaron Hillel Swartz - The Legend
Aaron Swartz was an American computer programmer, writer, political organizer and Internet Hacktivist. Swartz was born in Chicago, Illinois, in 1986. The eldest son of Jewish parents Susan and Robert Swartz. His father had founded the software firm Mark Williams Company. Swartz immersed himself in the study of computers, programming, the Internet, and Internet culture.

Swartz was involved in the development of the web feed format RSS and the Markdown publishing format, the organization Creative Commons, the website framework web.py and the social news site, Reddit, in which he became a partner after its merger with his company, Infogami.

At age 14, he became a member of the working group that authored the RSS 1.0 web syndication specification. In 2001, Swartz joined the RDFCore working group at the World Wide Web Consortium (W3C), where he authored RFC 3870, Application/RDF+XML Media Type Registration. The document described a new media type, "RDF/XML", designed to support the Semantic Web. Swartz was co-creator, with John Gruber, of Markdown, a simplified markup standard derived from HTML, and author of its html2text translator. Markdown remains in widespread use.

Swartz's work also focused on sociology, civic awareness and activism. He helped launch the Progressive Change Campaign Committee in 2009 to learn more about effective online activism. In 2010 he became a research fellow at Harvard University's Safra Research Lab on Institutional Corruption, directed by Lawrence Lessig. He founded the online group Demand Progress, known for its campaign against the Stop Online Piracy Act. On December 27, 2010, Swartz filed a Freedom of Information Act (FOIA) request to learn about the treatment of Chelsea Manning, alleged source for Wikileaks.

On January 6, 2011, Swartz was arrested by MIT police on state breaking-and-entering charges, after systematically downloading academic journal articles from JSTOR. Federal prosecutors later charged him with two counts of wire fraud and 11 violations of the Computer Fraud and Abuse Act, carrying a cumulative maximum penalty of $1 million in fines, 35 years in prison, asset forfeiture, restitution and supervised release.

Swartz declined a plea bargain under which he would serve six months in federal prison. Two days after the prosecution rejected a counter-offer by Swartz, he was found dead in his Brooklyn, New York apartment, where he had hanged himself. No suicide note was found.

In June 2013, Swartz was posthumously inducted into the Internet Hall of Fame.