If I storing my own cards in a database. Does this fall under PCI compliance framework? We want to store some cardholders data in our database. The card we want to store are all connected to our own company account. Does this fall under the PCI framework? For example do I have to comply with the requirements relating to storage of cardholder data?

PCI is about protecting consumers and "consumer data".   I don't think the PCI-DSS applies here,  although it isn't a good idea.  SQL Injection can be used to read these values,  it is slightly better to hardcode these values in a configuration file,  it is also a more appropriate design.


Does a BitLocker recovery key have any use on removable media, a.k.a 'BitLocker to Go', other than if you forget your password? I understand that there are multiple reasons that a recovery key might be needed on a system partition, but why would I want the extra security risk of having a way of circumventing my password for removable media?
Why is windows asking for my recovery key?

Windows will require a BitLocker recovery key when it detects an insecure condition that may be an unauthorized attempt to access the data. This extra step is a security precaution intended to keep your data safe and secure

If I've understood this correctly, it only applies to fixed drives. Why not write down my password, or a reminder, rather than a key that's impossible to remember and does the same thing?
This feels like a stupid question, but I've been unable to find a straightforward answer. Have I misunderstood something about how BitLocker to Go works? Does the recovery key offer any protection against the media or data being corrupted?
VeraCrypt appears to only require a rescue disk for the system partition.

One scenario I thought of was if law enforcement want you to unlock a drive and you don't want to give up a password that is used elsewhere or key escrow.

To try and expand upon my confusion, the message when you setup bitlocker on a system partition:

A recovery key can be used to access your files and folders if you're having problems unlocking your PC. It's a good idea to have more than one and keep each in a safe place other than your PC.

"safe" here is ambiguous:

Safe from attackers as it can bypass your password
Safe from being lost, because you might need it even if you still have your password due to hardware failure or a change in configuration

In fact, for system drives, both are true.
For portable drives, the message reads

If you forget your password or lose your smart card, you can use your recovery key to access your drive.

Comparing this with EFS on wikipedia:

Files encrypted with EFS can only be decrypted by using the RSA private key(s) matching the previously used public key(s).
The significance of this is occasionally lost on users, resulting in data loss if a user forgets his or her password, or fails to back up the encryption key.

Where presumably the private key is still symmetrically encrypted with a password.

