Can two locations in the same city at the same time have the same IP adress? I got a notice due to vandalism in Wikipedia and the perpetrator is someone with the same IP as mine.
I looked up the notice and it seems that the vandalism happened last year and the person behind it lives in the same city as me but in a different location. We both seem to have the same ISP as well.
I am very worried because this person seems to write offensive things about sensitive political subjects on Wikipedia.

Is this the ISP's fault for giving two households the same IP?
Could I be blamed for anything they do online?
What is the best course of action at this point? Should I just change my ISP and get a new IP address?

I'm at a loss here.

Details here depend on your specific ISP setup, but it might well be that multiple customers share the same public IP address. This is called NAT or in case of ISP CG-NAT (carrier grade NAT). It is pretty common for ISP in mobile networks but is also not uncommon with cable or DSL. The main reason is that there is a shortage of public IPv4 addresses so ISP often own less public IPv4 addresses than they have customers.
If this is the case in your specific situation depends on your ISP - thus ask the ISP.
Note that even with one public IP per customer it might well be that these change over time and thus a different customer is assigned an IP one had before. If the ISP assigns a fixed public IP to a customer is again specific to ISP and kind of contract - thus check with your ISP or read the contract.

Should I just change my ISP and get a new IP adress?

Each ISP has a pool of IPv4 they can use and different ISP use different pools. It does not change the general problem though, i.e. that it might be that the IPv4 is shared with others. Ask the new ISP for details.

Is this the ISP's fault for giving two households the same IP?

Unless a fixed public IP address is explicitly mentioned in the contract their is usually no obligation to assign a fixed IP address to a customer.

Could I be blamed for anything they do online?

Blaming somebody is often done without fully understanding things. This does not mean that they are right nor does this mean that this can result in legal actions against you.


Urls opens themselves on my Android phone Every now and then (say 1-2 times per day) my phone asks me to open a webpage while I'm using it. It doesn't happen in the browser, it happens from any app. I don't have any default browser set up, so I get the "open with..." dialog box.
I tried to open some of them with Opera Mini (which somehow is less prone to hacks I guess) and every time the url (even the domain) is very different.

How can I understand which app (if any app is to be blamed) is causing this?
What else can I do?

One example url: us.unidingcom.com/spac/redirect.html?model= (etc etc). Others were totally different.

Another: global.msmtrakk06d.com

This random URL pattern is something very common on C&C Malware. This funcion is called Domain Generation Algorithm, that commonly generate URLs like www.<gibberish>.com.

Things you could do to probe what apps on your Android Phone could be causing this problem:

Check what apps were not installed from Play Store. There is a great chance that those are the one to blame. Many reports from popular games like Pokémon GO or Super Mario Run are injected with Malware. Once those are installed, is difficult to audit what are they doing, unless you use the least privilege principle and deny all access to them(camera, gps, calls, sms..)
Depending on your Android version, you will have App Permissions at your disposal. This could be a pain, denying permissions to every app and allowing them when asked, but, its a method to try to probe if any rogue app is trying to use your GPS or Front facing camera for example, without you actually having that app on foreground(active app);
Reset to factory defaults. This could be an option, unless your phone is cursed by firmware malware.

I Think that you will lose more time trying to probe the malware(giving it more time to better entangle your device, and capture more data), than making a backup of your important stuff and reseting it. Maybe, even better than just reseting to factory defaults would be using your phone maker software to reflash a clean firmware through USB.


Can these html tags and attribs make my site vulnerable? I am developing a social website and want to allow user ONLY these html tags and attributes in their posts:

tags:  <img>, <b>, <strong>, <blockquote>, <a>
attributes:  'src', 'alt', 'width', 'height', 'href', 'class'

I am wondering if allowing any of them can open the door to some XSS or other exploits?

Src attribute could lead to XSS if you allow the user to define the protocol, for example to enter javascript: instead of http:

Example:

Additionally, you should use proper output encoding for the user controlled variables so that the user cannot escape out of the attribute/tag. For example if you have the following tag:

Without propper output encoding, the user could enter the following data:

">

Which would mean the tag would then look like this:

">


Malicious vbs script only opens a GET HTTPS connection Today we received a malicious vbs script in our mailbox (attachment was a zip containing the script).

Underneath you can find the source (note: domain changed due to not wanting to spread malware, but the parameters are still the same).

Dim ProxyOn, ProxyServer, ProxyOverride
Dim h, hh, s, u

Set s = CreateObject("wscript.Shell")

u = "https://example.com/?rid%3DVGX0Ipd&pad%3DAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
u = Replace(u, "%3D", "=")

On Error Resume Next

