How ECDHE is signed by RSA in ECDHE_RSA cipher About ciphers that use ECDHE as Key Exchange and RSA as Authentication:

How exactly this two algorithms work together, is ECDHE process encrypted by RSA public key?
What are the DH parameters?
Please explain this process as a whole, I'm in trouble to connected all parts of the authentication and key exchange process.
Is ECDHE used only for PFS (forward secrecy), or there others benefits?

Here's how it works in a nutshell:

1)  The client connects to the server.  The server advertises the SSL/TLS protocols that it supports, and sends its SSL certificate to the client.  The certificate includes an RSA public key, and the certificate is (presumably) signed by a recognized CA
that the client trusts.

2)  The client verifies the certificate's CA signature, and (presumably) trusts that the certificate is valid.  The client and the server agree to use ECDHE.

3)  The client and the server generate a set of ephemeral ECDHE keys that are used to facilitate the secure session.  The keys sent by the server to the client are signed by the server using the server's private key (which corresponds to the public key that was previously sent as part of the certificate in step 1 above).  The client validates that the signature is valid using the server's public key received previously (which was previously determined to be trusted).  Thus, the client can trust that the ephemeral keys that it received from the server were indeed sent from the server, and not from a man-in-the-middle attacker.

4)  The client and the server proceed with secure session using the set of ephemeral keys.  These keys are discarded by both the client and the server at the end of the session (and not reused) to facilitate perfect forward secrecy.


Can I get malicious malware in my computer or any kinds of virus by registering through Google/Facebook to a specifc site? Lately, there is a start up company in Israel called Initiative Q and currently it gives out coins (that are similar to bitcoin but they don't run on Blockchain technology) in order to advertise their services. (afterwards, these coins will supposedly have value)

As a result, there a lot of rumors now about whether it's malicious or not which I'm quite skeptical about it being mailcious because you register through google or facebook, it has a https certificate and the CEO is a well known business person.

My question:  Let's presume they have bad intents, is it resonable to have viruses planted on your PC/phone just via registering throgh Google/Facebook?

The potential for getting malware has nothing to do with how you register. Installing their application is a much bigger factor in getting malware.


What are the risks for putting bank account details on a website? If I want to accept donations on a website, what risk is there in showing bank account number and sort code?

Assuming you are talking about personal accounts not company accounts here. It's part of your identity and you should protect it as much as possible, risk is greater if they can find your address (fairly easy - online address finders, whois records if you  own the website) or your date of birth.

There was a case a few years ago where a UK celebrity claimed nothing could be done with their acct no / sort code and published them in the press - a stranger used their details to set up a direct debit to a charity. link to source (BBC)

Although you might have a number of trusted customers - your details will be available to anyone who can get to your site and some of those may be malicious. If you are in the UK, the direct debit guarantee may cover you if any one set up anything like that but your bank may consider it reckless to post your details in public. I certainly would be very uncomfortable doing so and would consider a payment gateway instead.


What are read state and write state in SSL connections? The SSL handshake contains the change_cipher_spec. When this change_cipher_spec is received, the pending read state is copied to current read state, and when change_cipher_spec is sent, the pending read state is copied to current read state.

What is the significance of theses states and what impact (in terms of data transfer/ encryption) do they have?

It's the state of the encryption.  The pending state includes new encryption keys, and initialization vectors.  There is a write key for sending data, and a read key for receiving data.  The state of the keys and resulting IVs are the read and write states.

So when the current read/write state is overwritten with the pending read/write state it means that the new encryption keys and IVs are to be used for future communication.  Until a new Change Cipher Spec message is received.

The significance of these states is that they keep track of the cryptographic state as data is being encrypted and decrypted.  When a new key is negotiated these states are updated to use the new key that was negotiated between the peers.  Key renegotiation is common among most cryptographic protocols.

To follow up on the comment by @Makif, the cryptographic state is complex.  It keeps track of:

Symmetric algorithm (mode of operation and size)
Asymmetric algorithm
Symmetric encryption keys
Initialization vectors
Integrity keys (Message Authentication)

Essentially everything in a cipher suite, and any (or all) can be renegotiated and changed when a Change Cipher Spec message is received.


Is it possible to exploit XSS by replacing image data for img tag If I have HTML page served over https with image loaded over http (image from other domain):

<img src="http://some-image.png"/>

so it's possible to inject any data to browser as image by using MITM attack.
Is it possible to inject some Javascript code instead of image or maybe wrap some code to SVG image to execute this code in browser? Or the only risk is that someone can replace one image with another?

There're some exploits in old browsers, e.g. Opera10 allows to execute Javascript for SVG fonts in .svg files (https://html5sec.org/#43):

<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg onload="alert(1)" xmlns="http://www.w3.org/2000/svg">
<defs></defs>
</svg>


Does injecting my own key material into the authenticator undermine authenticator's attestation? I'd like to be able to inject my own key material in the FIDO2 authenticator; at the very least it will remove the need to trust the vendor (because we have no guarantee whether the vendor keeps copies of the keys to themselves, because of government request or for any other reason).

So I believe that for customers it'd be very valuable to be able to set their own key material.

However, Yubico argues that if they allow that, it would:

  "undermine device attestation, which would likely disqualify those
  authenticators from high-security applications like financial
  institutions"

I'm not quite aware of the regulations in this area, and so, my main question is, whether that is true. I'm struggling to understand why by setting my own key material (and thus by improving my personal security), I would disqualify the authenticator being used.

Also, it looks a bit ironic since these days financial institutions tend to trust SMS and not U2F, even though SMS is anything but secure. I do hope that this is going to change someday though.

For reference, the discussion is happening here: WebAuthn recovery credentials extension

The argument is that, if you supply your own key material, the key manufacturer has no way to verify that the key material is sufficiently random, not stored elsewhere, etc. Imagine if you are the victim of a sophisticated targeted attack, and you generate the key material on a computer that has malware on it which exfiltrates it to the attacker. Or perhaps a supply chain attack, Alice sets the key material then hands the authenticator to Eve to deliver it to Bob, but by the time Bob receives it Eve has changed the key material to a value she knows. This would be fixed by Bob setting his own key material, but then Alice has to trust Bob to do that correctly.

It sounds like Yubico wants to be able to say "if an attestation is verified up to our root cert, we guarantee that the associated keypair comes from a Yubikey, and the key material used to create the keypair was generated securely by us and is stored only on the authenticator." If they allowed you to set your own key material they would no longer be able to make that guarantee.

Now this doesn't really matter for public websites, and most (or all) public websites that allow U2F or WebAuthn for 2nd factor don't bother checking attestation at all. But for something like a high security intranet, there could be value in auditing a small number of authenticator manufacturers and using attestation to only allow authenticators from those manufacturers. In that scenario not being able to modify the key material could be seen as an advantage.

  Also, it looks a bit ironic since these days financial institutions tend to trust SMS and not U2F, even though SMS is anything but secure.

I imagine he's talking about employees of a financial institution rather than clients.


Continuous integration SaaS security considerations How do CI SaaS products protect themselves from bad actors? When a CI server builds and tests arbitrary code, how can we be sure this code is not some sort of exploit? Are CI companies like Travis inherently flawed? I would imagine they have solved this apparent arbitrary code execution exploit, but I have no idea how they would go about doing that. Do they just allocate a VM to every user? If so, this seems like a bad option because of the VM overhead (not to mention the possibility of escaping the VM).

How do CI SaaS products deal with this?

It's going to depend on the SaaS, but you might be asking the wrong question.  Are the problems mitigated by you self-hosting?  They probably become drastically worse.

CI is inherently problematic only when you forget what it is doing and fail to protect it correctly, regardless of whether or not it's SaaS or self-hosted.  If you are the target, and you have malicious code build procedures on an SaaS, you're probably lucky.  On success, they get pwned.  Not you.  If you have malicious code which was committed to your source repositories undetected, and you deploy that, you're probably in for some hurt.  Services are not going to detect that.

What are you protecting?  Your source code or your servers?  Define risk and determine watchguard procedures for source code to prevent malicious code from being introduced.


Risk involved with using SSH for CTF challenges? I'm new to the INFOSEC scene and was intrigued by the concept of CTF challenges.  I was hoping to get started with OverTheWire.org which requires you to SSH to their server to complete the challenges.

I am running Kali on a VMWare VM using bridged networking to my host device, which is on my home network.

Are there any security-related concerns I should take into account before using SSH?

OverTheWire is a very reputable site that has been used for war games/training for a long time. You don't have anything to worry about there.

As far as SSH goes, Kali does not by default run an SSH server, only the client. This means that you can make outbound connections, but a remote server cannot attach to your SSH session and send commands back. Just take caution and avoid trying to make a connection back to your machine for any reasons.


Advantages of multiple valid CSRF tokens As far as I understand there are two approaches to perform CSRF protection:

1) CSRF token per session - the token is generated once per session. This is the easiest way;

2) CSRF token per request - the new token is generated on each request, and the old one becomes invalid.
This is more secure but the webapp might be broken when tabbing and clicking "back" button in the browser.

A few days ago I started to analyze how Node.js Connect framework implements CSRF protection and noticed that it uses the third approach:

New CSRF token is generated on each request, but the old one doesn't become invalid.
So there are multiple valid CSRF tokens for the user at once.

My question is: What are advantages of multiple valid CSRF tokens?

Thank you very much.

P.S. I'm not very strong in English so please explain as simply as possible. Thank you again

EDIT (rephrasing my question):

The main benefit of generating new token on each request (and making old one invalid) is that token becomes short term
and even if attacker steals the token, it will expire very fast. But with Connect an old token doesn't expire,
which makes this approach the same as using single token per session.

So why did Connect developers decide to generate a new token on each request? Am I missing something?

My question is: What are advantages of multiple valid CSRF tokens?

