Are there special attack vectors for statistical databases? Are statistical databases vulnerable to SQL injection attacks?
If so, what specific kind? Can you think of an example?

I might be mincing terms here, but technically no, a statistical database shouldn't be vulnerable to SQL injection, because statistical databases tend not to use SQL as its query language. They tend to use variants of the language like MDX or DMX. Then again, some do support SQL though so...

However, since they do accept input in the form of a language they certainly can be vulnerable to injection because its not really up to the database or its server to prevent injection. Its up to the application calling into the database to properly protect against injection.

There are varying degrees of damage involved here too. In most cases you can't insert data or delete data as these databases/cubes/models tend to be read only, however it could be possible to change the intended result set and get more information than expected. I would expect this to be possible in poorly developed reporting applications.


CVE-2015-7547 vulnerability, if the glibc used is below 2.23 , but does not uses getaddrinfo CVE-2015-7547 vulnerability, its mentioned,version of glibc below 2.23 are vulnerable.

if the glibc used is below 2.23 , but application does not uses getaddrinfo() function, Is  the application still vulnerable?

While you might not use the function in question, some other library function might use is somewhere, which potentially opens the vulnerability for exploit.

It is therefor hard to know without actual (pen-) testing whether your application is vulnerable to this vulnerability.


Vulnerability in popular Javascript Framework (Angularjs) I found a bug that allows you to escape the AngularJS template sandbox. Angular is a mustache based template language. It allows you to put expressions that are evaluated in your html. For example, {{1+1}} renders at 2

The sandbox makes it so users can't access window / constructors from inside Angular within expressions. You can't do {{{}.constructor = ...}} for example. This is because those operations are considered unsafe should the site also be saving templates from user input. It opens up the site to XSS.

Going through the source code, I found that there is a check for obj === {}.constructor that can be bypassed.

Basically, it comes down to bypassing this:

if (obj) {
    if (obj === (0).constructor || obj === (false).constructor || obj ===     ''.constructor ||
      obj === {}.constructor || obj === [].constructor || obj ===     Function.constructor) {
      throw $parseMinErr('isecaf',
      'Assigning to a constructor is disallowed! Expression: {0}',      fullExpression);
    }
}

I was able to get past those checks by hiding my constructor calls inside another object (object literal or array literal).

As literal object:

{{x = {'y':''.constructor.prototype}; x['y'].charAt=[].join;$eval('x=alert(`Evaluated Object Literal`)');}}

Or as an array:

{{x = [''.constructor.prototype]; x[0].charAt=[].join; $eval('x=alert(`Evaluated Array`)');}}

How can the above checks be best improved to make it so these cases fail?

I tried changing the obj === {}.constructor checks to instanceof instead and that makes the checks work, but I think it may introduce its own security issues. I would like to submit a pull request, but I'm hoping other security researchers out there might contribute to the conversation in order to make the sandbox as strong as possible.

Here is my issue posted to Angular project for reference:
https://github.com/angular/angular.js/issues/14939

Here is related material: http://blog.portswigger.net/2016/01/xss-without-html-client-side-template.html

Here is a jsFiddle: https://jsfiddle.net/ianhickey/5sb665we/

Angular users: Stop Saving UNSANITIZED User Input.

I have mixed feelings about the answer to my own question. As of Angular version 1.6, the Angular team has decided to remove the sandbox altogether. The sandbox (while not perfect) afforded the user some superficial level of protection against there own choices when building an Angular app. The sandbox was really pretty good and getting better and better. But the sandbox was also never intended to be a security boundary. It was there to try and help enforce clean design principals.

With the sandbox gone, the Angular user is going to be forced to think about the security implications of saving untrusted, un-sanitized, user input. Which I personally think is a good thing. If, and only if, people realize going into that upgrade that it could potentially open wider security issues that they had previously ignored. Hopefully this post helps create some awareness when people are searching 'angular 1.6 security'.

The answer to this question is that Angular has removed the sandbox as of 1.6 to address the fact that users were using the sandbox as a security mechanism where it was never intended to be.

Angular Sandbox Removal Blog post


Actual use of covert channel in malware I have seen several academic sources mentioning covert channels in computers, such as one process sending data to another process/thread on the same machine in a way that attempts to avoid detection. Covert channels methods include for instance timing, resource contention...
According to the Trusted Computer Security Evaluation Criteria, covert channels are

  ways of transferring information from a higher classification
  compartment to a lower classification.

Is there an example of an actual malware having this behavior?

I am interested more in covert channels inside a single computer than network channels.

It depends on what do you want to achieve: to hide the information that is being sent between the processes or the fact that they are communicating. If your goal is only to obtain confidentiality you can encrypt the information that is being sent between two or more processes.

Prior to this you need to some background information on IPC(on both windows and *NIX), a number of implemented cryptographic primitives(i.e. openssl) and a protocol that actually requires two or more processes to communicate.

An example would be stuxnet.


SQL injection on PostgreSQL in integer field? I was trying https://server/shared/sendemail?sendto=" and got this response:

Database operation "0or1row" failed
(exception ERROR, "ERROR:  invalid input syntax for integer:"""
LINE 4:  where user_id = '"';
                     ^
")

    while executing
"ns_pg_bind 0or1row nsdb0 {
      select first_names, last_name
      from cc_users
      where user_id = :sendto
    }"
    ("uplevel" body line 1)
    invoked from within
"uplevel $ulevel [list ns_pg_bind $type $db $sql]"
     ("postgresql" arm line 2)
     invoked from within
"switch $driverkey {
            oracle {
                return [uplevel $ulevel [list ns_ora $type $db $sql] $args]
            }
     ..."

If I put a random user ID as in https://server/shared/sendemail?sendto=999 the server shows this message:

Query did not return any rows.
      while executing
"db_1row user_to_info { *SQL* }"
      ("uplevel" body line 22)
      invoked from within