ProxyOn = s.RegRead("HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\" & "ProxyEnable")
ProxyServer = s.RegRead("HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\" & "ProxyServer")

Set h =  CreateObject("WinHttp.WinHttpRequest.5.1")
Set hh = CreateObject("WinHttp.WinHttpRequest.5.1")

If ProxyOn = 1 Then
    h.SetProxy 2, ProxyServer
End If

hh.SetProxy 1, ProxyServer

On Error Resume Next

h.Open "GET", u, False
h.SetTimeouts 10000, 10000, 10000, 10000
h.Send

If Err.Number <> 0 Then
  On Error Resume Next
  hh.Open "GET", u, False
  hh.SetTimeouts 10000, 10000, 10000, 10000
  hh.Send
End If

WScript.Sleep 2000
WScript.Echo "Installation completed."

To me it does not seem to do much, it reads proxy setting (to avoid firewall?) and issues a GET command to the (malicious) URL, but doesn't do anything with the response.

Of course we did not try running.

What exactly does this code try to do?

EDIT:
Today we received confirmation that this is part of a campaign about cyber security in the company! The analysis in the answer is indeed correct.

Kind regards!

As far as I can tell, your assessment seems accurate.  I see 2 possible options:

This is a reconnaissance probe to see if someone will open the attachments.
This attack was poorly executed, and you were sent an unfinished script.

I'm currently leaning towards the second explanation.  There is no reason to echo any output in a dropper, let alone something as suspicious as "Installation completed."


False positive Apache version in scanner results on Centos Recently I need to care a lot of false positive vulnerabilities in scanner results on Apache version.
Example of false positive vulnerability:

Apache 2.2 < 2.2.16 Multiple Vulnerabilities

Our customers run scanners and they check Apache version related to the official Apache version numbering.

We use Centos, and the Apache version numbering is different from the official Apache version numbering.

For example now we install httpd-2.2.15-26.el6.centos.x86_64 and it includes all security patches released by Apache in recent versions.

The Centos Apache version numbering relies on the RedHat Apache version numbering and they do not change the base number (httpd-2.2.15) each update.
But scanners do not “understand” this and check that 2.2.15 < 2.2.16.

Can you point me to the good document that explains the RedHat Apache version numbering?

Do you know if exist scanner that “understand” the RedHat Apache version numbering?

What you're experiencing is a common problem.  Vulnerability scanners that rely upon service banners do not deal with vendors like Red Hat which backport security updates.  They are also prone to making assumptions about configuration that lead to false positives.

You may be able to improve the accuracy of the scan by running an credentialed scan.  If your scanner supports it, you can specify account credentials that it will use to log in and look at "internal" information.  For example, it can use 'rpm' to determine which actual Apache package is installed, and base its verdict upon that rather than the banner that the service prints to external scanners.  Such a scanner should have access to an up-to-date database that will tell it what the real issues are.

If your scanner won't do it, then the usual solution is to do it yourself.  You would need to look up whether you're running the newest version.  For example, @Rook points out that there are Apache vulnerabilities newer than the package you reference.  Looking at those vulnerabilities, you can pull the CVE ID and look it up in Red Hat's CVE Database. For example, their entry for CVE-2013-1862 points you to the errata RHSA-2013:0815 which says that httpd-2.2.15-28 contains fixes for that CVE.  It also points out that there's a newer RHBA release, so there's a newer package with bug (but not security) fixes.  Repeat that process for any other CVEs that you're concerned with and you can make an educated decision about whether you're patched despite what the banner says.  If the CentOS package is a direct correlation to the RHEL package, you should be fine - but the RHEL package was announced on 5/13, so I don't know how @Rook's cited 3/2 release date jibes with that.

(The shortest version, BTW, is "yeah, this stuff is a known PITA.")


Are Google Chrome Extensions vulnerable? I've just discovered this:

You can create IFRAME pointing to "chrome-extension://" protocol
You can access IFRAME content with jQuery

Does this mean, I'm able to use badly written Chrome Extensions to exploit user workspace?

by

accessing extension files directly (sqlite db with passwords,...)
using chrome.extension.sendRequest call to interact with foreign extensions

to for example forcing stubleupon extension to like my page, without user confirming/creating the action?

Is this security issue or not?

Ok, so we came up with conclusion that this is not vulnerability
Although we have a way how to access IFRAME contents with $("selector").contents();
and although we can really point IFRAMEs to chrome-extension:// protocol

The point is, we cannot use this in Google Chrome only (till now)
Thanks to Google Chrome Javascript security implementation, we have to respect

Same Origin Policy (SOP)
described here: http://code.google.com/p/browsersec/wiki/Part2#Same-origin_policy_for_DOM_access

We cannot access DOM content loaded from other origin in the same session

Attack possibilities

It's still possible vulnerability, but with need of disabling SOP on google chrome
can be done like this:

chromium-browser --disable-web-security

but it is quite difficult to do it from within web browser ;-)

taken from here: https://stackoverflow.com/questions/3102819/chrome-disable-same-origin-policy


Email unsubscribe handling security There is another question with similar title: Unsubscribe safely
however my question addresses completely another issue.

I am trying to set up a notification system in the website, that will send emails to users based on different events on the webiste, it might be e.g. receiving on-site message from another user, someone purchasing your product, leaving a feedback etc. - there are a lot of things that might trigger a notification. Users from their account settings can choose for which exact events they want to receive an email.

I was reading email best practices from mailgun
https://documentation.mailgun.com/best_practices.html#unsubscribe-handling

and I learnt that

  It is important to give you recipients the ability to unsubscribe from
  emails. First, it is required by the CAN-Spam Act. Second, if you
  don’t give them this option, they are more likely to click on the spam
  complaint button, which will cause more harm than allowing them to
  unsubscribe. Finally, many ESPs look for unsubscribe links and are
  more likely to filter your email if they don’t have them.

Also, from gmail guidelines about Unsubscribing
https://support.google.com/mail/answer/81126?hl=en

  A user must be able to unsubscribe from your mailing list through one
  of the following means:

  A prominent link in the body of an email leading users to a page
  confirming his or her unsubscription (no input from the user, other
  than confirmation, should be required). By replying to your email with
  an unsubscribe request.

So, I do want to have the unsubscribe option in the email. I would not really prefer to use the second option (By replying to your email) as it might have some technical difficulties (e.g. I have to the notification type in response email, have to check the email for inbox regularly and maybe smth else I have not thought of). I'm thinking of having a unsubscribe link in the email and because their notification settings can be changed only after they are logged in, it contradicts with gmail's no input from the user, other than confirmation, should be required point.

So, it looks like I am left with some "public" url for changing their notification settings. From as I read and used to handle similar cases - e.g. when confirming the email or password recovery, I am sending an email that in url contains only randomly generated hash(sha512), NOT in any way revealing the user info, which expires in less than 1 hour(I used to put 15 mins).

Now, in case of unsubscribe link, even though I include random hash (and maybe the notification type id as well), that is tied to the user in the database, because its public, if it the email/link accidentally shared or posted somewhere, someone else can edit that user's notification preferences. On the other hand, generating random hash with each notification and saving in the db, also expiring them after some time sounds overkill for me, also considering that as it expires, if the user clicks on unsubscribe link in old email, it will not work.

I could not find any useful information out there, so I am seeking some advice on how to correctly and securely approach user unsubscribing in general and specifically in cases similar to mine. Any help is very much appreciated.

Thanks

This is a good example for a case where usability and security do not go hand in hand.
A user wants usability: They want to be able to click the link and be unsubscribed. They want this to always work (not just X amount of time after receiving the email, and definitely not with X being 15 minutes or an hour).
You want security: You don't want an attacker do be able to force-unsubsribe your users.
Now lets analyze these needs:
Usability
The usability one is rather important. If you do not allow easy unsubscribe:

your brand will suffer an image damage
your emails will be treated as spam
you are in violation of the CAN-SPAM Act (see eg here: The law also requires that the unsubscribe mechanism must be able to process opt-out requests for at least 30 days after the transmission of the original message)

Security
So you are using a securely generated, long, random token, meaning that an attacker cannot just brute-force your unsubscribe form to unsubscribe a large portion of your users.
At most, an attacker can unsubscribe single users after they somehow revealed their unsubscribe token.
So what's really to worry about? No attacker will use social engineering to get the unsubscribe token of users. They will also not hack into the email of your users or your database just to unsubscribe them from your newsletter.
So the only likely attack scenario is: A user accidentally posts your newsletter including their unsubscribe token to a website. Someone sees this and decides to unsubscribe that user.
This may cause a small annoyance to you and possibly the user, but it is a scenario which is unlikely to happen often.
Conclusion
A correctly generated random token is enough for an unsubscribe link.
The dangers of this token being revealed are low, and using any other mechanisms (such as requiring logins or expiring the token after a short time) are generally not acceptable.
At most, you could expire a token after 30 days. But that also means that you need to have more than one token per user.


What is the best way to run MitM attack on my wireless network? For research purpose, I want to launch a MitM attack on computers that are connected to my wireless network.

I wonder what is the best way to do so. Notice that I control the router, and do not want to launch constantly attacks like ARP poisoning or something like this. I want to use my router and a dedicated computer for this goal, in as clean as possible manner.

I thought about the following option:

Change the DNS server address in the router to my dedicated computer, and just impersonate every interesting website.

However, I'm sure there are some other options, and I would like to get information about them. In particular, is there something similar I can do via ARP? e.g., change some settings in the router to make everyone think that the gateway is my computer?

If there are other ways, which one is better?

References to other methods and tools will be appreciated.

If the clients were given IPs via DHCP, you could perform some kind of ARP poisoning attack.  Essentially, when a computer broadcasts to determine what MAC the router IP has, you respond with your MAC before the router can respond with its MAC.

Another option is to masquerade as an access point and trick the clients into connecting to your fake access point.  Airbase-ng is good for this type of attack.

There really isn't a way to change a setting on the router that will make clients think you are the gateway.  Also, the DNS idea, while it would work for connections using domains, it would not catch IP traffic where the IP was not discovered via DNS.


How do you exploit Directory Traversal to traverse from one drive/share to another? I'm trying to figure out if it is possible to traverse across drives or shares.  If I have a path that is concatenated in a web application, where the prefix is a drive, such as this:

var path = "D:\" + Request.Params["directory"];

Is it possible to use special characters or any other methods to get a reference to the C:\ drive instead of D:\ drive?  I've tried pipes (|), semi-colons, URL-encoded nulls (%00), and several other things.

In your example, I don't believe traversing to a different drive is possible solely through directory traversal (e.g. ..\..\..\windows\system32).

The most plausible way for an attacker to exploit this may be through a hard/symbolic link which points to somewhere on the C: drive.

If you were then using the path variable as an argument to a command (that is, shelling out) there may be other problems.


Can I find out what encryption is used by my Android Bluetooth keyboard? I've got an Android tablet (Samsung Tab S2) and a Bluetooth keyboard (Celicious Tri BK01). I occasionally use the keyboard to enter my password.

Is there any way, in Android, to find out whether the Bluetooth traffic is encrypted? How can I tell whether that's sufficiently strong encryption?

Your specific keyboard uses two-level E0 for encryption and P-192 for key exchange.

Bluetooth always uses encryption. However, the different versions use different encryption protocols:

So, what cryptography does each version use? For Bluetooth BR/EDR:

Prior to 2.1, versions do not use any key exchange. Keys are pre-shared, usually using a very weak PIN. They are often vulnerable to brute force as a result of the small keyspace. The cipher is E0, which is fairly weak and can be broken with a known plaintext attack given enough data.
From 2.1 to 4.0, key exchange is performed with ECC, specifically the NIST P-192 curve. This provides approximately 96 bits of classical security which isn't great, but isn't practical to break yet. Although it uses the rather weak E0 cipher, it uses so-called two-level E0, which is a more secure construction that uses the cipher twice. No practical attacks are known against it the way it is used in Bluetooth, but attacks only get better, not worse, so the cipher should be considered weak.
Since 4.1, key exchange is performed using a much stronger ECC curve, P-256, which gives approximately 128 bits of classical security. The cipher used, AES, is also superior to E0. These versions of Bluetooth are generally immune to passive attacks. Active MITM attacks may be possible if out-of-band authentication is not used and a weak PIN is used for authentication instead.

Bluetooth Low Energy (LE) is a little different and was only supported since 4.0. Prior to version 4.2, Bluetooth LE does not use any key exchange mechanism, making it vulnerable to passive attacks. This is a severe regression and can only be mitigated by using BR/EDR instead of LE, or by ensuring only LE version 4.2 or newer (which re-introduced P-256 for key exchange) is used.

According to a quick web search, the Celicious Tri BK01 Bluetooth keyboard uses version 3.0, which means it is using P-192 for key exchange and two-level E0 for encryption. No practical cryptographic attacks are known that can be used against this keyboard, but weaknesses in E0's design and the only barely adequate security of P-192 mean that advances in cryptanalysis in the near future may render it vulnerable. Do not use it in situations where long-term security is required.

Now, your real question shouldn't be what kind of encryption is being used, but how secure it is for entering passwords or other sensitive information. Excluding EMSEC (TEMPEST-type) issues, timing attacks may be possible. Each time you press a key, the keyboard immediately transmits it wirelessly. Although the key press may be encrypted, the fact that a key has been pressed and the exact time it was pressed (and released) is not hidden. It is possible to deduce potential passwords simply by viewing timing patterns, as certain sequences of key presses occur with different timing patterns than others. This problem becomes bigger the more often you enter your password. If your adversary may be collecting both the encrypted data as well as the precise timing intervals of the transmissions, your password may be revealed if entered enough times.

Related:

Difference between Secure Simple Pairing and Secure Connections in Bluetooth?
What can an attacker do with Bluetooth and how should it be mitigated?
Difference between Bluetooth LE Secure Connections security mode 1 and level 3 and 4?


Server with support for both EC and RSA keys I have a server that implements DTLS using OpenSSL 1.0.1 but supports only RSA keys as of today. I want to add support to this server to accept EC keys to be able to implement the newer ECDHE-ECDSA cipher suites while retaining support for RSA. Any pointers as to how to go about this?

All my searches have led me no where although I know web servers do supports this, so this must be possible.

That's just another ciphersuite, given support by the ssl library, it should happen almost automatically.

Some suggestions: Is support for ECDHE-ECDSA compiled in the openssl version you are using? Are they allowed by the SSLCipherSuite you are providing?

Regarding getting help with this, openssl-users seems the right forum for this kind of specific question.


for reCaptcha, the token needs to be sent to backend for validation right? So far, I have reCAPTCHA setup in the "submit" button for my login form with v2 Invisible recAPTCHA. But, I have a feeling that the token that I retrieve from Google needs to be sent to my backend (along with my login data) so that the backend can validate it's a valid token before it logs me in. Is this correct?
(I ask this because i have my login form setup in PingFederate, and they are supposed to handle the login)

Yes. It's not clear of your exact setup based on the question, but the backend indeed does need to do some sort of verification to determine if the captcha was passed. Otherwise, a user could simply send requests directly to your server backend without dealing with the captcha at all, if it was purely a frontend thing.


An attacker got a few 128bit TrueCrypt keys from a RAM analysis. What can he do? I'm trying to simulate a possible attack scenario for my studies.

I've got a image, which has a encrypted disk, encrypted by TrueCrypt (confirmed).
TrueCrypt is installed on the image itself too.

During a RAM analysis of the image, the attacker found a few keys using AESKeyFind.
A sample output is;

FOUND POSSIBLE 128-BIT KEY AT BYTE 35b880c

KEY: b4ce75c857163e668818d0d76c46bad2

EXTENDED KEY:
b4ce75c857163e668818d0d76c46bad2
ef3ac098b82cfefe30342e295c7294fb
ad18cfd21534312c25001f0579728bfe
e9257464fc114548d9115a4da063d1b3
1a1b1984e60a5ccc3f1b06819f78d732
b6153a5f501f66936f046012f07cb720
86bc8dd3d6a3eb40b9a78b5249db3c72
7f57cde8a9f426a81053adfa59889188
3bd6092392222f8b82718271dbf913f9
b9ab909a2b89bf11a9f83d6072012e99
f39a7edad813c1cb71ebfcab03ead232

CONSTRAINTS ON ROWS:
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000

Assuming that there's no other software using encryption keys, how could a attacker access the TrueCrypt volume? Could he eventually crack the key to gain a plaintext password, or could he use this key as a key file to open the volume?

That is not a TrueCrypt key. You can see that the key itself is 128 bits in length, and the number of round keys is 11, which is consistent with 128-bit AES. TrueCrypt uses 256-bit keys which, for AES, uses 15 round keys and has much larger keys at 256 bits. Whatever that key is for, it did not come from TrueCrypt. Let's assume that you did get the TrueCrypt key from memory, though, and you had on your hand the full 256-bit master key. So, what could be done with it?

  Could he eventually crack the key to gain a plaintext password

TrueCrypt and the newer VeraCrypt do not use your password directly as a key. Instead, it is passed through a very slow function called PBKDF2 which converts your ASCII password into a raw, binary key. However, TrueCrypt does not even use this raw key to encrypt the volume. Instead, a single master key (itself generated randomly at the time of volume creation) is encrypted with that key, and this encrypted master key is stored on the disk. When you input your password, it is passed through PBKDF2, and the resulting key is used to decrypt the master key. This master key is what is cached in memory and which is available to an attacker who is able to retrieve memory contents.

While this does mean that an attacker cannot derive your password directly from the cached master key, it does not mean the attacker cannot attack your password in other ways. If he has access to the volume header, he can guess candidate passwords and see which one unlocks the drive. While this can be automated, the slow PBKDF2 function makes this tedious for all but the weakest passwords.

  or could he use this key as a key file to open the volume?

Now that he could do. If he has access to this key, then he'll absolutely be able to access the volume and decrypt any data held within it. Of course, because he can't easily reverse the key into your plaintext password, he couldn't re-use your password on other TrueCrypt volumes or anywhere else the password was used, at least not without successfully cracking it.

If you're trying to recover data specifically from disk encryption software, a simple naïve search for encryption keys in memory might not be sufficient. This is because lots of disk encryption software, including TrueCrypt (except for ancient versions), VeraCrypt, and LUKS, uses a special mode of encryption called XTS. This encryption mode actually takes two keys, called a main key and a tweak key. In order to decrypt the disk, you would need to obtain both 256-bit keys. XTS mode works like so:

Both keys are standard 256-bit AES keys, but both are absolutely necessary to decrypt the disk. These two keys are derived from the master key which itself is stored on the disk in an encrypted form as mentioned earlier. The key derived directly from your password is not stored in memory, as it is only used briefly to decrypt the master key, and then discarded.


Are userid and password needed in order to pentest a website? We are a company that has many web applications developed in ASP.NET. Our Internet service provider (Telefonica) wants to test our web sites looking for vulnerabilities. For that, they are asking us to provide them credentials (read-only access) for each web site.

It's the first time that I have heard that for testing vulnerabilities in websites you need to provide such information to an ISP. I always thought that for testing vulnerabilities you should try to break or hack websites without knowing that precious info? Maybe I'm wrong.

EDIT :

Finally, I know what kind of vulnerabilities testing are they going to perform. They are going to use Qualys Guard Scan and perform "authenticated scans". First time I've heard about that. According to Qualys company, they are very helpful to find security vulnerabilities:

https://community.qualys.com/thread/11562

Any experience with that kind of scans?

Yes, it's normal for a pen tester to ask for credentials (but not so much an ISP).

The application as a whole can't really be tested without access to credentials.  Someone without credentials should only be able to interact with one interface - the login screen.  Given test credentials, however, every form, every upload, every data entry point in the application can be tested.  You do want to know if your users can perform SQL insertion or command shell invocation, right?

In fact, pen testers will often ask for multiple accounts, and if the site supports different privilege levels ("admin" versus "user") they'll ask for one of each.  This allows them to test the different levels of application access, and also to test for the ability of one account to do something that will impact another.

Now, if your ISP is doing this, I'd expect a vulnerability scan without credentials; I doubt they're actually spending the money required to do a proper pen test.  I'd probably decline if this is regular, automated testing - that's not a pen test.  But there's probably lots more to know about your situation which might clarify it one way or another.


Bank requires card PIN for online transactions: how is this better than standard two-factor one-time PIN? I have a bank account in one of the main European banks. The bank recently overhauled its online banking system, making it more visually attractive (and also full of bugs and extremely annoying to use).

One of the changes is that the bank now requires my a PIN every time I do an online transaction: they call you on the phone and you have to enter the PIN. By default this PIN is the same as that of the ATM card, I do not know if it can be changed.

How is this advantageous compared to the previous setup, which was similarly a two-factor authentication protocol via phone, but with a One Time Password? I thought this method was secure and reliable. Repeatedly inserting the ATM PIN on the phone for every transaction does not look secure to me: this looks like a regression, not an improvement. Am I wrong?

Its not necessarily a more secure.

The bank is not just concerned about security - but the cost associated with it. If using this protocol means 2% more customers are compromised but its 10% cheaper to implement or results in 10% less customers calling in because they can't understand what they are supposed to do then it may be economically beneficial to the bank to choose the less secure implementation. For example for the less computer literate typing in a code at the speed its read may be a struggle.

  Repeatedly inserting the ATM PIN on the phone for every transaction does not look secure to me

To abuse this system an attacker needs control of your phone line, either wire access to the line as you are using it or knowledge of the pin value and access to an authenticated online session. I'd argue that has a fairly high level of security - its usually much easier to abuse telephone banking.


Mutual Anonymity in key exchange If Alice (sender) sends a private message embedded with public key of the Bob(recipient) through onion network, so in this key exchange, does Bob remains anonymous to Alice as Alice knows about the public key of Bob. So if we want to achieve mutual anonymity, how can we do that? Can we achieve mutual anonymity through this key exchange?

There is a definition problem here. If Alice and Bob are anonymous to each other, to whom is Alice sending her message ? There must be some kind of rendez-vous; otherwise, Alice is just sending her message to "anybody".

In Tor, putative Bob's, i.e. service providers, have a name which is what Alice sees and uses; that name is derived from a public key which Bob generated. Bob also publishes "introduction points" which are randomly chosen Tor relay nodes; Alice will contact Bob through one of these introduction points (and she will also do so through a sequence of relay nodes). From the outside, it can be tracked that a given service exists under some name, and that someone is contacting it, but the identities of both client and server (Alice and Bob) are hidden through the usual mechanism of relay nodes. The cornerstone of the protocol is that the service name is a hash of the public key of Bob; thus, messages from Alice cannot be intercepted (as long as Alice uses the same service name, she knows that only the owner of the corresponding private key will be able to read the messages). This rendez-vous protocol is specified there.

What Tor does not provide is a way for Alice to learn the target service name. This is out of scope of Tor (Tor is not a PKI). Common methods are publication of the service name as a ".onion" URL in a Web page of other mediums.


How to mitigate Meltdown in Docker images? On https://meltdownattack.com/ it is suggested that (in some cases?) scenarios with Docker containers are also vulnerable.

I'm a developer using Docker for two different purposes:

Images used for running build steps in GitLab CI/CD
A few images running in production in a cloud (Azure and AWS)

These images are a mix of things, ultimately based on either Alpine, Debian, or Ubuntu. Often my Dockerfile is based off some intermediate image, like one with Nodejs/NPM for a front-end build for example.

Assuming the base OS (e.g. Debian) has patched things in their latest update, what is the recommended way to get my own images up to date? For example if I'm using node:8.9.4 currently, do I have to monitor and wait for a newer tag that fixes the problem?

The patch against Meltdown is kernel only. Docker containers run within the kernel of the host system. This means the resistance against Meltdown depends on the host kernel only. In other words: you don't need patches against Meltdown in the docker image and you cannot patch against Meltdown in the docker image.


Is binding all private services to the 127.0.0.1 address and then accessing them via SSH using an RSA key pair of 4096 bits secure? Is it secure to bind all private services only to the 127.0.0.1 address, and then use a local SSH client's local port forwarding with an RSA public / private key pair file of 4096 bits and a passphrase to access them?  I understand 4096 bits to be secure for the foreseeable future provided nobody steals the passphrase to my SSH public key.

(Depending on what the public facing services are able to access of course)

(And of course after the initial key exchange...)

Also, would it help to limit the number of internal computers allowed to access it using the source address, destination port, and possibly mac address on the firewall of the server?

I suppose too I should turn off access to the root account over ssh, lest someone get in there and make changes to the hosts file.

Would it also help to limit which ports can be connected to using this method?
(not sure how to do this, but I'll bet it's in the SSH config)

Is this secure why or why not?  And is there anything I can do to make this more secure?

You description of local services which you only access through secure SSH forwarding is to vague to evaluate the security of your setup. What this setup is doing is restricting the access to the service to specific hosts, but nothing more. Use of 4096 bit encryption of the transport does not magically make the service itself secure, it protects only the forwarding against sniffing and manipulation.

The following setup similar to yours I've seen several times and while it looks secure at the first glance it is not:

some web interface to administrate a device
forwarded through SSH to the local machine
accessible there as http(s)://127.0.0.1:some-port/

If you visit this web interface then with the same browser you use for your normal browsing an attacker can mount a CSRF attack against the server on 127.0.0.1, i.e. your forwarded administrative interface. Or it might use a DNS rebinding attack to access the device from the internet by using your browser as a relay.

Thus securing the transport and restricting the access to specific hosts is only part of securing a service. Especially with web services you have to take a look at all the usual web based attacks, which don't vanish just by using an encrypted transport. There are probably similar things to watch out for other kind of services.


Code injection in files with 0644 permissions My subject says it all - I am clueless as to how a file with permissions 0644 can keep getting iframe injections. None of the posts on this site that I saw quite described what I am experiencing. Every two days or so, an iframe gets injected into some files with 0644 permissions. Just as I think we've got it covered, it happens again.

We have searched the database for stored XSS or SQL Injection attempts, and do not find anything that corresponds to putting an iframe in these files, unless it is heavily obfuscated.

My question is: How do I stop this?

what do you mean by "injected"; is the iframe within the file itself or just in the answer by your webserver?

if the former, attacks seem to have access to the server and are able to alter files -> your server is compromised

if the later, the attacker probably installed a kernel-based rootkit that injects this iframe into server-answers -> your server is rooted and compromised


Is it possible to do HTTP header injection if CR/LF are stripped? In HTTP response there is the following header with attacker controlled content:

Content-Disposition:attachment; filename="attacker_controlled.html"

The only characters that can't appear in attacker controlled value are [CR] and [LF] (they can't appear in any combination). In all places where I read about HTTP header injection it was told about injecting those characters.