In general, there's no particular security advantage... the important bit about a token is when and how it becomes invalid (as in the previous discussion about whether a token becomes invalid after a single request or not). When and how many tokens are generated is more of an implementation detail:

If you implement CSRF tokens as random values stored persistently (the 'synchroniser token' pattern), you don't really want to store more than one token per session, as it will take more and more database bandwidth to do so. So it's natural in this model to have just a single token stored as an attribute on the session.

If you implement CSRF tokens as a signature (typically: HMAC) over the session assertion then you're validating that token by checking the signature with your application's secret key, so you don't need to store the token at the server side at all. In this model it is cheap to generate/sign a new token every time, and as the tokens typically include a timestamp and a random salt, they'll be different each time.

The usual advantage of the signature method is that you don't need storage, so it can potentially be part of a session-less access control scheme. The disadvantage is you need to manage the secret key safely. (But often you already have that burden anyway.)

However...

  So why did Connect developers decide to generate a new token on each request

Unclear. Judging by the code on the linked page Connect has a random value stored on the session, but then the tokens it issues are signatures over this random value and another per-token random value.

This doesn't appear to have any advantages over plain synchroniser-token: you still have to store session attributes, and the issued tokens aren't limited by any other signed restrictions (eg expiry timestamp or revokability). So knowledge of the issued token grants the same access as knowledge of the stored random value. They are fully equivalent, so there's no obvious point in having the varying issued tokens at all, you could just issue the stored random value with no security downside.


NIKTO: Requires Authentication for realm ''MD5'' I am trying to perform a scanning of a web server using Nikto using:

nikto -id id:pass -h xxx.xxx.xx.xxx

I am specifying HTTP Basic authentication credentials and indeed with this credentials I can log to the IP address I am scanning. So I am expecting result, but instead I am getting the following:

 Server: blahblah
+ The anti-clickjacking X-Frame-Options header is not present.
+ The X-XSS-Protection header is not defined. This header can hint to the
user agent to protect against some forms of XSS
+ The X-Content-Type-Options header is not set. This could allow the user
agent to render the content of the site in a different fashion to the MIME type
+ / - Requires Authentication for realm 'MD5'
+ No CGI Directories found (use '-C all' to force check all possible dirs)
+ / - Requires Authentication for realm 'MD5'
+ / - Requires Authentication for realm 'MD5'

I assumed the problem is with the HTTP credentials, but I am adding the right one. Since Nikto is new to me I cannot really understand what the issue is.

Could you please help me with that?

As Nikto's README.md point out; The parameter for host authentication -id's format is:

id:pass or id:pass:realm

You can probably try this: nikto -id id:pass:MD5 -h xxx.xxx.xx.xxx

Also, you can find here the authentication plugin's code (written in Perl), and here the Wiki of this project.


BlackHole Toolkit v2 JAVA Payload Stage Code Execution - What does this activity mean?! I cannot get hold of the owner of the server to check An analyst came across this alert - BlackHole Toolkit v2 JAVA Payload Stage Code Execution from the Checkpoint IPS coming from a server, the event is recorded as a blocked outgoing connection attempt - and to everyone's surprise has been triggering twice on average every hour for months(I know).

It was logged once a long time ago when first seen but the server owner said they didn't find anything on it.

The odd part is that the connection is only and always an outgoing attempt to one IP 89.187.145.139, which leads to a website called udger.com.

This site means nothing to anyone and has no malicious activity attributed to it.

Can anyone please give us insight as to what it going on and how to address it?

It means that someone using the Blackhole exploit-kit - a kind of collection of tools which allows you to exploit vulnerabilities easy, it's an underground-tool and distributed mostly by crime-related websites - tries to exploit a vulnerability on your server.

But your IPS is detecting & preventing that.

What I'd do in your situation is first making sure all software (especially the one of Java) are up-to-date, and try to download the exploit-kit from this reputable website (At own risk!) and try to attack your own website using that kit. Back-up your website set-it up on another machine (localhost) with IPS out, and try it.

Like that you might discover what's wrong.


What is TTP hunting? What is "TTP hunting" in terms of network security research?

I came across this term, but do not know what this is . Tried to google it, but TTP seem to stand for many different things, but none of them seemed related to network security or malwares.

According to this TTP refers to the Tactics, Techniques and Procedures of cyber threats.

Edit:

  Traditional security measures like firewalls, IDS, endpoint protection, and SIEMs are only part of the network security puzzle. Cyber Threat Hunting refers to proactively and iteratively searching through networks or datasets to detect and respond to threats that evade traditional rule- or signature-based security solutions. It includes using both manual and machine-assisted techniques, and aims to find the Tactics, Techniques and Procedures (TTPs) of advanced adversaries.


Is it worthwhile to restrict SSH on home web server to local network? First, some background: I have a web server (Linux) which I run from my house. I have a relatively small website, and have just set up SSH. While modifying the firewall, I had the choice to pick either A) Allow access from anywhere or, B) Restrict to 192.168.0.0/16. I went with option B.

I spend a lot of time outside of home, however, and this restriction is getting annoying. I know that it likely adds some extra security, so I don;t know what to do.

My question is: How (in)secure is allowing anybody to try to connect to SSH? Does the risk outweigh the benefits of being able to work away from home?

The second you open up a SSH port to the public web it will have multiple brute force / default credentials attempts against it. Just automated tools trying to get access - its up to you to weigh the risks, but if you go ahead insure good security hygiene. Turn off passwords based auth - limited retries etc.


Is there a way to add salted hashing to my user authentication without breaking my former login server I am presented with the following scenario:

I have a MySQL-Database with a table of users. The table has two fields: username and password. The password is stored as an unsalted hash.

An over 15 year old application uses this database to authenticate access to its services. It is only accessible internally.

Our team is tasked to modernize these services by offering a new application following best practices and lessons learned of the last 15 years (and potentially more that were ignored in the original application). This application shall be accessible from the wide open internet.

We are supposed to reuse the current database for authentication purposes to allow both applications to run in parallel on the underlying same authentication database.

I voiced several concerns regarding security as this application is about handling personal details of my coworkers and me.

We decided that part of our modernization is that password policies are put in place and that passwords are stored both salted and peppered.

This means our database table would get a third field salt and the password field now stores our salted and peppered hash.

The problem here is that this will break the authentication in our old application. As the code is very much legacy and we don't even have a working compiler for it anymore changing the code of the original application is out of question.

My question therefore is:

Is there a secure way to add salt (and pepper) to our authentication database while maintaining the old application's ability to authenticate users? Keep in mind that while the old application is inherently insecure it will not be accessible outside of our intranet, the new application however will be.

You have conflicting requirements here. The compatibility requirements forces you to keep the old hashes. The security requirements forces you to drop them. You will have to make a choice here about what requirements to fulfill.

If you decide to keep the backwards compatibility, try making the best out of a bad situation:

The old hash and the new hash should be stored in different tables, and the database user that the web application uses should not have read access to the old hash. Use table and/or column permissions for this.
As soon as you no longer need the old application, drop the table with the old hash. Ashley Madison famously failed at this point - they upgraded to bcrypt, and then for some idiotic reason they left the old MD5 hashes lying around in the database. When the database was leaked, that fancy bcrypt did not help much...

Or, alternatively, if you are not afraid to create a bit of a mess:

Drop the old hashes. In the new application, add on option "Create temporary password for old application". It gives you a long, random password that is hashed in the old way and only kept in the database for X minutes. The user can then logg in to the old application, and the password is then automatically deleted.


How to figure out encryption given input and output text? I need to figure out how some fields are being encrypted.  In my program, I can change the input text and see the encrypted output text.

For example, "Admin" results in "51@fnmk5gHT[^FX".

I tried doing one letter at a time to see the results, but combing letters didn't really mean combining the result of the encrypted text.  Any idea how to begin? Or even identify what is being done here?

Most software states what type of encryption they use, so it should be pretty easy to find out.
If that's not possible, you could try to encrypt the same string with the most common tools existing and see what matches the result.