"uplevel {
ad_page_contract {
      Sends an email to the user with user_id = sendto

My Questions is, it is exploitable? Some explanations of what is happening would be great .

It's not an SQL injection, and shouldn't be directly exploitable as one, since you've used a named parameter (:sendTo) instead of directly concatenating strings.

However, it is indeed exploitable, because an attacker can simply change the ID number and cause your server to spam other accounts with emails.

Also, cases like this one, where the client sends the wrong type of input, will trigger informative error messages; an attacker now knows that you're running PostgreSQL, for example.

Generally, passing input directly to SQL queries without validating it is a very risky practice.


What is the benefit of signing an executable that is not a driver on windows? What is the security benefit of signing an executable that is not a driver?
How is the signature verified by the windows?

When an installer is signed but the content doesn't match the signature, Windows will warn you, as a part of UAC, that the publisher is unknown. It still allows you to choose running it and doesn't specify that the problem is with a mismatching signature.

However, compromising a system doesn't require elevation: we are protecting data, not the system! There's also a lot of standalone executables: Windows allows you to run a tampered executable unless it doesn't require admin privileges. It even happily shows the original signatures in the Properties > Digital Signatures; you have to press Details for verification. You also have to do this to figure out why the UAC gave you this warning.

I'll demonstrate this with the well known PuTTY that has been used standalone long before it even had an installer. Let's modify a harmless string from the putty.exe to avoid breaking it – an attacker would obviously insert malicious code, instead.

Here we see the results, but Windows still runs the executable without any warnings.

You can also see the signatures still in their place. For actual verification, you have to go further to the Digital Signature Details to see that it's not valid.

This is the security benefit of signing even standalone executables. Just like publishing a checksum of the file on your download page, it's an extra measurement for those who would like to be sure.

Frankly, the fraction of the users actually checking this manually is small. People also tend to run the installer anyway: their goal is to install the software and they see the warning merely as an obstacle. However, this doesn't mean that you should avoid signing your executables. We just do our part and keep hoping people would learn – and Microsoft would embrace better security practices by emerging an alert even on standalone executables.


Question about Standard Access Control List According to my textbook, it states that a Standard ACL should be placed on the router interface as close to the destination as possible.

I am not sure what that means unless each router gets their own ACL?

It means like this: let's assume you have a configuration like:

network1<-->router1<-->router2<-->router3<-->network2 .

if you want something to be denied for going into or getting out of network2, you put the ACL on router3 (which is closest to network2), not or router2 or 1 (which are further from your target compared to router3).

Standard ACL examine the source address only. As a result, you must place them as close to the destination as possible to avoid blocking traffic bound for another interface/network.


Changing server side certificate during ongoing connection -> is it supported ? what are the effects on the existing connections? I was wondering (based on the TLS RFC and its current implementation by the major vendors / platforms - i.e. Microsoft's IIS): how would an existing active SSL / TLS session behave / react if the server where to change the certificate that was used for negotiating initially that session to an entire new certificate ?

Would the server automatically close the existing sessions ? (and specifically, how would IIS and Windows Server 2008R2/2012R2 handle this case - would the server side be able to start using the newly selected server certificate without affecting the already established SSL/TLS sessions ?)

Or would the server be able to change its certificate without affecting (closing) the already existing encrypted sessions?

Would the client detect the change at a later stage during the session (i.e. if a session renegotiation were to be performed) ?

Thank you in advance.

The server certificate is only used during the TLS handshake. It is irrelevant for the remaining session and so there is no need to close a session when the certificate changes. In fact the client will not even notice that a certificate has changed (or if a certificate got revoked) unless a new TLS handshake is done, i.e. either when doing a new connection or when doing a renegotiation inside an existing connection.

But it might be that specific server implementations will close a session as a side effect when the certificate gets changed for technical reasons, for example because the process needs to be restarted.

And there are  client implementations which restrict certificate changes on renegotiation in order to deal with the triple handshake attack. Thus if the server changes the certificate and a renegotiation gets triggered (maybe because a client certificate need to be checked) then this can result with current Java implementations in server certificate change is restricted during renegotiation.


Elastix Asterisk CLI flooded with chan_sip.c / sip_xmit warnings I'm still new to Asterisk/Elastix and apologize if this question is misplaced.

Recently one of our larger clients was hacked and we remedied the situation by enabling fail2ban. It seemed to have stopped the hackers from trying to register extensions but I still suspect that the server is under some sort of attack.

There is a constant stream of WARNINGs in the Asterisk CLI stating something along the lines of:

WARNING[2184]: chan_sip.c:3755 __sip_xmit: sip_xmit of ... (len 371) to (null) returned -1: Invalid argument

There are about 3 to 5 of these warnings each second and I am concerned that it will affect quality of service or lead the company to be victims of fraudsters.

Could the warnings be the result of an improperly configured PBX or could it be a possible attack?

The clients current setup is as follows:

Elastix 4.0.74
Asterisk 11.20.0

See screenshot of warning messages in CLI below:

Thanks in advance.

It appears that the system is doing a DNS lookup of the Trunk name possibly.


Does creating new subkeys change an existing master key? I have a PGP master public / private key pair. I have created 3 subkeys for it. I want to add 3 more subkeys to this master key. Would doing so change my public and private keys?

No.

Your quesiton is quite scarce in details, so I will assume that you are talking about PGP keys. And for change a definition such as if that would lead to a key with a different fingerprint.

If you add a new subkey to an existing PGP key:

the fingerprint of your key stays the same (it is the master key)
existing signatures on your key are not lost
the public key is augmented with the new subkey (and the signature binding it), so people that already have your public key will need to reimport/refresh it in order to get the new subkey.
similarly, in order to work with the new private subkey (eg. if you used it on several PCs), you will need the private part imported.


Where can I find a snort signature for detecting slowhttp DoS attack from Slowloris tool I am performing a test on some DoS attacks and how to detect them. I am currently testing the slowloris tool, but all the signature I have seen online, as very very few as they are,do not work even after modifying some parameters. Can someone point me to a site or an example of the snort detection rule for detecting slowloris attacks.

slowloris don't finish web request header.

pcre:!"/\x0D\x0A\x0D\x0A$/H"; will detect web request not ending with 0D0A0D0A

Or you can also use /D that Match unnormalized HTTP request or HTTP response header.

But i'm not sure this would work.:) In fact, i think it is better to monitor changes in session volume than pattern matching, if you want to detect like slowloris.


How secure is Facebook Messenger when not using “Secret Conversations”? If Facebook Messenger is only end-to-end encrypted if I start a secret conversation, how secure is a normal conversation?

Can Facebook theoretically access my messages?
Does Facebook scan the contents of my conversations for ads purposes?

Of course they can, they can access everything and anything that is uploaded, or used on their platform. Non end-to-end communication encrypts the data between you and Facebook, and the recipient and Facebook. So Facebook sees everything. The only exception is when using end-to-end communication, when data is encrypted between you and the recipient directly and Facebook may not be able to see the messages.

[Unless in a situation where the government gets a court order to disable the end-to-end communication feature so that messages are not encrypted when using end-to-end communications even though you think it is, but I am not a lawyer nor an expert on Facebook's terms and conditions]

For more information, read the terms and conditions, privacy policy and ad policy on the Facebook website: https://www.facebook.com/policies
Each website has their own conditions that you agreed to when you signed up or used their services.


Trouble understand login vulnerabilities I'm testing my own web page with the following vulnerabilities.

#1:

Form escapes ' to \'

So if a user tries to enter the following information:

username: 'or'1=1

password: m

username will actually look like \'or\'1=1

#2:

Script tags allowed.

So if a user tries to enter:

username: <script>alert(0)</script>

password: m

then a dialog box will pop up with 0.

I'm wondering whether the first method is truly secure against sqli. I know there are things about handling comments, but is this a good way to handle the single quote?

Also, in the second vulnerability, what can a malicious user do in this case? I'm aware of XSS attacks, but I thought those were with the URL. Is this really a big security flaw?

Both cases are serious vulnerabilities, and the security approach is wrong.

First of all, the form itself shouldn't escape anything. You might want to check the input, but you do not manipulate it. Escaping is done in a specific context like a database query, not globally.

No, it's not secure to simply prepend a backslash to single quotes in the application:

Database systems support different character encodings which may or may not match the encoding used by your application. If they don't match, the escaping attempt is essentially a shot in the dark and may not work at all. There's a famous injection attack which exploits the differences between two common character encodings. The only way to be sure is to use an encoding-aware library function of your database system. For example, MySQL has mysql_real_escape_string().
Backslash-escaping is a nonstandard mechanism which only works in some special modes of some database systems (like MySQL). If the server configuration or the underlying database change, you may again lose all protection.
There are much more characters that you need to take care of. This also depends on the database system and its configuration.

Manual SQL-escaping is actually a rather poor approach, because it's complicated, tedious and error-prone (as you can see). A more modern solution is to use prepared statements and not stuff any user data into SQL queries in the first place. If, for some reason, prepared statements are not an option, make sure to use the right library function instead of trying to invent your own solution.

Your second case is a full-blown cross-site scripting vulnerability, so an attacker can do anything which is possible with XSS (like stealing a session cookie). No, XSS is not limited to URLs in any way. You've just proved that yourself. An XSS attack happens when a user is able to inject data into an HTML context. Where that data comes from is irrelevant; could be the URL, could be a form paramater, could be a cookie, an HTTP header, a database string, anything.


Android Device Support Lifecycles A key consideration for most computer platforms is the availability of security patches for vulnerabilities which inevitably arise with them.

Are there any available resources which provide information on what Android security issues have been patched/not patched for a given device?

Even though it tracks all the issues and not a security issues resource, you can search the issues in Android Open Source Project - Issue Tracker for security issues of a given device.

Here is the link.


is pre-master secret computation different while using client certificates Is the information present in client certificate used while computing the pre-master secret of the session in TLS? In other words,for a given session will the pre-master secret be different depending on whether or not client certificate is used in the session?

The short answer is no. The way the premaster secret is computed depends on the ciphersuite. With the deprecated RSA-based ciphersuites with no forward secrecy (no key exchange involved), the premaster secret is chosen by the client and is supposed to be random. For ciphersuites based on a Diffie-Hellman key exchange, the premaster secret is the result of the DH key exchange and is thus normally effectively randomly co-generated by the client and the server. The only case where the client certificate is used to set the premaster secret is if the client certificate contains a (non-ephemeral) DH key, and that feature is very rarely used.

Where the client certificate matters (in addition to whatever validation the server performs) is that the Finished message contains data to verify the whole key exchange, including the ClientCertificate message.


Diffie-Hellman certificate verify message On the RFC 6101, about "Certificate Verify", I read that:

  "This message is used to provide explicit verification of a client
  certificate. This message is only sent following any client
  certificate that has signing capability (i.e., all certificates except
  those containing fixed Diffie-Hellman parameters)."

Why fixed Diffie-Hellman does not need this message, if it's using a certificate?

Diffie-Hellman certificates are certificates which contain a Diffie-Hellman public key (such beasts are exceedingly rare; nobody does that in practice). Such certificates can work for client authentication only if:

the server's certificate also is a DH certificate;
both DH key pairs use the same parameters (they work in the same group);
and a static DH (not DHE) cipher suite is used.

In such a situation, the server shows its DH public key as part of its Certificate message, the client shows its DH public key as part of its own Certificate message, and both DH key pairs are used for the actual key exchange (that is, the client uses its private key and the public key from the server, and the server uses its private key and the public key from the client). Client and server are mutually authenticated by virtue of the client (respectively the server) using the DH public key of the server (respectively the client) as found in a certificate duly signed by a trusted CA.

Conceptually, the signature by the CA suffices, which is why there is no need for an actual Certificate Verify message (or, for that matter, a Server Key Exchange message). In fact, we can consider that when a DHE (ephemeral DH) cipher suite is used, then both the client and server play the role of a subordinate CA, with the resulting "certificates" being the Certificate Verify and Server Key Exchange messages...

Diffie-Hellman certificates (and DSA signatures) were promoted by the US Federal government in the late 20th century because RSA was patented at that time. But the DH standard (ANSI X9.42) has never been freely available, so open-source software did not follow, and DH support in deployed systems is poor. Which is why DH certificates are a rarity. A museum piece, even.


Create shared private key Let's have the following problem:

There is something like a voting application. Every participant can cast a vote. There are more than one watchers who control the election. I want to make every single vote encrypted until election ends. If there were only one watcher, the solution would be straightforward - the watcher would generate private, and public keys and participant just encrypted the vote with this public key, and after the election ends, watcher decrypted these votes and calculated the results.

My problem is there is more than one watcher so I need to create something I would call a shared private key. Is there any scheme to generate a public key and many private keys which decrypted the message after watcher put their shared private keys together?

It could be imaginable as a lock that could only be opened if you have all keys.

There is Shamir's Secret Sharing algorithm, that allows to encrypt something in a way, that it can only be decrypted when a certain number of parts of the key are available.

You will probably need some additions for your voting system, as SSS is not a public/private key system.


Windows 10 seems to load session before user log in, is it safe? Last few days I noticed a really annoying problem with Windows 10 (not sure if it is caused by last update).

After computer is turned off gracefully, on next startup it loads completely session of the last user (I think the last) before anyone signs in!

Way to replicate:

turn off browser with playing music (in my case Firefox with Youtube)
turn off the computer gracefully
start the computer and wait on logging screen
after few minutes, the music from web browser starts to play (even though the browser/tab was not active on shutdown).

I tried to log in with another user, and the music stopped playing sometime during the login process, so I guess it abandons the loaded session at this point. On the next startup, the music started playing again.

It seems to me, that Windows 10 is trying to predict what user will log in next and preload his session before he logs in (or maybe it is just a terrible bug).

My question:

Has this feature (or bug) some security issues or is it just extremely annoying?

Edit
By security issue I mean for example case that some user will introduce running keylogger to login screen from his account extremely easily.

One of the many small changes in Windows 10 Fall Creators Update is that the operating system can now automatically reopen programs that were running before shutdown or restart. If you shut down Windows 10 with some apps open, some of them are relaunched at next startup just like what is happening to you.

It usually opens the app or the window you didn't close when you hit the shutdown button by bookmarking that specific window or the application so that it automatically open when you restart or power on again.

If you want to start with no apps open (other than those set to auto-start via Task Manager/Start), you’ll need to ensure all apps are closed before shutting down or restarting the PC.

Though there is no way to turn the feature off in the user interface, there is a way to prevent Windows 10 from restoring previously opened programs after a restart.Microsoft suggests exiting programs manually before shutdown, so that they won’t be be relaunched after reboot. That’s the best practice.

You need not worry about the security of windows as it is the update officially from Microsoft itself.


Spying apps: Android mic and camera access Can android lollipop 5.1.1 apps which have permission to access mic and camera access them when the app is not running?

I woke up to the news by the NYT that a popular app I had previously downloaded was solely developed to be used as a spying tool by a government. I did not research the app when I downloaded it and the app needed mic and camera access as it is a messaging app.

What can I do in the future to ensure my mic and camera are not running when I'm not running an app? It will not be practical to check if every app I download is trusted or not as even popular American apps could be potentially malicious.

As all software based techniques have a potential to be flawed or hacked (and, as @Jason commented: an app that is seemingly not running might still run), there may be a 'hardware' based solution:
A good old sticker that covers the camera (only really practical for the front facing camera) is a solution that's not hackable. 'Camera cover slides', available for about 8$ at Amazon, are the more convenient alternative.
Unfortunately I'm not aware of a similar simple solution regarding the mic.


Can my identity be revealed to the receiver when using skype to land line phone service? I have been using skype for online chats, and recently called my company on their landline number through skype a few times regarding an anonymous complaint to avoid retaliation. I have not used caller identification but is there any possibility that the company can track my identity?

The answer is maybe, but it isn't likely.

(Assuming that your company isn't the cyber mob and can't hack and slash their way through the internet)

One example of a case where you could be found out; say your company decided that the complaint was somehow incriminating, if it was they could press charges and attempt to get a subpoena for your information. Assuming Skype keeps accessible logs on activities such as calls through their phone systems, the police could legally get Skype search for who was using the phone number that called the company at the time and fork over everything they've got on that person. If you didn't use a proxy or a VPN or some other means of routing your traffic around, they could give your Internet Service Provider a call and then get a name and address for you.


Best practices manual for Alienvault USM? Is there any best practices manual for Alienvault USM?

I found some information about the profiles for the vulnerability scanner but nothing about how often I should launch the scan or which categories for a custom profile are dangerous:

Deep - Non-destructive, full and fast scan.
Default   - To be used when scanned system fails when overwhelmed by too many scanning requests.
Ultimate - Full and fast scan. Includes dangerous stress tests that have potential to induce host or system failure.
Custom profile

Which type of processes launch each profile? How often should I launch them?

This cannot be answered in general because this depends on your requirements. The vulerablity scanner unitilized by Alienvaults OSSIM/USM is OpenVAS. So the right place to look after information about the processes launched is in the OpenVAS documentation.

From my experience I can tell you that an extensive test will likely cause some trouble with blackbox devices. I have seen cheap switches and embeded devices (aka IOT devices) that go down even in an allegedly non harmfull scan. This is of cause a useful result of such a scan but it is of cause not very pleasant for the users. This is why I only do default scans in the week and extensive scans at the weekend. To get a realistic result I use wake on lan to start all workstations s they can be scanned even on the weekend.


Why are my plastic credit card and activation code sent separately? Capital One recently sent my plastic credit card by post mail  and its activation code by a separate post mail. What security problem does this mitigate?

If a rogue element has access to my mail box or home, they will have both the plastic card as well as the activation code. The only thing I can think of is that they are preventing rogue elements on their side from having access to the two pieces at the same time? Or is it something else?

Many low level crimes are ones of opportunity, not planned out attacks.  By separating the two needed pieces of mail in time, it forces the attacker to intercept the same person's mail more than once.

This prevents a mail thief from simply walking up to homes and looking for credit cards and activating them all in one step.  Now suddenly the thief has to go back to the same house, or intercept the same person's mail at least twice, and possibly multiple days in a row.  That takes time, effort, and additional exposure.


How to put executable code in files? I have PDF, Word and MP4 files on my site and I want to protect them from illegal downloading even if my site hacked. I want to put executable code in the files, so if someone downloads and opens them, the code is run to check if the file location is not the server or a specific location that I define. If not, the file is destroyed.
How can I put executable code in PDF, Word and MP4 files?

The field that you're nibbling at is called Digital Rights Management (DRM), and it's a big field.  Protecting your documents and music, for example, fall under Content Restrictions.
There are significant shortcomings to applying DRM, some of which are:

It may make it harder for legitimate readers to access your content
It may break or end-of-life and leave your content unreadable
It may be possible for attackers to bypass DRM and access your content

As an example, if you Google "mp4 drm" almost all the top hits have to do with bypassing the protections, not with enforcing them.
In short, it's a hard problem with many bad solutions and a smaller number of usable ones.  For these reasons, and because of the ethical implications of restricting content owner's rights, some people have rebranded DRM as "Digital Restrictions Management."
In summary:

What you want is hard to do.  It's not as simple as "putting executable code in mp4 and pd4 file"
Solutions exist, but may be limited in usability


OpenVPN Encryption Algorithm Used For Control Channel Encryption In OpenVPN which algorithm is used for control channel encryption (--tls-crypt directive in OVPN profile)?

By using --tls-crypt, will there be only encryption or authentication-then-encryption? I want to disable --auth by using alg=none parameter. I know --auth is required for --tls-auth (control channel authentication).

Is --auth necessary for --tls-crypt too, or I can disable --auth without any upcoming issues related to --tls-crypt functioning?

Update 1: I searched in OpenVPN 2.4 manual and it states --tls-crypt is used for encryption "and" authentication control channel. The rest of the question remains unanswered.

Update 2: After searching in OpenVPN support forum; I realized --tls-crypt uses AES-256-CTR for encryption; still know nothing about the authentication side.

First: don't disable --auth.  --auth controls the authentication mechanism for the data channel, while --tls-crypt is for the control channel (though, and this is slightly confusing, --auth also controls the auth algorithm used by --tls-auth).

--tls-crypt uses fixed crypto methods, which are HMAC-SHA256 for authentication and AES-256-CTR for encryption.  So yes, as the man page says, --tls-crypt offers an extra layer of both encryption and authentication for the control channel.  The algorithms are not mentioned in the man page, but printed at --verb 3 log level by openvpn op startup:

Sat May 12 22:07:42 2018 Outgoing Control Channel Encryption: Cipher 'AES-256-CTR' initialized with 256 bit key
Sat May 12 22:07:42 2018 Outgoing Control Channel Encryption: Using 256 bit message hash 'SHA256' for HMAC authentication
Sat May 12 22:07:42 2018 Incoming Control Channel Encryption: Cipher 'AES-256-CTR' initialized with 256 bit key
Sat May 12 22:07:42 2018 Incoming Control Channel Encryption: Using 256 bit message hash 'SHA256' for HMAC authentication

For more information, you could read the commit message of the commit that introduced tls-crypt (https://github.com/OpenVPN/openvpn/commit/c6e24fa3), or the in-code documentation (https://github.com/OpenVPN/openvpn/blob/master/src/openvpn/tls_crypt.h, or the generated doxygen available on https://build.openvpn.net/doxygen/html/group__tls__crypt.html).


Javascript injection in email address as username? Is it possible for a valid email address (something that would work  if used send to gmail, for varying definitions of valid (the email would be received not the exploit)) to contain javascript that could be exploited if rendered and the output is not sanitized (properly encoded)? if so please provide an example.

I would say that theoretically (and practically, depending on your sanitation function), yes, the local part of an email can be used in XSS attacks.

The problem is that email addresses are complex and may include a number of special characters. Additionally, email addresses offer features such as comments and quoted strings, which allow even more special characters.

XSS in Local Part of Email Address

[I'm using the informational rfc3696, because it's a lot nicer to read than the official rfcs.]

  The exact rule is that any ASCII character, including control characters, may appear quoted, or in a quoted string.

So a valid email address would be:

""@example.com

You can test its validity here. This is obviously not secure.

Further Possibilities

Even without quoted strings, an attacker can at least get close:

  Without quotes, local-parts may consist of any combination of
    alphabetic characters, digits, or any of the special characters
       ! # $ % & ' * + - / = ?  ^ _ ` . { | } ~

This is already enough to enter a javascript context, eg:

email me

via:

foo'onclick='alert'foo='@example.com

The problem here is that ( is not allowed, but I would not be comfortable printing this to the enduser unencoded. At the very least, a user could change the style: foo'style='color:red'title='imImportant'@example.com.

You can also place the payload inside a comment of the local part, so possible restrictions of your email provider do not apply, eg: ("")me@gmail.com, where me@gmail.com is your email address (here, the same rules as above apply - < and > can only be inside quoted strings; additionally, you cannot have ( and ), even in quoted strings).

And this is just about the local part. The domain part gives an attacker additional attack vectors.

Proper Defense

This is why XSS prevention should not be about filtering, but proper encoding. All dangerous characters (in most contexts - but not all -  these are at least ', ", <, and >) should be HTML encoded when send to a user, no matter what filter was applied beforehand.


Encryption decryption time Does the encryption / decryption time of rsa algorithm vary significantly with a change in key length? For example, is there a noticeable difference in encryption/decryption time between 512 bit and 2048 bit?

With usual implementations, doubling the RSA key length means that encryption will be four times slower, and decryption will be eight times slower. RSA encryption is much faster than RSA decryption (in the context of RSA signatures, verification is similar to encryption, and generation is similar to decryption). The theory says that for a n-bit key, computational effort for encryption is proportional to n2, while effort for decryption is proportional to n3. In practice, there is a little bit more to RSA than just the modular exponentiation, and the overhead does not scale in the same quadratic/cubic way, hence, for a specific implementation, you will not get exactly an 8x factor.

Also, note that the fast encryption (and its quadratic behaviour) relies on the use of a short public exponent. This is the way RSA is commonly used; it is possible to have a RSA public key with a long public exponent, which will make encryption as slow as decryption. A long public exponent does not seem to improve security, so short public exponents are the rule. Some widespread RSA implementations do not support long public exponents anyway.

OpenSSL comes with a command-line tool which can perform some benchmarks. Try running this:

openssl speed rsa1024 rsa2048

On my PC, this results in the following:

                  sign    verify    sign/s verify/s
rsa 1024 bits 0.000646s 0.000035s   1549.1  28408.6
rsa 2048 bits 0.004097s 0.000120s    244.1   8331.1

so we get factors 6.3x and 3.4x for decryption and encryption, respectively, when doubling key size from 1024 to 2048 bits.


Is it possible to use CSP for a Javascript-based video player? Some of my workmates are developing a video player using Javascript. AFAIK, we are not going to have any website. The clients will connect to the server, download the javascript code and then render the player in their site.

In this context, does it make sense to use CSP in our code? Is it even possible? All the examples I see are focused in how to use CSP for protecting a website against XSS.

CSP applies to the page containing the code, not the code. In your case, this means that the client pages may or may not have content security policies which allow (or don't allow) your script to run based on it being a third party script.

Your script can't influence those - that's kind of the point. CSP is designed to ensure that only known scripts run, or known elements are able to be loaded by the page.

In the case of a video player script, the hosting site (the one which loads your code) would need to allow your script, and for the appropriate types of files to be loaded from your servers if they implemented CSP. You may need to look at CORS to enable access to content from your domain by your script, which is running in the context of the client site, although this depends on what you're doing with it - if you're just including a video file using a <video> tag, this probably isn't needed.


Required security for storing bank transactions, but not credentials If I'm using an external bank data aggregation service to get user credit and banking transactions, but the external service itself is handling the process of collecting and managing banking credentials, I'm just storing lists of recent transactions and information like which accounts exist and their corresponding transactions, service tokens, banks or credit card companies, credit limits and so on, do I need PCI compliance? What security requirements are there for such an application?

If you’re not a merchant (ie you don't take payment cards) and you are not a service provider to merchants or banks, then there is probably no one who is contractually asking you to comply with PCI DSS -- and so the decision is yours. If you have payment card numbers (the 15/16 digit number in the middle of the card) then you may want to consider it as a good baseline. For another good baseline consider the CIS 20 critical controls.

Also - if you’re in the EU you need to be aware of the EBA's security RTS under PSD2 because it sounds like you may be providing Account Information services. However if you are in the EU, once PSD2 comes into effect (13 Jan 2018)it specifically says that the account number is not 'sensitive data'.


How to prevent sim swap to the most extent possible There's a technique called sim swap, which enables a fraudster to transfer the victim phone number to an other sim, allowing a fraudster hence to read the messages but especially to empty out their bank account by recovering or changing the bank website account password via phone number, so by receiving a recovery code or something like that. Anyway this can be avoided by setting a number unknown to anyone.

The problem is that maybe anyone who has my phone number could potentially use this technique just to associate a Google account or any other account to my number, in order to commit crimes on behalf of my identity.  How can this thing be prevented in the first place?

I mean, in this case I could have as many unknown numbers as I want but, a perpetrator can still use this technique with my known number, and even if my acquaintances are not evil minded, they can just give the number to other people who give it to other people as well, until my number happens to be in wrong hands.

The obvious way to prevent the effects of someone using this technique to access your accounts is not to use your phone number for 2FA or for account recovery. If you need to, then use an "unknown number" that you don't use to call anyone. Just use the number for account recovery.

To prevent social engineering attacks to be used by the attacker as a means of social engineering the companies to make the swap, you provide fake information to the company on your account. That way the attacker would have to figure out the specific data you provided the company.

As for someone using your main, known number to set up new accounts with which they will commit crimes, I'm not sure why that's a concern.


Books, videos, and other resources for CEHv7 What are recommenced books, videos and other resources for CEHv7. It seems as though not much is published on the new version of the cert just yet. Currently, I have read All In One CEH by Matt Walker. I plan on taking the test without attending the course as I tend to do better at self study.

Check securitytube.net if you didn't already. It has tons of videos that will help you get a better understanding beyond just CEH.


How to protect from new Javascript Injection technique that doesn't use eval()? There is a new Javascript injection technique that is generating chatter on the forums mentioned here

Here is the code sample:

String.prototype.code = function(){ return (new Function('with(this) { return ' + this + '}' )).call({}); };
var s = 'alert("hello!");'
s.code();

What infrastructure components need to be updated (if any) to monitor and protect from this class of exploit?

For example:

I'm under the impression that some DBA's scan their databases for evidence of a injection attack... this is almost a last-stand approach for mitigating a poorly written application in a distributed enterprise.

When I last worked with Microsoft on a JS Injection attack, the developer in India didn't properly verify form input.  This caused our client's database to be littered with Javascript code that executed on the client.  Microsoft's response was to search the database for pre-defined strings that are commonly used in attacks.

I'm assuming that there are products or sensors that monitor SQL or HTTP traffic for obvious js-malware.  If I take my assumption a step further, those devices need to have the signature updated for this vector.

Its all XSS,  its not proper to call it "JavaScript Injection".  The XSS vector you are talking about isn't new,  and its an interesting one.   XSS is an output problem.  If you perform the same input validation on all input you'll still have problems with XSS.  If you encode or strip all < > characters for every input variable you'll still have huge problems with xss.  This is because XSS is highly dependent on where the variable is being printed to the page.

This line of code is safe:

var x='alert(123)'

However,  it can be exploitable if the attacker has access to single quotes ' .   For instance if the attacker had a request like ?x=';alert(123);,  then he would be able to break out of the quote marks and execute javascript.   The solution is to encode all quote marks as well.   In php you can use htmlspecialchars($var,ENT_QUTOES);

But here is the real kicker,  even this function can't stop all XSS.  It will stop about ~90% of xss.  But even after a htmlspecialchars($var,ENT_QUTOES); you can still run into problems with DOM based xss  and XSS via event handlers.

So whats the real solution?  Test your code!   Use a free vulnerability scanning service like Sitewatch or an open source tool like Wapiti.  These tools know all of the strange rules for XSS, and it will be able to find these violations in your application.   Google uses Sitewatch.


Secure Wireless Implementations For quite a while now, I have grown to treat wireless networks as inherently insecure. As part of this, I put them on the public Internet and require VPN connections to access company resources.

My wireless vendor is claiming that this is no longer necessary. They recommend a WPA2 Enterprise implementation using NPS and 802.1x, which would be connected directly to the corporate network. This network will not have production data or any data that would have any regulations associated with its handling.

My initial research seems to indicate that this implementation is considered reasonably secure. Would I be exposing my corporate network to additional risk by using this implementation?

Architecturally this is likely to be reasonably secure, however there are still some things to consider.

Do you have Full-Disk Encryption on any laptops which will be accessing the service? If not there are some risks if a device is lost, as the credentials for accessing the network will be stored on the laptop (cached windows creds and the machine certificate if used)
How will the guest network be configured exactly?  I've seen some implementations where there's some information leaks where the guest uses the internal DNS servers, so they can query internal server names.  A minor point on it's own but worth thinking about.
Be careful to check that the APs are correctly configured.  Most implementations have both networks on single APs so if there's a configuration issue it can lead to unauthorised access to the Internal network.  If you think of your access points like firewalls in terms of change control (as they effectively segregate an untrusted network from a trusted one) that's a decent way to go.
It's worth making sure to use something like WPA2-PSK on the guest network, I've seen quite a few implementations where it's unencrypted and it just leaves guests at risk for no major benefit (assuming that they'll need to authenticate anyway via a captive portal or something similar)


Potential DoS in emailing admin on error pages In my website, the backend sends an email to the sysadmin whenever there is an Error 500 with the logs and other data about the error.

How can I prevent a cracker from intentionally triggering the Error 500 and, in turn, flooding the mail server?

If there is a legitimate use case that triggers a status code 500, there is little you can do to prevent someone from doing just that.

Of course you can add some logic to the website, resulting in the ban of an offender (e.g. identified via source IP address) after triggering a status code 500 too often in a defined amount of time, but finding a suitable threshold can be tricky. You risk banning legitimate users, if you are not careful. Add the possibility of banning a big network because a single offender behind a NAT triggers the protection mechanism, and this option doesn't seem too attractive any more.

The easier solution is reconsidering your alerting mechanism. Why do you need an email every time a single status code 500 is triggered. You can define thresholds on this level as well. To defined suitable thresholds, you should think about the purpose of this mechanism.

Do you want to find new bugs? You should alert only the first few errors for a specific request and investigate the problem. No need to report an already known issue again.

Do you want to identify attacks? You should only alert if a significant amount of errors are triggered. In this case, it is sufficient to send a single mail to initiate further investigation. The response team can gather everything else from the log files.

Those are just two examples. Your intention behind this type of alerting might be entirely different, so you have to come up with a suitable solution that fits your need. Nevertheless, I would consider revamping your alerting strategy more fruitful than preventing its misuse.


What is the difference between a certificate and a private key? What is the difference between a certificate and a private key?

In answering another question on this site, I wanted to point to a canonical answer to this question, but to my surprise I don't see one.

Users can be forgiven for getting these terms confused because many applications use the term "certificate" when they really mean "certificate + private key". It would be good to clear up the difference between the following file types: .crt, .pem, .p12, .pfx and why, for example, an application expecting a "client certificate" blows up when you give it a .crt file.

Here are some references that an answer could pull information from:

security.SE: What is the difference between Key, Certificate and Signing in GPG?
Digicert: What is a private key/public key pair?
Superuser: What is the difference between a certificate and a key with respect to SSL?
And of course, our canonical: How does SSL/TLS work?

Every Private Key has a corresponding Public Key. The public key is mathematically derived from the private key. These two keys, together called a "key pair", can be used for two purposes: Encryption and Signing. For the purposes of certificates, signing is far more relevant.

A certificate is basically just a public key, which has been signed by someone else's private key. This forms the basis of public key infratsucture (PKI), which is explained in the articles linked in the question.

How do Certificates and Private Keys relate?

A certificate is just a "fancy" public key, which is related to a private key. You can do the same thing with a certificate as you can do with a public key.

If Bob gets the certificate of Alice, he can encrypt a message for Alice. Likewise, if Alice publishes some data and signs it with her private key, Bob can use Alice's certificate to see if it is really from Alice.

What are all those different file types?

.pem: A .pem is a de-facto file format called Privacy-Enhanced Mail. A PEM file can contain a lot of different things, such as certificates, private keys, public keys and lots of other things. A file being in PEM format says nothing about the content, just like something being Base64-encoded says nothing about the content.
.crt, .cer: This is another pseudo-format that is commonly used to store certificates. These can either be in the PEM or in the DER format.
.p12, .pfx: These are interchangable file extensions for the PKCS#12 format. Technically, PKCS#12 is the successor to Microsoft's PFX format, but they have become interchangable. PKCS#12 files are archives for cryptographic material. Again, what kind of material this contains is completely up to the user.

Wait, what!?

Yes, .crt, .pem, .pfx and .p12 can all be used to store certificates, public keys and primary keys. From a purely technical standpoint, you can not tell what the semantic content of any of these files is just by their file extension. If you ever get confused, don't worry - you're not alone.

However, there are some common conventions that are being followed. .p12 and .pfx files are usually used to store a certificate together with the private key that corresponds to this certificate.

Likewise, .crt files usually contain single certificates without any related private key material.

.pem files are wildcards. They can contain anything, and it's not uncommon to see them used for all different kinds of purposes. Luckily, they are all plain text, and are prefixed in a human-readable way, such as

-----BEGIN CERTIFICATE-----
MIICLDCCAdKgAwIBAgIBADAKBggqhkjOPQQDAjB9MQswCQYDVQQGEwJCRTEPMA0G
A1UEChMGR251VExTMSUwIwYDVQQLExxHbnVUTFMgY2VydGlmaWNhdGUgYXV0aG9y
...

Why would an application not handle a .crt file if it wants a client certificate?

A certificate is just a public key, and thus by definition public. A client certificate is no different - just a public key by a person, machine or other "client", that is signed by some authority.

An application that wants a client certificate usually wants to use that certificate for something, such as to authenticate the client to a server. In order to do that, one needs the certificate and the corresponding private key.

So an application should really write "certificate plus private key", because the certificate alone is not enough to prove one's identity. It's actually the private key that does it.


Can I completely trust CA? When a software company sends me 1 file and asks me to install it then I check the signature and it is valid under the Cert (issued by Thwate CA). So is installing that file sent by that company safe? I mean:

Is there any chance a malicious superuser can alter that file?
If I don't know that company, should I install it? When signing the file, does CA check that file or they just signed it and didn't care whether the file is harmful for receiver or not?
Sorry for gramma mistakes, I am not English speaker.

What usually happens is that the CA creates a certificate for a company, and that company signs the software. The CA validates whether the company is who it says it is, but doesn't check the software at all.

So a corporation called ACME can get a certificate for ACME from Thawte CA. They can then sign any software with that. If you receive such signed software all you know is that ACME signed it. It says nothing about the software. Thawte didn't check the software, they only checked whether they gave an ACME certificate for ACME.

If you don't know the company, the fact that it is signed doesn't offer any security. It only offers security if you know and trust the company. For example, if software is signed by Microsoft I generally trust it not to be malicious. If it is signed by ACME I still don't know.


Is this ISP IP address assignment issue a vulnerability? Using a bridged router so that I can set the IP settings directly on the gateway server. We have two such routers for two different IPs (we needed a secondary IP but the ISP only provided it through a new subscription.. I know, right?).

These are internet lines that we're not using anymore after two 20-24 hours downtime periods (ISP's fault) and waiting for the ISP to disable them (it's been two months already).

Last week I checked if the internet was disabled on one router (cable into the laptop and manual settings) and it had lost the bridge setting - happened before, works only on auto-settings. Then I tried the manual settings on the 2nd router and it worked as expected - bridge working.

Then I had the idea to try the public IP of the first router into the second. And it worked without issues. After I checked again to make sure I saw it right, I tried 3 more IPs from the same range (not ours this time, but for as little time as needed to test it worked) and it worked the same way. I could assign almost any public IP to my laptop through the bridged modem.

Isn't this a security issue? Probably a weak configuration issue resulting into a security one.

I thought the public IPs should be tied to the MAC address of the modem or something like that.

Should I report this? This is a major ISP in my country but previous experience showed their high level of incompetence so that I think it's useless telling them.

I assume this is a DOCSIS cable ISP. It can be a bit of a security issue. It's just like having an IP address conflict on a LAN. DOCSIS cable can use ARP just like a LAN. If that IP address that you assigned is also being used by another host on the network, then that other host will loose connectivity while your host is working. You could host services that trick users in to connecting to you instead of the other host, or you could obtain some incoming packets that are intended for the other host.

A bigger concern is if baseline privacy (encryption) is enabled on the cable network. If it isn't, then this issue probably not important compared to that.


MDK3 warns about WPA2 downgrade - how do I find the key in Wireshark? While stress testing my router using MDK3, I got the message "REALLY BIG WARNING!!! Seems like a client connected to your target AP leaks PLAINTEXT data while authenticating!!"

I viewed the tool source and it showed that the WPA2 key is sent in plain text, after repeatedly being rejected due to MDK3 denying all WPA traffic.  How can I view the packet containing the cleartext WPA2 key in Wireshark?  I tried  wlan_mgt.rsn.akms.type but it was not helpful.

MDK3 is a Wi-Fi testing tool from ASPj of k2wrlz.  It uses the osdep library from the aircrack-ng project to inject frames.

edit
i may have misinterpreted the source code of mdk3.
can anyone make things clear by specifying the origins of this warning and its causes.(am not a c programmer but i can still figure out what the algorithm is doing).

if (wpa_old < wpad_cycles) {
if (wep_old < wpad_wep) {
    if (!warning) {
    printf("REALLY BIG WARNING!!! Seems like a client connected to your target AP leaks PLAINTEXT data while authenticating!!\n");
    warning = 1;
    }
}
}

Have you found the cleartext?  If not, there seems to be a bug in the code that could explain this.

The interesting code is:

  //Is encrypted?
  if (! (pkt_sniff[1] & 0x40)) {
      if ((pkt_sniff[30] == 0x88) && (pkt_sniff[31] == 0x8e)) { //802.1x Authentication!
          wpad_auth++;
      } else {
          wpad_wep++;
      }
  }
  //Check WPA Enabled
  if ((pkt_sniff[27] & 0xFC) == 0x00) {
      wpad_wep++;
      return rtnpkt;
  }

This code is intended to increment wpad_wep whenever MDK3 identifies either an non-encrypted packet or a WPA encrypted packet sent by a client to the AP - and this will cause the "REALLY BIG WARNING!!!" to be output on the next status update.

But there's at least one bug in the code. If the packet is a QoS data packet then the packet header has an additional two bytes in which case both the frame type and the WPA indication would be two bytes later in the raw packet - and the current MDK3 code is looking at the wrong bytes in the packet. So it's quite possible that the warning you're getting is a false positive due to a client using QoS data packets.


Stack Overflow on ARM : Null Bytes Issue I am trying to follow the research paper by Tiger Security for ARM Exploitation : Link

For the simple stack overflow exploitation, the code is :

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
void donuts(){
puts("Donuts...") ;
exit(0) ;
}
void vuln(char *arg) {
char buff[10] ;
strcpy(buff,arg);
}
int main (int argc,char **argv ){
vuln(argv[1]) ;
return 0;
}

However, when I run it on my Debian ARM Machine running on Qemu, under Ubuntu. Everything runs fine, except the part that when i have to put the addresses which would fill up the Frame Pointer, Stack Pointer and the Return Address.

So the final resulting code to run under GDB (in my case) becomes :

r `printf "AAAABBBBCCCC\x94\xac\x8b\xbe\[FP 4 bytes here]\x38\x84"`

In my case:
Desired

SP : 0xbe8bac94
FP: 0x000084ac
Return Address: 0x00008438

Since the FP contains null bytes in the middle, Is there any way i could use that in my exploitation. Since, its in the middle, i am not able to use \xac\x84.

Why would you need a specific FP ? The saved FP is there to be loaded back into the corresponding register by the vuln() function when it exits; but that function does not access it in any way, so it could have any value. The loading back of FP is for the benefit of whatever code will execute immediately afterwards: normally the caller of vuln() (who wants to get his FP back), but, in your case, your exploit code, since you hijack the return address. It is then up to you to deal with a non-sensical FP value (that's your code: you can make it recompute an adequate value of FP with a few zero-free opcodes).

Edit: this article, especially section 2.4 ("Getting a known value in a register") might be enlightening.


How to make nmap list an unfiltered port? I have a host that is NAT'ed and I have opened a single port in my router so the host is reachable by the external world. I tested if it was reachable by running a service and connecting to it externally.

I stopped the service, but the port is still open on the router. When I run nmap from an external server, it doesn't show that port and ends.

This is how I ran nmap from the external server:

sudo nmap -n -PN -sA x.x.x.x

and it returns:

Nmap done: 1 IP address (0 hosts up) scanned in 0.49 seconds

As far as I know my router blocks icmp requests. So how do I make nmap show unfiltered ports ?

I have stopped the service, but the port is still open.

Your port is "open" on the router, which only passes traffic on to its destination. If there is nothing listening at the destination (the service is stopped), it is a closed port for all intents and purposes. It's just not a firewalled port.


What Are the Algorithm and techniques of IP Traceback? In most of the cases the cyber attacks such as a DDoS attack or other kinds, it is sometimes hard/impossible to identify the real source IP addresses. This is because when you review the logs and lookup those IP addresses you usually find that the addresses belong to victims.

When you report the crime to cyber-attack investigator agencies, how can they find real IP's or persons behind it?

You, as an individual, can't find who's behind an IP address.

Well, you can grab an IP address via social-engineering tricks if you suspect someone, but if you have no idea who to suspect, then you're basically out of options here.

The FBI is a government agency, they can just ask your Internet Service Provider because the law may allow them to do so during an investigation.

Your ISP have your personal information, they'll communicate them to the FBI: it's that easy.


Router detecting constant ack flood attacks and port scans I first noticed this yesterday in my logs - while I was configuring the router settings, so I don't know how long it's been going on. What should I do? I reconfigured my router with more secure settings, changed my password and it's still happening. So now i'm directly connected.

I was asleep at this time, the "authentication success" bit worries me, my logs are full of ACK flood attacks and packet scans.

Mar 15 15:37:34 Port Scan Attack Detect (ip=31.13.74.1) Packet Dropped
Mar 15 15:37:34 Per-source ACK Flood Attack Detect (ip=184.84.243.224) Packet Dropped
Mar 15 15:35:34 Whole System ACK Flood Attack from WAN Rule:Default deny
Mar 15 15:34:34 Per-source ACK Flood Attack Detect (ip=31.13.74.1) Packet Dropped
Mar 15 15:34:34 Whole System ACK Flood Attack from WAN Rule:Default deny
Mar 15 15:33:34 Per-source ACK Flood Attack Detect (ip=69.16.175.10) Packet Dropped
Mar 15 15:32:54 DHCP lease IP 192.x.x.x to John 0c-xx-xx-xx-xx-xx
Mar 15 15:32:53 Authentication Success 0c-xx-xx-xx-xx-xx
Mar 15 15:32:53 Authenticating...... 0c-8b-xx-xx-xx-xx
Mar 15 13:12:13 DHCP lease IP 192.x.x.x to NP-13C254012390 cc-6d-xx-xx-xx-xx
Mar 15 12:36:13 DHCP request success 192.x.x.x

I'd really appreciate any help.

The Internet is a wild place; there are tons (as in, hundreds of thousands or even millions) of script-kiddie bots constantly scanning every single IP address looking for open ports they can connect to or unsecured servers they can exploit. This is most likely likely the kind of activity that you're seeing.

Fortunately, the vast majority of consumer routers can easily defend themselves against this stuff because they ship with a firewall that, by default, will block all incoming connections and only allow outgoing connections. It looks like yours does too, based on the WAN Rule:Default deny which shows up in the snippet you posted.

So basically, there's probably not much you can or need to do about it. But in general, to keep your router secure you should:

Verify that your router does not have any incoming ports open (which you can do using the GRC Shield's Up website "All Service Ports" scan)
Keep your router's firmware up to date by checking the manufacturer's website for updates
Make sure you change the default administration interface password to something more secure
If it's a wireless router, make sure the wireless is secured with WPA2-PSK and a strong key; also make sure WPS is disabled
If there is an option to enable remote administration, disable it.

As for the "Authentication Success" messages in your log, could it just be you logging in to the administrative interface to check the log?


TinyCA missing CRL information in root and leaf certificates I setup a new CA using TinyCA.  When creating the CA i used an internal host name for the crl url exactly as follows: http://myserver.com/crl.pem

And I have exported the CRL to that location, and I confirmed it's visible on the network.

Now, when I issue certificates (in this case for exchange), it accepts the cert but says revocation check failure.  Using the certuil it suggests that the CRL information is missing from the leaf certificate.  (See output of certutil of a leaf certificate below).  Similarly, certutil says my CA's certificate has no CRL URL's.

Why are my CA and leaf certificates missing CRL URL's?  When I view the CA details in Tiny CA, it shows Netscape CA revocation URL as http://myserver.com/crl.pem as originally entered.

Issuer:
    CN=My Company
    C=CA
  Name Hash(sha1): b6b02cfd24a47572f68a85a398322f978989d9ef
  Name Hash(md5): 5333e962243f00751ee6fcf5b62973b9
Subject:
    C=CA
    S=State
    L=City
    O=mydomain
    OU=IT4
    CN=newmail.mydomain.com
  Name Hash(sha1): 1a7840c8a10059e8e2b87e32f32426dd6ad3d60a
  Name Hash(md5): 1b0581a411b0c14d057203950e3aca98
Cert Serial Number: 04

dwFlags = CA_VERIFY_FLAGS_CONSOLE_TRACE (0x20000000)
dwFlags = CA_VERIFY_FLAGS_DUMP_CHAIN (0x40000000)
ChainFlags = CERT_CHAIN_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT (0x40000000)
HCCE_LOCAL_MACHINE
CERT_CHAIN_POLICY_BASE
-------- CERT_CHAIN_CONTEXT --------
ChainContext.dwInfoStatus = CERT_TRUST_HAS_PREFERRED_ISSUER (0x100)
ChainContext.dwErrorStatus = CERT_TRUST_REVOCATION_STATUS_UNKNOWN (0x40)

SimpleChain.dwInfoStatus = CERT_TRUST_HAS_PREFERRED_ISSUER (0x100)
SimpleChain.dwErrorStatus = CERT_TRUST_REVOCATION_STATUS_UNKNOWN (0x40)

CertContext[0][0]: dwInfoStatus=101 dwErrorStatus=40
  Issuer: CN=My Company, C=CA
  NotBefore: 2/29/2016 9:45 PM
  NotAfter: 2/26/2026 9:45 PM
  Subject: C=CA, S=State, L=City, O=mydomain, OU=IT4, CN=newmail.mydomain.com
  Serial: 04
  SubjectAltName: No alternative name
  06a85bf14f2747b8cd2c2c4be5bb5ae945f94ed9
  Element.dwInfoStatus = CERT_TRUST_HAS_EXACT_MATCH_ISSUER (0x1)
  Element.dwInfoStatus = CERT_TRUST_HAS_PREFERRED_ISSUER (0x100)
  Element.dwErrorStatus = CERT_TRUST_REVOCATION_STATUS_UNKNOWN (0x40)
  ----------------  Certificate AIA  ----------------
  No URLs "None" Time: 0
  ----------------  Certificate CDP  ----------------
  No URLs "None" Time: 0
  ----------------  Certificate OCSP  ----------------
  No URLs "None" Time: 0
  --------------------------------

CertContext[0][1]: dwInfoStatus=109 dwErrorStatus=0
  Issuer: CN=My Company, C=CA
  NotBefore: 2/29/2016 8:17 PM
  NotAfter: 2/26/2026 8:17 PM
  Subject: CN=My Company, C=CA
  Serial: 86278a3832426d41
  SubjectAltName: No alternative name
  353c6f365f9d7b2e623b7c228e937adac5ee3a2b
  Element.dwInfoStatus = CERT_TRUST_HAS_EXACT_MATCH_ISSUER (0x1)
  Element.dwInfoStatus = CERT_TRUST_IS_SELF_SIGNED (0x8)
  Element.dwInfoStatus = CERT_TRUST_HAS_PREFERRED_ISSUER (0x100)
  ----------------  Certificate AIA  ----------------
  No URLs "None" Time: 0
  ----------------  Certificate CDP  ----------------
  No URLs "None" Time: 0
  ----------------  Certificate OCSP  ----------------
  No URLs "None" Time: 0
  --------------------------------

Exclude leaf cert:
  06a85bf14f2747b8cd2c2c4be5bb5ae945f94ed9
Full chain:
  b8408cac425b1604c28a619181394d7f057607e0
  Issuer: CN=My Company, C=CA
  NotBefore: 2/29/2016 9:45 PM
  NotAfter: 2/26/2026 9:45 PM
  Subject: C=CA, S=State, L=City, O=mydomain, OU=IT4, CN=newmail.mydomain.com
  Serial: 04
  SubjectAltName: No alternative name
  06a85bf14f2747b8cd2c2c4be5bb5ae945f94ed9
The revocation function was unable to check revocation for the certificate. 0x80
092012 (-2146885614 CRYPT_E_NO_REVOCATION_CHECK)
------------------------------------
Revocation check skipped -- no revocation information available
Cert is an End Entity certificate
Cannot check leaf certificate revocation status
CertUtil: -verify command completed successfully.

CRL download URL cannot be guessed; systems that validate certificates must find these URL somewhere. In a certificate, the URL for the CRL that talks about it is found in a CRL Distribution Points extension. When certutil shoes this:

  ----------------  Certificate CDP  ----------------
  No URLs "None" Time: 0

it is really telling you that there is no CDP in the certificate.

A root certificate is a certificate that is trusted a priori by the system. By definition, it cannot be revoked: revocation is a status proclaimed by the super-CA that issued the certificate, and a root certificate was not issued by any super-CA. It just is. Therefore, it is normal and expected that a root certificate does not include a CDP.

Note that when a CA issues (signs) certificates and CRL, it puts the CRL download URL in the certificates it creates. The CA own certificate does not reference that CRL.

If TinyCA does not add the relevant URL in the non-root certificates that it issues, then either it was misconfigured  (you did not provide the information), or it is bad software. Speaking of which, it seems abandoned: the references I found speak of a last version published in 2005, on a site which has since disappeared.


Plugin / extension security practices What kind of common security practices do software developers apply when allowing extensions or plugins to be added to their software, like e.g. Firefox, Photoshop and GIMP do? It can be either on Windows or Linux or Mac.

Example of scenarios:

What prevents the plugin from installing additional malicious code in the system that will allow it to do everything it wants (backdoors etc.)?
What prevents the plugin from spying on the user while it's being used?

Obviously anyone can create a malicious plugin and no one will suspect. I wonder why it never happend to Firefox (as far as we know).

If you want to allow plugins, the only realistic methods to keep the parent application secure are:

Review the code

Only permitting submissions that can be reviewed and putting in place sufficient resources to actually do the reviews. The reviews can be automated or manual, a mix of both is undoubtedly best.

Review-only submissions also require some kind of official marketplace for plugins and you should also have the ability for end users to review and feedback publicly.
Apply a restrictive security model

You could ensure that plugins can only take certain, relatively safe, actions. For example, you could prevent them from contacting URL's outside of your own to stop them from "phoning home" and leaking data.

You could extend that further to allow less safe actions but only after a manual code review.

Doing both together is the best approach.

These are fairly common processes but obviously take time which equals cost. The second option is the cheapest but can also be the hardest to implement securely.

There are many examples of where this kind of thing fails badly, the most obvious being the Android app store where malicious apps are regularly discovered though all too often, only after years of being in the store. The Windows app store also suffered from this in its early days. As far as I can remember, each of the 3 main browsers have also had malicious extensions at some point.

To help protect yourself, you should only choose well used extensions that have consistent and large numbers of positive reviews. Preferably ones with well-funded support. Obviously you should keep the extension use to a minimum and something like Extensity for Chrome is good as it allows you to easily and quickly turn extensions on and off at will. Try not to use newly submitted extensions until you can see that they have been tried and trusted by others.

If you can, keep an eye on the news so that you may spot when an extension is highlighted either for having been independently security reviewed or when it has failed. And also watch out for extensions changing ownership as the new owners might not be quite so honest.

Realistically, most people are not going to be able to do those last recommendations though.


Disable SSL verification between isolated microservices I have an internet isolated EC2 instance which is a Ruby client and it is connecting with multiple EC2 servers of mine in the same network having different sub-domain names. These EC2 servers are protected with forced SSL whenever they are accessed from the internet.
But since the Ruby client is isolated from the internet, can I connect with my EC2 servers with SSL verification flag turned off? I am using Faraday client and for development I have done Faraday::Connection.new host, { ssl: { verify: false } }

My reasoning behind this is that there will be two types of ssl certificates for different use cases, one will be our production ssl certificate and other one will be self signed ones on developer systems. And maintaining all those different ca paths on this one client server can be a roadblock.

What can go wrong if I disable client side ssl verification off on this internet isolated instance?

This is different from this question because the connection between the client and server is happening on an internal network.

If you are considering routing back-end microservice traffic over HTTP, then the question you should ask are:

Who can sniff this traffic? How much effort is involved in pulling off that attack? What data will they be able to see? Does that violate your security model?
Who can intercept, modify, or spoof traffic? How much effort is involved in pulling off that attack? What data will they be able to modify? Does that violate your security model?

You mention that your microservices are running in AWS EC2 in the same network. Is this is a production quality EC2 network / VPC? What software components are running there? Is there any software components that you don't trust, for example, open source of questionable origin / quality? Which humans have ssh access to this network? If your EC2 environment is driven by strong deployment automation then maybe no people have SSH access, or only a small number of trusted admins.

Summary

It's common in cloud environments to have TLS of incoming requests to terminate at the front-end load balancer and then propogate through your backend as HTTP.

So do your security analysis, and if you decide that it's low risk to have your backend microservices communicate with each other over HTTP, then you will be using a common design pattern!

[Image source from this Medium article]


How does the HMACSHA1 algorithm really work? I am preparing for a presentation and I need to understand how HMACSHA1 works. I understand what a salt is and I understand that it does a number of cycles but how does it really work?

When is the salt added?

Using just the standard .NET SHA1 hashing function how can I recreate a HMACSHA1 algorithm? I would like to do it manually, not with PBKDF2 implementation.

I was expecting the following 2 blocks of code to give the same output ... but they don't. Where did I went wrong ?

HMACSHA1 hmac = new HMACSHA1(System.Text.Encoding.Unicode.GetBytes("test"));
var x = hmac.ComputeHash(System.Text.Encoding.Unicode.GetBytes("test"));
Console.WriteLine(Convert.ToBase64String(x));

SHA1 sha1 = new SHA1Managed();
var y = sha1.ComputeHash(System.Text.Encoding.Unicode.GetBytes("testtest"));
var yy = System.Text.Encoding.Unicode.GetBytes("test").ToString() + y;
var yyy = sha1.ComputeHash(System.Text.Encoding.Unicode.GetBytes(yy));
Console.WriteLine(Convert.ToBase64String(yyy));

You're confusing things. HMAC-SHA1 is a "Hash-based message authentication code" that uses SHA1 as hash. PBKDF2 is a key-derivation function. HMACs can be a primitive in the context of such a function but they aren't equivalent.

You CAN use a HMAC for creating salted hashes but you can as easily simply add the salt to the value directly before hashing and achieve the same thing. HMACs are more commonly used to validate the authenticity of messages.

For the .net question, I suggest you ask in stackoverflow but you might have a look at the HMACSHA1 class that is in the  System.Security.Cryptography namespace.


What was the issue the UAE had with RIM/Blackberry and what was the outcome? What countries have similar agreements? I'd like to understand what came out of UAE's desire to monitor RIM traffic, and what technical compromise was made.

Do other countries have similar agreements with RIM?  What are the details?  Please post references, or any supplemental information to the best of your knowledge.

As far as I interpret the news there was no technical solution made. RIM made a contract with the UAE as well as India that they hand over communication of specific customers. It is not public under what circumstances they'll do it. There is only speculation around.

India has lawful access, BlackBerry assures India on access to services
Turkey wants RIM data

So the three known countries are UAE, India and Turkey. Maybe others want it too. If you google around you'll find more details.


Does an ORM framework such as Hibernate completely mitigate SQL injection? I know that to prevent all or most SQL injection attacks that you should use parametrized queries. I've been using Hibernate for a while instead of hand writing my SQL statements. Are there any known attacks or research that is directed toward exploiting this layer?

No, you are not automatically safe.
SQL Injection can still exist.

From the OWASP page:

  A note about SQL injection

  Since it is the hot topic, I will
  address it now but discuss in detail
  later.

  Hibernate does not grant immunity to
  SQL Injection, one can misuse the api
  as they please.
  There is nothing
  special about HQL (Hibernates subset
  of SQL) that makes it any more or less
  susceptible.
  Functions such as
  createQuery(String query) and
  createSQLQuery(String query) create a
  Query object that will be executed
  when the call to commit() is made. If
  the query string is tainted you have
  sql injection. The details of these
  functions are covered later.


aWallet Password Manager NOTE: This question is a subpart of the original question on aWallet Password Manager posted on Cryptography.StackExchange. As suggested by @SEJPM, I'm posting it here since the topic of the question is better suited for InformationSecurity.StackExchange.

After reading a lot of articles on ramping up the security of my web accounts, I started using aWallet Password Manager for Android to backup my passwords. I like it for following reasons:

I'm able to have fairly good-entropy passwords: I'm able to throw in a mixup of lowercase & UPPERCASE alphabets, digits, special characters (including spaces) and have reasonably long passwords (10+ characters)
Saving my passwords securely allows me to have distinct passwords for each web account which would otherwise be impossible. This would avert a cascading effect (giving away credentials of all accounts) that would be created if one of my accounts, whose login credentials I share with several accounts, gets compromised.

Needless to say, that 2nd point is debatable because having all credentials stored at a single place introduces a single-point of failure and poses an equal risk of the chain-reaction mentioned earlier.

Given my limited knowledge of cryptography and doubts around privacy (given recent incidents of online thefts), I want to testify the security of aWallet Password Manager before storing my Banking / Card details in it. Here's what they claim on their Google PlayStore page:

  SECURITY FEATURES

  • All data is encrypted, including Entry names, Category definitions
  and the data itself.

  • Encrypts data using AES and Blowfish algorithms with key sizes of 256, 192 and 128 bits.

  • When the data file is decrypted, up to all combinations of algorithm, key size and cipher mode of operation (CBC, CFB, OFB and ECB) are tried with the Master password to unlock the data file. This makes brute force attacks longer. The app itself does not store any hint to the actual cipher, key size or cipher mode of operation.

  • Uses a randomly generated 'salt' combined with the Master password. Salt helps to protect from off-line dictionary attacks.

  • The key to open the data file is created by combining your master password with the 512-bit 'salt'. The result is hashed 1000 times by SHA-256. Repetitive hashing makes a brute force attack more difficult.

While none of these points make a lot of sense to me, the little bit that I know about Cryptography tells me that [please correct me if I'm wrong] repeating an encryption technique multiple times doesn't Mathematically improve the security; it may only give one a false impression of added security.

And because of this inconsistency, I started doubting the validity of their other claims. My questions are:-

Is there a tool / technique that I could use to attempt to decrypt the data.crypt file used by aWallet app so as to test it's security?
aWallet doesn't offer any cloud storage of their own and allows us to (optionally) backup the data.crypt file onto Google Drive or Dropbox. How safe would that be given that I use 2-Factor-Authentication for my Google account?
In general, is it safe to store login credentials or banking details or both in a password manager?

aWallet specifically: don't use it. The creator obviously doesn't know what they are doing. I'll just pick out one concern (there are several that will probably be more obvious to People Smarter Than Me): it could encrypt your database in ECB mode (sometimes, but not always).

ECB mode is notably not secure because the same plaintext always encrypts to the same cypher text. Therefore, ECB mode "does not hide data patterns well...it doesn't provide serious message confidentiality, and it is not recommended for use in cryptographic protocols at all".

Password managers in general: use one. But pick a well-known one with good reputation like 1Password, LastPass, KeePass, Dashlane, etc. Or at least use one created or recommended by a well-known security company or security researcher if you don't know where else to look. A good password manager with competent encryption (not aWallet apparently) is perfectly safe to keep on cloud storage, provided your master password is strong.

Edit: OK I can't resist picking a few other points that jump out at me to scream "stay away":

Regarding transforming the master password to an encryption key: "The result is hashed 1000 times by SHA-256." This is laughably insufficient. Done properly they would at a minimum use PBKDF with 10,000 rounds or more rather than a custom-made hash loop of only 1000. Even that would be barely sufficient, and would compare poorly to properly implemented password managers. Hundreds of thousands or more rounds would be more like it. Or abandon SHA-based password hashing and use something like bcrypt or argon2. This software cannot compare to modern tools.
"Supports auto destruction of the data file after a predefined number of unsuccessful unlocks have been tried." This doesn't affect an attacker at all. The only person this can hurt is the legitimate user. An attacker will make a copy of the database or use modified software to remove the guess limit. You on the other hand can accidentally lose all your passwords, never to be seen again, by accidentally having capslock turned on, or a dead key, or something like that.


Looking for information about the job from security consultants I'm graduating with my bachelor's in computer science in December, and I'm looking to get an internship in a security consultant firm for the summer, or apply as an analyst/associate in October. I've got a pretty even spread of security topics from academics and independent study (including crypto algorithms, protocols, security tools [nmap, wireshark, etc...]), and lately I've been focusing a lot on IPv6 security and the IPv4-IPv6 switch. I also do quite a bit of reading about business and management, and I historically know my way around an office.

I guess I'm kind of asking an open-ended question to see:

If my academic and independent study experiences will be any more than loosely relevant in the field
Which skills in particular I should focus on that would really make me stand out as an applicant
Do certifications mean anything for an 'untested' applicant (someone directly out of school)
As a consultant, how much of what you do is nitty gritty hard network security (beyond pen testing) and how much of what you do is more risk and policy analysis/auditing (I understand this varies from company to company, but I'd like to get individual case feedback)

Any help you guys can give me would be greatly appreciated. Thanks.

REF: your question "Do certifications mean anything for an 'untested' applicant (someone directly out of school)?"

There is one "certification" that is worth big dollars in the security field; namely if you are a US citizen who can pass a security clearance. There is a definite premium for this among government contractors and with the federal government itself.


Whitelisting Email Service for Anti-Spoofing and DMARC My company uses an Anti-Spoofing Protection based on the SPF Record and has implemented DMARC. Often our users correspond via a "secure" messaging platform like Proofpoint/ZIX/IronPort from their counterparts. However, when our users respond on those platforms, the platforms respond on their behalf "spoofing" their emails. At first level it fails to reach any of that person's colleagues if they are on the thread based on our Anti-Spoofing Protection (Which I can whitelist Proofpoint/ZIX/IronPort via adding their IPs to our SPF record), however how can I do it for DMARC? Since I don't have any of those services, I can't provide them the DKIM key, etc. I'm assuming just whitelisting Anti-Spoofing Protection would then fall to failing to DMARC next.

DMARC requires either SPF or DKIM passing with alignment to the From header domain.
If you've added the encryption service gateways to your SPF record, all mail from those gateways will pass your domain's DMARC.


Why doesn't the CPU verify/enforce matching call/ret addresses? I've been contemplating the fundamental issue of stack overflows, from the classic shell code injection that doesn't work with NX bit to the newer ROP gadgetry.

The first question I had was in regards to CPUs that have branch registers.  It seems as though doing any of these sorts of attacks on a CPU that tracks branches in a "stack" of branch registers, like Itanium does for example, would be difficult if at all possible.  Obviously there are other attacks that don't require overwriting the return IP but doesn't the combination of branch registers and an NX bit foreclose a huge swath of attacks?  If that's the case, why don't people consider using processor architectures that employ branch registers for their edge devices?

As a follow on question, why doesn't Intel/AMD introduce a mode of operation in which the series of CALL/RET instructions are verified and enforced?  It seems the real problem is that the CPU leaves the tracking of return IPs in the care of the process, on the stack.  It would be a very bad compatibility break to simply not push the return IP onto the stack, or even to push some random value, but why not offer a mode in which the CPU on CALL pushes the return IP onto the stack AND onto a CPU managed backing store for this process/thread/context.  These pages would be totally off limits to the process except through CALL and RET.  When RET is executed, the address popped off the stack is compared to the address in the secondary storage and if they're not equal then abort.  Obviously this would be slower, but for security sensitive parts of applications, such as those which handle external input, the application could set the safe flag/mode on choosing to sacrifice performance for security.

Does this concept make sense?  Would it actually mitigate return IP oriented attacks?

Your idea sounds like ROP Defender although that is a software implementation.

This would make buffer overruns harder, but while I can't think of a way round it just now, I expect some smart exploits could get round it. So what you propose is effectively another kind of anti-exploitation technique - it would be a sister to Stack guard, DEP, ASLR, etc.

When considering anti-exploitation techniques there are two main considerations: compatibility and performance. These techniques are only used when there is a very good pay-off. My gut feel is that this won't cut it - too much performance pain for too little benefit. But who knows, maybe it will get implemented.


How to Prove you created IP using a Notary Say you created some IP in the form of some files. How do you prove that you created the IP, in a theoretical cryptographic sense? A major constraint is to maintain security as well, so you can't just create a patent which will share the information publicly.

I can imagine all kinds of scenarios where someone can say down the road that they created the IP. Say you are in a small group like a government agency and internally to the agency you want to be recognized for some advancement. You can't create a patent or do something else public which would compromise the security of the agency, so you do what to prove you created the IP?

Say you create some advancement in the agency, but don't make a big deal out of it. Someone else in the agency sees the advancement, then draws up some fake "backdated" notes to make it look like they made the contribution. How do you say, "no, actually I did", while still maintaining security?

I am trying to understand if PGP applies, and if the idea of a Notary might be effective. Somehow you tell a Notary a little about your advancement contributed at work, and take an oath or something. Now somebody else at least knows by a certain date that you had some knowledge about the situation. But even then, that doesn't seem like enough to prove you actually created the contribution.

It's as if you need to create a highly detailed document, like a patent, outlining what you did and how it works. Then go to the Notary, have them read it, and sign off on it somehow. You never show this document to anyone else but the Notary. Then if it comes down to it, you can just call up the notary and be like "hey, didn't I do this thing first". But I don't know if that would be sufficient.

Basically, I'm wondering (a) what sort of documentation you need in this situation, and (b) what sort of authentication/security you need to prove identity and ownership, while also maintaining security. That is, how do you prove you were the one responsible for the new feature, without revealing it to the public like would happen through traditional "insecure" channels like patents?

I am trying to imagine like something with PGP. Say I have a website domain which hosts encrypted notes documenting the feature. Only I have the key to the notes, so I show people I can unlock it. BLah, that seems so lame and useless, I don't see how it could apply. Maybe Affidavits apply somehow, I don't know.

It is possible to sign a document (using PGP or by other means) and also include a trusted timestamp so that you could technically prove that you had a specific knowledge at a specific time. Or you could do it a non-technical way by writing everything down and give it to some publicly trusted party like a notary who will seal and timestamp the document and store it until you want to prove that you had this knowledge at the specific time.

But of course, somebody else could simply claim that they had this knowledge already earlier. While they can not prove this the same way you do they can get some bribed witnesses or make up some facts. And depending on the specific information it will be hard or impossible to prove that they could not have this knowledge at the time they claim. But whom some boss or judge will finally trust is not a technical thing but an interpersonal or legal thing, i.e. off-topic. With patents it is usually clear though because this is defined by law.


Download Windows 7 security updates and patch offline I am planning to do a clean Windows 7 OS installation.

Is it possible (and/or recommendable) to download all the Windows 7 Security Updates from Microsoft in advance and patch my fresh Windows 7 installation before I connect it to a network? If so, how?

Are the temporary risks of being online through my private broadband connection and reading data from http://windowsupdate.microsoft.com so small that I can safely use this strategy?

The easy answer is yes, it is possible. In fact, we have several servers that for various reasons are only patched in this manner. This does produce a bit of an annoyance on the admins, however once you get into the swing of things it is not so difficult to do on a small scale.

Your situation sounds wonderfully easy, though. I would recommend installing Service Pack 1, then connecting to the network to pull down any additional updates. Since SP1 rolled-up a large number of patches this should

Speed things up significantly
Take care of any of the older vulnerabilities that may be frequently looked for

You can find the official instructions for installing the update here. That page contains the link for the actual download page as well as instructions on how to determine which file to use for your system.


Looking for a (simple) utility to decrypt rsa-encrypted text in Windows? Quick question: I'm looking for a simple utility program to be able to decrypt rsa-encrypted data (either base64-encoded or binary attachment) on a Windows workstation.

Scenario: There is a group of operators that will get email alerts with information on user they have to contact. Part of the info is encrypted, and we need them to be able to decrypt that info to reach out to the users. They'd have the corresponding private key, so the idea would be to "paste the private key and the text" or "open the attachment" and get the resulting 1-2 lines of decrypted text.

I know that OpenSSL and some scripting in Perl, or a zillion other options, would get me the data, but that would mean:

Deploying OpenSSL to the operator's computers
Deploying ActivePerl (or similar)
Allowing the operators to open a command prompt on the machine (current security policy disables it)
Teaching them how to run the script from the command line

Quite a bit of work I'd rather avoid.

I've been googling around, and I've found one million versions of the recipes for openssl, half a million source code examples, and no "encryption utilities"... So I've decided to ask here in case someone is aware of some (probably obscure) tool that does what I need...

Thanks a lot in advance!!

You could send the mails in standard S/MIME format, which would allow recipients to use a plugin for their mail client of choice to read the encrypted parts without too much hassle. I know for a fact that there are Tunderbird plugins, and I'm pretty sure Outlook has native support for S/MIME.

You can create these mails with the openssl command line tool: https://www.openssl.org/docs/apps/smime.html