Is it possible to do HTTP header injection or some other harmful attack without CRLF?

Depends what you mean by stripped.  (python's string.strip() method only removes occurrences from the beginning and end,  which doesn't stop CRLF injection.)  If you are replacing all occurrences "\r\n"  then you are still vulnerable to HTTP response splitting.  This is because every http client and server I know of also recognizes the "\n" character alone as a delimiter.  Although in this case all we care about is browsers.

The best way to always replace all occurrences of newline "\n" with nothing "" and the "\r" with nothing "", separately for good measure.  I have never seen an implantation of the HTTP protocol that just looks for "\r",  so as far as I know this has zero security impact,  but you should do it anyway for good measure.  If you are also worried about HTTP attributes then you also need to strip " ", "\"" and ";",  but that also depends on where in the http header the attacker controlled string is.


How to submit credit card info to a separate server/website (PCI) My company has a website/service that stores/processes credit cards and is PCI compliant (Site A). We also have websites with storefronts that need to submit credit card data to that site for processing (Site B). When someone orders something on Site B, and enters their billing information, how do I submit that information to Site A and remain PCI compliant?

Obviously they're on a secure page on Site B, when they are entering their billing details.

Can I just post the form to a secure page on Site A from a secure page on Site B? Do I need to encrypt the credit card during this transaction? Obviously it is stored in some sort of encrypted state, but does it need to be encrypted during the submit transaction?