Start with MD5 generator (http://www.md5calc.com) and go from there with the most common ones. All of them have only versions. Theres an extremely high chance that it is one of the most widely used ones.


Why IPv6 showing on whatismyip.com? I use Tor Browser on Whonix. Why I see IPv6 (something like 3221:23f9:c:67h:0:0:0:3) on whatismyip.com?

Is that website can see my MAC Address?

As indicated on the IPv6 roadmap of the Tor project, tor has had support for exit nodes contacting destinations over IPv6 since 2.4.8-alpha. The closest stable release I could find that followed is 2.4.19 from the end of 2013. I don't know exactly which nodes need to support it for a connection to be established over IPv6, but by now, every node in your chain should have at least that version. So all you're seeing is your exit node contacting whatismyip.com over IPv6, and whatismyip answering with the exit node's IPv6 address (the address format seems to confirm this is a manually chosen address as it ends in 0:0:0:3).

If you still have the exact IP, you can check it was indeed an exit node on that day using exonerator.

By the way, IPv6 implementations do not necessarily leak the MAC address by default thanks to RFC4941, which, in addition to a MAC address based IP, assigns a randomly chosen temporary address on every interface, which changes regularly and is used by default for outgoing connections. On Linux this can be controlled using net.ipv6.conf.all.use_tempaddr
net.ipv6.conf.default.use_tempaddr. Many distributions don't enable it by default, saying it can cause problems for unaware users, and I'm having trouble finding out what the default value is for whonix, but as a privacy oriented distro, I would hope it is activated... Of course, manually assigned IPv6 addresses also don't have to leak the Mac address.


How can we represent SSL and Firewall in OSI Model? I want to draw an architecture diagram for a general ERP application.

In that I have come across a confusing point: where should I place the SSL and Firewall?

I tried to figure out exactly where the SSL and Firewall fit in the OSI Model. I know we can use Firewall in Application Layer, Network Layer, Transportation Layer, etc.

A firewall may work at different layers of the OSI model, going from layer 3 to layer 7 (depending on your firewall). Representing it in a diagram will require to set rules for each layer. I would represent the firewall and include a list of all enforced rules on each layer. Some examples could be:

Layer 3: IP filtering
Layer 4: port filtering (TCP/UDP)
Layer 5: session layer firewall (state of the connection)
Layer 6 and 7: application layer firewalls (more inteliggent, can perform deep packet inspection, close to IDS/IPS)

For the "SSL" I presume you mean an SSL offloader. SSL/TLS takes place at the presentation layer or layer 6 of the OSI model.


Could a session id be considered as a valid factor in 2FA? As is stated in this question:

Two-factor or multi factor authentication is based on three possible forms of authentication:

Something you know which is considered secret (password)

Something you have (token, SMS token, card,...)

Something you are (biometrics)

Given that a session ID is obtained after a successful authentication, could it be considered as "something you have" obtained from "something you know" (e.g. user/password)?
For example, if I want to authorize a specific operation by using biometrics, would be the pair ("session ID","biometrics") be considered as a valid two-factor authentication?

The "something you...." terms are intended to illustrate by example what the underlying concepts are. It would be wrong to infer a reverse relationship; the examples do not define the concept.

Usually when we are talking about session ids then we're talking about HTTP sessions. Here the session id has 2 functions:

it acts as surrogate credentials in place of supplying your username and password with every request
it provides a means for the application to maintain state (e.g. the contents of your shopping basket) between requests

Since it acts as a surrogate for the (username and) password rather than alongside it, it is not 2 factor authentication.

Authentication data is supplied by the party seeking to be authenticated - however a session id is generated by the service and reflected by the client. It is therefore not authentication data. Allowing clients to choose their own session id creates security vulnerabilities.

That's not to say that persistent data stored on the browser could not be used as a second factor ("device registration") but this should be emplaced independently of the users application session.


What is "Multi-Protocol Unified Hello" and what are the impacts of disabling/enabling it? This article describes how to disable old versions of TLS, but in addition to doing so, "Multi-Protocol Unified Hello" is also disabled.

# Disable Multi-Protocol Unified Hello
md 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\Multi-Protocol Unified Hello\Server' -Force
New-ItemProperty -path 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\Multi-Protocol Unified Hello\Server' -name Enabled -value 0 -PropertyType 'DWord' -Force

I searched for that term, and didn't see anything besides other registry edits that disable this.

What is the Multi-Protocol Hello, and why/when should someone disable/enable it?

Not certain, but given context and MS penchant for bland names, it could be SSLv2/later compability.

When SSLv3 came out (long ago) it used a different message format than SSLv2, and sending a v3 ClientHello to a v2 server wouldn't work at all. Instead it was common practice to send a v2 format ClientHello containing flags indicating the client would prefer v3 protocol and ciphers. A v3-capable server could respond with v3 ServerHello and then v3 would proceed; a v2-only server would ignore the v3 flags, respond in v2 and v2 would proceed. TLS 1, 1.1 and 1.2 (internally numbered as SSL 3.1, 3.2, 3.3) kept the message format close enough this continued to work, mostly, as well as negotiating among the v3 and later protocols. OpenSSL called this 'SSLv23 method' and it remained the default until about 2 years ago when they switched to v3-and-up-only; Java called it 'SSLv2Hello' but wouldn't actually accept selection of v2.

Using SSLv2 has been a bad choice for a long time, and RFC 6176 in 2011 finally officially 'prohibited' it, but some (much?) software still supports it out of a combination of let-sleeping-dogs-lie and just-in-case-you-never-know, and I'd bet that includes SCHANNEL, so taking steps to disable those remnants of v2 is probably a Good Thing.


Stacking Encryptions (Stream over Block) I am reviewing the code for a product our team developed where credit card information is stored in a local database in the event of no internet connection and came across the encryption methods. The developer who wrote this portion of our code encrypted AES over RABBIT over AES. I have seen implementations with AES over AES(same concept i suppose as TrippleDES) but never seen or researched stacking block over stream and if the results from this are going to be consistant(without data corruption) and secure which i would assume stacking encryptions with different keys can never be less secure than a one time encryption.

EDIT: To add the performance of this is not horrible. it takes 0.012 seconds to encrypt and decrypt credit card data.

Encryption using rather different algorithms is probably not less secure than encryption with just one algorithm. There's a meet in the middle attack possible which may influence the security to be about the strength of AES + a single iteration of RABBIT though.

AES-256 is (thought to be) so secure that it will likely not be cracked even if quantum computers become a possibility. So basically you are only protecting yourself against significant breaks of AES. In that sense this kind of scheme only protects the part of the protocol that is most likely to be secure in the first place.

Cryptographic errors are easy to make. In that sense the more complicated the protocol the more likely it is that it is in error somewhere. If there is an error then the security of the layered encryption can easily be negated.


Given a list of components and versions, how can I check if any of them have known vulnerabilities? In this case, I have a list of names and versions, but not access to any source code or binaries. E.g.

ComponentA 2.6.6
ComponentB 1.1
ComponentC 0.12

The list is more than 300 components long, so an automated process would be preferred :-)

There are a number of solutions here, depending upon the types of components involved. Are these code dependencies? Are they open source? If not, how well-used are they? If they aren't code dependencies, what types of software are they?

All of these questions point to different areas to look. To start with, I'd recommend familiarizing yourself with NIST's and MITRE's CVE databases. They're both great. For scanning tools, check out OWASP's list of vuln scanners, which might point you in the right direction.

For more detailed help, let us know more about the types of components involved so that we can give more guidance. This particular question defines an entire industry of software and subfield of cybersecurity, so without more detail the answer is going to be pretty broad.


Why are some ports reported as closed by nmap? I was scanning a machine from inside the same LAN which is running and up to date Windows XP Home Edition which I suspect may be running some malware.

The target machine has an up to date antivirus running (AVG free), but has no other firewall than the one which Windows provides, which provides an option to configure the processes allowed or restricted to open connections but does not provide any option to configure specific ports being open/closed.

One of the scan commands used is this one:

nmap -p 1-65535 -v hostname

And this is part of the output:

Not shown: 65528 filtered ports
PORT      STATE  SERVICE
139/tcp   open   netbios-ssn
445/tcp   open   microsoft-ds
2869/tcp  closed icslap
4041/tcp  closed unknown
12216/tcp closed unknown
16881/tcp closed unknown
23590/tcp closed unknown

I have googled and read thoroughly about closed/filtered differences (and I think that I understood it) but, since there's no firewall configured to block these ports running between me and the other machine nor inside it, this is actually confusing me a lot.

So, does anyone have any clue about what may be causing these 5 apparently random ports appear as closed while the other 65528 appear as filtered?

Usually the reason a port will appear as closed is that there is a no service listening on it but the firewall is not filtering access to the port.

In your case this may be because a piece of software has at some point requested that these ports are opened and now no longer uses them?

If you want to change this I'd suggest looking at the windows XP firewall rules (instructions here) and removing any exceptions that you don't think are needed.  After that you should see things as filtered.


Backup to non-persistent mapped NAS My backup mechanism until now is a batch file to copy my data folder to my NAS, which is permanently mapped as Drive N:. I have a batch file (BackShut.bat) which mirrors my data directory to the NAS and then shuts the system down; this means I can start the batch file when I finish for the day. I use the program Mirror.exe from Zeno Systems which is freeware (at least it was back in 2009) and it seems to work OK.

Recently I have read some more about ransomware and it seems that this may be inadequate: the ransomware may encrypt the permanently mapped NAS as well as my local hard disk. I use the NAS for other purposes so I want to keep it available. I also use Dropbox but I understand some ransomwares can zap that as well.

So I had the idea of creating another share on my NAS and only mounting it at backup time with a line like:

net use X: \\192.168.1.50\backup /persistent:no

and then backing up to X:

The NAS share backup is public, so no password is needed. Since the system shuts down right after the backup, there is only a small time window when a malware program would have access, and my mail server and browser are not running at that time.

I realise this is not industrial-grade security, but would it protect me against a variant of WannaCry if it infected my system? (I run W10 and have automatic updates enabled.)

The underlying problem is that you are effectively allowing a less critical system to initiate communications to a more critical system when really you want that communication to go the other way.

In other words, switch your backup process from Push to a Pull and ideally add a one-way firewall or firewall rule to protect the backup system.

Current

System --Pushes-Data--> Backup Share

Problem

An attack on the compromised system can pivot to attack the Backup system or damage it from the compromised system.

Suggested

System <--(one-way firewall)<-- Backup Server which does a Pull request.

Advantage

Compromised System, Attacker Pivots ---> XXX Packets Blocked -- (Backups unharmed)

You'll also want to have multiple backups or some kind of content versioning to protect against pulling bad data over good data but this will add a layer of defense between these systems.

Having your backup server only on-line at certain times does reduce the attack surface time-wise but it's even better if the attacker can't send packets to it ever. Maybe both controls would be ideal.


When do I need to install root certificate on the client trust store? I have a https server with following the certificate chain : Root CA -> Intermediate CA -> server certificate
I noticed that for the client (eg. browser) trusts the server I need to install in Windows: Root CA in Trusted Root CA store, Intermediate CA in Trusted Intermediate CA store.
Why do I need to install Root CA and not only Intermediate CA ?
Thanks.

Installing the Root CA tells your browser to trust the Root CA, and any certificates signed (directly or indirectly) by the Root CA.
If you don't install the Root CA, then your browser will not trust the Root CA, and therefore it will not trust the Intermediate CA, and therefore it will not trust the Server Certificate.