BitLocker (in all uses) has a master encryption key which is encrypted using keys based on several "protectors". Common protectors for system partitions are TPM, passphrase ("PIN"), file-based key, and so on. BitLocker can also be temporarily "suspended" by writing a plain-text protector to the volume. Across all use cases, the recovery key is an additional protector (it can be disabled if you want to, though you'll probably need to use the command-line manage-bde.exe tool to do it).
For any version of BitLocker where a PIN/passphrase protector is used, there's a risk of an attacker attempting to brute-force it. BitLocker has standard protections against this (mostly the use of an extremely slow password hashing function), which work both for online and offline attacks. However, in the case of online attacks, BitLocker can also respond to repeated incorrect password attempts by removing the PIN/passphrase protector (deleting the data necessary to derive the protection key for decrypting the master key, even if the correct password is later entered). While this doesn't stop somebody who imaged the BL metadata before attempting their attack, or who is accessing the volume through a write-blocker, it does prevent casual attempts to break into an encrypted flashdrive or external hard disk.
However, with the PIN/passphrase protector gone, you need some other protector if you want to ever decrypt the drive. That - in addition to "forgot password" cases - is what the recovery key is for. It also provides a long-term secret that can be thrown in a safe or something and doesn't need to be updated even if you change the passphrase.


Attacks on password-based encryption Frequent attacks on password-based encryption are dictionary attacks with special hardware. I suspect that this is the only promising attack on the ciphertext. Is that correct?

Another attack scenario that targets passwords is keyloggers. This attack is not on the ciphertext, but on the system.

In addition to these two attack scenarios, are there any that specifically target passwords (not encryption in general)?

There are several attacks on password-based encryption, each with their own techniques and their own goals.

Password Cracking

This is the most straightforward group of attacks. The goal is to gain the password, which might be weak. The exact kind of attack may vary, from brute force, over masking attacks to mangled dictionary attacks. The outcome, however, is always the same. If you succeed, you get the password and can decrypt the file.

Cryptographic Weaknesses

Key-Derivation Function

Passwords can't be used as keys directly. For example, AES-256 requires a key that is exactly 256 bit long. It can't be longer, it can't be shorter. As a result, you need a function that derives a key from your password. These functions are aptly-named "Key-Derivation Functions".

The user password is the input for the key derivation function (short: KDF), and the output of that function is the key for the encryption and decryption algorithm. As such, if there are weaknesses in the key derivation function, an attacker may not have to get the password, and it may be enough to exploit those flaws

Encryption Function

The encryption function itself may have flaws, allowing an attacker to modify or or gain access to certain information. The Cipher-Block-Chaining Mode (short: CBC-Mode), for instance, is malleable, meaning that you can change specific bits in the plaintext by flipping bits in the ciphertext.

This of course depends on what the data actually means. For example, if a text message is:

AT 1630 INITIATE PLAN GAMMA

If an attacker knows the rough structure of the message, e.g. AT **** INITIATE PLAN ***************, then they can flip certain bits to change the message. It doesn't allow the attacker to read the data, but it may be enough to modify the data.


Where to start filtering POST input with MVC? [PHP] My question is more about design practice, but where should I start the filtering? I figured the class would be the best place for it, but wouldn't that put the instantiated object ($objReg) at risk for code injection using unfiltered POST variables like that?

How do I get around this problem? Is there a better design for this?

Index.php is the handler for all calls. So for example it will call register.php's function register2() (i.e. index.php?action=register2), and the function in-turn instantiates the object as seen below.

Is this safe you think? I'm trying to follow DRY and OOD principles in order to avoid confusion.

main code @ register.php (includes ommited):

function register2(){
            $objReg = new registration($_POST['username'],$_POST['password'],$_POST['email']);
            $objReg->register();
            unset($objReg);
}

clean class @ security.php:

class clean
{
    public function process($data)
    {
        $data = trim($data);
        $data = stripslashes($data);
        $data = htmlspecialchars($data);
        return $data;
    }
}

registration class @ register.class (register method omitted):

class registration
    {
        // Registration stuffs
        private $regUser = NULL;
        private $regPass = NULL;
        private $regEmail = NULL;

        public function __construct($regName, $regPass, $regEmail)
                {
                    //Set the class properties if they aren't NULL.
                    if (!empty($regName) AND !empty($regPass) AND !empty($regEmail)){
                        $objClean = new clean;
                        $this->regUser  = $objClean->process($regName);
                        $this->regPass  = $objClean->process($regPass);
                        $this->regEmail = $objClean->process($regEmail);
                        unset($objClean);
                    }
                }
    }

I think this design is not bad, but usually the sanitization is done in controller in a MVC architecture design. I think the reason is it should be done as soon as possible, so maybe you can do the filtering before calling your class:

function register2(){

    $objClean = new clean;

    $username = $objClean->process($_POST['username']);
    $password = $objClean->process($_POST['password']);
    $email = $objClean->process($_POST['email']);

    $objReg = new registration($username,$password,$email);
    $objReg->register();
    unset($objReg);
}

In this way you pass the parameters to the class already filtered. The functionallity is going to be the same, but this is how it's done usually.

Regarding the way of filtering... If your php version is >= 5.2.0 , you can use function filter_var which is very nice for this. It has a lot of filter types depending of the use of the var. You can see them here.


Are mail-servers removed from security concerns in contrast with cloud storage? I have meet people and even businesses that are against using the cloud for data  storage invoking  security risks. In the same time they seem perfectly fine using email services (usually from obscure ten-bucks-a-month web hosts that also serves their two page website) to transport most of this data.

Is data passing mail-servers not at the same level of risk as the various cloud storage solutions (Dropbox, AWS, etc)?

In the general case I would agree with you that cloud services are no more inherently risky than e-mail providers.  Any time you store data with a 3rd party there are security risks, especially if you're using a consumer grade service which doesn't have things like contracts in place where you can specify security/audit requirements.

I'd say that there's a slight difference between e-mail and cloud services in that the programs and servers for e-mail storage and transport are quite mature and most of them will have been through the mill of vulnerability disclosure, whereas a lot of cloud services will be newer codebases that may not have had the same level of scrutiny.  Of course that is a bit of a generalisation but may well still hold.


What is the relevance on HSTS on HTTP application? We all know that HSTS should be implemented on HTTPS application. Recently, I came across an application HSTS implemened on HTTP application.

I need to answer to the client. According to me, HSTS implemented on HTTP would have no advantage. Please let me know.

The decisions made in RFC 6796, 8.1 are much easier to comprehend, if you imagine what would happen, if a HSTS header from an HTTP response was handled the same way as with HTTPS:

The site is HTTP only, and accidentally adds a HSTS header. The browser would now be instructed to upgrade to HTTPS, but the site is not serving the HTTPS version at all, and becomes unreachable.
A man-in-the-middle (MitM) adds this header, making the site unreachable on purpose.

As a man-in-the-middle could also do the same on an HTTPS connection, when user bypasses a warning making a security exception, the RFC 6796, 8.1 has two conditions:

The HSTS header must be received over a secure transport (not plain HTTP).
There must be no underlying secure transport errors or warnings. As, after enforced, HSTS requires the same conditions, as described in 8.4, having any errors or warnings allowed during reading the header would also make the site unreachable, whether it's accidental or caused by a MitM.

Therefore, the only reasonable usage of HSTS is:

First redirect HTTP to HTTPS, then redirect to the canonical name over the HTTPS.
Add the HSTS header to all the HTTPS hostnames, not just to the canonical hostname. This way you'll be protecting all the hostnames. Otherwise, an unprotected version could still be used for MitM.
If all the redirecting hostnames are subdomains of the canonical hostname, and if you don't need any subdomain over plain HTTP, add the includeSubDomains directive to protect them all at once.
Consider HSTS preloading. It has two phases: adding the header & submitting to the lists.


Hardening an old SRP3 protocol setup This is the situation: client-server login is done via SRP3, hash used is single SHA1. Client cannot be modified but server can (open source). Because of this, all hashed passwords in the database are only SHA1. Server got hacked several times already and whole database leaked, passwords were broken.

To my understanding for SRP3 to work correctly both client and server need to use the same hashing alghoritm so I can't switch SHA1 with bcrypt or anything like that. What are my options to harden the hashes on server side?

With the server must store a "password verifier" with a special structure; in SRP 3 (the one described in RFC 2945), this is described this way:

The host stores user passwords as triplets of the form

    { <username>, <password verifier>, <salt> }

Password entries are generated as follows:

    <salt> = random()
    x = SHA(<salt> | SHA(<username> | ":" | <raw password>))
    <password verifier> = v = g^x % N

The protocol cannot work if the server does not have v or the salt because the server must send the salt to the client (in the initial steps of the protocol) and must use v not long afterwards. Therefore, regardless of what the server actually stores, the server must know enough to retrieve or recompute the salt and v in a fraction of a second. An attacker who obtains a complete copy of the server will be able to do the same, and get to the salt and v, allowing for a fast brute force attack on the password (fast because the computation of v, given the salt, username and a putative password, implies only a couple SHA-1 and a modular exponentiation).

So the only hope is to find a way for attackers to not obtain a complete copy of the server. Namely, symmetrically encrypt the data which is stored, with a key which you will then store "elsewhere", and pray for the best. For instance, most breaches of the "SQL injection" persuasion allow for the attacker to grab a more or less full copy of the server data as stored in the database, but does not (immediately) allow for reading arbitrary files outside of the database. If the server stores the symmetric encryption key in a file, and use that key to encrypt the relevant fields in the database (namely, the v values), then attackers who only get a dump of the database will be defeated.

A variant is to setup an extra internal server who stores the salt and v values. Your main server would talk to that secondary server. It would then be up to that secondary server to detect attempts at exhaustive pumping of all values, should the main server be totally hijacked by attackers. At least, the physical separation would protect the sensitive values (salt and v) from SQL injections and similar breaches.

There is little more you can do without modifying the client.


Are open redirects a security concern? Are open redirects a security concern? Google writes that: "An open redirect isn't a bug or a security flaw in and of itself—for some uses they have to be left fairly open." And Google's bounty program doesn't view it as a bug:

  Some members of the security community argue that open redirectors are
  a security issue. The common argument in favor of this view is that
  some users, when presented with a carefully crafted link, may be duped
  into thinking that they will be taken to a trusted page - but will be
  not be attentive enough to examine the contents of the address bar
  after the redirection takes place.

Should open redirects be treated as bugs?

YES, and its an OWASP top 10 violation: OWASP A10 - Unvalidated Redirect.  These are valuable for phishing and spam.  Recently it was uncovered that spammers where exploiting Open Redirect vulnerabilities on US .gov websites for profit.


DDoS on LAN: How to Defend? DDos on a wired network has to be extremely rare, since the intruder has to be physically connected to the network. However, let's say that it still managed to happen. How would you be able to defend against it on a LAN? I'm curious as to how this is possible. I'm interested in exploring this further in my lab tomorrow because I should have some free time.

The most obvious way is to locate the source of the attack and pull the cable. This shouldn't be too hard, since switches can report the amount of traffic they're handling in various ways (e.g. SNMP).

In terms of prevention, you'd take the same steps as you would on the internet - install rules that block IPs that send large numbers of SYN packets. Whilst this is still likely to make the first switch run slow, it segments the attack off from the rest of the network.


Does the following data stream look secure to you? I understand the basic concept of SSL but maybe I am missing the point. Please could someone take a look at the following part of a test log to a server and tell me if it looks secure. My concerns are that although the certificate callback returns "true" you can see that it states under policy status RemoteCertificateNameMismatch.RemoteCertificateChainErrors and mentions untrusted root.

1:07:04 AM: SSL: secure.newsfarm.ams2.highwinds-media.com:   Certificate: E=support@sslusenet.com, CN=*.sslusenet.com, OU=sslusenet.com, O=sslusenet.com, L=Phoenix, S=AZ, C=US
9/7/2012 1:07:04 AM: SSL: secure.newsfarm.ams2.highwinds-media.com:   Policy status: RemoteCertificateNameMismatch, RemoteCertificateChainErrors
9/7/2012 1:07:04 AM: SSL: secure.newsfarm.ams2.highwinds-media.com:   Chain status: UntrustedRoot
9/7/2012 1:07:04 AM: SSL: CertificateCallback returns True
9/7/2012 1:07:04 AM: SSL: secure.newsfarm.ams2.highwinds-media.com:   KeyExchange: RsaKeyX (1024 bits)
9/7/2012 1:07:04 AM: SSL: secure.newsfarm.ams2.highwinds-media.com:   Cipher: Aes128 (128 bits)
9/7/2012 1:07:04 AM: Nntp: < highwinds: 200 Welcome to Virgin Media
9/7/2012 1:07:04 AM: Nntp: > highwinds: AUTHINFO USER bnv *******@binverse.com
9/7/2012 1:07:05 AM: Nntp: < highwinds: 381 PASS required
9/7/2012 1:07:05 AM: Nntp: > highwinds: AUTHINFO PASS ***
9/7/2012 1:07:05 AM: Nntp: < highwinds: 281 Welcome to Binverse.com (No Posting)

Are the security considerations what the callback is checking or is there actually a name mismatch from an untrusted root with chain errors and the callback is just returning "true" anyway regardless?

Although the log files you show are relatively obscure, one can see some fishy things in the first few lines:

Apparently, the server which was contacted under the name secure.newsfarm.ams2.highwinds-media.com responds by sending a certificate which is meant for *.sslusenet.com, which does not match the server name.
The UntrustedRoot part is suggestive of a certificate chain which begins with an untrusted root certificate -- i.e., a chain which proves nothing to the client.

So it is like bypassing a security warning on a HTTPS Web site. This is vulnerable to active attackers.


Why is ECC more vulnerable than RSA in a post-quantum world? Forgive me if this should be in the crypto sub, but sometimes the answers there are very mathematical and I would rather have an answer which is a bit lighter on the math.

I was watching the Cryptographer's panel from RSA 2013 and at about 33 minutes in they mentioned that ECC is more vulnerable than RSA in a post-quantum world.  Can somebody explain why ECC is more vulnerable to RSA in a post-quantum world?

The current challenge in building a quantum computer is to aggregate enough "qubits", entangled together at a quantum level for long enough. To break a 1024-bit RSA modulus, you need a quantum computer with 1024 qubits. To break a 160-bit elliptic curve, which has a "similar strength" (with regards to classical computers), you need something like 320 qubits. It is not that elliptic curves are intrinsically weaker; on the contrary, they still seem somewhat stronger than RSA for the same "size". Rather, the strength ratio for a given size is not the same when considering classical computers versus quantum computers.


How is the initial request made to the Access Server in Kerberos? I'm trying to understand how Kerberos works, in particular how the initial client sends a request to the Access Server. Some YouTube videos I've seen say the initial request is partially encrypted using the client's password. First, what is meant by "partially" encrypted? Second, considering a password is just an arbitrary string I didn't think it could be used as a symmetric key. Can any string be a symmetric key? I thought it's a special process to derive keys.
In another video I heard the message is not encrypted but a nonce is used to prevent a replay attack. If this is the case, how exactly does a nonce prevent a replay attack? The initial request must contain the password/hash, otherwise where's the actual security from any machine requesting a ticket?

Note that it's the Authentication Service, not access service.
Why wouldn't a password be capable of being a symmetric key? It just needs to be the right length. Since Kerberos doesn't require users passwords to be a certain length what actually happens is the password is passed through a key derivation function (KDF). This output is considered the user long term credential. Both the client and AS need to know this long term credential.
What happens is the client sends the AS-REQ and the AS responds saying the user needs to do pre-auth. The client will resend the original request, but then the client will encrypt the current time to the long term credential and stick it in the pa-data list. This is the partial encryption bit. Only the timestamp is encrypted where the rest of the message is cleartext.


Wi-fi security using WPA or WEP In current years we have used WPA and WPA 2 for the encryption of data sent over an 802.11 network. But in the past WEP is used . From time to time, many people say that WEP (Wired Equivalent Privacy) is a rather poor way of protecting data sent over an 802.11 wireless network.  Is there any reason behind?  What is the advantage of using WPA for the encryption of data sent over an 802.11 network ?

WEP has a flaw that renders it essentially unsecure. If you look at How does WEP wireless security work? it explains in better detail.

WPA(2) has fixed that vulnerability but they also suffer from their own problems.

WPA significantly less secure than WPA2?
WiFi WPA cracking with Reaver
How to get hold of and use WPA session keys?


Is my browsing history on the server hidden when I use a VPN? I am a client within a server in a school.
My computer has a static IP address to enable me to connect to the internet.

We have a server that records the browsing history of the computers that are connected.

If I use a VPN, will this prevent capturing my browsing history in those logs?

I'll assume it's your own computer, because you likely wouldn't care about your IP being static otherwise.

If you use a VPN, your network activity is encrypted from you all the way to the VPN service.  They're not going to see it, but they'll likely know you're using a VPN if that matters.  This is one of the primary functions of using a VPN.

Just make sure to check https://www.whatismyip.com/ before browsing to make sure your VPN is working correctly.


Why does Spamhaus' CBL blocklist return records for 1.1.1.1 and 8.8.8.8? I'm looking up ips with the following code

import dns.resolver
resolver = dns.resolver.Resolver()
resolver.timeout = 0.10
resolver.lifetime = 0.10
resolver.nameservers = ['127.0.0.53']

searchIp = '8.8.8.8'
ipRev =  '.'.join( searchIp.split('.')[::-1])
searchQuery = ipRev+'.'+'cbl.spamhaus.org'
resolver.query(searchQuery,'A')

The above returns

>>> resolver.query(searchQuery,'A').response
<DNS message, ID 11379>

And not what I would expect;

dns.resolver.NXDOMAIN: None of DNS query names exist: 8.8.8.8.cbl.spamhaus.org., 8.8.8.8.cbl.spamhaus.org.

Is there caching happening? Or is there a problem with the way I'm doing the lookups? Because this really looks like a very obvious false positive?

It might be useful to take a closer look at the answer you get instead of just seeing that you are getting a successful answer back:

searchQuery = ipRev+'.'+'cbl.spamhaus.org'
print resolver.query(searchQuery,'A').response

results for me in:

...
;ANSWER
8.8.8.8.cbl.spamhaus.org. 172732 IN CNAME blocklist.address.is.wrong.spamhaus.org.
blocklist.address.is.wrong.spamhaus.org. 172732 IN A 127.0.0.2

A quick search indicates that you'll get this kind of answer when using a non-existing blacklist. In fact, looking at spamhaus.org shows no information about some CBL list. There are SBL, XBL, PBL or DBL lists but no CBL. So you are using a non-existing list. Switching instead for example to sbl.spamhaus.org gives you the expected dns.resolver.NXDOMAIN.


If you mistakenly try to access a website with an unrelated username/password, do they record your logon data? I use KeePass with auto-type, and once in awhile (when tired, etc.) I'll accidentally launch a similarly-named entry's URL and try to logon with the wrong U/P. This question is unrelated to KeePass per se.

I'm just wondering if attempted logons are recorded and logged by the "wrong" site, allowing site admins to see an unrelated logon which they might abuse.

They could be, phishing sites are set up to do exactly this.

On non-malicious sites, this would be generally be considered poor practice, but there is no reason why they couldn't, beyond user privacy regulations.


What algorithm should I use to avoid the error "ERR_SSL_WEAK_SERVER_EPHEMERAL_DH_KEY"? I got a CA cert by submitting my CSR from GoDaddy, after applying a certificate to my Tomcat web server. When I access my website using Chrome or Mozilla I face the error:

  ERR_SSL_WEAK_SERVER_EPHEMERAL_DH_KEY

I invoked the following command for the CSR generation process:

 keytool -genkey -alias mydomain -keyalg RSA -keystore mydomain.jks -keysize 2048 -sigalg SHA256withRSA
 keytool -certreq -alias mydomain -sigalg SHA256withRSA -keystore mydomain.jks -file mydomain.csr

How can I solve this?

That warning is caused by the size of the group used for ephemeral Diffie Hellman key exchange being too small. So small that the symmetric keys can be extracted by academics.

The certificate does not affect the size of the group used for DHE. The configuration of the web server does.

Currently the recommendation is that the group size in bits should be as large as the RSA key for the certificate, usually 2048 bits, and in any case no smaller than 1024 bits. Also, you must generate your own group, not use a predefined one, or else 1024 bits is not enough.

Make sure your server does not support intentionally weak "export" crypto - that means 512 bits.

Use Qualys tool to check the server configuration.

Java docs.


Can a site with HTTPS be impersonated if it's visited for the first time? From https://doesmysiteneedhttps.com/:

  "Attackers can still impersonate my site, even if I use HTTPS."

  They can try, but as long as your private key stays private, browsers
  will show warnings if attackers present a mismatched or invalid TLS
  certificate. And if the attacker does not use HTTPS at all, browsers
  should mark the imposter page as insecure. To this end, HTTPS
  guarantees authenticity.

But what if the site is visited for the first time? Wouldn't the certificate be downloaded for the first time so the fake one will be seen as the legitimate one by the browser?

Web TLS certificates are not "trust on first use" (like SSH is often used), they are "trust by webpki", which is a kind of "cached trust on first use".

Your browser only accepts certificates signed by one of a few hundred Certificate Authorities (either the list curated by Mozilla, or the one by Microsoft or the one by Apple), which should not issue a certificate for your domain to anyone who is not in control of your domain.

If everything is working as expected, the attacker cannot get a certificate for your site that is signed by a CA the visitor's browser trusts.

To get a certificate for your domain that the visitor's browser trusts, the attacker needs to either:

get control of the webserver (in which case TLS gives you no protection), or
be able to read mail sent to one of a few special mailboxes ('admin', 'administrator', 'webmaster', 'hostmaster', or 'postmaster'), or
get control of the authoritative DNS server for the domain, or
get control of the DNS server for the eTLD, or
social engineer the registrar or get control of the registrar or
compromise a trusted CA (or sub-CA), or
have control of a private CA that is trusted by the browser or the OS on which the browser is running (this is often done in large corporations).

All of those are supposed to be too hard to do.

From that list, compromising the web server is by far the easiest. The one that happens second most often is that IT admins from your company can MitM your connection from your work computer because your work computer often has a private root CA installed that is controlled by company IT. That is considered a feature.

The rules for web certificates are spelled out in the CA/Browser Forum Baseline Requirements. Browsers use the rules for TLS (which are in the RFCs and affect private/corporate certificates too) + the CA/B BRs (which are for publicly trusted certificates).

I wanted to add that if on first visit the visitor get to the site using a http:// link and not an https:// link, and you rely on the site redirecting the browser from http:// to https://, the redirection might be stripped by an attacker. To combat this, you can add your domain to the HSTS preload list. If the site is on the list, browsers won't try to use plain http and will only try to use https, as if they have a valid HSTS header for that site, but even for the first visit. Of course, if your site's TLS breaks, your site will be completely unavailable, like in a pinning suicide, so be sure you have your certificate renewal 100% reliable before you do this.


Why do websites store passwords' hashes not their ciphertexts? Every time we discuss passwords and hashing functions posters immediately bring up how hashing functions can be cracked and we should avoid MD5 .. etc
Hence we have use strong passwords and salt and other measures to avoid brute force and rainbow tables .. etc

In the same time every time we discuss TLS people point out that it's almost impossible to break the encryption used and how secure TLS is..

Why do we need hashing functions to store the passwords in the database then? let's just have them encrypted instead? since it's was safer and let the user enjoy using weak passwords.

Assuming that we use an asymmetric encryption algorithm, securely generate public and private keys, then discard the private key.

My understanding is that you feel that passwords would be safer if they were stored by having the site:

Generate a unique public/private key pair.
Immediately dispose of the private key in a secure manner.
Encrypt the password with the public key.
Store the public key and the encrypted password in the database, similar to the common practice of storing the salt and hashed password.

Your statement that this storage model for passwords would be safer than modern techniques is false. While this approach does have the irreversibility quality that is essential for password storage and has adequate pre-computation defenses, it lacks the performance defenses needed to prevent even a simple dictionary attack.

Modern password storage hashing algorithms like bcrypt and scrypt are designed to be slow to execute even in the face of specialized hardware. On the other hand, encryption algorithms are designed to be as performant as possible. So an offline dictionary attack to crack passwords that were encrypted with a public key will be much faster (likely many orders of magnitude) than a similar attack trying to crack bcrypt or scrypt hashes.


WPF Hide ConnectionString in MyApplication.exe.config file (or hide the whole file) While building my Project I got a new file called MyApplication.exe.config.
This is the Content of App.config (I guess) where I also included the Connection to a DataBase in <ConnectionString>.

The problem is, that the ConnectionString will shown in this .exe.config file.
Is there a way to hide the .exe.config file itself (So that my Project just have the .exe and it's .dll's)?

And How can I hide the <ConnectionString> Section ?

Last time I tried to encrypt my App.config, there was the problem that I can't run the same program on other pc's (I guess cuz of RSA).

Im currently in education as an Application Developer so sorry for bad knowledge.

As described in your comment you habe two databases for your application.

They have the following purpose:

authenticating the user
user specific database with data or so for your application

For authentication you should not give the user access to the database where all users are stored. There are multiple solutions.

1. Solution

If you first database only stores the information about user authentication you could use the authentication provided by the database(server) and give the user only access to the database on the server with there data

2. Solution

The databases are on different servers and you use the first database only for some kind of protection of your app usage. You could make a simple Rest Service where the user login is sent (over https) and the result tells your app if the user is allowed to access your app or not (this can be bypassed also like your database solution since the app runs on the users maschine)

Dangers of your solution

You can't really hide the connection details from the user since they could start man-in-the-middle attacks and capture your credentials. Or just search for the string in the application code (you can finde strings in exe files).


How do I customize /proc permissions? So that:

Only process owners, and root, can access information about their processes,
Or, at the very least, cmdline permissions are only readable by root, and
My system (CentOS 6.x) still runs

Why do I care?

I was just talking to a few developers who I think of as knowledgeable people, and only one out of the three of them knew that, by default, command line arguments for running programs are world-readable.

Incidentally, the topic came up because I was mocking one of them (my brother) for passing a password via command line and he didn't get it, and now I'm worried idiots well meaning but misguided developers might have written programs I actually use, and my authentication tokens might be stupidly and wantonly passed via command line by some of the OSS I have running on my box.

Extra credit

If you could provide solutions for other *nix flavors that don't use /proc but do allow command-line listings (e.g. FreeBSD) , that would be much appreciated.

On Linux kernel 3.3, this is done with the hidepid= and gid= mount options for /proc (to be added in /etc/fstab). See this answer. Possibly, some distributions which use older kernels may have backported the patch.

On FreeBSD there is a sysctl flag for that, called security.bsd.see_other_uids. See this documentation (search for "see_other_uids").

I am not sure whether other Unix-like systems have similar features. Apparently, back in 2011, there was nothing of that sort in OpenBSD (that's what I infer from that discussion).

One may say that such things matter only if you let hostile people run their code on your machine, which is the traditional "Unix mainframe" concept, but increasingly irrelevant nowadays. In 2014, when people who don't trust each other share the same hardware, they actually run virtual machines which don't see each other.


Techniques for Writing Encryption Algorithms (Exclusively For Personal Use) I'd like to preface this question by stating that I fully understand the dangers of writing your own encryption algorithms, and I would never, ever, use homemade encryption to secure the data of anyone except myself.

Today I was assigned a computer science semester project that brings together everything we've learned into one program. Part of the functionality of this program is that it can encrypt and decrypt Strings. We have to write these encryption methods ourselves, so we cannot use anything built into the language we are using (Java). Finally, we need to avoid anything that uses a key for encryption.

Now, after talking to some of my classmates, it seems like almost everyone is using ROT13 or another similar method. Because I'm an overachiever, and because I don't want to be like everyone else, I want to design my own method of encryption. However, I'm a bit lost in where to start. So, what basic or advanced techniques are there for encryption?

If you're generally interested in cryptography beyond your project:

It depends what type of encryption you wish to do. Huge caveat: this answer is only about pointing you in the right theoretical direction. I highly recommend doing a lot of reading before jumping in - the more you read the more you will understand how previous ciphers were broken and not make the same mistakes.

Public key

For operating a public key system you need a trapdoor function. Unfortunately, the advice on wikipedia is pretty accurate:

  Several function classes have been proposed, and it soon became obvious that trapdoor functions are harder to find than was initially thought

Trapdoor functions are pretty hard; trapdoor permutations (where the output and input sets of the functions are the same and as such the function "permutes" the input inside the set) are even harder. Roughly speaking, the prime factorisation problem and the discrete logarithm problem are two "big ones". Chances are in this field, using an existing one is going to be by far the easiest approach.

Symmetric Key

Symmetric key algorithms are deliberately reversible, but without one of the inputs (the key) are designed to be very difficult to reverse. The underlying idea is the confusion/diffusion principle. Common techniques in modern ciphers include substitution permutation networks and feistel networks. You should also consider reading up on block cipher modes of operation.

Right, great, where should I start?

By reading - as much as you can. I dislike the standard advice "don't design your own crypto". I think people should try if they want to. But I cannot emphasize enough how hard it is to get right. As you've a limited amount of time for your project, one technique might be to use a simple example of an existing cipher, so:

For your project

As an educational exercise RC4 is very easy to implement. Once upon a time (not so long ago) this was used to protect SSL/WEP traffic - sometimes it is still used, so you'd be using a real cipher. It does have some security issues - understanding these will also help you for your general crypto-education. However, as your requirement is less absolute security and more learning, I would have thought it would be ideal.

If you're feeling quite ambitious and know your language well, AES is also not that hard to implement in ECB mode. FIPS-197 is quite readable and generally explains the algorithm in a fairly accessible way.

You are right to consider ROT13 a poor example. Even not knowing the offset of each character was 13 places, assuming you use ASCII you just try each of the 127 (or 255 for extended ASCII) offsets of your cipher-text until the right one drops out. To decrypt it is therefore pretty trivial, even without the key.


Is there a inherent security threat to having border security receive your passwords? There have been a number of cases when border security officials have requested passwords to mobile data devices as indicated in the questions US and Canada border crossing and computer privacy: What do I need to know? and Do I need to provide PIN or password for my digital accessories, when entering Canada? .

I am wondering even if you have nothing on your device to hide (clean install with innocent activity logs), your user account is a restricted account, your WiFi switch is off and the network drivers are incompatible and the firewall blocks all network ports, the battery is flat and your charger is checked in and the USB ports deliver excessive voltage when the unit is working.

Assuming that officials have your password and have the machine out of your view for some moments how easy would it be for them to leave some residual compromise on your system that would be a pain to detect?

EDIT:
In response to answers and comments.
I am hoping to determine if it is worth owning a device after it has had the 'greasy' hands of border security on it.  I tried exclude the external data vectors, assume you have dropped super-glue in the USB connectors on phone and laptop USB connectors generate 350V spikes on the data lines.

My worry was more in the line of can they simply try and connect it to a local WiFi sniffer to determine the MAC address or some other meta-data and say track you later on now that the device ID is positively linked to your passport (identity) for future data aggregation.  I suppose the real question is how much damage can they do by seemingly doing nothing?

Personally I may not get chance to travel to US or Canada but would possibly use a sacrificial phone and junk it after my visit to such countries, I'm just wondering what advice to offer friends who travel that are not quite as security concious.

I suppose for my friends and I there should be an alternate question that does not include physical hacks to our daily devices just to harass border guards but might simply include a software/firmware tidy up check-list.

SECOND EDIT:

It looks like I should add Australia to the list of countries that one needs to be wary of.  In this case it looks like it took 90 minutes for the officials to work their way through a phone and laptop that had been unlocked and it looks like the phone was tampered with.

If you gave me your phone and password for 30 seconds I could install a Remote Access Trojan completely undetectable to the common user that would give me remote access to the phone just like I had it in my hand unlocked (ie. listen to the microphone, access all files, pictures, text messages, calls, ect).  If I can do that I'm sure any government is capable of the same.

So if they did that to your brand new phone, they could access any new information on it as you entered their country.

So yea, I'd consider that a bit of a security issue.


Sharing a message broker between remote systems We are currently exploring solutions to push/synchronize data between two systems (in two separate networks) in "near" realtime.

The solutions are somewhat limited :

Some kind of RPC mechanism : HTTP "Web Hooks", gRPC, SOAP, whatever...
Sharing some kind of message-broker/queue (Apache Kafka, RabbitMQ, NATS...)

From what I see, most message brokers are like databases : they implement a minimal level of security (credentials and sometimes TLS), but they rely mostly on network security.

Question : is there a secure way to share a message-broker between two remote systems ?

All I could think of was either putting an application in front (hence falling back to solution 1.), or using a VPN.

Anything that secures the connection will do.

The most compatible option using a layer 2 or 3 VPN to connect the two systems (and firewall them properly against anything else): unless you're dealing with a really, really strange protocol, you're pretty much guaranteed to be able to make it work. The downside is that it can be delicate to configure that on cloud-based hosts and it doesn't scale well.

The second option, as you guessed, is to use TLS connection between machines, That will depend heavily on what software you're using but TLS is a pretty common option and you can usually configure it for mutual x509 certificate authentication which will give you a pretty good level of security. Note that all HTTP-based RPC will be able to use TLS and that forcing mutual authentication is typically a matter of configuration.

The third option is to enable encryption inside the message broker architecture.  Contrary to what you wrote, many message broker system will allow you to configure end-to-end encryption at the message level. It's usually not really trivial to implement, however. for instance, take a look at WebSphere's help page on that subject. The main advantage of that option is that messages are encrypted at rest as well as in transit and that means the message queue system doesn't have to be able to decrypt the messages themselves: all it requires i^s the correct enveloppe data.


Subresource Integrity versus signing The draft spec for subresource integrity is straightforward:

  This document specifies such a validation scheme, extending two HTML
  elements with an integrity attribute that contains a cryptographic
  hash of the representation of the resource the author expects to load.

Such a solution is a very static one. If a reliable provider wants to change their JavaScript, they have to update the integrity hash and distribute that to all possible users. In essence the object at that address had better never change, ever. If you update your resource, you should give it a new address along with its new hash. (Which makes me think about IPFS, but I digress.) In the (nearly) worst case the clever, but ignorant web developer will dynamically generate the hash from whatever document is being hosted at any given moment.

I'm skeptical of this approach, though – I can send you a document signed with my private key and you, having my public key, can trust the pedigree of that document as much as you trust my public key to be mine. Is there no way to leverage asymmetric key signing to provide a better experience for web developers without undermining security?

Hypothetically, what would be the security impact if (instead of SRI) the following behavior were baked into web user agents:

A primary web server response would include a list of public keys mapped to its subresources. Those resources would be expected to be signed documents. If not, or if the signature doesn't match the expected key, the user agent would take protective measures similar to what the SRI draft spec proposes.

Ultimately I'm trying to understand how providing static hashes of each document is better than key signing in this case.

If a reliable provider wants to change their JavaScript, they have to update the integrity hash and distribute that to all possible users.

Not if the caching policy means that the referer will not be cached for longer than the referee. It's another strong argument for using long expiration times for static content and injecting a variable into the URL. I think (would want to spend some thinking time on this, and testing) that using mod_pagespeed's extend_cache would deliver the desired result without having to wait for browser developers to implement SRI. If smart 404 handling at the origin (i.e. creating a cacheable response rather than a 404) then the heavy lifting could be done on the CDN rather than at the origin.

My immediate thought on reading about SRI was that it should be an extension to CSP indicating what resources are allowed to reference a content item (rather than specifying what content items a resource is allowed to reference). However, IME, most browsers (Firefox is a notable exception) do not have bulletproof referer handling. The only way I can see asymmetric encryption being of any use would be to associate it with the referer mechanism.


Can public keys in digital certificates be used to verify name of certificate holder? I recently had a conversation with a teacher who argued that in a digital certificate (x509), the public key is used to verify the name of the certificate holder.

From my understanding, there are actually 2 public keys at work in this scheme:

1) There's the public key contained in the certificate, which belongs to the certificate owner, and can be used by others to encrypt things that only the certificate owner can decrypt, or be used to check the signature of things encrypted by the owner (i.e the usual public-private key verification).

2) The public key of the trusted certificate authority which signed that certificate, which is not contained in the certificate itself but can be obtained through other means (i.e local certificate stores) to verify if that certificate is indeed OK (by checking the signature of the certificate).