Do I need to setup some sort of handshake between the websites, like a secret key? If so, what would be a secure way to create that key/handshake?

We've been reading and reading about PCI compliance trying to find concrete answers, but it seems kindof subjective, and obscure what we are supposed to be doing.

This question is also currently posted on StackOverflow.

The PCI DSS applies to any system which stores, processes or transmits cardholder data. In the scenario you describe above, to the letter of the law, you would need to apply the standard to all systems and networks which make up Site B.

As you are not storing cardholder data in Site B this will at least reduce the amount of work you would need to cover as, for example, as far as I can see, the whole of "Requirement 3 - Protect stored cardholder data" would be N/A.

You will however need to ensure that things like your firewall/DMZ architecture is appropriately put together and managed (Requirement 1), that cardholder data is encrypted in transmission if the connection between Site A and Site B is over an "open, public network" like the Internet.

Picking up your point, and to echo @Rook, SSL will be fine for this purpose (see Requirement 4.1).  You do not need to hash or encrypt the card data at this point. It is only when it is at rest.

Moving through the standard, pretty much everything else will apply, Systems should be hardened (Requirement 2), Anti-virus (if it's a system "commonly affected by viruses") and patch management (Requirement 5), good Software Development processes (Requirement 6) - not forgetting the legendary 6.6, code review or WAF.

Strong access controls (Requirements 7 and 8), Physical security (9), Logging and monitoring (10), regular testing (11) and good information security management (12) will all apply as far as I can see.

Without any of these elements if I were the attacker I would simply target Site B and grab the data either straight off the server as it's input by the customer or as it transmits out of Site B into Site A.

This is actually a common scenario in the payment processing world (think PayPal, WorldPay, etc). "Merchants" (someone taking credit card payments) typically have two choices when they wish to integrate with a payment processor to take credit card payments.

1) They receive the card data themselves, typically through a web form and then POST that data to the payment processor's API for authorisation, etc. This is typically done by the larger merchants. They process the response and update their systems and respond to the customer appropriately.

2) They "redirect" the customer to the payment processor who then takes the card data through a form on their own website so the merchant never sees the card data at all. The merchant is typically then updated as the success of the order by some "out of band" HTTP POST to the merchant's website. The customer obviously has an immediate on screen result.

In option 1, the merchant would be required to achieve full PCI DSS compliance. In option 2 the merchant does not have a need to comply as they are not storing, processing or transmitting card data.

If Site B is not currently in scope of your PCI DSS compliance and you wish to keep it that way, I would suggest you develop a means to take the payment data directly on Site A and Site B just points people that way.

I hope this was useful. I've got a lot of experience with the PCI DSS so would be happy to discuss further. Standard disclaimer though, I'm not a QSA so any decisions regarding scope should be verified with a Qualified Security Assessor before beginning work.


Does revealing two factor codes reduce security? If I were to publicly display the 6 digit code from my google authenticator, would my account security be diminished beyond it's valid life time?

What if it were the code and the time it was generated?

What if it were N sequential codes?

I'd like to know why or why not for each case.

No. Thats the whole point of TOTP/HOTP. That it should be infeasible, given any sequence of valid codes, to generate future codes or recreate the seed.

The reason is that the TOTP/HOTP algoritm, use HMAC-SHA1 as hash, given the "challenge" (either current UNIX time or a counter of usages) and the secret "seed" as key. The resulting hash output is then truncated according to a very specific rule.

This would mean, in your first case, it would be impossible to do, as multiple valid keys will come up with the "correct" 6-digit code but will turn out to be incorrect as future codes from these "valid keys" will be invalid.

To successfully mount a bruteforce attack against a seed, you would atleast need 2 valid auth codes, possible more, and even in that case, its infeasible (eg, practically impossible) to do it.


Outbound proxy which whitelists by server certificate? Short version:

Are you aware of any proxy or firewall device which will permit outbound SSL connections to hosts with approved* SSL certificates only?

Long version:

Consider the following scenario.

I have a server farm which is protected from the Internet by a firewall.  Let's say HTTPS is allowed in from the Internet, but that the firewall blocks outbound access from these machines to the Internet.  I don't want my server admins getting bored and surfing /. from the data center, and I don't want malware or malicious actors being able to connect outbound easily in the event of a breach.

I do want to permit some outbound access, though.  For example, let's say I want my Windows servers to go out to windowsupdate.microsoft.com.  If I can determine the IPs used by windowsupdate, fine, I open them up specifically in the firewall, no problem.

But what if those IPs aren't known, or aren't knowable?  Specifically, let's say Microsoft is using Akamai or another CDN to serve their files.  The IP address that you reach out to is going to be difficult to determine ahead of time and will change regularly.  I can't whitelist by IP in that case.

One elegant solution - presuming that we're reaching out to an SSL-protected service - is to whitelist based on the SSL certificate rather than the IP address.  So, if the server certificate is *.windowsupdate.microsoft.com and it's signed by a valid CA, then permit the connection.  If it's not *.windowsupdate.microsoft.com, or if it's signed by SnakeOil, then disallow the connection.

(Approved certificate could mean any number of flexible things.  Name and trusted CA; Name and specific CA; Specific CA-signed certs; etc. etc.)

The control point must not be at the internal server - if a malicious actor gains access to it, they must not be able to disable this protection.  As with IP whitelisting, it makes sense to remove the control to the perimeter as a proxy or firewall device.

That seems to me to be the right way to do it.  What are my options for doing it this way?  Is this a paradigm anyone has ever implemented, free or commercial?  Are their other paradigms I should be aware of that can clamp down on outgoing access in a flexible but powerful way that meets modern (Akamai, AWS, Dyn-ish) dynamic services?

Any help appreciated!

There are two things I can think of, neither fits the bill perfectly, and there's some assembly required.

squid  with sslBump and the SSL Server Certificate Validator
This is basically an MITM SSL proxy configuration, and you get to provide an external "helper" that augments normal verification. Stumbling blocks include certificate trust and managing your own CA/certs. I've never used this though.
Apache httpd as a forward-proxy, with mod_rewrite, mod_proxy and an external validation script. The approach here is to use a mod_rewrite program map to pre-validate the target's certificate before allowing access.

The Apache option can be tested easily:
httpd.conf

LoadModule proxy_module           modules/mod_proxy.so
LoadModule proxy_connect_module   modules/mod_proxy_connect.so
LoadModule rewrite_module         modules/mod_rewrite.so
[...]
Listen 10.0.0.16:3128