Verification of a timestamped PDF I'm kinda new to the process of timestamping files to provide digital integrity.
For testing purposes, i use tsa.safecreative.org for PDF files.

Now i've signed a couple PDF files and if i open up the PDF it says the timestamp is valid (as the file is signed by the timestamp certificates). Nevertheless, one of the key ideas of timestamping is to be evidence proof, so i should be able to use the list on the SafeCreative Website to verify the timestamp of my file.

When taking a look at the exact time of timestamping i know that SafeCreative safes the following data for my demo file.

2015-12-16 21:17:27 5488602bec5c55a91e474c2b79d6c1a02928d594c472be54307e3cc8cec3cd90    SHA256

Now lets assume that this demo file is part of a court process. I want to verify that the file was timestamped at that exact time. According to defuse.ca the SHA256 hash is bc5886d2890da95d04b5ec4fbba7881a2cabb38ba87ae27daf5870c381facbbe though this is obviously the hash after the timestamp-adding-certifications.

How exactly would i proof in court that the PDF i got was timestamped at that moment (i dont think the certificate is proving timestamping instead of file integrity)? Is the "old" hash somewhere in the file? Do timestamp servers even store the hashes and if yes, why is there no API to check it?

Looks like i was almost at it and briefly misunderstood the concept used. The concept i assumed was the database version of timestamping, mainly because of the list on the website (yes, there are different methods of timestamping - see here), while actually the PKI one is being used according to RFC 3161.

The concept can be more easily explained by this image (only linked due to its license). Instead of verifying the timestamp by asking the TSA, all the data is indeed (as i doubted in the starter post) included in the new file - the hash of the file at that time and the timestamp are signed by the TSA and appended to the file. Therefore in court i would only need to provide the file and it could be viewable that the file had this specific hash at that time, and that can be tested. As long as the TSA isnt compromised the signatured time and hash are valid and no one is able to modify them.

This way i also found out why the limitation to 5 signatures per IP/day are bullocks (for database ones that wouldve been understandeable) and it makes more sense using other free services.


Do I need an ECDSA SSL certificate to use Diffie–Hellman key exchange method? I cannot quite understand the role of Diffie–Hellman key exchange.

Does RSA SSL certificate work with the Diffie–Hellman key exchange or is it only used with an ECDSA certificate?

When is Diffie–Hellman algorithm used if a client still has an option to use the RSA algorithm suggested by most servers for compatibility?

No. tls_ecdhe_rsa_with_aes_128_gcm_sha256 would use an RSA certificate and tls_ecdhe_ecdsa_with_aes_128_gcm_sha256 would use an ECDSA certificate.

Read again about how TLS works, what Diffie Hellman key exchange does, what digital signatures do, etc.


Got requests to unpublished services. Am I being spied on? Just today I'm migrating some of my webpages to a new server. After a couple hours the services was ready, I set up a hosts file with my domain example.com pointing to the server address, went to my browser and navigated to the domain and all worked ok. Just before I made the new server public (by changing the DNS) I noticed two requests in the nginx log comming from different IPs to my own:

184.105.139.67
176.58.124.134

By curiosity I went to that address in my browser and both says that they are from bots that scans services (tequilaboomboom and shadowserver). OK, but... how did they know the domain? The server is public and people can go to the IP address, but my nginx log is specific for my domain example.com. I only have React extension on my W10 Chrome browser. How did they catch my request to know what site to scan? Am I being spied on? Is my machine compromised? Is my network compromised?

There is are multiple reasons why this can happen. As some poeple stated in the comment, its possible that a misconfiguration in the nginx lead a request to end up in your virtual hosts, simply, because of how the requests are processed. It's hard to tell without the config and detailed logs.

An other thing might be that you are leaking information, somehow. For example, error message of if your defualt_server coudl leak a hostname or a redirect (to a canonical site or the standard http to https redirect) can also be a s possible leak of your actual site name.


Google OAuth 2.0 and Java. Is it safe to locally store access tokens? I Installed this Java app:

https://github.com/andresoviedo/google-drive-ftp-adapter

The program asks permission to see my Google-Drive files and then stores an
access-token on my local harddisk. Filename: 'StoredCredential'.
The next time the app needs to access the files it uses the token to authenticate.
What are the risks of this method and are there ways to make it more safe?

Thanx for any advice.

Taking a look at the specific source code piece(GoogleDrive.java) that handles credential file creation/initialization, I found this:

Line 449:

/** Directory to store user credentials. */
private final java.io.File DATA_STORE_DIR;

Line 473:

public GoogleDrive(Properties configuration) {
    DATA_STORE_DIR = new java.io.File("data/google/" + configuration.getProperty("account", "default"));

    try {
        // initialize the data store factory
        dataStoreFactory = new FileDataStoreFactory(DATA_STORE_DIR);
        // initialize the transport
        httpTransport = GoogleNetHttpTransport.newTrustedTransport();

    } catch (Exception e) {
        throw new RuntimeException("No se pudo inicializar la API de Google");
    }
    init();
}

Can you see the that the credential file is stored at "data/google" using a relative path on Unix-like? This means that you will not want to run this software on your /tmp directory, since the credentials could be accessible by more people that you want. If the parameter set is account=default the path shall be $CURRENT_DIR/data/google/default. This is the default behavior of java.io.File and a longer answer is found at stackexchange:

Java file path in Linux

Tips to make this thing a little safer(on the StoredCredential perspective):

Don't run java as root/admin. NEVER! There is no need for if from filesystem to network. FTP binds on a port that is higher than 1024 so, there is no need to run as root
Keep data/ under strict directory permission, like rwx only to you, the owner.

There are other security measures that you could take related to local port bind and local user that could access it(iptables), but it will get out of the scope of the question.


Google: log in on a new machine without a phone Trying to log into my google account from a new computer, I had no choice but to use my phone in order to connect, the options were:

use something like a "Security by Google" smartphone application
receive a code by sms
get a call
read a code deep into Android parameters.
or abort connection

The thing is that, connecting to Google and having my phone are not forever-absolute-concommitent events. Especially if I am trying to log from a new machine, because the reason I need it may be the same reason I do not have a phone at the moment.

Is there any way I can ensure that my password is the only thing I will ever need in the future to connect to Google via any machine in the world?

Interestingly:

I have never had my « number verified » as I have been prompted many times by Google Accounts.
I have never activated the « two steps validation » in Google Security parameters.

I think this is a misunderstanding on your part of the importance of this additional security measure.

Might I introduce you to this site: https://haveibeenpwned.com/

This website, run by a Mr. Troy Hunt, keeps track of major data breaches and provides a service to see if you've ever been a part of one. If you had an account on a site that might be insecure (ie, Yahoo) and shared the same password on yahoo with Google then a hacker could effectively have your password.

Your password is effectively an authorization measure that grants access based on "something you know". More specifically, it's supposed to be "something that only you know".

If someone could steal your password from one of these data breaches or by any other means then you lose that ability to identify yourself. By requiring your phone to log in (in cases where the request came from a new device or new location) you can help protect the account of those who might've have their password stolen.

The phone is "something you have" which means that in addition to gaining knowledge (your password) that you're supposed to only have, they have to have physical access to something that only you should have (your phone).