The first key can in no way be used to verify the name of the certificate holder, because it would be equal to me claiming I am named Bob and having no proof to it.

The second key may be used indirectly to verify the name of the holder, but by verifying the integrity and authenticity of the certificate as a whole (i.e someone else objectively testifying that my name is Bob). But this key is not part of the certificate itself. Through logical assumptions, the only public key in the certificate, which is the first key, cannot be used to verify names.

Am I correct in my assumptions in that there is no way of using the public key in the certificate to verify the name of the holder? Or is the teacher right and I am missing some crucial detail?

You are mostly correct.

The public key of a certificate is not used to proof any information in the certificate itself. The public key of the issuer CA instead can be used to verify the certificate signature which encompasses both the certificates public key, subject, expiration, usage, extensions etc.

But even with the issuers key the name of the certificate holder cannot be verified. It can only be verified that the issuer CA has signed the certificate. Only if one believes that the issuer has properly verified that the name in the certificate actually belongs to the entity who submitted the certificate request one can assume that this is the name of the certificate holder. In other words: issuer key is not enough, but issuer key combined with trust in issuer is needed.


Finding environment variables with gdb, to exploit a buffer overflow I have to exploit a very simple buffer overflow in a vulnerable C++ program for an assignment and I am not being able to find the environment variable SHELL.