<VirtualHost 10.0.0.16:3128>
    ServerName   proxy.domain.com
    ErrorLog  ...
    CustomLog ...

    ProxyRequests on
    RewriteEngine on

    RewriteMap sslval prg:/usr/local/apache2/bin/sslval

    <Proxy>
        RewriteEngine on

        ## parse CONNECT
        RewriteCond %{THE_REQUEST} "^(CONNECT) ([^:]+)(:([0-9]+))? HTTP/"   [NC]
        RewriteRule .          -   [env=CHOST:%2,env=CPORT:%4]

        ## hand over to sslval
        RewriteCond  ${sslval:%{ENV:CHOST}:%{ENV:CPORT}}          ok
        RewriteRule  .                            -               [P,L]

        RewriteRule   .                           -               [F]

    </Proxy>
</VirtualHost>

This is an external "sslval" script which uses gnutls-cli because of its certificate caching support, and lets you specify exactly which certificate you expect:

#!/bin/bash
export HOME=/usr/local/apache2
while read key; do
    timeout 10 gnutls-cli --tofu \
        --port=${key##*:}  ${key%%:*}  >/dev/null 2>&1 <<<Q
    [ $? = 0 ] && echo ok || echo fail
done

Now all you need to do is add the expected certificates to ~apache/.gnutls/known_hosts interactively with gnutls-cli --tofu ..., and entering "y" to confirm.

This trust on first use method might seem familiar, it's exactly like OpenSSH's known_hosts. This approach is not unlike the OpenVPN's --tls-verify option.

A variation on the sslval script can be used to check against a select CA database, e.g. with OpenSSL's s_client and a database of .pem CA files (maintained with c_rehash), e.g:

timeout 10 openssl s_client \
         -connect "$key" -servername "${key%%:*}" \
         -verify 5 -CApath /usr/local/etc/CA <<< Q |
   gawk '/Verify return code: (19|0) /{ok=1}
      END{print ok?"ok":"fail"}'

Error checking, locking, configuration and access-control, caching, and all those nice things are an exercise for the reader... ;-)

With Apache (2.2.2x) I have found that proxying normal requests (non-CONNECT) is affected by the above mod_rewrite technique, you will need an second VirtualHost for those.


What is a good general purpose GnuPG key setup? Since most key types can be used for multiple purposes, namely certification, authentication, encryption and signatures, one could simply use one key for everything - which is a bad idea, as elaborated e.g. by Thomas Pornin. So one should use different key pairs for different purposes, with different backup methods (decryption should remain possible "forever", while signature keys can "simply" be replaced) and securing. But I haven't managed to find a one-in-all write up of best practice summarizing answers to the following questions:

What type of key should be used for which purpose (RSA, DSA, ... how many bits, when should they expire etc)?
Should all keys be (separate?) subkeys of the certification master key or be individual master keys signed by the former one? I found some non-trivial guides on how to remove the secret master key from your day-to-day used subkeys, but is the trouble involved really worth having a shorter chain-of-trust to these keys compared to an entirely separate certification key?
How important is it actually to keep the certification key offline when one uses a) a "really" strong passphrase or b) a hardware device like an OpenPGP card?

About Using Subkeys

Use one primary key for each identity you need, otherwise, use subkeys.

Examples for using multiple primary keys:

You don't want to mix up your private and professional keys
You need some key not connected with your "real life" identity, eg. when prosecuted by the authorities

Examples for using subkeys:

You want to use multiple keys for multiple devices (so you won't have to revoke your computer's key if you lose your mobile)
You want to switch keys regularly (eg., every some years) without losing your reputation in the Web of Trust

I recently posted about How many OpenPGP keys to make in another answer.

About Key Sizes

The GnuPG developers recommend using 2k RSA keys for both encryption and signing. This will be definitely fine for currently used subkeys.

As your primary key will not be used for anything but keysigning and validating signatures (and revocation of course), it is seen as good practice to have a quite huge key here, while using smaller sizes (huge enough for time you will need them) for subkeys (which will speed up calculations and reduce file sizes).

I had a more detailed answer facing RSA with DSA/Elgamal for another question at Superuser, go there for reading further.

Key Expiration

There are two ways a private key could get compromised:

Somebody is able to steal it from you
Somebody is able to recalculate it from your public key

First is a matter of your computer's security (and how you use your key, read below), second is a matter of time. Today (and probably the next few years), RSA 2k keys will be totally fine. But computing power rises dramatically, so an attacker needs less CPU cores/graphic cards/computers/power plants to recalculate your private key. Also, glitches could be found in the used algorithms, leading to much less computing power needed. Quantum computers could speed up things even more.

A key expiration date will limit the validity of your key to a given time you expect it to be secure. Any attacker cracking it afterwards will only be able to read encrypted data send to you, but nobody will use it any more; if an attacker gets hold of your key and you stay unnoticed, at least it will stop him from having use from it after a given time.

Expiring your primary key will let you lose all your Web of Trust reputation, but at least invalidates your key after a given time if you lose access (what should never ever happen, read on at the end of my answer).

Storing your Primary Key Offline

Your primary key is the most crucial one. All trust - both incoming and outgoing - is connected with this. If somebody gets access to it, he's able to:

Create new keys using your name (and GnuPG always uses your newest subkey by default!)
Revoking subkeys and primary keys
Issuing trust to other keys, which is the worst thing to happen: An attacker could create a new key, giving it trust from your old one and then revoke your old key, leaving you without any access to your "moved" identity - he's literally overtaking your identity.

  How important is it actually to keep the certification key offline when one uses a) a "really" strong passphrase [...]?

Your computer always could be hacked or infected by some malware downloading your keys and installing a key logger to fetch your password (and this is not a matter of which operating system you use, all of them include severe security holes nobody knows about at this time).

Keeping your primary (private) key offline is a good choice preventing these problems. It includes some hassles, but reduces risks as stated above.

Highest security would of course mean to use a separate, offline computer (hardware, no virtual machine!) to do all the key management using your primary key and only transferring OpenPGP data (foreign keys and signatures you issued) using some thumb drive.

  b) a hardware device like an OpenPGP card?

OpenPGP smart cards are somewhere in between storing it offline on a thumbdrive, but attaching it to your computer for signing and using another offline computer dedicated to this purpose. Your private key will never leave the smart card (except for backup purpose) which requires an "admin PIN", all signing and even key creation will happen inside the card. "Using" your key (encryption, signing, giving trust) will only require a "user PIN", so even if you connect the card to a "harmed" computer, the attacker will not be able to completely overtake your ID.

You can store your public key wherever you want, for having real use of OpenPGP, you even should send it (and your other public keys) to the keyservers.

And do not forget to create and print a revocation certificate of your primary key. Losing your private key not having this certificate means there is a key you cannot access any more lingering on the keyservers and you can't do anything about it.

Print it, possibly several times, and put it to places you trust. Your parents, some bank deposit box, ... - if this certificate leaks, worst thing to happen is losing your Web of Trust.


How to wipe unused RAM in Windows 10? Background:
I'm trying to get as much security as possible. I have my hard drive encrypted with BitLocker, but I got worried about leaking something through RAM. Precisely, if someone gets to my laptop when it's turned on but locked, they could still retrieve some data from it's RAM by some cold boot procedure. As far as I know, encrypting RAM is not possible on Windows, so I thought of wiping the unused portion of it in order to limit what might get leaked.

Question:
Is there a Windows command (or feature, or utility) that would wipe unused portion of RAM (without shutting down of course)?

You are looking at a workaround or a mitigation of this risk at best. There are no official tools that provide this functionality, and a cold boot attack is relatively difficult to pull off. The RAMBooster approach suggested in the comments will flush your data to the pagefile, which, ironically, can make that data easier to recover if the attacker retrieves your Bitlocker key. Cold boot attacks may not be able to retrieve all memory contents due to the decay that occurs after power loss, but the pagefile does not decay in the same fashion.

That is bad because the Bitlocker key could be retrieved by multiple means. One is the cold boot attack you're worried about (which is quite difficult to achieve, and a failed attempt will result in the permanent loss of volatile memory). Another method is somewhat easier, cheaper, less noticeable, and repeatable: DMA attacks.

The safest course of action is to either power down the machine or enable hibernation when the machine is unattended. Powering down is the safest option, but it is disruptive and therefore impractical.

Hibernation is an acceptable mitigation in this case because the contents of RAM are written to disk, and then the system is powered off; this starts the clock on DRAM. Most other power/sleep states leave RAM powered on and refreshing, so be careful when configuring the system. Since you must unlock the disk before RAM contents can be restored on the next boot, you will have to endure a regular bootup, but your applications will resume in the same state you left them in.

Off and warm is good. The contents of DRAM decay faster when the memory modules are warmer. Under ideal circumstances, an attacker would freeze the memory immediately after shutdown to maximize the likelihood of recovery. This implies that it is best to power down the system before it comes under adversary control, as memory contents last for maybe 30-60 seconds at normal temperatures. Note that the article tests DDR2 memory, and newer types are expected to exhibit lower remanence; a later study was able to reproduce the original results with DDR2 but could not retrieve data from DDR3 using the same method.


Does encrypting information multiple times with only small changes weaken security? Suppose I have work in progress which I want to back up each week, so at the end of each week I take the current version of my document or folder, encrypt it and upload it to Dropbox or another kind of storage. Is my security weakened if a third party observes several or all of my successive encrypted versions?

If your encryption system is any good, then no, there will be no weakness.