Oftentimes, security measures end up detracting from user experience. Obviously there are cases where you won't be able to access your phone and it can be stressful. Google does offer an "offline" solution to this. You can set up "Backup Codes" for your Google account. When you set this up, it'll create a little notecard pdf (that you're supposed to print out and carry in your wallet/purse/etc) with 10 separate, 1-time-use codes on it that you can use whenever you need to log in with two factor.

Here's where you can go to set it up. Go to https://myaccount.google.com/security. After that, select 2-Step Verification.

I would enable two step verification so you can use backup codes in place of this phone-based verification. Additionally, enable two step verification on other services as well.


airodump-ng never see WPA handshake I am testing cracking my personal WPA2-PSK password following these directions.

I completed step 4.  However, I do not see "WPA handshake" as seen in step 5.  All I see is "fixed channel mon0: -1" and it never changes.  I ran the death command a few more times and even set it to 1000 with no luck.

Am I missing something?

First, Don't use airmon-ng check kill command to fix the fixed channel -1 error, instead, use the following commands when starting monitor mode:

airmon-ng start wlan0
ifconfig wlan0mon down
iwconfig wlan0mon mode monitor
ifconfig wlan0mon up

And as for the handshake problem, from experience, it might be the following:

You're not close enough to the router, there is a chance that you'll not capture the handshake if the client is too close to the AP and the monitor mode device is relatively far.
A hardware issue, your network device is old and not compatible, so it can't capture packets from another protocols. For example if your device running 802.11g and the network is 802.11n

Solution: First, try to capture the handshake from different physical positions, if it doesn't work, try another WiFi device.


Proof that data has been encrypted/destroyed by the user Is there any algorithm where user can prove to server that the encrypted data sent by the server has been re-encrypted/destroyed by user after reading it?

Lets assume there is a server and user. The server wants the proof that data sent to user has been re-encrypted/destroyed after it has been read. Assuming user didn't create multiple copies of data.

Though there is one option to encrypt with the servers public and sent the data back to server so that server can verify. But in this case I dont want the server to read actual data. So this scenario is ruled out.

This can be applied to the scenario where the customer stores the data in the third party servers and after the contract is finished he wants to make sure that the data has been destroyed by the 3rd party servers and proof is provided to the customer.

Assumptions : There are no multiple copies of data, Third party servers can access the data before deletion.

Thanks.

EDIT:

To the doubts raised by community member. Lets assume the server will give access to some other resource on providing information that data has been encrypted. Second one: I gave the example of public key encryption so that server can use his private key to decrypt , but I dont want server to read the data. I need something similar to that.
I dont need 100% reliable solution. I just need a close one.

Let's say you sent me a file. After a month, I decide to delete it. How on Earth do you expect to notice about an action done in my local machine?

And if magically you could do so, what's preventing me to send you a fake "confirmation" message that the data has been removed?

So to answer your question, no, there is no reliable proof that data has been encrypted/destroyed by the user.


Should I provide https downloads? I've seen several articles like The sad state of Linux download security that suggest you should offer downloads of software updates via https. But is there any point in doing this if your website doesn't require a login to download the update?

Absolutely there is a point. Properly configured HTTPS includes an authentication check that ensures that the server is the site you intend. More technically, it confirms that the client-specified hostname (ie: what's in the URL bar for your page) match the name on the SSL certificate. Assuming that a site's private key hasn't been stolen, when you communicate with HTTPS, you know who you are talking to and that there is no man in the middle (MiTM). You have no such guarantee when you are using straight HTTP. You may be talking to an attacker's site or there may be a MiTM modifying what the real site is sending to you.

This HTTPS authentication is the opposite of website authentication as SSL authentication authenticates the server to the client while website authentication authenticates the user to the server. The only time website authentication would be relevant for a download would be if you wished to restrict or otherwise monitor who is performing the download.


Equivalent of Windows Process Hollowing on Linux/Unix/MacOS To sum up process hollowing on Windows: basically, a legitimate PE binary (exe usually) is used to start a process in suspended state, after which process memory is replaced with code and data of a malicious/other binary, and the process is resumed. As far as the environment is concerned, the original legitimate binary is executing.

There is lots of information on this topic, but it all relates to Windows OS.
Is this issue possible on other operating systems and how (for example, what sequence of system calls on Linux would indicate such behavior?).

Thanks!

A book, The Art of Memory Forensics, covers Linux-based process hollowing in chapter 25. You can see the module here -- https://github.com/volatilityfoundation/volatility/blob/master/volatility/plugins/linux/process_hollow.py

Their technique looks at the main function and compares what is in-memory to what is on-disk. For Windows, using processhacker (or Process Explorer), you can compare the strings of the binary to the replaced process loaded into memory. It's the same set of techniques.

While unsure what system calls would be changed, it may be different depending on the Linux kernel, distro, and userland. You could use Sysdig Falco to determine characteristics about any Linux malware including and perhaps especially process hollowing and/or shared-library injection.


What is an IT Artefact I am going to be starting my dissertation soon in MSc Cyber Security.  The supervisor keeps asking me 'What will be your IT artefact?' and to be honest I have no idea what he is actually asking me.  I understand the words, and I have Googled it (to some extent) but it's not clear to me what he is expecting.

Any help welcomed.

By dictionary definition, an artefact (UK) or an artifact (US) is

  an object made by a human being, typically one of cultural or historical interest. "gold and silver artefacts"
  something observed in a scientific investigation or experiment that is not naturally present but occurs as a result of the
  preparative or investigative procedure. "the curvature of the surface
  is an artefact of the wide-angle view"

Your supervisor probably has a design science methodology background and expects your work will be build on this methodology, too.  An IT artifact is a design artifact in the field of information systems (research).

The term  is widely used in information systems research. Reading through e.g. Hevner, A., March, S. T., Park, J., & Ram, S. (2004). Design Science in Information Systems Research. MIS quarterly, 28(1), 75-105. should give you a good grounding on the subject. Here, an IT artifact could be many different things:

  The realm of IS research is at the confluence of people,
  organizations, and technology (Davis and Olson 1985; Lee 1999). IT
  artifacts are broadly defined as constructs (vocabulary and symbols),
  models (abstractions and representations), methods (algorithms and
  practices), and instantiations  (implemented  and  prototype
  systems). These are concrete  prescriptions  that enable  IT
  researchers and practitioners to understand and address the problems
  inherent in developing and successfully  implementing  information
  systems within  organizations  (March  and  Smith  1995; Nunamaker et
  al. 1991a). - -

  Design  science,  as  the  other  side  of  the  IS research cycle,
  creates and evaluates IT artifacts intended  to  solve  identified
  organizational  problems.  Such artifacts are represented in a
  structured  form  that  may  vary  from  software,  formal logic,
  and rigorous   mathematics   to   informal natural  language
  descriptions.    A  mathematical basis for design allows many types of
  quantitative evaluations of an IT artifact, including
  optimization proofs,  analytical  simulation,  and
  quantitative comparisons with alternative designs.  The
  further evaluation  of  a  new  artifact  in  a  given  organizational
  context  affords  the  opportunity  to  apply empirical  and
  qualitative  methods.


Where to find complete Kali image for docker with all the tools? As of now, I am using window 10 & I want to run kali Linux on Docker. For that, I took the copy from kali official site Here
But after running I found it's just a base OS it doesn't contain all the tools for which kali famous for,  it's not a full flash copy.
So I want a complete kali image for the docker run where I can find the complete kali with all the tools copy for the docker.
Solved Listed metapackages using & install

apt-get update && apt-cache search kali-linux

kali-linux-arm - Kali Linux ARM system
kali-linux-core - Kali Linux base system
kali-linux-default - Kali Linux default system
kali-linux-everything - Everything in Kali    Linux
kali-linux-large - Kali Linux large system
kali-linux-nethunter - Kali Linux NetHunter tools

Use Kali Linux Metapackages after setting up a Kali Linux Docker Image. In 2019.3 there was a Major Metapackage Makeover, changing the names. To combine this information:
apt-get update && apt-get install kali-linux-large

Previously, kali-linux-full was the default metapackage, which has
been renamed to kali-linux-large with a redirect put in place.

When you download a Kali Linux ISO, you are essentially
downloading an installation that has the kali-linux-full
metapackage installed. This package includes all of the tools you are
familiar with in Kali.
Installation Size: 9.0 GB

apt-get update && apt-get install kali-linux-everything

Depending on how you use Kali will determine which metapackage would
suit you best. This is the power of metapackages. For example:

If you want a core set of tools, stick with kali-linux-default (designed for assessments that are straightforward ).
If you want a more general and wider range of tools, select kali-linux-large (useful if Internet access is permitted but slow).
If you want to be prepared for anything, go with kali-linux-everything (great if you are going to be doing
air-gap/offline work)

In order to keep our ISO sizes reasonable, we are unable to include
every single tool that we package for Kali and there are a number of
tools that are not able to be used depending on hardware, such as
various GPU tools. If you want to install every available Kali Linux
package, you can install the kali-linux-all metapackage.
Installation Size: 15 GB


How I add cookie to w3af for authenticated attacks? Can anyone explain this in steps to me?
Lets just say I clicked to OWASP Top 10 scan profile and entered url.
Next I need to add cookies or authentication values to w3af (form based auth.).
How?

Thanks

In w3af in order to test a web application after selecting the OWASP Top 10 scanning profile you need to enable the auth plugin. The auth plugin can be enabled by placing a check mark in the box to the right of either the detailed or generic version of the plugin.  Many times simply selecting generic and supplying w3af with a valid user name and password will do the job.  If this does not work there is a second option which uses the detailed options which allow you to tweak the way the log-in credentials are processed by w3af.

There is additional information provided in the documentation provided by w3af at the following url:
http://w3af.sourceforge.net/

Also you did fail to mention whether you were using the CLI or the GUI version however these directions obviously apply to the GUI but can be converted to CLI by simply navigating the plugin tree in the console.


OAuth2 client registration: should redirect_uri be unique across clients? When operating an OAuth2 Authorization Server:

  The authorization server MUST require the following clients to
     register their redirection endpoint:

  o  Public clients.

  o  Confidential clients utilizing the implicit grant type.

  The authorization server SHOULD require all clients to register their
      redirection endpoint prior to utilizing the authorization endpoint.

  ...

  Lack of a redirection URI registration requirement can enable an
     attacker to use the authorization endpoint as an open redirector as
     described in Section 10.15.

Is there any added security benefit to enforcing a uniqueness constraint on registered redirect_uris? That is, any given redirect_uri could be associated with at most one particular client?

I'm thinking particularly for the case of public clients, where the redirect_uri is the only means the authorization server has to identify the client (since the client cannot protect client credentials), but I'm also interested in answers about private clients.

Are there any vulnerabilities exposed if an attacker could register a new client with the same redirect_uri as an existing client?

There's really no good way to even securely guarantee that a client is what it says it is, so there's really no point in trying to make each redirect URI unique to a single client. The only reason why you register URIs to begin with is to prevent the open redirect scenario mentioned in the documentation, which would make it trivial to say, configure an evil client that you redirect to after authentication, allowing it to masquerade as a benign client. It does not solve problems like DNS poisoning or host-file modifications.

Since there's no way to guarantee that a client is the same requester as the last time it made a request, because of the stateless nature of HTTP servers, what this means in the long run is that you'd have to issue a nonce each time the client wanted to connected by some secure side-channel, and authorize the request that way. For private clients, that may as well be impossible, because someone could figure out how to do so by reverse engineering the app that does this. For public clients, this would be feasible, but would add extra complexity and a small delay for each request.

There's no scenario that makes a unique client constraint more secure than not having such a rule, because any way that could be used to bypass one could also be used to bypass the other, it just adds a layer of obscurity. It wouldn't even trivially slow down a determined attacker in the case of a private client, and public clients are protected through other means anyways (including a client secret, a type of password that only that client should know).


How to verify correct, secure and test setuid? I've been looking into setuid vulnerabilities.  Particularly, I am looking on OS X (10.5+) but other modern *nix distos apply as well.  For example, I found a world writable suid file installed by a 3rd party app on my OS X box via find.  According to standard practice, only critical files should be suid like chmod and passwd.  My question is, how do I test this file for vulnerabilities beyond just turning it off?  For example, I was able to vi the file itself and have it run a simple command but couldn't get it to chmod another user account. Does this simply mean that it was coded properly or is there a OS X function that helps secure suid vulns?  Any resources, or corrections in my thoughts, would be excellent.  If you know of a insecure 3rd party *nix apps or distros vulnerable to suid privilege escalation to learn on, that would be doubly excellent.  Thanks.

According to standard practice, only critical files

All executables you run are "critical", as they run with your UID and have all your permissions! They could do bad things to your files, that's "critical" to me. Executables run by root are even more "critical".

It is common, but incorrect to focus on SUID files when discussing possible security flaws of a Un*x system; all executables should be considered. There are just more ways to corrupt a SUID program.

  According to standard practice, only critical files should be suid like chmod and passwd.

No, only executables specifically designed to run as SUID.

Writing SUID program is a whole topic, way too big to be appropriate for an answer here.

  My question is, how do I test this file for vulnerabilities

In order to do a vulnerability assessment of a program, you have to first learn what purpose it serves, how and when it should be run.

  My question is, how do I test this file for vulnerabilities beyond just turning it off?

You just don't "turn off" parts of your system just because you are afraid! A program is SUID for a reason; if you remove the SUID bit, the system might misbehave.

  For example, I was able to vi the file itself and have it run a simple command but couldn't get it to chmod another user account.

A trusted program that can be modified by anybody is a security issue, even if it isn't SUID.

  If you know of a insecure 3rd party *nix apps or distros vulnerable to suid privilege escalation to learn on, that would be doubly excellent.

There is a long and shameful history of vulnerabilities in SUID programs. Just searching for "exploit" or "vulnerability" and "suid" returns plenty of these.


Should you be able to reset a password without verifying the email address first? I just noticed with Instagram, what you can do is:

From the logged in Instagram app, change your email address. This will send a verification link to the new email address.
Verifiying the email address requires you to log in when you click the link.
From any log in screen (desktop browser or smartphone app), you can ask to reset your password using the new email address before you've verfied the email address.
This will send a reset link to the new email address, which you can use to reset the password, and then verify the new address.

So this requires that you already have access to the persons logged in instagram account (eg if they leave their phone lying around).

Is this a serious security issue or do you assume that accessing someone's phone is already the security breach?

More details here: https://thingsdavidhaslost.wordpress.com/2015/06/01/access-to-his-instagram-account/

Leaving access to your phone while logged in to a service is without doubt a security breach, but I also see a few screw-ups from the part of Instagram here:

Not asking for the password when modifying the email address associated to the account
Sending the verification for the new email address to the new email address, instead of the old email address (or both old and new addresses)

Point #1 should be implemented in any environment which is minimally security-aware.  If not implemented, point #2 serves to mitigate this kind of attacks.


Vulnerabilities of DNS when utilized on a TCP port There was some specific cyber security challenge (Cyber Cube 2018, GE). In one of the tasks, objective was to gain the access to some specific file that server included.

After successfully solving some steps, there was a base64 encoded string:

  bmFtZTogZXRlcm5hbHJvbWFuY2UsIHByb3RvY29sOiBkbnMoNTMvdGNwKQo=

Decoding this string gave following output:

  'name: eternalromance, protocol: dns(53/tcp)\n'

I figured that the only way to access the server was to perform a DNS attack.

Creators of this challenge gave a hint that choosing TCP port over UDP for DNS may cause certain vulnerabilities.

I'm not experienced in domain name systems, but I know that generally DNS uses UDP port 53 to serve requests - DNS queries require single UDP datagram request and require single UDP datagram response. Main reasons to choose TCP protocol is to respond with data that is larger than 512 bytes (although some DNS implementations can allow UDP datagram responses up to 4096 bytes by my knowledge), and for DNS zone transfers.

But what vulnerabilities may DNS have when TCP is used over UDP?

Thank you.

Although it's impossible to know for sure, one option would have been AFXR.

AFXR

What does it do?

AFXR would give you a list of all of the records on the server.

Why does TCP affect it?

RFC 5936, section 4 says:

  AXFR sessions are currently restricted to TCP by Section 4.3.5 of RFC
     1034, which states:

Because accuracy is essential, TCP or some other reliable protocol
must be used for AXFR requests.

  The restriction to TCP is also mentioned in Section 6.1.3.2 of
     "Requirements for Internet Hosts - Application and Support"
     [RFC1123].

[Source]

How could it have been used?

These records could have contained either a flag, or clues to the next step.


How do I prevent SSD file recovery? I use a Kingston V300 SSD (specifically SV300S37A)

According to this answer

  The 'best' modern drives support a vendor-specific secure erase functionality. Examples of this are Intels new 320 series, and some Sandforce 22xx based drives

My SSD supposedly has
SandForce's SF-2281 controller chip and
SandForce's 5.0.5 firmware

My question now becomes: how do I make sure the free space does not contain recoverable information from deleted files?

Ideally, I want to CClean the %=!T out of my SSD, but I'll restrain myself.
EDIT: to clarify, my (windows7) OS is on the disk so I have no interest in wiping it all.

If you just want to entirely wipe the disk and start over, ATA Secure Erase is what you want. It's a single command supported by almost all modern SSDs which changes the onboard crypto key (SSDs encrypt all data transparently at the physical level) to make all data on the disk unreadable. The reason for this mechanism existing is that wiping data from SSDs reduces their lifespan, so simply encrypting everything and discarding the old key when you want to start over is much more efficient.

If you're just looking to delete slack space, you don't need to bother. If your OS supports TRIM (Windows 7 and later, iirc) then it is already automatically wiping your slack space for you. TRIM causes unused blocks to be full zeroed in a single step, which means it doesn't cause as much disk wear and makes the disk perform better - SSD bits can only be set individually, but they must be cleared as an entire block, so having a blank slate to work with on unused blocks is faster.

The only downside of TRIM from a security perspective is that it can leak which blocks of data are being used on an encrypted volume, which may be exploited in order to prove the existence of a "hidden volume" configuration if an attacker can take multiple full  snapshots over time. If you're not using hidden volumes on the disk, or your threat model doesn't include repeated low-level access by your adversary, then it shouldn't make a difference at all.


How to refute "don't use internet if you don't like it" answer? I hope it is legit question, similar to, for example, Why do law-abiding citizens need strong security?, et al. and it is tightly conected with user's security, privacy, etc.

The response I always run into for any complaint about inadequate or illegal Terms of Service (ToS, Terms of Use), Privacy Policy, etc. takes the form:

  "Don't use it (our service) if you don't like it"

even in discussions in 3d-party forums, which is IMO synonym of:

  "Don't use internet"

since such illegal ToS, privacy policies are nearly ubiquitous on websites and on-line services, even including major players such as Google, Facebook, Automatic (WordPress), et al.

How can I refute such answer?

Update (28 Febr 2012):
I'd like to remind to answeres and commenters that the question is about argumentation against illegal ToS's statements and apologia of ToS's sublegality in 3d-party (forum) discussions.

Not about proving of whether private data being sold or not.

Earlier in answers to question:

Is Facebook allowed to sell/give your information away to anyone
willing to buy it?
it was shown that selling of private data is the status quo on the internet and telecommunications which is not even being hidden by major players.

And the logical and judical foundation for it are provided illegal ToS (Terms of Services, Terms of Use, Rules, Policies).

Different countries take a much different position on a person's right to privacy on the internet. The European Union has legislation in place to control what companies can legally do with personal information that you provide. The United States is much more like the wild west in terms of what companies can do with your data. And then there are repressive governments in parts of the wold that spy on internet traffic to jail and torture people who engage in internet activities that they do not approve of.

Perhaps it comes down to the question "Is privacy a basic human right that all people, no matter where they live, should have?" If so, that an answer like "if you want rights, don't be born in a country with a government that tramples rights" is not an acceptable answer. In other words it is the responsibility of government to protect the rights of its citizens.

So ask the person if they believe that control of their personal data is a right or is personal data merely a commodity to be bought and sold in the open market by large companies like Google and Apple?


server access to application owners I am looking for the right practice to provide access to application owners. As of now they are part of system admins groups. whoever part of the group login tho the servers any time and do any stuff.

should PAM solution with shared ID with firecall would be right solution, If yes every app team should have their own ID or one ID for all app owners.

A shared ID is a very risky approach. If one admins is compromised, then:
A) It may be hard to identify the compromised account and thus hard to analyze why it was compromised.
B) You will have to deactivate or restrict this account, this block admin activities of all admins. Thus administrative tasks will be performed for some time until you resolved the problem.
C) Time to time people change their responsibilities in the company. If some employee doesn't work as an admin anymore, he still has credentials for the shared ID. You would have to (at least) change password every time in such cases.
A better approach is to define a role that gives the needed set of permissions. Then give this role to every admin separately. If needed, you can withdraw admin role without blocking any other permissions and without any side effects for other admins.