I have never worked with BoF before, and after reading lots of similar questions, posts, etc. I have this information (correct me if it's wrong):

The program stores the environment variables in a global variable called environ
I can find the address of this variable like this:

(gdb) info variable environ
All variables matching regular expression "environ":

Non-debugging symbols:
0xb7fd1b00  __environ
0xb7fd1b00  _environ
0xb7fd1b00  environ

I need to find the /bin/bash string in that variable to launch a shell (I have already got the system and exit addresses, I only need the route to the shell). And here is where I don't know what to do. I have been reading gdb tutorials, but still nothing. x/s 0xb7fd1b00 does not output anything useful.

environ is a pointer to pointer, as it has the type char **environ.

You have to try something like:

(gdb) x/s *((char **)environ)
0xbffff688:      "SSH_AGENT_PID=2107"
(gdb) x/s *((char **)environ+1)
0xbffff69b:      "SHELL=/bin/bash"


scada honeypot guide help With the recent vpn filter attacks, and talks about the hackers wanting to attack our SCADA systems in the U.S. I want to setup a honeypot to monitor the attackers and learn more about how they operate. I found this link but think it may be outdated since it talks about ubuntu 12. Does anyone know of any modbus scada honeypot guides out there?

https://www.hackers-arise.com/single-post/2016/09/22/SCADA-Hacking-Building-a-SCADA-Honeypot

One of the main problems about ICS Honeypots has always been the variety of deployments that are out there. Anyway, you have some opensource ICS Honeypots that are under continuous development: One of them is Conpot (which is the one used in your post). It is python based, so you shouldn't have problems deploying it in a newer Linux distribution (or you may deploy it in a container fashion, which works great).

You should find that Conpot simulates most of the industrial technologies you'll need.


How to prove flyer was (not) authored by specific person? Let's say we create a flyer in some desktop publishing software (e.g., InDesign, Illustrator), physically print it and post it somewhere.

We don't want inauthentic claims of authorship.

Is there a way to, say, put a [?] on the flyer that only we could have generated. Or, that someone claiming to author the flyer cannot prove they generated.
(We are fine in revealing ourselves if we have to prove we generated it, it's more to defend against others claiming they did.)

Or should it be a message that no-one can decrypt?

This might be a simple public key problem, but if someone could list specifics of how we'd do it, it'd be much appreciated!

With a digital signature you might claim ownership of a piece of data, but usually not to your own advantage. A digital signature works like this:

The key owner generates a public/private key pair (two mathematical objects sharing a common structure).
The public key is made public (hence the name) while the private key is kept private (the structure is such that revealing the public key does not allow recovery of the private key).
A signature is computed over a given piece of data using the signature generation algorithm, which relies on the private key.
A signature value can be verified over the piece of data, using the signature verification algorithm and the public key.

The signature somehow proves that the owner of the private key was involved in the process since knowledge of the private key is needed to produce a signature value that the verification algorithm will accept. The signature value is mathematically tied to the data that was signed, and thus cannot be transported to another piece of data. Certificates (hence PKI) are a method to bind identities (e.g. your name and physical being) to public keys, so that other people may learn (with some strong guarantee of reliability) what your public key actually is. Certificates themselves rely internally on signatures.

Now this does not really solve your problem. As I wrote, signatures can be used to claim ownership; by signing a piece of data, you demonstrate that you were involved, but nothing prevents you from signing a file which was "produced" (in some way) by somebody else.

The normal way of using signatures is to endorse: by signing something, you accept to be bound (in some way, possibly legally) to the contents of what you signed. That's not what you seek here.

A better candidate is time stamps. Authorship really is defined relatively to time: you are the author of some work because you are the first one to have come about it. So you want a proof of anteriority.

A Time Stamp Authority is some service who signs (with a digital signature) a structure containing the current date and time (as known to the TSA) and a piece of data (actually a hash thereof, but that's a technicality). The TSA, by that signature, guarantees that the piece of data existed at the specified date. So what you want to do is to submit to a TSA a structure which contains your artistic work (the "flyer") and your name; and the TSA will issue a time stamp which proves that, at some date T, the flyer was in your possession.

If you do that before publishing the flyer, then other people will not be able to obtain a time stamp for the same data, with their name, and a date prior to T. If the earliest proof of possession of the flyer bears your name, then you will be reputed the "original owner", i.e. the author.

In practice, what you do is the following:

Take the artistic work as a file F.
Create a text file called README.txt with your name in it.
Put both F and README.txt in a Zip archive.
Obtain a time stamp from a TSA.
Keep the time stamp and the Zip archive somewhere. In case of dispute, show them to the judge.

Whether such a scheme would hold in court is another matter. Legal matters are their own world. My technical feeling is that a time stamp done that way is a rather strong proof element, but whether it will be sufficient depends on jurisdiction, local laws, and, crucially, how well the used TSA does its job.

There is a non-computer equivalent to the time stamp; it is called a Soleau envelope. If you take your flyer in printed form, and put that in the Soleau envelope along with a sheet of paper stating your name, then that would be a good start for ulterior authorship claims.


How to keep data private where software requires an online check When software forces a user to verify online (phone home) before use, it creates an opportunity for private data created with this software to be physically connected to the Internet.

This may not be a big deal for some, but what if the data is sensitive or worth thousands of dollars? Even if the data is stored on a second drive that isn't plugged in, this doesn't mean there isn't an unknown exploit storing it on the OS hard drive.

Without requiring user to be a security expert, assuming their may be an exploit in the OS or in a running app, is there an absolute way to protect personal data created with an app requiring an online sign in?

When software "phones home" for licensing, it is exposing its own internal data to its developer, it's not exposing the data you created with it. The data you create are in separate files that are opened with the software.

If, on the other hand, you suspect that the software is intentionally also sending your private data to an off-site location, that's a separate issue that has nothing to do with "online verification before use" because the software could be doing this at any time. This situation is a trust issue, and can be verified with network monitoring.


Should I use a thumbdrive I got on a conference in China? I (from EU) recently attended a scientific conference in China. As part of the goodies there is a decent looking thumbdrive which has the conference logo printed on it. It seems to be in original packaging, so I guess somebody ordered them to be made with the logo from the manufacturer directly.

I am a bit wary about getting thumbdrives that I did not ask for. For instance there was the RSA conference where the vendor screwed up loading the conference material onto the drive and and there was malware on it was well. Additionally I have no feeling on whether intelligence services use this opportunity to get a bridgehead into various university networks.

As I do not need a thumbdrive, I will likely just not use it myself. But is that overly paranoid? Should I just gift it to somebody else?

This is primarily an opinion based question so there's a good chance it'll be locked - but I'll give my two cents ahead of whatever that verdict ends up being.

The general rule of thumb is: if you are suspicious - don't use it; and if that's why you're not using it, don't just give it to someone else for them to use. My recommendation would be to see if there is somewhere near you that recycles electronics, or if you happen to know any security minded person that wants to take a look at it for fun you could give it to them and be up front about its origins.

Formatting the drive from a controlled machine will get rid of a most of your run-of-the-mill malware - but for USB devices specifically, the main issues arise from the firmware. Your computer doesn't communicate directly with the flash memory on the stick - it communicates with the controller first. If it's a cheap device, chances are it likely has cheap/malformed protocols handling things under the hood - and then of course the worst case scenario is that they've been maliciously configured. It's fascinating what can go wrong with USB (any USB, not just the flash drives) so I highly recommend doing some googling just to see - if you're interested.

As an example: you can get all kinds of different firmware on a USB stick - say, you plug it in and part of it has been designed to behave like a keyboard, which your computer will recognize as a keyboard and automatically install - only, this false-keyboard also has keybinds it has been programmed to run, which - given the amount of keyboard shortcuts and available commands, and depending on the level of access the user of the keyboard has - can do just about anything.

Treat your device's physical security just as you would when configuring a firewall - deny everything that you are not explicitly OK with.


Is using the concatenation of multiple hash algorithms more secure? Is it more secure in practice to use the output of multiple hash algorithms instead of a single one (assuming that the output size is the same)?

By secure, in this context, I mean protecting against both collisions and function reversibility.

One particular example would be using 128 bits from SHA-512 plus 128 bits from MD5 instead of using 256 bits from SHA-512.

My intuition is that, theoretically, this would weaken the function, because there are known attacks against MD5 which, effectively, would reduce the output size of the combined function. However, in practice, is it more difficult to find a collision/inversion for both algorithms at the same time - because it'll involve additional theoretical work as opposed to using existing (or upcoming) published ones?

EDIT:

To clarify, I'm simply asking about the basic properties of irreversibility and collision resistance - not about any particular use of hash functions, such as key derivation from passwords (there's excellent coverage about that in other questions) or using the output as unique identifiers.

Another way to phrase this would be "is a hash function defined as the concatenation of two other hash functions better than those?". Also, I'm (somewhat) aware that, information theoretically, it can't possibly be.

You don't mention what you're using the hashes for, but it appears likely that your intent is to use if for password verification.

So, the first issue to clear up is the concern that a given algorithm might be found to be susceptible to collisions.  Collisions are not a threat to password hashes, and even if an algorithm were susceptible to collisions, that doesn't weaken it for the purpose of password hashing.  For password hashing, we're worried about pre-image attacks instead...Being able to find the input that was used to create a given hash.

Today, the primary mechanism to attack password hashes is a dictionary-based brute-force attack. You hashes as many possible inputs you can, as quickly as you can, to determine which input results in the hash you're trying to match.  Thus, the most desirable feature of password hashing function is slowness.  You want to ensure that it takes as long as possible for an attacker to test the inputs required to find the correct one.

So, now that we understand what we're looking for, let's take a look at your proposal.

If you hash the password twice, with SHA-512 and MD-5, and truncate to 128 bits of each, and concatenate them together, for all intents and purposes, you're giving the attacker two hashes to work with.   In many cases, the security of a hash isn't terribly reduced by truncation, as long as the resulting length is reasonable, which 128 bits likely is.

This means that you're taking two fast hash functions (SHA-512 and MD-5 are both far too fast to be effective password hash algorithms) and offering the attacker the opportunity to choose which one they would like to use to crack your hash.  In this case, they're certainly choose MD-5, and feed inputs into it, truncate the hash to 128 bits, and match it to the MD-5 portion of your hash, and as soon as they have the match, there's near 100% certainty that they also have the value they need to compute the SHA-512 portion of the hash on a single try.

So, not only does this specific construction not improve security, but it actually rather significantly cripples it instead.  While there are other potential constructions that could prove to increase security, it's not a simple matter to get it right, so if you really want a reasonable assurance of security, use a proven construction like bcrypt with a reasonable work factor.


Windows 10 FIPS140 Bitlocker without using System Cryptography policy We have an app that makes use of Non FIPS compliant AES256 System.Cryptography calls. My question is, can Bitlocker be FIPS140 compliant on a PC, but not need the FIPS algorithm set for .NET calls?

For the U.S. Government (VA), are told we need the policy enabled for FIPS, Policy Editor --> Security Settings --> Local Policies --> Security Options --> System cryptography: Use FIPS compliant algorithm ... enabled. (We are also told this coincides with: Set the Enabled value to 1 in HKLM\System\CurrentControlSet\Control\Lsa\FIPSAlgorithmPolicy, which is what the PC image folks are doing.)

The good news is that this changes the Bitlocker config so that Recovery passwords are not created or backed up.

The bad news is that .NET calls to Non-FIPS compliant APIs result in a hard exception: "This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms.
 Stack:    at System.Security.Cryptography.AesManaged..ctor()" It might not be so tricky to refactor, but this actually is vendor API code, so we have to arrange with them to re-code.

I have reviewed this a few times.
https://technet.microsoft.com/en-us/library/cc750357.aspx

As well as this:
https://security.stackexchange.com/questions/152538/full-disk-encryption-and-fips

Ultimately, we changed the app. We switched the app code to use AesCryptoServiceProvider to replace the AesManaged we had been using. AesCryptoServiceProvider uses the underlying Windows CryptoAPI to perform the encryption. AesManaged performs the encryption in pure managed code. Advantages to using AesCryptoServiceProvider include potential for higher speed and the fact that CryptoAPI is FIPS certified (AesManaged is not, and is the source of the crash). Once the Windows 10 has the FIPS encryption policy, the old encryption calls are blocked in .NET. There was much debate about whether app level encryption is necessary and no one could be pinned down. The answer that probably would satisfy auditors would be, "If you never had it before, and now FIPS140 Bitlocker is enabled, you are covered. If you did have app level encryption before, you need to replace it with a compatible compliant encryption." Side note, we verified that AesCryptoServiceProvider can decrypt the AesManaged encryption, and vice versa.


How can I inject real php code into this website? So I found a file uploader on example.com. The file uploader accepts every file extension and the file is uploaded inside the directory

/temp/random-numeric-id.php

I tried to upload a php file and it got uploaded, however when I access that file, the content of the file is read as html comment. For example, I uploaded a file with content <?php print(123); ?> and when I visit example.com/temp/111111111.php I see a blank page because my php code has became the following:

<!--?php print(123); -->

Is this some kind of protection mechanism? How can I bypass this to execute my print functionality with php on that server?

This is... strange. My guess is that you are right in that this is some sort of protection mechanism, but it doesn't look like a very stable one. A better approach would be to block files with .php or similar extensions, and on top of that turn off PHP execution in that folder.

So can this be exploited, and if so, how? I am not sure, but here are a few things to try:

Different PHP tags (<?, <?=, <%, <%=, <script language="php">).
Insert whitespace and try different cases, e.g. <?PHp or <? pHp. (Not sure if the PHP engine will recognise this, though.)
Leave out the closing tag, try nesting tags inside tags, and so on.
Maybe it only does the replacement for PHP files? Then you could use .php5 or .phtml or similar instead.

To figure out a bypass (if there is one), you need to guess how the system works and test your theories. E.g. if you suspect it simply replace all < with <!--, send in a lone < and see what happends! Don't be afraid to experiment. Trial and error is your friend.


Can website see my payment information? So I decided to purchase a service in website which only accepts payments where I need to enter my debit card information. Now connection is secured with TLS 1.0, so no 3rd party can observe my payment data, but what about website itself?

Edit: I need to enter Card Type, Card Number, CCV number, Expiration date, etc., all the regular stuff when purchasing using credit/debit card without using 3rd parties like Paypal.

Can it see my debit card number and if yes, then it can collect it and store that information?

If you enter your credit card data on a website then yes, the website can see your credit card data.

If the website redirects you to PayPal, and then you enter your credit card data on PayPal, only PayPal sees your credit card data and not the original website.


SAML Security Question I have a SaaS app (App), and it has established SAML trust relationships with two of our clients, Acme and Foo.

Acme users log in to App through an IdP-initiated flow. Foo users also log in to App through an IdP-initiated flow. Accounts in App are identified by email address, say jdoe@acme.com and rsmith@foo.com.

A bad actor at Acme decides to create an account in their IdP identified by rsmith@foo.com. Then the bad actor tries to sign in to App with that account (an account called "rsmith@foo.com" that lives in Acme's IdP). How do I prevent that?

In other words, I want the trust relationship between App and Acme to be limited only to accounts @acme.com, and the trust relationship between App and Foo to be limited only to accounts @foo.com.

In other other words, if Acme's IdP tries to authenticate a user that "belongs" to Foo's IdP, then I don't want to authenticate that user.

Each SAML response includes an issuer field identifying the IdP. Furthermore, either the SAML response or assertion is signed by the IdP's private key so, as long as the signature verifies, you know who sent the SAML response.

If your SP receives a SAML response from Acme it should make the additional check that it includes an @acme.com email address.

In general, the SP can reject the SAML response if it doesn't contain the user identity information it requires or this information is invalid from its perspective.


How to allow access from just one IP in htaccess I have a public hosting server. I want to give access to it only from one specific IP address. Since it's a public hosting I don't have access to its infrastructure or apache configuration. I can create .htaccess file only. Based on that can I create a truly secure firewall to accept request from specified IP address only?
Does this .htaccess setting accomplish this?
order deny,allow
deny from all
allow from xxx.xxx.xxx.xxx

Is it possible to have access from other IP address?
Or maybe someone can make fake requests signed as from xxx.xxx.xxx.xxx client?

If you allow from one IP and deny the rest (once you get the syntax correct), then only the one IP can connect.
Another computer can spoof that IP, but then all traffic would end up going to that IP and not the one trying to connect.


I ran a netstat on my server and port 80 is listening, does that mean it is open and vulnerable to attacks? Sorry I am just getting into Web Development and trying to learn more about servers and PHP, so I downloaded the LAMP stack on an Ubuntu14 OS and started an apache2 server.

tcp6       0      0 :::80                   :::*                    LISTEN      -

This is the line in my netstat -anltp | grep LISTEN I am curious about.

Port 80 is the standard port for web servers. It is supposed to be listening for people to connect to it with their web browsers. That is how it works. All web servers are targets for people to hack, so technically yes, you are open to attacks-- But that is the nature of a public web server. You install things like firewalls and intrusion detection applications to cover yourself when you set one up. If you add SSL, it will be listening on port 443 by default as well.


Unknown proxy blocking connections over port 8080 For the past two weeks, I wasn't able to use some of the software installed on my computer (e.g. Visual Studio). There is a process that is communicating with IP address 185.82.212.95 over port 8080. All of the packets from this IP are stuck in SYN_SENT status. Because of this, I can't even install a plugin on Visual Studio.

When I looked up the owner, this is what I found.

This IP address is tied to many processes when I look it over netstat -nab output, over the same port.

How do I identity if this is really a virus?
How do I find out which program is actually using it (the one from the task manager is svchost.exec which I don't think is true)?
How do I uninstall this program if it is a virus?

On some IP abuse websites, this IP address is marked as spam. For example, check this out:  Link

Any help would be greatly appreciated.

Thank you.

I've done some digging for you and although I am not 100% sure this is the case it might be worth checking out. Since you did not specify what operating system you're using, I am going to assume it is Windows.

A quick port scan reveals the following:

5222/tcp open     jabber       ejabberd (Protocol 1.0)
| xmpp-info:
|   STARTTLS Failed
|   info:
|     unknown:
|
|     stream_id: 6622689145227766353
|     xmpp:
|       lang: en
|       server name: localhost
|       version: 1.0
|     capabilities:
|
|     features:
|
|     auth_mechanisms:
|
|     compression_methods:
|
|     errors:
|       host-unknown
|       host-unknown
|_      (timeout)
5269/tcp open     jabber       ejabberd
| xmpp-info:
|   STARTTLS Failed
|   info:
|     unknown:
|
|     stream_id: 10375863078716023551
|     xmpp:
|       version: 1.0
|     capabilities:
|
|     features:
|       TLS
|     auth_mechanisms:
|
|     compression_methods:
|
|_    errors:

This confirms that a jabber server is running on the host. The malware Win32/Jabberbot.A for example uses the XMPP protocol.

  How do I identity if this is really a virus?

The data you looked up and posted here seems a fair indication that something malicious is going on.

Things to consider:

Block the IP address using a firewall (Windows firewall)
Install / update your anti-virus scanner and execute a full scan.

If the used anti-virus software doesn't find anything, try one or more other anti-virus scanners.


SSL session ID in TLS ticket based resumption We have a server which supports TLS ticket based stateless session resumption. However, when I connect to the server using openssl s_client, I still see a session ID being generated along with the TLS ticket. What is the significance of this session ID and can it be used to resume the session?

What is the significance of this session ID and can it be used to resume the session?

You always get an ID.
You may establish more than one session with a server. The ID tells them apart. It's basically an index into a table where the server will find all necessary keys/etc. for that session.
The client can TRY session resumption by supplying the old ID during the handshake. But the server can just ignore that attempt and issue a new ID instead. Which is just what happens when that particular ID has expired from the server's ID table (session cache). It doesn't cost the client anything extra to try resumption.
Further reading

Section "TLS session resumption" here: https://istlsfastyet.com
Related question here

Update 1. Empty IDs
I don't really understand this. Maybe some SE-user can expand on this.
I don't really understand the interaction when both IDs and Tickets are enabled. So I decided to read that section in my copy of "Bulletproof SSL and TLS":
(quote is from Chapter 2. Protocol | Extensions | Session Tickets)

Note
When a server decides to use session tickets for session resumption, it sends back an empty session ID field (in its ServerHello message). At this point, the session does not have a unique identifier. However, the ticket specification allows the client to select and submit a session ID (in its ClientHello) in a subsequent handshake that uses the ticket. A server that accepts the ticket must also respond with the same session ID. This is why the session ID appears in the TLS web server logs even when session tickets are used as the session-resumption mechanism.

And having read this, now I'm not so sure anymore that I actually understand the concept of the session ID.
Anyway, the relevant section from the session ticket RFC is 3.4.  Interaction with TLS Session ID.
And this seems to say that session IDs either don't exist or don't matter when tickets are in use. Dunno.


Can my father's smartphone be compromised? My father told me that he allowed the installation of apps from unknown sources when he was asked to do it to go further with something (he said that he doesn't remember when or what he was doing).

In android 8.0 (the version of his smartphone) we can allow third-party installation for individual apps, so I went in this tab and I saw that only Google Chrome was able to this type of installation.

So, I navigated through my father's apps and found nothing suspicious.

When I went to files, I found a folder called didi. Inside, a file with no extension called psnger_encrypted or something like this. When I selected the file to see details, I accidentally clicked on the file. Android told me that there was not found any app to open that file.

Could a file have been executed even when Android says that message? If this file is malicious, it is possible that has executed and so infected the phone?

Doing some research, I found that a chinese app called "DiDi" has a file called "psnger" too. Also, I found a file in my father's phone called .omega.key, and this file is also seen in topics related to DiDi app.

The fact is that I can't find this app on the phone, and I'm looking for ways that can indicate if the phone is infected. I executed AVG, and Malwarebytes but both detected nothing. What else can I do?

Tapping a file without an extension will not run it so you are safe there.

If you have unexplained apps or files on your phone and you suspect malware your only good course of action it's to re-image/reset the phone to factory defaults.


Guest user on Mac Book Pro is suddenly on. Was I hacked? Today I restarted my Mac book Pro and the guest user was on when has always been off before.

Apparently was turning on "Find My Mac" that turned on the guest account:
https://discussions.apple.com/thread/4145011?start=0&tstart=0


Can a security job be cracked without OSCP? I have my B.Tech in Information Technology with CEHv8 certification. I have 2 years of vulnerability assessment experience and 1.5 years of python automation experience. I am not able to crack any security job interviews.

I mainly look forward for Application security but I had worked only for web application assessment and have experience on XSS, clickjacking, poodle, heartbleed and CSRF. I get rejected in penetration testing interviews because of lack of OSCP or mobile security testing experience.

OSCP certification is bit costly for me and I am not sure how much time I can spent daily for it since I work for python automation right now.

My plan was to get into a security role and then do OSCP, so that, I could spent time on it, I would be able to practice with experience as well as mainly I can reimburse the certification cost in the company.

Are there any suggestions for me on how to achieve or proceed with my career dream? Is certification must or can I go with some other certification or something else? What effort do I need to put? I am well versed in Python.

I am a penetration tester; I got my job without an OSCP but I was studying for it. That, however, was not relevant.

I emailed every single CREST (UK) company I could (CREST provides a list, but I only got 1/4 of the way down the list before I got interviews), no generic emails.

I explained my situation, my interests and my goals.

My tips for you:

do as many CTFs as possible; hackthebox is a good CTF. You may have high interest and some background but you need to show and talk about that interest.
email all the small companies, applying for a big company probably will not get you anywhere
make all of those emails personal and attach your C.V. (make sure your C.V. is security focused and clean)

The little guy is always willing to invest in the little guy.


What are the implications of using a hostel wifi via a Facebook account? Recently, while travelling, I cam across a hostel which offered wifi, that was authenicated by a facebook or instagram account (as instagram is part of Big Evil Blue, I ask only about facebook in the remainder of this post) instead of the traditional wifi password.

Apart from an interest of how this works at all (authenticating via facebook), I have some questions on this:

What is the motivation/incentive for the hostel to do so? Is it in any easier/cheaper for the hostel to do away with the traditional method of wifi passwords?
What is the motivation/incentive for facebook to offer/maintain the infrastructure? Or, is there any infrastructure involved?
What is there to loose for the user? Clearly, there is some data to be slurped, so be imaginitve in your worst case scenarios.

Bonus question: What may be measures to stop the neighbour of the hostel to use the hostel's wifi with his/her facebook account?

Ill Try to Answer your questions precisely.
What is the motivation/incentive for the hostel to do so? Is it in any easier/cheaper for the hostel to do away with the traditional method of wifi passwords?
Answer: Assuming that the hostel owner has a big heart and wants to give free wi-fi access to the public, he needs a way to authenticate(recognize actually), every user, so that he can be answerable to the authorities, if any illegal thing happens through his network. By using FB Open authentication, he knows the user(actually FB does and the owner is trusting FB).
What is the motivation/incentive for facebook to offer/maintain the infrastructure? Or, is there any infrastructure involved?
This is Open Authentication. Check this for details.
What is there to loose for the user? Clearly, there is some data to be slurped, so be imaginitve in your worst case scenarios.
Answer: There is nothing much to lose for the user, provided the owner is not using phishing tools to lure the user to use FB authentication. If it comes to phishing, the adversary can steal the password and further may try other sophisticated methods like social engineering attacks, to cause damage of various other natures.
What may be measures to stop the neighbour of the hostel to use the hostel's wifi with his/her facebook account?
Answer: Technically, you can block any user to use the wi-fi services by blocking that particular user(by username or mac address).


Is it a real security benefit if a host uses static IP Addresses for authentication? As my knowledge about information security is not THAT good and Google did not give me a satisfactory answer I would like to ask the community here:

I am working for a company offering online services (as an ASP) where high-value target information of customers is stored (e.g. confidential documents of different companies).  Access to the backend (source, database, and so on) of the application (root) server should be protected as good as possible. Now our host suggested to only allow certain static IP addresses as part of the authentication process, to make it more secure.

So my first question is: Is there a REAL security benefit in this measure OR not? (Beside the fact that it may be a bit harder for attackers to get into the backend as they must know of the measure itself and the required static IP Adresses, also think of IP Spoofing and high anonymous proxies)? If not, please give me a reasonable explanation as the stakeholders of my company want to force every programmer in the company to get a static IP address for their home internet connections ;-)

Second question: If there is a REAL security benefit in this, is there a real difference regarding security between getting a static IP address from my Internet Provider directly and renting a static IP from a service like http://dyndns.com/ or http://www.noip.com/ [as this is cheaper ;-)]?

@Edit: You cannot rent a static IP for this purposes from dyndns/noip, but from VPN service providers as e.g. strongvpn (http://strongvpn.name/static_ip.shtml).

I'd say that there can be a benefit from using static IP addresses.  Essentially if at the firewall you can say "only allow traffic to this port from these specific IP addresses" then there are a number of effects.

An attacker scanning the Internet for vulnerable hosts is unlikely to detect the service and therefore be able to attack it
An attacker who is more determined will have to compromise a host which has one of the allowed IP addresses to get access to the service.  Depending on how the list is configured this would be more or less difficult.  For example if one of the IPs is a proxy server which allowed anyone in a large company to get to the service then the benefit is reduced as there's more systems for the attacker to try and compromise. However if it's server-to-server then the attacker has a likely harder job.

As to IP address spoofing, on the Internet this is an overplayed risk (IMO).  Spoofing TCP based services (e.g. HTTP) is impractical on modern Operating systems.  UDP services can be spoofed but you need to know information about the receiving service so it's still likely to be an impractical attack for most attackers.

As to rented against ISP assigned, I'd say there's not a major difference although there is a risk with rented that after the rent expires someone might forget to update the ACL so you end up with more systems than necessary having access...

So overall I'd say it's a reasonable part of service security, although I wouldn't rely on it, on it's own.


Is a keytab sufficient for logon? Is possession of a Kerberos .keytab file (as generated by e.g. ktpass) sufficient to 'pretend to be' that user on a windows machine? For example, create a process as, or access network resources (e.g. a share) as that user?

If so, are there tools that can demonstrate this?

FWIW - I have been able to demonstrate that possession of a .keytab file for user X:

is sufficient for a client to authenticate themselves as user X to a SPNEGO web service.
seems to be sufficient for that SPNEGO web service to impersonate user X (a local logon occurs) but with limited (ie impersonation, not delegation) privileges. Can I go further and actually delegate?

A Kerberos keytab file is roughly equivalent to a saved version of the relevant password.  It contains the shared secret key of the service.

Therefore, someone with access to a keytab file can kinit from it and obtain Kerberos tickets of the related user (or service), just as if they had that user's password.

I'm not enough of a Windows expert to know how to demonstrate this on Windows.  On Unix, you'd use something like kinit -k -t keytab_file principal_name.


Why do some ransomware executables run on VirtualBox? Even though they appears to have anti-VM capabilities? I've downloaded some latest samples of ransomware executables from cerber, locky, and other family of ransomware

Why do they still execute in the virtualbox environment? It is a fresh new virtualbox with no hardening to evade malware analysis. Given the latest versions, aren't they supposed to not run in the environment because virtualbox itself being a VM, should be evaded by them at the first place?

Please advise, thanks!

These days with prevalence of virtualization in organizations, a good deal of production systems are setup as virtual machines so it is not a good strategy anymore to skip virtual machines and not infect them.

For example this old report from Symantec shows that the malware is infecting virtual machines (Symantec Report).

Malware authors try to incorporate other mechanisms to bypass automated analysis and detection and these days being run on a virtual machine on its own is not a pointer of a sandbox or analysis environment being present.
For example by sleeping for long periods of time before starting the operation or waiting for user interaction you can evade sandbox (or Detonation Boxes) in some intrusion detection systems, and of course this  is a cat and mouse game where we try to design sandboxes and analysis environments that can't be detected by malware and malware authors try to come up with new methods to detect these systems and prevent detection. (Detecting Malware and Sandbox Evasion Techniques by Sans)


How to defend against attacker without affecting other users of same NAT gateway I am implementing a web service and have a daemon process that notices repeated failed login attempts from any given source.  If too many occur the IP address is blocked for a given time.

This is similar to the fail2ban or (now deprecated) denyhosts packages.

My concern is if the bad actor is behind a NAT gateway for a large organization (a university or Fortune 1000 for example) then the ban will affect everyone behind that gateway, not just the one station running dictionary attacks.

Is there any viable method for avoiding that side effect?

UPDATE: I changed the title as per suggestion and it occurs to me that this problem applies to nearly any kind of attack, not just the dictionary attack I outlined.

Your solution is easy to config/code, but not so fair as you stated the ip could be for not only one person.

You could come with following alternatives:
1:
If the attack is for one particular user(let say user a), so after some failed logins disable the account and send an email/notification to the user to activate his/hers user, and/or activate the account after 24 hours of last attack.
Disabling the account means reject both fail and correct authentication for the given user, and instead of saying this account is disable, or wrong password, state it's invalid username or password.

2:
After some attack from the ip, ask for captcha for next login attempts, and always check the captcha first. If the attacker starts to continue attacking with vary IPs to skip the captcha, then act more smart and ask for captcha of every requests(assume it's code-security for your server).
Captcha(if it's good enough really) makes you sure the attacker is not robot(which 99% is).
Even if the attacker could get over the captcha, go back for the plan 1 again, disable the user becasue of too much fail logins.


How to store banking information,collected on website, securely and implement encryption? So I have this website in which I will ask users to input the following banking information.

Bank account holder name:
Bank account number:
9 digit routing number:

I need these information from users to pay them by check. And it's necessary for me to store them on my server (I'm using Apache) and display it to admin only.

I've very very limited knowledge of security and encryption.

Please tell me how to make this secured as this isn't sufficiently encrypted. Maybe there should be additional password protection on the page where this info is display?

Oh and does PCI standards apply to banking info as well or just credit card info? If it applies to banking info too then I need to make sure I follow requirement #3 and #4, correct?

Here is the technology I'm using:

Server:
Apache

CMS:
Drupal

Frameworks:
PHP

Please help!

You aren't in scope of PCI for having bank account numbers. You might face other regulatory requirements including general data protection issues depending on your region and business type.

That said, many of PCI requirements make for good guidelines when you are designing and operating an application that handles sensitive data.

So, from the viewpoint of app architecture, you might consider issues like:

putting the database on a separate server, potentially with network boundaries between them
encrypting the data, using a key that isn't stored in the same place as the data; potentially, tokenisation (even if manual)
separating the admin interface from anything accessed by a wider userbase, potentially on a different server, and enforce access restrictions in a reliable way (eg firewall rules)

and so on. The aim being to ensure that a compromise on a widely-available interface (eg public web site) doesn't spread to give full access to the sensitive data in the database.


Why did Google sign every auxiliary app inside "Google Chrome.app" (OS X version) except for one? $ codesign -dvv /Applications/Google\ Chrome.app/Contents/Versions\
/46.0.2490.80/Google\ Chrome\ Framework.framework/Resources/app_mode_loader.app/

/Applications/Google Chrome.app/Contents/Versions\
/46.0.2490.80/Google Chrome Framework.framework/Resources/app_mode_loader.app/\
: code object is not signed at all

You may need to adjust the version number after "/Applications/Google Chrome.app/Contents/Versions" to match yours.

We can't sign the app_mode_loader bundle because it's altered at runtime
  as new app mode loader stubs are created. We can sign just the
  executable. The resulting executable won't validate in its bundle
  normally, and spctl won't like it, but it can be verified with
  --ignore-resources, or in isolation from its bundle.

https://codereview.chromium.org/1486863003


Windows groups and permissions: Authenticated Users group meaning What is the purpose of the "Authenticated Users" group in Windows?
Under Linux it doesn't exist and I'm starting to think this is another idiosyncrasy or over-engineering of the Windows operating system.

Here is why:

Assume I want to know what rights has the user Mike on disk C:\, I will type:

net user mike

and will be returned:

User name                    mike
Full Name
Comment
User's comment
Country code                 000 (System Default)
Account active               Yes
Account expires              Never

Password last set            7/13/2013 7:55:45 AM
Password expires             Never
Password changeable          7/13/2013 7:55:45 AM
Password required            Yes
User may change password     Yes

Workstations allowed         All
Logon script
User profile
Home directory
Last logon                   7/13/2013 7:53:58 AM

Logon hours allowed          All

Local Group Memberships      *Users
Global Group memberships     *None

I therefore assume the user mike belongs to group Users only, so I will check the security tab with a right click on the disk C and will see that users belonging to the "Users" group cannot modify the disk c but only read it.

Surprise surprise however, user mike will be able to write to C:\ !!!
Why? because the command net cannot know it but mike also belongs to the Authenticated Users group which has right to write on C:!!

Can someone confirm the above story, comment whether it makes any sense or as I doubt it is a case of over-engineering and elaborate on the reasons behind this?

EDIT:

Notice the net command correctly shows groups if I create a new group and add user mike to it.

 net localgroup testgroup /add
 net localgroup testgroup mike
 net user mike

returns

[*]
Local Group Memberships      *Users     *testgroup
Global Group memberships     *None

There are a number of special groups in Windows. Included among these are Authenticated Users, Interactive Users, Everyone, etc. These days, Everyone and Authenticated Users are effectively equivalent for most purposes, but if you had a pre-2003 domain level domain that would not be true.

In any event, there is no way to observe the membership of these groups. In a sense the membership is calculated when a SACL or DACL is processed.

That said, it seems strange to me that you would be assigning permissions in the file system to authenticated users, especially C:\.  A more appropriate setting would be Interactive Users or, if you're locking down workstations, read only.

The technical definitions of these two, according to Microsoft, are:

Authenticated Users:

  Any user accessing the system through a logon process has the Authenticated Users identity. This identity allows access to shared resources within the domain, such as files in a shared folder that should be accessible to all the workers in the organization.

Everyone:

  All interactive, network, dial-up, and authenticated users are members of the Everyone group. This special identity group gives wide access to a system resource.

You can find these for yourself, along with all others, here:  http://technet.microsoft.com/en-us/magazine/dd637754.aspx


{Secure} Telnet connect to a console server from webbrowser I've got a terminal server set up in a data center that also serves as a console server. This console server only accepts regular telnet requests. To this server are a bunch of routers and switches connected with console cables. For example, to connect to a router I telnet to the server's public IP-address and a port. I need this action to be taken place from the webbrowser: telnet://ip-address which will open an external terminal application on my PC.

It is not unknown that telnet is an incredible nonsecure communication protocol. My question therefore is: how do I telnet to my console server via a webbrowser in a secure way? If I force my webserver to do this via HTTPS, will this be secure enough?

If the webserver is running on the same box as the telnet system (or directly connected on a physically secure connection), then you could safely relay information to the webserver and have it relay it, via telnet, to the system that you want to talk to.  The important thing to realized, however, is that your communication is only protected between your system and the webserver.  The web server's connection is still unencrypted and open to being snooped on unless that network is under your control and otherwise protected.

If this provides sufficient security for you, an alternate (and possibly easier) approach would be to setup a simple VPN to the network and allow telnet traffic over the VPN.  VPN is more natively designed for this kind of forwarding and can be configured to encrypt traffic.  It would allow you to use a telnet client of your choice on your PC instead of having to use some funky web based interface.