Consider that often just finding out if a pair of plaintext messages are identical is enough for a compromise. (If we find out that a given message means "no operation", it's easy to detect when something happens, even if not what it is.) Clearly leaking non-uniqueness would also violate the requirement that an attacker should not be able find out anything about the message without the key. (Semantic security).

Most robust encryption protocols add some sort of random value (nonce) to the message to combat against this (Probabilistic encryption). E.g. in CBC mode encryption, it would be the IV, in CTR mode the initial counter value, etc. With sufficient randomness added, identical plaintexts will give different ciphertexts, and the same works simply for near-identical plaintexts too. (The alternative in some cases related to signing is to generate the nonce as a function (hash) of the plaintext. That would leak non-uniqueness, but not the amount of changes.)

Also note that for stream ciphers (including block ciphers in CTR mode), the keystream must not be reused on different messages. Otherwise the keystream could easily be removed from a pair of messages and a XOR of the plaintexts recovered.


Setup of Kali Linux for reverse shell connections over the internet I am running Kali Linux as a VM on my Windows machine which is NAT'd behind my company network, if I wish to pen test a website for a client and believe that a reverse shell is possible, what is a good way of achieving the connection?

Note that I am not asking how to execute the exploit or inject the shellcode, but I am asking for a simple way for my local netcat to listen on a public IP address.

My thoughts so far:

VPN/SSH tunnel to a server to give me a direct internet connection that my Kali VM can connect to and I use the public IP address of this connection for my reverse shell.
Port forward from my company's internet connection to my VM (not a good solution if multiple ports on multiple protocols are required).
Setup a DMZ to my Kali VM - again not a good solution on a company network.
Run Kali from the cloud. However, this would mean maintaining my local VM as well as the cloud version, and also Amazon would need to be informed of any penetration tests in advance.

You could configure pwnat but you need control of both sides to negotiate the UDP hole punch. Now I want some crazy MSF developer to add this functionality to Meterpreter. Similar techniques include tools like matahari (or, older, pbounce) and particular networks such as iodine (DNS) or onioncat (Tor nodes).

If I were you, my phone would be a quick hotspot and some sort of dynamic DNS could be used. Thus, hole punching is largely unnecessary and so are a lot of other elements you allude to in your question such as IaaS, regulations, due diligence, simplicity, et al. If you have a wired coporate connection along with the WiFi hotspot connction, you could be on both networks at the same time.


multi tenancy and microservices API authentication/authorization I'm seeking advice on how we may be able to implement authentication and authorization for multitenancy with slightly different number of scenarios.

We are building a set of API's which of some are internally accessible (within the organization) whilst some will be externally accessible (internet).

The ones internally and directly accessible within the organization may "indirectly" be accessed via more abstracted services that are externally exposed.

due to the complex nature of our business (telco company), consumers of the externally facing API's will come in different forms. Some will be our subsidiaries, whilst others will be 3rd party, vendors and developers.

I'm going to make an assumption that whether they're a large organization consumer or a single person developer - they're all uniquely identifiable the same way.

The tricky part now is that in certain scenarios the resources that publicly exposed may not be allowed to be accessed by certain consumers. example:

Subsidiary X can access all resources and CRUD operations on resource Y
However, 3rd party Z can only retrieve
I'm probably venturing into ACL territory now...

Furthermore, to add complexity to the matter, there are certain "structural separation" scenarios (imposed by the government) that warrant data segregation but I won't go further down that rabbit hole.

There is also the issue of multiple tenants accessing a system that does not cater for multitenancy. :)

So there is a lot there so I'm wondering what are people's opinions, advice and approach to such.

We're hoping that oauth2.0 in conjunction with OpenID with a custom ACL solution could possibly work.

EDIT:

Apologies had issues with my mobile when posting question and half of it got cut out.

Just some general advice to the approach.

Is this something that OpenID and Oauth2 with entitlements server could cater for?

https://blog.andyet.com/2015/05/12/micro-services-user-info-and-auth/

The above blog entry suggests keeping object level permissions within each microservice.  So you can authenticate and pass along user_id (or group_id) via something like OAuth 2.0 and tokens, but do the actual work of authorization / filtering response within the microservice.

This approach keeps the "loosely coupled" spirit of microservices.


How to get clients mac address for aireplay-ng While I was reading the docs on deauth for aireplay, I found that the parameter -c 'mac addr' is used for deauth of a specific client if I am not wrong. But what I don't know is how to find the MAC address of clients on different networks? It's easier to find the MAC address on the same network but is there any tool or specific method for this? I am on latest Kali.

1.First choose the Access Point:

airodump-ng wlan0mon

2. Retrieve client's MAC Address from the chosen Access Point:

airodump-ng -c 9 --bssid 00:14:6C:7E:40:80 -w psk ath0

Where:

-c 9 is the channel for the wireless network (channel 9) . It is important to note the channel of that AP so you must specify the same channel as the AP else it will display an error that the AP is on different channel

--bssid 00:14:6C:7E:40:80 is the access point MAC address. This eliminates extraneous traffic.

-w psk is the file name prefix for the file which will contain the IVs.

wlan0mon is the interface name which can be different for yours. You have to check first what is your wireless interface name after setting your card to monitor mode to avoid network interface name error.

The output of this command shows the BSSID which is the MAC Address of Access Point and the Station adjacent to it lists the client's MAC Address.

Source


Preventing a man in the middle attack with a self-signed certificate using IP not DNS I've looked for similar questions but can't quite find the answer I need.

Preventing a spoofing man in the middle attack?

After reading this question:

"Authorized" Man in the middle

I think I can grasp the problem (simplified).

Client attempts to make a connection to a target server.
A proxy hijacks the connection.
The proxy initiates an encrypted connection to the target server.
The proxy creates a forged certificate and sends it to the client and starts an encrypted connection.
The proxy is then a man in the middle.

Without a CA the client does not know if they have made a genuine connection.

My question is about how the proxy manages to hijack the connection. If the clients DNS was compromised I could see a case where the IP resolved  could be the proxies IP.

If the client makes a connection directly using an IP address, would the the proxy still be able to intercept the traffic? Perhaps a hostile router could do this.

If the proxy is in the path of the connection it can intercept the traffic. This is the case of a proxy explicitly defined in the browser and also with transparent proxies installed on a device where all outgoing traffic must pass thru (like a firewall). It is also the case when an attacker in the local network redirects traffic using ARP spoofing. DNS spoofing is only relevant if hostnames are involved but all the other cases work with IP address as target too.


Why can't sqlmap find an SQL injection in my code? I installed XAMPP on my development PC, and started Apache HTTP server and MySQL.

It comes with a test page "CD collection", with the following back-end PHP code:

mysql_query("DELETE FROM cds WHERE id=".round($_REQUEST['id']));

I'm not an expert in PHP, I'm guessing the round call is there to prevent SQL injection.  So I removed it from the PHP code, leaving the following:

mysql_query("DELETE FROM cds WHERE id=".$_REQUEST['id']);

I verified that I can modify the query parameters in the URL to do whatever I like to the database, so the SQL injection vulnerability is definitely there.

Now I'm trying to use sqlmap to find the SQL injection vulnerability.  I run it like this:

python sqlmap.py -u "http://127.0.0.1/xampp/cds.php?action=del&id=14"

But it returns the following:

  [16:01:47] [WARNING] GET parameter 'id' is not injectable [16:01:47]
  [CRITICAL] all parameters are not injectable, try to increase
  --level/--risk values to perform more tests. Rerun without providing the --te chnique switch. Give it a go with the --text-only switch if
  the target page has a low percentage of textual content (~15.27% of
  page content is text)

Any idea of what I may be doing wrong?

There is a huge probability, that your server doesn't display any errors/warnings. Sqlmap tries to inject sql inj.-like payloads and observes the webapp "state". As sqlmap hasn't got an access to your vulnerable code or DB content it could just only guess the potential vulnerability by observing webapp behaviour – in this case „visual” behaviour (no warnings/errors – no potential sql-inj.).

However, sqlmap gave you pretty nice hint: try to increase level/risk values:

    python sqlmap.py -u "http://..." --level=3 --risk=3

after that change you will increase the amount of payloads (sent to your webapp) and you will find blind sql.inj!. It means that on level 3 (and --risk=3) sqlmap doesn't check only „visible” effects. It uses some time-taking operation [BENCHMARK()] which delays server response if sql. Inj. occurs.


Is AntiForgeryToken needed for newsletter subscription? General recommendation is to include an anti-forgery token in all POST requests, but is it needed for email newsletter subscription form?

Many single page scrolling sites have email subscription form on page, and using anti-forgery token may have performance implications since anti-forgery token and caching doesn't work well together.

It depends.

You only need protection against CSRF for endpoints that are protected with some sort of authentication. The reason that the attacker needs to fool the victims browser into sending the request (i.e. to "forge" it) is that the attacker doesn't know the session cookie, so she can't just send it from her own machine.

So for an ordinary newsletter form, where theres not authentication and you just enter your email address and hit submit, you don't need CSRF protection. If I want to sign you up against your will I just enter your email and do it myself.

However, if the form is behind authentication and perhaps the email address is fetched from the user database, then it's a different story.


DoS and Serialization I got the following message from Fortify static code analyser.

  Incorrect serialization and de-serialization can lead to unpredictable behavior and cause denial of service attacks.

Can anyone explain how this can be serialization and de-serialization can lead to DoS?

If the serialized data is provided by an untrusted client, it can be manipulated.

Let's assume there is a linked list. The attacker can add a huge number of entries.

It may even be possible to created invalid serialized data. For example the length field of an array can be set to a very huge number. The server will allocate enough memory to store all elements, although they are never sent.

In some circumstances it is possible to trigger code that allocates other resources such as threads or files.

Last but not least there have been classes with bugs in their serialization code.


What is the exactly mean of these CPE file fields? I am working in the development of an application that have to download and parse this CPE file definition: http://static.nvd.nist.gov/feeds/xml/cpe/dictionary/official-cpe-dictionary_v2.3.xml

My problem is the following one.

Into some entry (of the XML file) I found something like this:

<vuln:vulnerable-configuration id="http://nvd.nist.gov/">
  <cpe-lang:logical-test negate="false" operator="OR">
    <cpe-lang:fact-ref name="cpe:/a:apache:tomcat:4.1.10"/>
    <cpe-lang:fact-ref name="cpe:/a:apache:tomcat:4.1.12"/>
    <cpe-lang:fact-ref name="cpe:/a:apache:tomcat:4.1.24"/>
    <cpe-lang:fact-ref name="cpe:/a:apache:tomcat:4.1.3:beta"/>
    ..........................................
    ..........................................
    ..........................................
    <cpe-lang:fact-ref name="cpe:/a:apache_software_foundation:tomcat:5.3"/>
    <cpe-lang:fact-ref name="cpe:/a:apache_software_foundation:tomcat:5.4"/>
    <cpe-lang:fact-ref name="cpe:/a:apache_software_foundation:tomcat:5.5"/>
  </cpe-lang:logical-test>