How to safely handle non public data in memory Alice needs to get non public information from Bob, validate it (let's say check that birth day is between 1900 and now) and forward it to Charlie. There's an end to end encryption between Alice and Bob and Alice and Charlie.

If the computer Alice uses is some remote machine, can Alice avoid leaking the non public information she is handling to whoever has access to the machine she uses?

My undestanding is that the moment the data is decrypted in the machine's memory it's at the mercy of whoever has physical access to that machine. Is that correct? If so. Does that mean that for handling non public information I should never use cloud solutions and rely only on physical machines that I own?

I see there's "Homomorphic encryption". But I understand that if, as in my example, I have to validate that a number is btween x and y it's equivalent to the number being known?

There's a somewhat similar question here:
encrypting data while in memory

But it does not focus on these questions and is implementation specific.

For your first question:

If Alice's machine is compromised, her private data is compromised too. There's no way to protect this "non public data" from someone who has access to the machine generating it. Of course I am assuming low level access here (administrator or VM-host), if the machine is shared but has proper user level security, then it may be okay.

For the second question:

Handling private data on cloud providers is indeed a bad idea. There is absolutely no way to keep anything private from the host machine while operating inside a VM.

When I see people trying to run privacy services in the cloud, it always makes me cringe.


Crack password protected zip file with pkcrack I have allfiles.zip contains only file allfiles.exe and is password protected. I heard about pkcrack, it is possible to get the file from a zip file which is encrypted if we have some part of encrypted zip.(Correct me if I'm wrong)

So, with that statement, I have add a plaintext file(words.txt) to allfiles.zip, created another zip file wordfiles.zip which contains only plaintext file words.txt and run pcrack.(You can see below step-by-step)

Initially we have password protected zip

allfiles.zip
  -> allfiles.exe

Add a dummy plaintext file to allfiles.zip. Now the file allfiles.zip contains 2 files

allfiles.zip
  -> allfiles.exe
  -> words.txt

Create a zip file contains only words.txt

wordfiles.zip
  -> words.txt

Run pkcrack on those files

./pkcrack -C allfiles.zip -c words.txt -P wordfiles.zip -p words.txt -d allfiles.exe1 -a
Warning! Plaintext is longer than Ciphertext!
Files read. Starting stage 1 on Thu Feb 28 11:39:48 2019
Generating 1st generation of possible key2_255982 values...done.
Found 4194304 possible key2-values.

---OUTPUT REMOVED----

Lowest number: 93 values at offset 246121
Done. Left with 93 possible Values. bestOffset is 246121.
Stage 1 completed. Starting stage 2 on Thu Feb 28 11:40:10 2019
Stage 2 completed. Starting zipdecrypt on Thu Feb 28 11:40:15 2019
No solutions found. You must have chosen the wrong plaintext.
Finished on Thu Feb 28 11:40:15 2019

Is this a right way to crack? What is the best way to crack?(Other than fcrackzip)

PKCrack does a known-plaintext attack (KPA). So you need to know the plaintext of a file in the zip archive before you can decrypt other files in the same zip file. But there are no other files in your archive, so you cannot do the attack.

One might ask "What is the point of doing a KPA, if you already need to know the answer?" Well, imagine you have a zip archive with the files "passwords.txt" and "usernames.txt". You could have obtained the plaintext of "usernames.txt" through other means (like asking the sysadmin) because it's not secret. By comparing the known contents of the usernames file with the encrypted version, you can (using pkcrack) recover the keystream. Then, you can use that keystream to decrypt the other file ("passwords.txt"). Note that you never learn the password, but you can decrypt the other file(s) in the archive.

In your case, "passwords.txt" is "allfiles.exe" (the file you don't know the contents of, but you want to decrypt it). To try to simulate the attack, you added "words.txt" to the zip archive, but you can't encrypt "words.txt" with the same keystream as "allfiles.exe" because you don't know the password (so you can't generate that keystream). So the attack is impossible this way.


Windows event log - Security - Audit failure Every one hour or so I have this event in my Event viewer -> Windows logs -> Security log.

I understand the consent.exe is Windows' UAC control, what i wan't to know is why and what is trying to log into my administrator account every 30 min / every 1h.

The detail of the log is (I have a bunch of these btw.):

An account failed to log on.

Subject:
    Security ID:        SYSTEM
    Account Name:       DESKTOP-8P22P26$
    Account Domain:     WORKGROUP
    Logon ID:       0x3E7

Logon Type:         2

Account For Which Logon Failed:
    Security ID:        NULL SID
    Account Name:       Admin
    Account Domain:     DESKTOP-8P22P26

Failure Information:
    Failure Reason:     Unknown user name or bad password.
    Status:         0xC000006D
    Sub Status:     0xC000006A

Process Information:
    Caller Process ID:  0x2260
    Caller Process Name:    C:\Windows\System32\consent.exe

Network Information:
    Workstation Name:   DESKTOP-8P22P26
    Source Network Address: ::1
    Source Port:        0

Detailed Authentication Information:
    Logon Process:      CredPro
    Authentication Package: Negotiate
    Transited Services: -
    Package Name (NTLM only):   -
    Key Length:     0

Logon Type:         2

2 means it is Interactive (logon at keyboard and screen of system)

  Security ID:        NULL SID

Subject is usually Null or one of the Service principals, though not that useful.

  Logon Process:      CredPro

CredPro indicates a logon initiated by User Account Control

With these, you can determine that someone is in fact trying to log on. At regular intervals, could be a script (maybe, at that lenght they are trying to make it seem like it's another admin or something, compared to trying to log on every 30 minutes).

See this from MSFT of what looks like a similar issue.

Also if you are watching Event Viewer, I'd also suggest centralizing the Event Logs maybe to another dashboard (useful if the account becomes compromised). See these types of modules here (I'm involved in the project) and also others that can collect EventLog events into another format like JSON.


VPN Authentication over WiFi -- Is it secure? Count this question as part of my ignorance on how authentication scheme is done on your typical VPN session.  But here goes:

We often advise the security-conscious user that if one must use an unsecured public wifi connection (say, at an airport, internet cafe, restaurant, etc), then always connect to a private VPN.  This will allow the user to connect and surf from a trusted network with all traffic being encrypted.

My question is this:  The connection/authentication process.  Sure, VPN offers more security.  But if someone with a packet sniffer (such as wireshark) somehow intercepts my attempt to log in, does typical VPN usage include authentication security over the air?

UPDATE:  In otherwords, is it standard that part of the VPN authentication process includes encrypting the username/password combination from the client prior to sending over the air?  If the intent is to protect the user from MIM-attack, this could be a weak point.

If my question seems odd in any way, again, this is my attempt to be more educated on how this step in communications security over wifi can work.  I feel the question assumes some kind of modular encryption scheme being built-in to the authentication routine to secure traffic before a VPN session even begins.  It basically boils down to: is encryption applied at this stage, and if so, what kind?

And thanks, guys.  You're the best.

A VPN which is worth that name will ensure a proper bootstrap for the encryption, i.e. protect the credentials as well. Most VPN will rely on either SSL or IPsec. An SSL-powered VPN is, cryptographically speaking, similar to browsing to a HTTPS Web site: first SSL, then the data under the protection of SSL; once the SSL layer has been established, the client has some guarantee that it talks to the right server, and can safely send the credentials, which will be encrypted like all other data, and won't go to the wrong guy. With IPsec, ISAKMP/IKE or something similar will be used, and the model is the same as with SSL.

SSL and IPsec differ in the encryption details and how they split data into transport packets (with SSL, the inner packets will be serialized into a sequential tunnel which runs over a TCP connection; with IPsec the translation is per-packet and more direct) but for the security model, they don't differ much: the client authenticates the server through the server certificate, and builds up the cryptographic tunnel from it; once the tunnel is up and running, the client sends credentials to the server, under the protection of that tunnel, so that the server knows who is talking to it.

A very poor, badly written VPN may leak your credentials, but hey, that's what you get for using crappy technology.


Can one steal data using electric wire? If I would like to keep my work secret in my computer and I don't use Internet, is it possible for a cracker to steal my data via electric wires or a wireless connection?

Yes, this is possible. It is not an easy task, though, and you are not likely to be a target.

There are series of equipment which are shielded so that such attempts are more difficult. They follow sets of standards called TEMPEST.


techniques of sql injection (boolean based, UNION query-based, stacked queries and time-based blind) I would like to know about these 2 SQL Injection techniques. I completed my studies in SQL databases and my teacher told me about SQL injection, then I became interested in this topic. I discovered a tool that does this automatically, but I only understood the step where the vulnerable parameters are identified.

thank you

Boolean based sql injection is useful when the server doesnt return any information to you which is often the case. If you can determine that the response is different based on whether the sql statement returns true or false, there are ways to get the information your after even if the server doesnt return it to you.

For example, if a password field is vulnerable to boolean based sql injection and you type in the correct password then ' And 1 = 1 -- on sql server, you will be logged in. If you do the same thing with 1 = 2, it will say invalid password.

If you try to put a select statement in that attack vector, you will get nothing back, it just wont let you in.

This is where boolean based sql injection is useful. You can craft an attack vector to say

Sql Pseudocode:
And ( the first character of the first column in the database has an ascii value greater than 25)

If it logs you in, you can say, is it greater than 55, and so on, until you get the character. You can then do the same thing with the 2nd character, until you get the full column name.

I cant go throug every technique but there are loads of resources out there. I think the best way to train is to spin something up thats vulnerable.  Then run sqlmqp and proxy the traffic through burp suite or something. Then you can see exactly what the tool is doing.


Is Kissmetrics using ETags for tracking (again)? Ayenson et al. reported in their paper [Flash Cookies and Privacy II: Now with HTML5 and ETag Respawning][1] years ago that Kissmetrics used ETags to identify clients.

When looking at a site which uses Kissmetrics, for example http://www.up.edu.br/, I can see the ETag element in the response header when loading the Kissmetrics' tracking library.

According to their [privacy policy][4], they do not use ETags for tracking purposes:

  Kissmetrics’ Use of Cookies and Web Beacons

  Cookies. Kissmetrics uses cookies (small text files that Kissmetrics
  stores locally on your computer) on our Client’s websites for one or
  more of the following purposes: to help identify unique visitors
  and/or devices; assess usage patterns and perform traffic analysis;
  identify visitor preferences; conduct A/B testing; diagnose problems
  with our servers, and otherwise administer the Kissmetrics Service.
  Kissmetrics does not use methods such as browser cache, Flash cookies,
  or eTags, for acquiring or storing information about end users web
  browsing activity on Client websites or otherwise.

However, I do see the exact same identifier when browsing in private mode.

So, are they using ETags again?

So, are they using ETags again?

The Etag HTTP header is used for caching in HTTP, i.e. the browsers includes the given tag in the If-None-Match header of the HTTP request so that it only gets the response body if it has been changed compared to the previous access. Etag can be used for tracking but most uses of Etag care only about caching and not tracking. Thus just the existence of this header in the HTTP response is no indicator that it is used for tracking.


Unknown folders in OneDrive Today I opened OneDrive by accident, since I do not use it. To my surprise, inside there were unknown folders, in foreign (to me) languages. Namely, "document" and "photo" folders in Korean and a shortcut in French with the meaning of vault/safe.
Mind you, these are all completely foreign to me. Judging by the status icons, the folders are online-only. The shortcut had been created at the same time as the first folder. Also I cannot open the file location of the shortcut.
Could this be a sign of potential infection? If not, how did these come about? Please see the screenshot below.

EDIT
Potentially related question OpenSSH remote access?

Let me start by saying that one more time, you should never ever click on something if you don't know what it is. Let's say it was crypto malware, we would go from "Strange folders on my OneDrive" to "Why is my data encrypted" in matter of seconds.
Putting that aside, you should delete the folders and the file if you don't recognize them. Go to the OneDrive website and change your OneDrive password (consider setting up two factor authentication). You may optionally contact support to find out where the folders come from (as a normal user you have no access to any logs), but don't have high hopes about them responding.


How do you secure service account password on enterprise windows enviroment? I'm suppose to have a large environment ( 500+ servers ) all Windows based joined to Active Directory domain.

Some domain accounts are used for application\middleware authentication that needs high privileges (domain admins).

I would like to secure such accounts as much as possible. The password is known to restricted users but anyway not so much restricted ( as servers are managed by an outsourced provider). Changing the password seems a nightmare due to difficult to evaluate impact on services.

Is there any technology I'm not aware of to manage in secure way these sorts of password changes?

Jason Fossen, the SANS instructor for SEC505, posted a great article about this (below).  While the topic is for local accounts, one could use his script for domain accounts as well.  He also mentions some of the commercial solutions too.

Reset Local Administrator Password Using A Different Random String On Each Computer And Recover The Passwords Securely


How can I protect my home/office computer against row hammer? Row hammer seems to affect ECC memory less, but ECC is still not immune. I have heard of software mitigations like ANVIL, but that doesn't seem to be 100% row-hammer-proof either.

What software or hardware can reliably protect me against row-hammer attacks?

I have found one hint, that certain types of DDR4 memory have built-in protections that work reliably against bit flips and should thus protect against row hammer. But I'm not entirely sure I fully understand it, nor how reliable this protection should be. Would this be a reliable form of protection? A quotation:

  In addition to purchasing a fast Intel Skylake based system, we also acquired four Crucial Ballistix Sport 2400 MHz, two Crucial Ballistix Elite 2666 MHZ, two Geil Super Luce 2400 MHz, two G.Skill Ripjaws 4 3200 MHz, and two Micron branded 2133 MHz DDR4 memory modules for testing… Of the twelve memory modules we tested, eight showed bit flips during our 4-hour experiment. And of these eight failures, every memory module that failed at default settings was on DDR4 silicon manufactured by Micron. The Geil branded modules contained SK Hynix and the G.Skill modules contained Samsung silicon.

Edit: in the other question, it is mentioned that Micron has built in special protections in its DDR4 chips. But I believe Samsung and SK Hynix have done that as well, and, apparently (see above), Micron's protections weren't enough.

The only reliable hardware mitigation that does not involve downgrading to a motherboard with DDR2 is to use memory that supports TRR (Target Row Refresh), which is optional for LPDDR4 (not the same as DDR4). Unfortunately, many DDR4 modules do not support TRR, and there is often no easy way to tell if it is supported without digging deep. Furthermore, it seems that most modern TRR implementations are ineffective and actually make the situation worse. There is also pTRR  (Pseudo-TRR) for DDR3 which some Ivy Bridge processors have. It requires using pTRR-compatible DIMMs. I do not know how effective or reliable this is as there is little information available on its implementation or specifications available online. Other than that, there are a few techniques to reduce susceptibility:

Use ECC and panic on MCE - While ECC does not fully mitigate the attack, if you configure the computer to panic on any violations (called Machine Check Exceptions, or MCEs), it can go a long way. An attacker will have a much harder time successfully exploiting the system if the first detected error results in the system halting. High scrub rates improve detection.

Increase refresh rates* - By default, memory is refreshed at 64ms intervals. Some BIOSes allow you to specify the refresh interval. Reducing this to 32ms makes rowhammer more difficult to exploit, at the expense of performance and energy usage. Reducing it even further helps more, but with an even higher performance impact. Some BIOS vendors that claim to have a rowhammer mitigation setting (either optional or enabled by default) simply reduce the refresh interval to 32ms.

Reduce clock speed* - Reducing the maximum clock speed of every core makes it more difficult to access rows of memory at a high rate, as memory access is naturally bounded by clock speed. This mitigation only works for memory that is borderline vulnerable, and at a high price (significantly reduced performance). You can also disable Hyper Threading or other forms of SMT and switch to using a single core, again resulting in a significant performance impact.

Set CPU and RAM resource limits* - Rowhammer requires hammering memory which uses up a lot of CPU time. Some privesc attacks additionally work more quickly if the malicious process can allocate a lot of memory. Setting strict resource limits to kill a process that uses too much CPU or memory can slow down attacks when using memory modules that are borderline vulnerable.

Disable JIT in web browsers - JIT, or Just-in-Time compilation, is an optimization feature used by browsers which compiles JavaScript into executable code. This greatly speeds up heavy scripts on webpages. However, it also makes rowhammer from the browser possible. Disabling JIT reduces JavaScript performance enough that this attack becomes infeasible. Note that this mitigation only reduces susceptibility of the browser, not any other local processes!

Use memory with a high MAC - The Maximum Activation Count, or MAC, is a measure for DRAM that counts how many accesses can occur to a row within a single refresh interval before instability results. A higher MAC is better, and an unlimited MAC is ideal. Modules with an unlimited MAC are, in theory, not vulnerable to rowhammer. You will need to search the datasheets in order to find out the MAC for that particular model, or obtain the data via SPD. It would also be necessary to test the modules to make sure they are safe, as the reported MAC value is not always accurate.

Blacklist vulnerable addresses - A special feature of x86 CPUs is e820, which contains a list of physical memory addresses that the CPU will hide and refuse to map to virtual memory. Combine this with the fact that rowhammer typically affects the same rows over and over (i.e. there are susceptible rows and there are insusceptible rows in any given module), it makes sense to find these vulnerable addresses and blacklist them. This is the approach taken by B-CATT.

Physically partition memory - If you can partition your memory such that processes of different security levels are never mapped to adjacent rows, you can isolate rowhammer-based corruption. This can be useful when allocating memory for virtual machines, or when segmenting memory so there is a split between user and kernel physical memory regions (not just the "upper" kernel).

Many rowhammer-related questions and discussions are present on rowhammer-discuss.
* On their own, these mitigations can do very little and only slightly reduce the rate of bitflips in many circumstances.


What lessons about Denial of Service can we learn from Egypt's "experiment"? Internet service was widely disrupted in Egypt starting Jan 27th at about 22:15 UTC, in the space of about 20 minutes:
How Egypt Killed the Internet.  Service was largely restored 5 1/2 days later on Feb 2 at about 9:30 UTC: Overview of routing activity in Egypt - RIPE

As described at On the ground amid Egyptians' protests It disrupted much more than browsing and messaging:

  The handful of bellhops working at the
  Sheraton Hotel near Cairo
  International Airport had to scurry
  from room to room, using their master
  keys to help guests into their rooms
  becasue the hotel's magnetic key
  system wasn't working - it relies on
  Internet access to update guests'
  keys.

What other perhaps surprising lessons can be learned here about the ramifications of a DoS attack?

We are reminded that testing a 24x7 infrastructure is a Very Hard Problem.

Testing helps

Door locks that depend on internet-access, large enterprise products that depend on  unidentified network resources. If you can't disable part of your environment to see what else breaks, you really have no idea.

Obviously, door locks shouldn't depend on internet access and if you decided they should depend on a working LAN, you better make sure it's fully in your control.

I've worked in environments where the NetApp systems and the DNS-systems were mutually dependant, and this was only discovered while bringing an entire datacenter back online after a power outage.

I've worked in environments where supposedly stand-alone, hour long compile processes depended on network resources. This was only discovered when the network failed at a critical time of software release.

Other engineering disciplines (water, power, etc) have had this problem for centuries.

At least in IT environments, you have the option to automatically re-create your environment somewhere isolated and see what happens when parts of your re-created test setup dies.

Design for offline functionality

This is actually my biggest concern with 'the cloud'.

Everything becomes dependant on reliable, high-speed networks. I personally try to work around having to depend on reliable networks: Instead of a web-based CMS that requires network access to edit content in-place, I have a static website that I edit offline and upload when I'm on a fast network.

I sync my IMAP account to local disk, so I don't have to wait for network latency or service availability.

Most of my work these days is stored in git, so I can work fully offline while making it easy to backup and share my work whenever I'm on a fast network.

Google Reader fetches content from around the internet and stores all my feeds until my offline client connects to Google Reader and downloads a full copy. I can get to my desired content regardless of how broken these sites are, because only the route between my computer and Google needs to function.

I know these are very simple examples (and some, like Google Reader, have privacy implications) but anytime you can design a system that allows for full offline mode, while making the best of a network when it's available, I think that's a golden design to shoot for.

Just as a suggestion: Perhaps door locks should be able to cache some sort of credentials for X hours or days to prevent network problems from rendering an entire hotel inoperable.