</vuln:vulnerable-configuration>

<vuln:vulnerable-software-list>
  <vuln:product>cpe:/a:apache_software_foundation:tomcat:4.1.34</vuln:product>
  <vuln:product>cpe:/a:apache:tomcat:5.5.21</vuln:product>
  <vuln:product>cpe:/a:apache_software_foundation:tomcat:4.1.37</vuln:product>
  <vuln:product>cpe:/a:apache_software_foundation:tomcat:4.1.32</vuln:product>
  .....................................
  .....................................
  .....................................
  <vuln:product>cpe:/a:apache:tomcat:5.5.22</vuln:product>
  <vuln:product>cpe:/a:apache:tomcat:4.1.36</vuln:product>
  <vuln:product>cpe:/a:apache:tomcat:5.5.25</vuln:product>
  <vuln:product>cpe:/a:apache:tomcat:5.5.1</vuln:product>
</vuln:vulnerable-software-list>

As you can see I have 2 differents collection: the first one is represented by the content of  tag and the second one is represented by the content of the

What these collection exactly represents and what is the difference between them?

Tnx

cpe-lang shows if are other dependencies for the vulnerable product. If you look over the NVD CVE's you will see some products are vulnerable only on some specific platforms. For example

<cpe-lang:logical-test negate="false" operator="AND">
<cpe-lang:logical-test negate="false" operator="OR">
<cpe-lang:fact-ref name="cpe:/o:redhat:enterprise_linux:5.0::desktop"/>
<cpe-lang:fact-ref name="cpe:/o:redhat:enterprise_linux:5.0::desktop_multiple_os"/>
<cpe-lang:fact-ref name="cpe:/o:redhat:enterprise_linux:5.0::server"/>
<cpe-lang:fact-ref name="cpe:/o:redhat:enterprise_linux:5.0::virtualization"/>
<cpe-lang:fact-ref name="cpe:/o:redhat:fedora_core:core_5.0"/>
<cpe-lang:fact-ref name="cpe:/o:redhat:fedora_core:core6"/>
</cpe-lang:logical-test>
<cpe-lang:logical-test negate="false" operator="OR">
<cpe-lang:fact-ref name="cpe:/a:xen:qemu"/>
</cpe-lang:logical-test>
</cpe-lang:logical-test>

<vuln:vulnerable-software-list>
<vuln:product>cpe:/a:xen:qemu</vuln:product>
</vuln:vulnerable-software-list>

What all that means? xen:qemu is vulnerable only on redhat:enterprise_linux::* and Fedora core* . So if you parse this xml and get only the vuln:product, for some products, you are inaccurate.

cpelan stands for - CPE language matching algorithm and was created by NIST.
Here you will find more informations: https://cpe.mitre.org/specification/


Does limiting size of images prevents buffer overflow? I am writing an app that serves images to clients.
The app is written mostly in python. I store the images in AWS s3 and serve the clients them directly from there.
Am I vulnerable to buffer overflow attacks?
If an image is bigger than 500KB I resize it so it would be less than 500KB.
Does this prevent buffer overflow attack?
Are my clients subjected to these?

Python is a high-level language; it does not expose memory management to the programmer. Thus, you can't make errors when programming that lead to buffer overflows (unless any of your code is written in e.g. C/C++).
However, the cPython interpreter itself could contain buffer overflows since it is written in C, but this doesn't happen terribly often and your best defense would be to keep Python up to date in this case.


Creating self-signed certificate for localhost and trusting fully As an accompanyment to a web application we plan to have a node application running as a windows service running on the client computer. This will run a small web server which will listen on port XXXX for information sent from the web application (so the web application will do an Ajax POST to http://localhost:XXXX). The node application has access to do things that a browser based application cannot so it helps us with certain integrations.

The problem is that the web application is running as https and will not allow a POST request to happen to our http service that is running locally.

My questions are:

Is it possible to create a self-signed cert for https://localhost so that the user doesn't need to then trust the certificate every time they log on to the computer.

I have tried creating the self-signed cert and adding it to the trusted authority list but I still need to browse to the http://localhost:XXXX in a browser and choose to trust the certificate before I can get the web application to successfully communicate with the node application.

Is there any other way around this?

As to the first part of your question. the answer is NO, and all who say it is forget that that also means breaking essential layers of security on the device.

as to the second   it is possible
but highly dubious to do so. The way to do this is by buying a certificate for a domain (like localapp.example.com) and have its DNS entry point to 127.0.0.1. and than share the key and certificate with the app.

Mind you, this effectively breaks the security layer TLS provides as the key is now on the same machine as the client. and anyone with access to the machine can listen in on that part of the conversation and use your certificate to setup there own service in its place.

I would recommend you get a NEW domain for this purpose and be aware this setup is only so that you can use your webapp in conjunction with your other web services. Which are now vulnerable to more injection attacks due to you having a local web service made part of the full app.


Why is Address Space Layout Randomization not effective against the Open SSL Heartbleed Vulnerability? My understanding is that ASLR randomly arranges the key data areas of a process, and so reading contiguously above a buffer as is done in heartbleed would not be enough to achieve the exploit.

ASLR randomizes the addresses of critical parts of the processes memory, i.e. stack, heap and where libraries are loaded in order to make it unpredictable where a specific piece of code or data structure is located. But this kind of knowledge is not needed in the first place to exploit Heartbleed.

The Heartbleed vulnerability relies on an out of bounds read within an already allocated buffer on the heap. It does not need the base address of the heap for this, all what it needs is that sensitive data are still located at the heap and that they are located behind some newly allocated buffer. An image taken from Inference of Memory Bounds: Preventing the Next Heartbleed visualizes the problem nicely:

Relating to this image: in case of Heartbleed the buffer allocated for the TLS heartbeat was the blue one. But since the claimed size given in the heartbeat request was larger than the actual size of the heartbeat request and the heartbeat response trusted this wrong size OpenSSL ended up not only to include the payload of the original heartbeat request (blue) but also the data behind it on the heap (red) and thus leaked the sensitive information. No knowledge of any actual address was required for this.


SSL certificate expired on the embedded device (a client) I need some inputs for the scenario when the certificate expires which is stored on the embedded device on the network which is a client.  Following is the explaination of the setup.

The setup explaination

A device (client) is connected on the internet.
We need to connect this device to the server
Currently the server is supporting the SSL protocol
We need to implement the SSL protocol on the device side
Device will send the data to the server
We can only access the server but not the device directly.  Whatever data is  received   by the server from the device can be viewed on the server only.
As stated in point no. 4, the data which is being flown between the server and the device should be made secured by using the SSL on the device side.
Device does not have a web browser facility.

So the device (client) has to have a root CA certificate stored in its keystore.  When it expires how to renew it...

Regards,

ssk

If I understand you right the device will only communicate with a single or few specific servers. In this case you should not rely on the public CA system, but instead roll your own:

If you have only a single server you can use a self-signed certificate and hard code the expected certificate in all devices (certificate pinning).
If you have multiple servers you might either use multiple self-signed certificates and deposit them all in each device. Or you might create your own CA and store it as the only trusted CA on the device. Then accept anything signed by this CA but nothing else.

In both cases you control the expiration times of the certificates yourself, so you can make them really long or skip verification of expiration at the device. Of course you need to tightly protect the private keys of the generate certificates and CA, but this would be the same too if you use the public CA system.

And unless you are able to upgrade the firmware on the device you should use crypto algorithms which will likely be strong enough for the expected life time of the device. If you instead are able to update the firmware make sure the upgrade process is secure (e.g. signed upgrades) because otherwise an attacker might just add its own firmware and circumvent your SSL protection by grabbing the data on the device before they get encrypted with SSL.


Is the unallocated space on my drive also encrypted (full disk encryption)? $ lsblk
NAME                  MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda                     8:0    0 119.2G  0 disk
├─sda1                  8:1    0   512M  0 part  /boot/efi
├─sda2                  8:2    0   244M  0 part  /boot
└─sda3                  8:3    0 118.5G  0 part
  └─sda3_crypt        254:0    0 118.5G  0 crypt
    ├─user--vg-root   254:1    0 110.7G  0 lvm   /
    └─user--vg-swap_1 254:2    0   7.9G  0 lvm

The sda3_crypt partition is 118.5G, so does that effectively mean that my entire drive is encrypted, including unallocated space (excluding the boot partition)? I know this question might be too simple, but I've tried to find a definitive answer but haven't had any luck.

In terms of the boot partition, am I correct in that it is possible to keep it on a USB stick? What happens when you try to boot the OS without the USB drive, then?

Lastly, does the output of lsblk indicate that my swap partition is encrypted?

The sda3_crypt partition is 118.5G, so does that effectively mean that my entire drive is encrypted, including unallocated space (excluding the boot partition)?

Assuming the drive was randomized before or during the initial encryption, yes. The entirety of your third partition is encrypted. If you started using encryption and just formatted your disk, there may be leftover traces from the previous, unencrypted install. However files that are deleted in the encrypted partition, deallocating their blocks, will remain encrypted.

This is not necessarily the case for solid state drives that support (and use) TRIM, however. TRIM support allows the OS to send a signal to the drive to zero unallocated sectors, because the SSD firmware can make better optimization decisions when it knows what blocks are free and what blocks are not (something it cannot know without the OS telling it, due to the encryption). In that case, unallocated spaces is erased and zeroed. This can allow someone to know which blocks are unallocated on an encrypted drive, by seeing which ones are zeroed. They will not be able to know what the blocks previously contained, both because it was zeroed, and because it was encrypted. There is a great blog post on the issues with SSDs that support TRIM and encryption.

  In terms of the boot partition, am I correct in that it is possible to keep it on a USB stick? What happens when you try to boot the OS without the USB drive, then?

Yes, you can keep the boot partition on any device that the BIOS supports booting from. If you try to boot without the USB drive, the behavior depends on your BIOS settings. It may attempt to boot from other plugged in media, or may say that no bootable medium was found and to press F12 to reboot or something of that sort. The effect would be the same as if you took out all drives.

  Lastly, does the output of lsblk indicate that my swap partition is encrypted?

Yes it does. You are using LVM on top of sda3_crypt, which is a method of, among other things, creating virtual partitions. The output shows that your encrypted device mapping is split into two virtual partitions (called volume groups in LVM terminology): user--vg-root and user--vg-swap_1. This means LVM was set up on the encrypted partition, so all volume groups it creates will also be encrypted.

  My question is directed at guest, who answered this post. You say "Assuming the drive was randomized before or during the initial encryption, yes. The entirety of your third partition is encrypted."

  I assume you mean that the drive was wiped with zeros before the encryption was performed. But my question is, is it okay to wipe an SSD with zeros for "safer" encryption? Won't that reduce the SSD's lifespan?

I mean the drive was wiped with random data before it was used with encryption. Encrypted zeros look random, so if you randomize a device and then encrypt it, no one without the key can tell which sectors have all zeros. If you zero it before encrypting, then you may have gotten rid of previous unencrypted data, but you are revealing exactly what sectors are in use. This is often a necessary evil with SSDs, due to TRIM being important for performance and lifespan.

A single "cell" in an SSD can handle between 2,000 and 10,000 erase cycles. I believe some even get around 100,000. This means you could overwrite the device that many times before severe risks of failure occur. Not to mention, they have some extra, hidden storage to prevent wear, called overprovisioning space.

You do not have to write zeros to the entire SSD. You can zero it by issuing a manual TRIM command, which tells the low-level firmware to zero everything. This can be nearly instant, because it is a separate action from writing. On Linux, you can use the hdparm command. From the manpage:

--trim-sector-ranges
       For Solid State Drives (SSDs).  EXCEPTIONALLY DANGEROUS. DO  NOT
       USE  THIS OPTION!!  Tells the drive firmware to discard unneeded
       data sectors, destroying any data that  may  have  been  present
       within  them.   This makes those sectors available for immediate
       use by the firmware's garbage collection mechanism,  to  improve
       scheduling  for  wear-leveling  of the flash media.  This option
       expects one or more sector range  pairs  immediately  after  the
       option:  an  LBA  starting  address, a colon, and a sector count
       (max 65535), with no intervening spaces.  EXCEPTIONALLY  DANGER‐
       OUS. DO NOT USE THIS OPTION!!

       E.g.  hdparm --trim-sector-ranges 1000:4 7894:16 /dev/sdz

Don't be scared about the apocalyptical warnings that are so common to that one program's documentation. All it is trying to address is the risk of losing data with this flag. You would want to set the starting address to 0, and the sector count to the total size of your drive. This will quickly erase everything without shortening the drive's lifespan as much as if you write directly to it.


What are some signs that a certain degree in information security will be a quality one? I have been searching frantically for a college that has a good information security program. One of the ones I came across is Wilmington Universities Computer and Network Security program. I got a little exited when I saw it. The college is very close, it's cheap, and it has the program I want. I then went to an open house event that they were hosting. I talked to once of the teachers (she teaches in the technology department but does more web development) and to say the least my dreams were a little crushed. When I asked her about the program further she told me that they only had one programming class and that was in python. This killed me for two reasons. First I enjoy the programming side of security. And second because it was python.

What should someone look for in a higher education plan when trying to go into IT security. I understand that it is a broad field and there are differences between each type but what do you think?

Since I know you guys go in depth with your answers can you lay out a list of different things you should be looking for when searching for each individual section? I understand it is a lot of work but this should be able to help people for a long time.

I have to say, reading the program materials, I'm not surprised.

As you say, the IT security field is very broad - and programming is only a very thin slice of it.  If you love programming, and are looking for it to be the center point of your education and your work, then I'd offer the idea that what you're really looking for are courses in Software Security - and I have yet to see many (or any) cirriculums using this as a center point.

Things to think about when looking for advanced education and working in IT Security...

What do you want the education to do for you?

IT security is still such a new field that it will be a long time before anyone really knows what a "classic" IT security professional is capable of.  It will be even longer until there are jobs that require an IT Security degree as a baseline.  I'd bet money that over the next 10 years, the majority of IT Security professionals are NOT people who have degrees or advanced degrees in anything bearing the title "security" - the field is still too new and too diverse.

So - the goal returns to being - what do you want from the degree?  An IT security degree as the programs I've seen are currently designed will help get you in touch with some of the current best practices and the business tradeoffs in the industry.  But if you want to be a technical whiz at any particular discipline (programming, networking, computer OSes, management) - then consider a program in that discipline.

What IS an IT security degree?

I expect this answer to be extremely dated in the next few years, but worth the attempt...

It's currently separating itself from any specific discipline which contributes to IT Security, in favor of creating an overall perspective that goes across these disciplines and lets students take a broad perspective to:

Identifying and mitigating risk
Making IT decisions that align security with business value
See the gaps in security that occur across disciplines
Align various experts from various disciplines to creating a secure solution that actually works.
Protect the company from a legal standpoint - knowing enough about the law and forensics to make sure that the company operates legally, and that should prosecution of an attacker be necessary, the data provided by techology can be used as evidence

So in any program these days, I'd expect to see a minimal bit of:

Programming - both hacking and secure software development
Operating system security
Network Security
Web app security (yes, some programming but also the application layer network stuff)
Physical security
Social engineering/human policy

With that diverse of a topic set, I'm not surpised that programming (or any single discipline) is only taking a small part of the cirriculum.

The hiring market today

I leap to this mostly because the #1 reason people pursue education is to get a job.  The key to getting a job is to have the skills that people will pay you for.

Since there really is no predent yet, there's not a single job that recruits exclusively for this type of degree.  Key areas that are looking for heavy security knowledge include:

Pen tests - probably the most "glamorous" field - the one everyone thinks of - testing a secure system for cracks and helping to provide input to fixing weaknesses - takes some programming, but as important is a detailed knowledge about what you are trying to break into - products, protocols and human weaknesses.
Audit - reviewing (not pen testing) systems for compliance with security regulations.
Operations - running and making day to day decisions about systems with a high degree of security risk - more likely to require superior debugging skills and judgement than programming knowledge.
IT security implementation - upgrading, and creating new components for secure systems
Risk management - decisions and strategy about the risk of the current state of the system and the risk of making suggested changes to it.

Only a fraction of these jobs currently require hacking expertise or serious programming skills.  Most require some depth of knowledge about key security controls and an ability to learn and review security controls in light of the capabilities of hackers.

Evolution in progress

Security related cirriculums are very much in transition.  Professional groups I work with now are actively engaged in revising and refining these programs - they are very new and still very much in transition.  The trick I see as a hiring manager is that there's a rock and a hard place right now - the key jobs in security that are very hard to fill take serious technical expertise, great communication skills, and good judgement.  The way these roles are filled right now is with people who are usually 10+ years into their careers - they've gained technical depth in key areas through previous work, they've survived some serious challenges that gave them good judgement and they've spent enough time communicating to have gotten better at it.

Ideally, those of us in the industry will find ways to leverage new college grads to fill in some of this work and leverage our experienced folks as guides and mentors - like other technology disciplines.  The trick is - there's no one sized fits all program yet.  Risk, cost, the nexus of technology and people - that's more or less transferable job to job.  But the details that each roll needs has typically been so company specific that it's hard to fill.

Computer & Network Security - specifically

This particular course is branded as Computer and Network Security, specifically, which is - IMO - rather enticing.  I've seen IT Security, and CyberSecurity and the open ended nature of these titles always makes me worry.  At least computer & network security suggests a program centering around ... well... computers and networks!

Taking the program in smaller detail, and going back to my main points:

Identifying and mitigating risk - hard to tell in this cirriculum - there's a principles and practices - but I'd have to read a description to see if they agree with me on risk mitigation as a "best practice".
Making IT decisions that align security with business value - maybe - there's some intro economics here, but one wonders how close to IT it really gets...
See the gaps in security that occur across disciplines - hopefully - but this is really hard to teach
Align various experts from various disciplines - yep - the various SEC courses are doing a decent job - some OS (LINUX and Windows), some networking (there's a 101 telecom sounding course, and also one on networking security controls)
Protect the company from a legal standpoint - nice - the CRJ and LES courses are pretty enticing - assuming the course is of high quality, the philosophy course on ethis is nice, too.

If I were interviewing a candidate and saw this degree, the first step would be to do what I'm doing now.  I'd also:

scope out other graduates - what fields are they working in?  This looks forensic heavy - are candidates working primarily law enforcement?
Interview for content - certainly the basics look good - can the candidate really configure the security controls I'll need him to configure?  How hands on was any of this work (not programming - staging, fixing and installing computer systems and network gear)
look for project work focusing on interdisciplinary collaboration - if you can't work with people who think differently, you won't work in most security jobs.

As a graduate - I'd have one more question -- how many of your professors are working in the field?  The field is growing and changing rapidly - if your profs aren't getting in and doing hands on work, then you're getting a theory based education and you may have to unlearn much of what you've learned when you get to a job.  A real key in this area is having the opportunity to work with people who have knowledge of the industry and whose theories have been proven in practice.


is IPSEC Authentication between local domain hosts a part of normal behaviour in a Windows network? I am seeing lot of IPSEC Authentication messages in eventlogs of Windows domain hosts.  I was wondering if this -  setting up IPSEC connections between domain workstations is a part of normal Windows behaviour?

Short answer is: probably normal.

Windows server 2008 can use IPSec (if configured) for domain and server isolation.

It depends on the configurations and the Group Policies involved. Aside from this answer, you'll need to head over to a Windows admin forum or Superuser for specifics.