Standard for securing web server to client connections via HTTPS on the local area network

The security is security, no matter the network zone. Yes, there are not so much potential attacckers for LAN-only server, but it's not just leveraged, but hightened by the network speed : one lan attacker on strong/stable/guaranteed 1Gbps speed can try as many passwords, as 100 attackers from the WAN/WWW/Web with unstable connection speed, for example. Use exactly the same techniques and criteria as for a public web server and you will be just fine. I'm using the next checklist working with web servers:

Only 256 bit strong ciphers
Explicitly disable old, weak and export ciphers
Make a DH params at least 4096 bit long and specify them by pointing to a file
Make your cert with 16384 key, SHA512 hash. You can use it as a single-domain-name certificate, and you can optionally make it signed by a trusted CA.

The way when you use one cert and routing clients via DNS seems to be proper one for you, but option4 with your own CA seems to be a way more secure(and laborious, sadly) because you will be able to get a client certificate to every client in your network: it will prevent a lot of "my-pass-stolen" cases. But if you'll be implementing Option4, make a single CA for all of your lan's - it will reduce a work amount not touching the security it provides.


It depends on the class of the switch, for example:

Wifi routers and home routers have LAN Isolation, however this one is usually disabled by default
Layer 2/3 campus class switches usually have ARP filtering, but if it's not enabled than you can spoof MAC or IP address from different VLAN (you can use same MAC or different one for any IP address). The one I mean here is the one implemented at the Layer 3 gateway.
Some new campus like switches (as of 2016) have LAN Isolation built-in as well, however it's not enabled by default, which helps with ARP spoofing
Some networks require IEEE 802.1X authentication to connect to the port, usually corporate equipment must be used and not private one. This is very often preventing ARP spoofing but not always, depends on how it is used, sometimes it's easy to defeat.
Some networks have MAC learning and do not allow spoofing (e.g. allow only specific MAC on single port), this is quite rare but existent. So this works by monitoring the switches and blocking attackers.
Some networks might require you to supply you MAC which is configured for the port, and this way it can also prevent from sending malicious ARP requests / responses
Depending on switch vendor there might be other features helping with ARP spoofing, usually at Layer 2 switch like Dynamic ARP Inspection.
It is quite easy to make switch policy so that each customer port can exchange packets only with router port without need of LAN Isolation feature, however not many people do it


Why can I read the response to this CSRF attack?

Ahh!  I think I can explain.

foo.com can navigate the browser to any page or domain.  Thus, foo.com can submit a form that posts to localhost, even though that's a different domain.  No problem.

After navigating to a new page, the browser will happily display the contents of the new page to the user.  For instance, after submitting the form to localhost, the browser will happily display the response from localhost to the user.
This is not a same-origin policy violation, because the response is shown to the user, not to foo.com.  The user is trusted and is not restricted by the same-origin policy.  The same-origin policy only restricts websites, not the user.

At no point does foo.com get to read the response from localhost.  The browser will show the response from localhost on the screen, but foo.com can't read it.  That is what the same-origin policy forbids.

So, in summary: the same-origin policy doesn't prevent one site from navigating the browser to another site.  It doesn't prevent one site from triggering a request to another site.  However, it does prevent the first site from reading the response to that request to the second site.


Why will the syscall will hang for 1min when the Linux audit subsystem reach the backlog limit for the first time?

The waiting is done here.

On a recent kernel, you could use auditctl --backlog_wait_time 0 to set audit_backlog_wait_time to 0 to avoid this, but it seems there's nothing we can do on older kernels (e.g. 3.10.104).


How to Determine if Keylogger is Running on My Windows System

Take a look at this thread. Slightly different topic of discussion, but the answer also answers your question. As was stated in that thread, no anti-virus program can detect every key logger, especially given that there are numerous different ways and languages that could be used to create a software based key logger, assuming that's what you're asking about. Some AV software will detect a key logger simply by identifying it as a known key logger by hashing. Some will also detect key loggers by identifying that a process is behaving like a key logger.


when people say a file has a checked md5 hash, what exactly does that mean?

The idea of the md5 hash is that it is a hash of the entire file - which will be different if any bit is changed. Not sure what you mean by 'dissolve it into bits' because that is all a file is - a series of bits.

When you download a file, you can get the md5 hash of it on your own machine, and comparing that to the md5 provided online you can reassure yourself you have the correct, unmodified file.

Have a look at this question on the value of a hash of a file.


Firefox is uploading lots of data during startup

Firefox has provided a list of things to try here to disable connections on startup. The entire list is a bit long and it covers things such as auto-updates, diagnostics, network detection etc. You can try disabling each setting to see if said connection stops.

As you are probably aware, your sample connection points to Amazon AWS cloud service. This means this could be anyone using Amazon's services, including Mozilla. It'll be difficult identifying who this belongs to unfortunately.


What is the actual value of disabling remote root login using ssh?

Just off the top of my head:

If user's credentials are compromised, locking out that account in the user directory is much quicker and reliable than editing /root/.ssh/authorized_keys on all systems to remove that user's key.
Linux auditing daemons distinguish between "uid" and "effective uid". Users who ssh in as themselves and then sudo to gain privileges will be seen by the audit daemon as "user bob acting as root" vs just "user root" if they ssh in directly as root. Having an audit trail that goes back to the user performing the actions is important.
You can require a 2-factor authentication token for sudo. While this can also be done on the sshd level, this requires a 3rd-party patch and significantly impacts usability, as this can't be just enabled for a group of users.


Is it safe/correct to grant full access to Everyone on a Windows symlink?

I'm going to say no, with a symbolic link its only linking to a file on the system like a shortcut and all its designed to do is act as a bookmark for easy access from whatever location you put its shortcut at. In this case the only thing that COULD happen to your symbolic link is that if you don't put permissions other people on the system could potentially copy and or delete it but the original documents would be fine.

I did this once on Linux with a Minecraft server at one time and a rogue admin with FTP access thought he was going to "kill" the server by deleting it but unaware to him it was only a symbolic link he had killed and not the entire directory.


Do websites outside of the EU need to consider GDPR?

they are built into the web!

No they are not.

The WWW defines functionality - but its use is optional. It is a convenient and well understood mechanism for supporting sessions over a stateless protocol, but are a cornerstone of monetization.

  Are there legal implications [arising from the GDPR] for a publicly available website

For a website run by EU based operators - yes.

For a website trading within the EU yes - yes

For everything else - ask a lawyer.

  Are there any sane alternatives to cookies when it comes to authentication

Cookies are not used for authorization - they are used for session maintainance - i.e. associating subsequent requests with a previous authentication.

But leaving that aside for now, yes - there's http authentication, client certificates, many roll-your-own-cookie implementations using other client persistence mechanisms and Javascript, device fingerprinting, various flavours of evercookies... But as a user of a service you don't get to choose.

Further, if you read the original articles, the guidance relating to EU Data Privacy - even the legislation prior to GDPR, you will be aware the references to "Cookies" are a translation to a terminology people will be more familiar with. The law applies to any persistent data placed on the client. If a website wants to use the window name to store a session id, then it needs informed, opt-in consent from the user to do so.


What is the "segment size" when using Cipher FeedBack (CFB) chaining mode?

The segment size refers to how much plaintext is encrypted by the output of the AES encryption operation.

AES has input and output in 128-bit blocks, and CFB mode converts the block cipher into a stream cipher using an IV, outputting 128-bits of stream at a time.

In segmented modes, only a portion of that stream is used. For an 8-bit segment size, only the first 8-bits of stream are used to encrypt 8-bits of plaintext. The remaining 120-bits are not used. Those 8 ciphertext bits then become the last bits of the input block.

How the remaining 120-bits of input block are generated depends on the implementation. They may even be unchanged from the original IV. The common alternative is to left-shift the previous input block by the segment size, this is the method described in Wikipedia for CFB segmented encryption.

Segmented encryption is obviously not as efficient as using the entire output block. Doing this allows synchronization to occur when data of a certain size is lost.

The following diagram is extraced from NIST Special Publication 800-38a that describes the segmented encryption operation:


How do I build a secure signing mechanism on top of HMAC

Technically, HMAC is a MAC, not a signature. Some people get the terminology wrong (in particular Microsoft's documentation) and call HMAC a signature, but things are clearer if you use the right words.

HMAC, when used with a secure hash function (say, SHA-256, but SHA-1 is fine too), is resistant to forgeries; that is, the attacker cannot succeed in computing a valid pair (m,h) where h is the correct HMAC value for message m, even if the attacker has access to many pairs (m',h') (where all m' are distinct from m). In particular, the attacker cannot guess the HMAC key, because obtaining the HMAC key would allow him to create a lot of forgeries.

Salts, and PBKDF2, make sense only if you envision that exhaustive search on the key might work. Salting and slow hashing (PBKDF2 does both) are mitigation measures to make life harder for the attacker in that case. In your scenario, the HMAC key is "strong", i.e. immune to exhaustive search (e.g. it is a sequence of 128 bits obtained from a cryptographically strong random source). Therefore, salts, PBKDF2 or other ritualistic elements won't make it any more secure. HMAC is already fine as it is.

Note that in the case of cookies, several users may collude and exchange their HMACed cookie values. A user could also record a cookie value, and send it back to you afterwards, even if the server sent him a newer cookie value. Depending on your usage context, this may or may not be a problem.


Return address incorrect (buffer overflow)

Since you are using gdb, set some breakpoints before main returns. Try executing step by step. Notice how 0x39783039 came to be the return address and see where it came from. Getting familiar with your tool will help you tremendously.
In this case, you have a typo in your python script which is sending "x90" repeatedly instead of NOPs. So, it is three times as long as you expected. Thus, the intended NOP sled is still overrunning right through the return address.
Remember that 0x39783039 is "90x9" when unpacked in ascii.


tl/dr: Although you could store the balance in your JWT and it would
  be safe from tampering, there are many ways in which the balance in
  the JWT might be technically valid but still incorrect. Therefore, you are probably best
  off checking the balance in the database everytime, and you certainly
  need to check it before making any transactions

There are two kinds of JWTs:

JWS: Payload is in "plain text" and has a signature to confirm its contents
JWE: The payload is completely encrypted.

These have slightly different use-cases.  If all you need to do is verify that the data stored in the JWT is correct and has not been tampered with, then a JWS is fine (presuming you implement it properly and verify the signature on all requests).  Therefore, you could store the balance in a JWS and later confirm that the reported balance is what you originally stored.

If you also want to keep the data private, then you can use a JWE.  The encryption will also guarantee that the data is not modified (again, assuming you properly implement the JWE).  Note that the only person who normally has access to the JWT is the end user,  so we're talking about keeping it private from them - probably not necessary for your use case (h/t EdC).

Therefore, the balance is safe from tampering.

In either case you should check the balance with the database before making an actual transaction though because:

The balance might still be wrong. If another transaction was made without updating a JWT, or if an old JWT is presented (aka a replay attack), then you can have a valid JWT that has the incorrect balance.  This is very likely even without active attackers.  Consider a user who uses more than 1 app.  In your hypothetical scenario, what happens if a balance is stored in a JWT in one device, and then the user logs into another device and makes a transaction?  The data in the JWT for the first device is now incorrect, even though the JWT itself is valid and has not expired. This is just one of many ways in which valid but incorrect JWTs may happen.

There are many possible ways to fix issues with outdated data in a JWT, but in the end those fixes might be more work then simply checking the database every time.  However, that's a balancing act that ultimately is up to you!  There isn't one right answer there.


Why not use a commonly used application to do it? VeraCrypt is a good choice as it replaced the respected TrueCrypt application and allows you to create an encryption container that you mount as a drive.


how to do internal subdomain enumerations in corp network?

Internal DNS are widely configured to authorized zone transfert in the internal context.

you can use the tool fierce for example. It makes an initial AXFR request (zone transfert) or use dig @myinternaldns axfr mydomain.com

If these tools don't work, your company is not allowing internal zone transfert for security reasons and you should not try to pass over the internal security policy without asking them


Is there anything I am missing?

Yes, there is something you are missing. I'm not familiar with Node.js but I can guarantee you that there are existing implementations of authentication and authorization libraries.

Using an established library will save you  a lot of headaches when it comes to protecting against the edge cases so make your life simple and pick a well-vetted library and use it.


Keyless entry security systems and HIPAA implications

Physically, it isn't difficult to make them read at a greater distance - get a decent antenna and power level and you can make it work. Some people locators in offices do this - not for access control, but for logging as you pass through doorways.

There is a very good reason why this is not done for access control - it presents a couple of considerable security risks:

With close proximity devices You require the person to be at the door scanner for it to register, so the card holder is the one entering. With a longer distance, someone else could when the card holder is nearby.
At close range, or contact, the signal strength is very low, which reduces the risk of an attacker picking up identifying information for reuse themselves**

**Had a play with some kit ADT were demoing on Thursday - a proximity cloner for RFID access cards. Hidden in your sleeve it could take 2 seconds to clone an access card in your target's pocket, and then can retransmit it to the door scanner!


How to convert 64byte openssh-key-v1 to the resulting 32byte ed25519 private key

In an OpenSSH 'new format' keyfile (as also in the SSHv2 protocol) the number of values, each with 4-byte length, after the 'type' (formally algorithm-name) in a publickey is always 2 but (like the privatekey) it varies: 2 for RSA and ECDSA, 4 for DSA, 1 for Ed25519.
For Ed25519, the privatekey (after the name) has 2 length-prefixed values: the first is a copy of the publickey (32 bytes), and the second is what is labelled the 'secret' (private) key in the code, but actually is 64 bytes of which the first 32 bytes are the actual private key and the second 32 bytes are yet another copy of the public key!
Compare https://unix.stackexchange.com/questions/466179/show-values-of-an-ed22519-private-key-stored-in-openssh-format .


Submit a pre certificate to Certificate Transparency logs via APIs?

The operation of Certificate Transparency is specified in RFC 6962 and the submission method is specified in sections 4.1 and 4.2. A shortened version:

4.1. Add Chain to Log
POST https://<log server>/ct/v1/add-chain

4.2. Add PreCertChain to Log
POST https://<log server>/ct/v1/add-pre-chain

The format for the POST requests is specified in the beginning of section 4:

Messages are sent as HTTPS GET or POST requests. Parameters for POSTs
and all responses are encoded as JavaScript Object Notation (JSON)
objects [RFC4627].


Is it secure to allow an account to use `test123!` as their password?

You've almost answered your own question(s). First off, it's important to note that password complexity typically only comes into play for offline attacks. As your entropy report showed, a password that can be easily cracked offline would take much longer as an online attack. As for your bank only requiring a minimum of 5 characters, obviously the short passwords could be easily cracked in an offline attack, and as such one could argue that perhaps it would be better practice for them to have a longer minimum password length. That being said, as any bank should, they probably have very tight security on their servers and data, meaning that the chances of someone gaining access to perform an offline attack are extremely low. As long as they have good brute force prevention measures in place for the login pages (lockouts and/or 2-factor authentication for unknown devices), then this could explain why they don't have accounts regularly being compromised. (Though arguably even if they did, they would be individual accounts and likely not publicized anyway.)

Regarding your question about preventing the distributed password attempts, the simple solution is instead of locking out attempts from an IP after 5 failed attempts, just temporarily lock out the account after 5 tries regardless of IPs. This would completely thwart a distributed attack. It does have the unfortunate side effect of potentially locking out the actual user if someone tried to hack into their account, but as the lockout would be temporary the attack would have to be pretty much constant for the user to even notice in the first place. Most attackers would not gain anything from doing this, so I believe you're right that the reason it doesn't happen more often is they don't bother wasting their time on something that has an extremely low chance of success.


Would publishing a network diagram make the network less secure?

If I am attacking a network, having a map helps me target my attack, avoiding possible sensors, honeypots etc and aiming at high value targets or sources  of information.

This can speed up an attack immensely, reducing the defender's chance of preventing it.

In summary, yes this is a security risk!

Update:

To reduce risk, some steps you can take are:

remove addresses, function titles etc
only include sections of the network
post under an anonymous profile
include fake network sections


Can a neighbour who installed my router access it?

Is it possible to remotely connect to the Linksys device?

Yes.
Most routers have an online administrator page that can be accessed externally by visiting your public IP address (go check WhatIsMyIP.com too see yours).
It's even easier internally by accessing the internal IP address of your router, which is in most cases either 192.168.0.1 or 192.168.1.1. If these don't work, you can find this IP address by opening a command prompt by opening start and typing cmd (Windows Vista, Windows 7 and Windows 8) or by pressing Windows + R and entering cmd.

Once the command prompt is open, enter ipconfig and look for the default gateway address under Wireless LAN if you're connected via the Wi-Fi or under Ethernet adapter for LAN connection if you're connected via wire.

If you browse to the address of your router, you shall be greeted by the Lynksys administrative page and you'll have to login. Read the manual or Google lynksys [your model, see box] default login to find out the password.

And see my online activity

This depends. Some routers allow to log the activity of the connected devices. Check the manual or the administrative page of your router for settings like this.
If I were to stalk you, however, I'd connect to your network and run a sniffer. A sniffer snifs all network traffic on the network you're connected on and most of them allow to filter on interesting protocols like HTTP (normal browsing network).

If he knows the password of your Wi-Fi, he can connect to it and sniff your network. Sniffers are tools that listen to all network passing by, even if it's not being sent to you. Wi-Fi is easy to sniff, as wireless data is sent in all directions.

and should I be concerned?

Do you trust this person?

You allowed him in your house and you allowed him to install the device. This means that there is some basic trust between the two of you. Is there any reason not to trust this person?

What can be gained out of doing something like this?
The neighbour might be connected to your Wi-Fi to steal your bandwith, i.e. he downloads movies via your network, so he doesn't have to pay for it. He might also use your network for stuff he wouldn't like to see linked to his own network (for example, criminal activities or surfing to adult websites).

If he's able to sniff your network, he could capture passwords on weakly protected websites (they use normal HTTP instead of HTTPS, which encrypts network traffic). If you suddenly were to see notification of HTTPS-sites being non-trustworthy anymore, although they have always been (e.g. Facebook), then he's trying to sniff the encrypted connection between those websites. If you use other services, like FTP to connect to a fileserver or RDP to connect to a virtual work environment, he could steal those passwords.

By listening on someone's network traffic, it's also possible to collect information about a person's behaviour. Do you check a lot of travel websites, adult websites, cat videos, ... This information could be used to make a profile of you. The advantage of this depends on what it would be used for.

If this issue is possible, how can I defend myself?
If you decided that you don't trust this person, there's a lot you can do yourself.

First of all, undo all possible settings your neighbour made. This means resetting the device.

Unplug all network connections to the device and reset it by sticking a pencil in the hole at the back where it says 'reset'. Hold this for 5-10 seconds. Most devices will notify you of the reset, e.g., with some blinking lights.

Follow the instruction manual of your device to reinstall it. In most cases you'll have to connect a device via cable or via a default Wi-Fi and browse to the IP address I mentioned before.

You'll be able to change the administrative password, name of the Wi-Fi and password of the Wi-Fi. Do all of this. Be sure to use a strong password (8+ characters, capital and small letters and a few numbers, maybe a - or _). And use at least WPA2-PSK protection on the Wi-Fi. Use a generic name on the Wi-Fi that doesn't reveal whose Wi-Fi it is or what device is being used. I like to use names of stores that aren't in my neighbourhood (for example, Starbucks).

Once you've done all of this, you'll have to reconnect your devices. If they're connected by cable, nothing has to be done. If they're connected via Wi-Fi, you'll have to connect them to the new network with the new password.

Whether you trust the person is up to you. But it never hurts to learn something new by installing the router yourself, and it'll give you a more safe feeling knowing that nobody is able to do you harm this way.

Big hint: although this practically does it, reading a manual every now and then might help you.

Next time you need a router, ask a store clerk for one that fits your needs (number of wired connections, does it need Wi-Fi, do you want a wired connection that is guaranteed to get better speed than the others [e.g. for gaming, streaming], ...). When you get home, spend some time reading through the whole manual and then start installing the device with the manual close by.


Your question is a bit vague, however I have used a VM called Network Security Toolkit (NST) that you can read abou and download from here: http://networksecuritytoolkit.org/nst/index.html
NST does a lot so I reccomend loading up a virtual machine and play, er I mean test it out and see how much of your concerns that it could cover. :-)

With your SQL DB and application is it explosed to the web, if so then how. What logging measures and precautions are currently being taken? Is the application wide open to be accessed from any IP? Do you want to limit specific Geographic traffic? Encryption being used in any way on the network, if so how?

Have you been able to identify what kind of attacks are coming from where? If so what are they?


Authenticating a user by verifying a signature

It is unclear to me exactly why you are implementing such a complex authentication mechanism. Homegrown authentication solutions are notoriously difficult to get correct. So my first thoughts are to try and steer you to more standard mechanisms.

In summary, my recommendation is to use username/password for authentication. If you have a good reason not to do that, use SSL mutual authentication. And if you have a really good reason for not doing that, use your suggested method with changing the time stamp to a server-side generated nonce.

Details follow...

Option 1: Simply use username/password for authentication. You don't mention why you're not choosing this more common route. Perhaps you are hoping for a higher degree of security?

Option 2: Use TLS/SSL mutual authentication. This is a tried and true standard supported by nearly every web browser and TLS library. In mutual auth, the client has a private key and an X.509 cert, similar to the server. When the SSL connection is initiated, it uses not just the server's cert, but the client's as well. Both sides of the communication can confirm the party they are communicating with. Unlike the server's cert, the client's cert doesn't need to be signed by a certificate authority. This means it could be a self-signed cert or created by your own certificate authority. All that matters is that the server can validate that it is the right cert for a specific user. My preference is to simply store the cert (really the cert's fingerprint) in the user database. This allows for easy revoking as it just means deleting the revoked cert from the DB.

Based on the limited understanding I have of your project, I see no advantage to your proposed solution over mutual auth SSL. You are recreating parts of the mutual auth protocol instead of just using an established solution.

Option 3: Your homegrown solution. I see no problem passing the nonce in the same message as the signature. As this is done over SSL, only the client and the server could see this information. So it doesn't matter if the server gets the nonce in the message or "knows" the nonce from an earlier part of the conversation. Either way, the server has both the nonce and its signature and nobody else should have access to this information.

As far as defeating a replay attack (what I assume you mean by "rogue digests"), I'm not thrilled about using a client-side generated nonce. I think it is more secure to have the server pass the nonce to the client and then let the client sign that data. This requires an extra round of communication, but as we're discussing long-lived conversations in this scenario, I think this should be OK. Once you move to using a server-side chosen nonce, you can just use a cryptographically secure random number as the nonce and store this nonce on the server. The server can then handle the lifespan of the nonce. Also, I'm not a big fan of using time stamps that span computers as, even in 2016, clock synchronization between server and client can be a hassle.


What is OSINT (open source intelligence)?

Open Source Intelligence is the operation of gathering information about target, from publicly available sources. You don't use anything illegal, you don't get into contact with target so you don't leave trace. In short, you don't do anything to alert the target.

When harmless/unimportant looking publicly available informations about target systematically collected and gathered together, it becomes harmful, especially in social engineering attacks.

Examples of resources for OSINT:

Internet Service Registration – The global registration and
maintenance of IP address information
DNS: Local and
global registration and maintenance of host naming
Search Engines:
The specialist retrieval of distributed material relating to an
organisation or their employees
Email Systems: The information
contained within each email delivery process
Naming Conventions: The
way an organisation encodes or categorises the services their online
hosts provide
Website Analysis: The information intentionally made
public, that may pose a risk to security

Examples of tools for OSINT:

Google Dorks: Sophisticated Google searches, shortly.
Shodan: Search engine for inter-connected devices
EXIF-Viewers: Sometimes you can find very useful information inside photographs
Metagoofil: Info gathering tool for extracting metadata from public sources.

And many others...


Best practice of deprecating old OpenPGP subkeys when migrating to a new subkey pair?

Exchanging Keys on a Regular Base

If you intend to switch subkeys on a regular base (for example yearly, as you proposed), setting an expiration date seems a reasonable thing to do. Unlike expiration, other OpenPGP users will realize an outdated subkey anyway (which will trigger them updating your key, to look for new subkeys). Creating new subkeys in advance might help distributing it, key servers need some time to spread updates (between seconds and a bunch of minutes).

Consider setting up a reminder in your calendar, I often experience people to forget about creating new subkeys. When using smart cards like the Yubikey, remember you cannot download keys created on the device, so consider creating them locally and uploading them instead.

Revoking old Subkeys

Revocation does not necessarily imply your keys are compromised. There's a flag to indicate your (sub)keys are simply superseded and shouldn't be used any more. Revoking a key instead of just forgetting about it will also prevent possible attackers from using leaked keys after a time (this will probably be the reason you want to exchange keys every now and then, so also revoke the old ones!).

Remember revoking subkeys is nothing complicated and does not have any negative impact on certifications you received or issued.

Deleting old Subkeys

I don't see a reason not to store revoked and/or expired encryption subkeys on your "daily-use-computer" any more. You will not be able to read old encrypted messages any more if you do so! Removing the old (private) signing subkeys is not a problem, as only the public key is needed for verification, you will not use the private key any more anyway.


Do the organisational policies need to have ownership to ensure accountability?

Even after your comments, I'm still not sure what you are asking, but I will attempt to provide an answer.
High-level policies are set and "owned" by Senior Management.
Policies exist to assure that business objectives are met. Risks can affect those objectives. There are then risk owners to ensure that there is someone ultimately accountable and resourced to manage those risks.
But there are multiple levels of policies that can apply at different layers of the business. The policies written to be closely tied to the activities that mitigate risks tend to be owned by the risk owner.
So, it is possible to have policies that have a single, named owner, and others that are "owned" by Senior Management. Policies that set a philosophy are high-level policies and are difficult to assign accountability to.


Is it possible to exploit a file upload with whitelist and filename hashing?

Don't trust a whitelist, it can be bypassed:

Content-type: image/jpeg; filename=exploit.php

Hashing the files does not protect you if the attacker can access the file direct:

<img src='http://yoursite.net/images/526a8f9f3497b5a69bc4523ba0c6aacd.jpg>

You could create a PHP script to read the file and send the contents to the user, unchanged. This way, the attacker will never reference the file on your server, and whatever server side exploit he could upload would not trigger:

<?php

$filename = getFilenameFromDatabase();
// e.g: $DOCROOT/images/exploit.rb.exe.py.bat.scr.php.jpg
header("Content-type: image/jpeg");
readfile("$filename");
?>

Just make sure to filter the path to the files, otherwise the attacker can get read access of your files.


The world is your oyster with this one. If you simply need to create one alert use a packet crafting tool like scapy. Testing a rule like this in snort is easy, however, this can work for all types of rules.

alert tcp any any -> any 80 (content:"GET";)

From here, just fire up scapy and at the console type:

send(IP(src="X.X.X.X",dst="X.X.X.X")/TCP(dport=80)/"GET")

Remember you would need to add the appropriate IP addresses to ensure the packet passes by your sensor. The complexity of the rule you want to test(trigger) is only limited by your skill in scapy which is super easy to learn.


Error150 (net::ERR_SSL_PINNED_KEY_NOT_IN_CERT_CHAIN): The server's certificate appears to be a forgery

A quick search indicates that you might see this if your Chrome version is very old.


SCSV is not a real cipher but only a pseudo-cipher, i.e. a hack to notify that the client currently does a TLS fallback. And because it is not a real cipher there is no way to enable or disable it as cipher.


If one user sees an email of another user, is it DSGVO conform?

The best answer can only give a lawyer.

To my knowledge, it mainly depends, if there is a legal base for providing Email address of one user to another user. See the Article 6 "Lawfulness of processing" in DSGVO.

A few examples.

  (a) the data subject has given consent to the processing of his or her
  personal data for one or more specific purposes;

One legal reason can be, that all users gave you a consent that their Email addresses will be available to all other users. This may look simple, but it is not. For instance if you maintain a web site for Anonymous Alcoholics, may be your users will not give a consent to show their emails to other users.

  (b) processing is necessary for the performance of a contract to which the data subject is party or in order to take steps at the request of the data subject prior to entering into a contract;

Using your application, some user place work requests, the others provide some services. For instance, one user needs get his house painted. Hi gives a consent to disclose his Email to another users, so that are able to send him contract proposals.

Compliance with DSGVO can be not easy in some cases. Better talk to a layer.


How can CloudFlare save your website if the attacker knows the IP of the server?

found the answer here

Use CloudFlare IP addresses to your advantage

Take action to prevent attacks to your site during peak season by configuring your firewall to only accept traffic from CloudFlare IP addresses during the holidays. If you only accept CloudFlare IPs, you can prevent attackers from getting to your original IP address and knocking your site offline.


Preferred UAC configuration in Enterprises that use Login scripts to map drives?

Use Powershell and set your execution mode to allsigned.  It's the best of the worst options for powershell execution methods, issue a code signing cert from your internal CA and sign your login scripts.

(new-object -com WScript.Network).MapNetworkDrive("g:","\\Saturn\data")
(new-object -com WScript.Network).MapNetworkDrive("k:","\\Saturn\stuff")

Powershell defaults to executing asInvoker, so unless I'm mistaken that should run sans UAC prompt.


Mac OS: keylogger vulnerability & FileVault 2

Key loggers exist and they are in fact a real threat.

Encrypting a disk is not so much about making sure your disk isn't vulnerable to trojans and malware that works across a network. Rather, its about ensuring that if your laptop falls into nefarious hands that the attacker cannot read your computers data using a live disk or some other means to bypass any sort of login all together.

However, it is possible your attacker could key log your computer before hand then get his hands on it and crack it like that.


Locking accounts using the same strong hash in the database

This is fine. Practically, the chance that such random password was bruteforced would be zero.
However, the way to do this would usually be slightly different: rather than setting it to a valid hash, you set it to something invalid. I wouldn't be surprised if the password implementation was a custom one, so you should check what it is doing, but basically, if it checks that hash(salt, provided_password) == stored_hash you would set stored_hash to something like ! which won't be equal to any hash output.
This lets you perform the same without having that weakness. I would prefer this for being cleaner, as it more clearly separates the representation of accounts which are locked from those with real hashes.


... etc

There is no generic "mutual auth" scheme available for arbitrary protocols the same as there is no generic "auth" scheme in the first place. What is possible depends on the specific protocol used. Protocols using TLS could do it in theory but there might be restrictions in actual specification or implementation on how TLS is used within the protocol. Protocols not using TLS might offer mutual auth too (like SSH does) but again it depends on the specifics of the protocol.


He needs only one page, right ?
Fine then, you might want to save it somewhere, so he can access only that page.

Assuming the data he is trying to get is static, and assuming it's only for data processing purposes he needs that access, wouldn't that be a solution to save it somewhere else to give him access only to that page ?

Unless it's the secure connector he is trying to set up... So, what is your guy actually trying to achieve ?


How can a new website create trust with users?

The main way to help users to trust you is be worthy of your users' trust, and make it apparent to your users why you are worthy of their trust.  There are various ways to establish that you are worthy of trust.  The details are likely to be specific to your particular site, but here are some examples from other domains.

One way is through branding: if your brand is familiar (e.g., the user has had positive interactions with you before, or they have heard positively about you from friends or family), they will be more likely to trust you.

Another suggestion is to ensure that everything you do is in the customer's interest -- and make this apparent to the customer.  Don't be "sleazy".

For example, don't ask for the user's address or phone number just because you want it or because it would let you send the user marketing.  Wait until a point arises when the user will get some tangible benefit from providing this information, and then allow them to provide it.  For instance, it is one thing to ask for your customer's shipping address and phone number when they want to order something and have it mailed to them; it is another to require them to provide this information just to create an account with you.  If you must ask at account creation time, make it optional and allow them to provide it later when it is needed.

Another way is to provide user-friendly policies.  Think of mail-order companies, which promise that if you don't like what you ordered, you can return it for a refund, with no questions asked.  Think of Zappos, which not only offers no-questions-asked returns, but will even pay return shipping.  That can increase confidence among customers and give them peace of mind that if they don't like what they ordered, they can get their money back.

You will probably want to have a privacy policy (though many users will never look at it, some may).


NIST 800-53 rev 4 - CM-7(2) implementation on Linux

There are a few ways to prevent execution on Linux. It is important to remember, though, that these only apply to binary executables (like ELFs). Scripts or any other interpreted files cannot be blocked in the same way. For example, a bash script isn't actually executed, it is merely read by /bin/bash, which parses it. The same goes with something like python, where /usr/bin/python reads and interprets a python file. Blocking execution of the scripts will prevent one from doing ./file.sh, but you will still be able to do /bin/bash file.sh, unless the bash executable itself is blocked. As such, any programs which act as interpreters can bypass these protections.

A few ways to block execution:

Setting the noexec mount flag prevents execution on an entire partition.
DAC can be used on a blacklist basis, by removing the executable flag on a file.
AppArmor, and many other MACs, can be used to whitelist individual files for execution.

Note that AppArmor by default only applies to programs you create a policy for. There are ways to use a global profile so whitelists for each program are required, but it is not officially supported.

It looks like what you want is a MAC, just one simpler than SELinux.


Warning: the terminology is a bit fuzzy, so there cannot be a completely authoritative and clear-cut answer.

A static authentication protocol means that the device which does the authentication does not compute anything. If embeds some secret value but can, at best, show it. The human user, when he types his password in a login page or interface, is a static authentication device. The smallest, dumbest, cheapest kind of smartcard does the same: after having been duly unlocked (users typed his PIN code), the card spouts a secret value always the same.

A dynamic authentication protocol is the opposite: the device computes things. There are many types and sub-types of dynamic authentication protocols:

The protocol can be a challenge-response: the system which runs the authentication submits a challenge, e.g. a random sequence of bytes, to which the device responds by computing a cryptographic function which uses both the challenge and a secret data contained in the device. The cryptographic function can be, for instance, a MAC which the device computes over the challenge, with the secret as key; the authenticating system will verify that MAC (this scenario assumes that the secret value is known to both the smartcard and the authenticating system). Another kind of challenge-response is based on digital signatures: this requires heavier computations (hence a less cheap smart card) but means that the authenticating server needs not know the secret value which is embedded in the smart card.
Some cards generate one-time passwords. This can be viewed as a challenge-response protocol in which the challenge is not sent by the server, but is a publicly known everchanging value (e.g. a counter, as in HOTP, or the current time, as in TOTP). RSA SecurID tokens are of that type. Devices which use that kind of protocol must maintain some permanent state which resists resets (e.g. a battery-powered internal clock, or a counter value stored in EEPROM); but they are easier to integrate into existing systems (as with RSA SecurID tokens, the user just has to type what is displayed on his token; he does not have to plug the token in his desktop machine).


Shared Secret, is it a public key or a private key?

If it is public it cannot be secret...

A key is "a parameter for an algorithm, which concentrates secrecy". This means that the key is not only secret, but, normally, nothing else is (algorithms are known to everybody).

A public key is a paradoxic terminology which was coined when asymmetric cryptography was invented. The "real" key is what we call the private key. It is the secret parameter which allows for performing an operation which only the key owner should be able to do (e.g. decrypting a piece of data, computing a signature...). The magic of asymmetric cryptography is that the reverse operation (encrypting a piece of data, verifying a signature...) can be done by anybody, using a mathematical object which is linked to the private key, and which can be made public without revealing the private key. You can imagine the public key as the face of a human being: it is distinctive and can convey information, but recognizing the face does not tell you what goes inside the brain. So a "public key" is not really a "key" in the strict sense of the term; and the "private key" could be called simply "key" or "secret key" because that's what it is.

However, Tradition dictates that we say "private key" for a key of the asymmetric kind (a key with enough mathematical structure to have a public face, which can be revealed without endangering the secrecy of the private key), while keys which are just bunches of bits, for symmetric encryption and similar algorithms, are called "secret keys" (or "symmetric keys"). That's traditional, not ultimately rational; terminology is always like that.

Asymmetric cryptography is mightily cool, but it is ill-suited for bulk encryption of gigabytes of data. For that, symmetric cryptography is much better, with "secret keys" (i.e. keys which do not have a public face, they are 100% secret). Diffie-Hellman is an asymmetric key exchange algorithm, in which two parties do the mathematics of DH and end up with a shared secret, i.e. a key: they both know it (thus "shared"), but nobody else (thus "secret"). With it, they can do symmetric cryptography, which was the point.


DOM-Based cross-site scripting on window.location.pathname

Even if page could be whatever you want, its only use is to match other links on the page to add the active class.

The worst thing you could do would be setting all links in the page as active.

In my opinion, this doesn't count as a XSS vulnerability since no malicious code would be executed.


Different IPv4 numbers from different browsers, same computer

I am going to assume from the comment

  Update 2: I was configuring a Security Group for an AWS EC2 server using Firefox. When I clicked on "My IP", most of the times it shows me 200.x.x.x, but sometimes, it shows me 181.x.x.x

that this is at your place of work. in many cases businesses have 2 or more ISPs in case one fails. You might have your gateway routers setup to do some sort of load balancing so that sometimes your connection will use the 200.x.x.x and other times it could use the 181.x.x.x.


What are the performance differences (for client and server) between DHE and ECDHE in TLS?

DHE uses modular arithmetic to compute the shared secret.
ECDHE uses algebraic curves to generate the key, therefore it has lower computational, storage and memory requirements.

DHE is considerably slower than ECDHE. If you want some actual numbers here they are:

Key exchange    Parameters               Transactions/sec
DHE-RSA         1024-bit RSA key,
                1024-bit DH parameters        347.64

ECDHE-RSA       1024-bit RSA key,
                192-bit ECDH parameters       612.25

DHE-RSA         1776-bit RSA key,
                1776-bit DH parameters        97.62

ECDHE-RSA       1776-bit RSA key,
                192-bit ECDH parameters       349.53

As you can see, the performance penalty for DHE increases a lot more when increasing the number of bits. If you really want the best of both worlds, you could use ECDHE-ECDSA and you have both forward secrecy and efficiency.

Here you can find other independent results that should give you relevant info.

The effort is not at all identical. The client is never a problem. You will only notice the performance differences on the server (because there is one server and many possible negotiating clients - so only in the case of 1 client and 1 server the effort will be equal).

-EDIT-

So, to conclude: 1. Yes for one client. No for more concurrent clients, for obvious reasons. 2. Both assumptions are incorrect. On identical machines, the computation time will be similar in both cases.


I love the OWASP project and community (I'm actually part of it), but I don't like DirBuster at all, which is an OWASP project. It's very slow compared to other similar tools, and it easily crashes if you try to load a big wordlist.

  "Does anyone out there have an idea on what mistake I'm making that is getting such a weird output?"

You may be not making any mistakes; from my experience about 1-2 years ago DirBuster seemed a fairly unreliable tool, especially when using middle/large-sized lists, so it may be simply malfunctioning.

I strongly recommend gobuster. It's a command line tool, fairly flexible, and super fast. Most pentesters I know choose gobuster over any other similar free tools.

You could start with a command like the following one, explore the different options, and tune it according to your specific needs:

gobuster -u http://A.B.C.D/ -w /usr/share/seclists/Discovery/Web-Content/raft-large-words-lowercase.txt -s 200,204,301,302,307,403,500 -e

If you don't have one already, I recommend you get a Kali Linux VM so you can have lots of tools (including gobuster, dirb, and DirBuster) to play around with. Kali also comes with many good wordlists such as the one referenced in the command above.


How do I protect the WiFi-network I'm on from worms?

Stopping network worms is very simple: configure each device's firewall not to allow incoming connections. That's all you need to do. Bonus points for having a home router that can block the device-to-device traffic.

But that's not the only threat in your story...

  "I don't store any important information on the computer I downloaded
  it with..."

Yes, you do. You likely store email, account details on all the websites you subscribe to, personal information. Your browsers likely store passwords, and other sensitive information. If you use online banking from that computer, then your bank account is exposed.

That computer also has access to your home router. If your router can be hacked, or if the admin password is weak, then a malicious actor can take over your entire network.

The computer itself can be used as a launching point for attacks outside of your network or a storage point for malicious actors.

So, yes, the worm stuff can be handled simply, but there is a lot more to consider.


Is there any reason for disabling telnet client on windows?

The Telnet client does not present much of a security threat in itself though it could be leveraged by some malicious process (virus/malware) to do further damage. It is also disabled as very few users, particularly home users make use of it.

Standard security practice says you should reduce your attack surface as much as possible and that includes disabling tools and services that you do not use.


Can we prevent users from generating a QR code with edited information

Both applications will be open source.

If it is not possible to avoid this for a single individual who is willing to make an effort, would it conceptually still be possible to prevent at least a cracked app which is distributed to the public easily?

These two sentences are mutually exclusive. If it's open source it's trivial to create an alternate version of it that does something else than what you envision. Furthermore, why are you focusing on integrity of the application and not the data?
Sign the data that is provided in the QR-code. This way, it doesn't matter what app people use; the data in the QR code is signed by you. You'll obviously have to verify information before signing, but after it's signed, it's trivial to verify that it is not changed.
The numbered ideas you provide is mainly security through obscurity. Don't bother. It's trivially bypassed in much less time than you think.


Are there vulnerabilities in display connections?

HDMI, DVI, VGA ports aren't networked. There are no packets to pass through them. They can however be spliced/split to enable recording but this would need to be done on premise (local). You could go the KVM over IP which can be configured as secured as you want them to be. (Shove them in a VPN tunnel, allocate firewall rules, over SSL, etc)


Has anyone actually been hacked by video subtitles?

From this blog the issue appears to be a file parsing problem with subtitle files used by media players.

This kind of issue can be exploited as the media player program needs to parse the subtitle file as part of using it, so a malicious file may be able to exploit vulnerabilities in the media player to execute code on the affected system.

That blog doesn't mention number of affected systems, but they're offering PoC examples and IPS signatures, so it's quite likely they're seeing active exploitation of it.


Preventing registered users from sharing passwords

What you are trying to do is futile. Information can not be contained. You can not prevent someone from passing on information. When they can not share their logins, they just copy&paste the text. When you disable copy&pasting (the common methods to do this can be easily bypassed, by the way), they will make screenshots. When you find some way to make screenshots impossible (I couldn't think of any), they will read it to each other. All you will achieve is impair the user experience for legitimate users without really preventing abuse.

But when you really want to go down that route, you might look at alternative ways of browser fingerprinting than IP address and cookies. There is a lot of other information a web browser transmits on every page request, and often it is sufficiently unique to identify a user. The Electronic Frontier Foundation has an interesting demo with their Panopticlick website.

Among the techniques used are:

UserAgent string (browser self-identification)
HTTP_ACCEPT Headers
Installed plugins and their version numbers
Installed fonts
Timezone
Screen size and color depth
Alternative cookie techniques (localstorage, persistent storage in plugins like Flash)

Keep in mind that all these identification methods are prone to false negatives because many of them can change at any time. You should only consider a fingerprint as comming from a new device when multiple properties drastically change simultaneously. When the difference to the previous device profile is minor, you should silently update the device fingerprint instead.


You're correct, but only for wireless clients. If you want to trick wired clients into routing their packets to you instead of the real router, you'd want to arpspoof. This way allows you to capture both wired and wireless client's data.


I believe the reason is "it's easiest to use instruction sequences from the libraries, because the libraries are so common and they've already been scanned."

There are just a handful of Microsoft-provided C-runtime library files.  If they provide a complete enough instruction set, why work harder?


Is reseeding OpenSSL CSPRNG necessary if using RAND_bytes?

Does RAND_bytes reuse any seed?

Kindof.
Re-using a seed is bad, because it will give you the exact same random numbers again. OpenSSL doesn't do this. However, you're allowed to use the one seed obtained by the first RAND_poll as long as you want (which is not advisable) as the PRNG will generate a steady stream of (unpredictable) bytes based on this one seed and you will just be served "later" parts in the stream if you don't reseed.

You should re-seed the PRNG as often as possible if you have entropy rich data, but it will also work (quite securely) if you don't do this.

Final answer: RAND_bytes (kindof) manages this itself.


Perl CPAN modules in a PCI-DSS environment

Can he point out the section in the PCI DSS Requirements an Security Assessment Procedures 2.0 which he is using to justify this? It's not quite clear if the problem is the fact that it's third party code, or that it's sourced via a collectively managed repository.

If this is only a PCI-DSS audit, then argue your case:

  PA-DSS does not apply to payment applications developed by merchants and service providers if used only in-house (not sold, distributed, or licensed to a third party), since this in-house developed payment application would be covered as part of the merchant's or service provider's normal PCI DSS compliance.  [page 9]

and

  Note: It is not a PCI DSS requirement to use PA-DSS validated applications. [page 16]

You must review your custom code (PCI-DSS §6.3.2), not necessarily all code (PA-DSS §5.1.4).

In a strict sense, unaudited third-party code or repositories are risks. You need to demonstrably understand and manage those risks.

You should have a detailed inventory:

List of hardware and critical software in use in the cardholder data environment, along with description of function/use for each

To meet Requirement 6, you should have a verifiable process to use that inventory to check for, and apply in a timely manner, relevant security updates (§6.1, §6.2) for third party software. This should also be covered by your documented change control procedures (§6.4.5).

You should have a process to evaluate (not audit) modules so that features which fall under PCI-DSS are verified and understood (e.g. authentication, encryption and logging related). This probably means you need to have approved baseline versions of certain packages, and configuration guidelines (e.g. for CA stores, allowed ciphers), where it is relevant.

You should have a documented process for configuring CPAN, including but not limited to, a set of approved mirrors, requiring gpg/Module::Signature (where possible), procedures for sourcing developer signing keys, and requiring a proxy so that downloads are logged and traceable.


How verify id_token from the browser in OAuth2?

To answer your questions:

When it comes to id_token validation, the client needs to verify the integrity and authenticity of the token header and payload by checking the token signature. Yes, the frontend needs to have either client_secret, or public_key of the identity provider. Where it gets it from is implementation-specific, but it can be either embedded inside the client, or the client should download it from the trusted source. The full step-by-step guide of token validation using OpenID Connect is described here:
https://connect2id.com/blog/how-to-validate-an-openid-connect-id-token
You still need the session cookie/token. id_token and session_token serve different purposes and have a different life span. Session token has a shorter life span and had to be refreshed regularly (unless the auth timeout is disabled, which is a questionable choice from a security point of view). While identity token usually only gets renewed with the new login.


Code Review on a Header Injection In Java : any help?

In principle HTTP headers are ISO-8859-1 according to RFC 2616. In practice non-ASCII content in HTTP headers will be in a different encoding depending on the browser (and for IE also locale), but always an ASCII superset. Consequently CR and LF would invariably be encoded as 0x0D and 0x0A so there shouldn't be anything to worry about if you are replacing those.

The only point at which encoding would come into play would be for UTF-8 overlong sequences. For example 0x0A could be encoded as 0xC0 0x8A. This is invalid, but has been accepted by various UTF-8 decoders in the past. So, if:

you're using a non-UTF-8 [default] encoding in your web app, so that this byte sequence would get through without Java complaining it was an overlong, and
the user-agent you were sending the header to were to decode headers en bloc using UTF-8, and
the user-agent permitted overlong UTF-8 sequences

then yes, you could get header smuggling attacks by reflecting a parameter into a response header.

With today's user-agents this is a pretty unlikely proposition, but in general I would say it's worth removing all non-ASCII characters from header values, just because they're handled so inconsistently across browsers as to be useless in any case. I'd also recommend filtering out all the control characters 0x00–0x1F, not just newlines.


Automatic connection from LSASS to different IPs. Is this the usual behavior?

This is a normal part of certificate validation or revocation list update using the OCSP protocol.
Enjoy reading:
https://technet.microsoft.com/en-us/library/ee619730(v=ws.10).aspx
https://en.m.wikipedia.org/wiki/Online_Certificate_Status_Protocol


AWS HIPAA requires hardware dedicated to a single customer

Not using dedicated hardware can lead to information leakage due to shared caches, compromised hypervisors  (due to various timing-based side channels, and other issues due to uncertain performance stability.

Encryption of the data at rest and in transit is not sufficient as several of these attacks have demonstrated proof-of-concepts that steal keys from neighbours. In general, compliance regulations tend to err on the side of caution until a technology is mature.


Is it possible to take back the control from an MITM in progress?

When you are under an MITM attack, typically the attacker has complete control of part of the link between you and your intended destination. For this reason, it is usually difficult to "bypass" MITM, if done correctly, because the attacker is fully in control of your traffic and free to direct it to wherever he pleases. The attacker can basically just ignore all routing protocol, and direct all of your traffic to the attacker's server, regardless of intended destination.

Also, an MITM does not have to involve someone "worming their way in". Anyone who controls a router or cable link between you and your destination can easily MITM because they already control your Internet traffic. Whenever you communicate through the Internet, your traffic probably goes through at least a dozen routers owned by various Internet companies before it reaches its destination. You can see this for yourself if you run a traceroute command.

If any one of those router operators decide that they want to do something malicious, they can easily reconfigure their routers to send your traffic somewhere else, rather than follow routing protocol and forwarding it on to the next router.

It is, however, possible to detect that a MITM is occurring by utilizing public key cryptography combined with a certificate system to verify the identity of the person you are communicating with, as HTTPS does. But once you detect a MITM, there's usually not much you can do about it - your options are basically either to immediately stop what you're doing, or attempt to establish an encrypted VPN tunnel to a trusted location and hope that the attacker does not notice and block your VPN.

If you want to truly "bypass" the MITM, you would have to get your traffic to take another route to the destination, one that goes around the attacker. In some situations, that's impossible - for example, if the attacker is your ISP, then there is literally no other route your traffic can take because your ISP is your sole link to the Internet. But even if there is an alternative route, it is still difficult because you don't really have any control of how your traffic is routed. It would be nice if you could tell all the routers handling your traffic, "Hey, I think Router XXX is doing MITM, could you please not send any of my traffic there? Thanks." But since there is no easy way to do that, you are basically at the mercy of the routers' decisions. If you are lucky, perhaps a benevolent router operator will notice that a neighboring router is acting funny and stop sending traffic there, but that's pretty hit-or-miss.

Oftentimes though, the attacker is not someone who is "naturally" between you and your destination, but is instead on your local network and playing tricks on the LAN (like ARP spoofing, or DNS poisoning) to get your computer to send traffic to a place where it would not normally send it. This is where it gets murkier, and where the answer is going to depend on both the technique used and the amount of control you have over the network you're on. For example, if you are on your home WiFi network and the attacker manages to connect to your WiFi to do MITM, then it's easy -  just change your WiFi password and boot the attacker off your network. But if it's at a public place, then obviously it will be more difficult.


Windows user: Is having many active TCP connections normal?

It can be perfectly normal but it can also be dangerous.  The :number after an IP address is the port number.  I would investigate the processes that own them.  Use something like SysInternal's Process Explorer and make sure to run it in admin mode to make sure you get all processes.  Sometimes processes can be nested within another and don't necessarily always show in the normal Task Manager.

If they are all processes that you know, then I wouldn't be worried.


Could you use svchost to run any service?

Yes, it's possible and there are known attacks based on svchost.exe file/service.

Windows processes are essential for usual operation of OS. Some processes require special privileges or resources, which a regular user may not have. This is exactly what malware writers are looking for. The following are processes commonly used by malwares (Source : https://blog.checkpoint.com/2016/04/26/how-ransomware-and-malware-use-microsoft-windows-known-binaries/):

svchost.exe – A system process that hosts multiple Windows services in the Windows NT family of operating systems. Svchost is essential in implementing shared service processes, where a number of services can share a process to reduce resource consumption.

explorer.exe – Previously known as Windows Explorer, this is a file manager application, included in releases of the Microsoft Windows OS from Windows 95 onwards. It provides a graphical user interface for accessing the file systems. It is also the component of the OS, which presents many user interface items on the monitor such as the taskbar and desktop.

Sdbinst.exe – This process is part of the Microsoft Desktop Optimization Pack (MDOP), which contains Application Virtualization (App-V). MDOP enables the user to make applications available for customers without installing them directly on their computers. App-V transforms applications into centrally managed services that are never installed and do not conflict with other applications.

Sdbinst.exe allows the creator of the application to push updates via .sdb files. The process manages this behavior by serving as middle-ware between the application and the OS. For this purpose, sdbinst.exe runs code received from the creator with admin privileges.

Further you may refer below site to see how an attacker hide him self behind a legitimate windows process: https://safe-cyberdefense.com/load-inject-malicious-dll-using-microsoft-tools/


I've given a lot of thought to this area over the past couple of years, and the simplest answer to both of your questions is that a wholly peer-to-peer web would introduce new ways of handling those processes which would traditionally reside on a server. Peer-to-peer websites would most likely not be served with the data inline. Sort of like Meteor, you would probably work with one version of the static website files, and those files would include scripts that run on the client side to populate the page with data and send commands/requests to an external "server" as needed. In a peer-to-peer web, the server would be more like an entire public network of users.

Think about a website like Facebook. What do you achieve by logging in and holding a session? Firstly, you gain access to all the private information that you are authorized to see. Traditionally, your session cookie is all the authentication needed in a request to access private data.

But in a true peer-to-peer infrastructure, who holds this private data to begin with? Well, it should be other peers like you. Even if you can prove your identity to a peer, they shouldn't be handling any of your private data in plaintext. Thus, encryption should be a huge part of any secure peer-to-peer web. When data is encrypted properly and keys are handled with care, proof of identity is less essential: if you can decrypt the data, you are implicitly authorized to access it.

Back to the Facebook example, sharing private information could be done by transmitting the decryption key to contacts whom you wish to authorize. The closest measure to revoking access would then be to either remove the data altogether, or re-encrypt and transmit a new key to all remaining contacts who are authorized. To encrypt data for a particular contact, the peer-to-peer network would probably utilize public-key cryptography: pull the public key of a contact, then use it to encrypt any private transmissions. With thoughtful crypto, the messages could be stored in a peer-to-peer network without any concern about tampering or eavesdropping.

Of course, authentication goes beyond access rights. On the real and traditional Facebook, your valid session enables you to act under your own identity: if you post something on your wall, any other user will implicitly trust that it was your doing. You can replicate this sort of thing, and with considerably greater certainty, using digital signatures for message authentication on the fly. The process of authenticating any information on the site as valid would occur on the client side, and no unsigned posts would be shown because there would be no valid information about the author.

Because information would move about the network indiscriminately, any distributed file sharing system should make for a fine foundation on which to implement an infrastructure like this. Denial of service should, in theory, be a tall order. There are a lot of pros and cons to governing privacy with cryptography alone, but it is far more true to life at the end of the day. There would be no one to subpoena for relinquishment or cessation except the users themselves (might be anonymous), and it comes with more integrity at every corner.


Remote Desktop - Can my company see web browsing in other applications while connected?

That depends on the VPN specification you're using. However, if you are connected via VPN you should probably assume that everything you do is visible to the VPN provider if they want it to be. And therefore you should not look at anything the VPN provider would not want you to be looking at, and/or you should trust them to respect your privacy.

If you want to find out where your traffic is traveling, you can open terminal and just type traceroute cnn.com (or any website you prefer). This will show you the path your request takes to the resource. It may or may not be easy to recognize your company's servers from this. You can then disconnect VPN and run the same command again and compare the two results.


When you use a re-webber proxy (a website where you enter a URL and it shows you the content of that url in its own context), using TLS between you and the end-website becomes impossible, even when the proxy would want to provide it.

When you enter https://google.com in the proxy you linked, you get redirected to https://www.zend2.com/vip3.php?u=RyhEPtB1SQ6bFRGMjVSDaC2jhw%3D%3D&b=29. Note that the domain you connect to is https://www.zend2.com. That's the domain you make your TLS handshake with. Anything else would lead to a certificate warning, because your browser expects a valid certificate from www.zend2.com, not from google.com. The proxy then does its own TLS handshake with the destination site, requests the content, decrypts it, COULD look at it, re-encrpyts it for you and sends it to you.

You might also notice that this service performs a man-in-the-middle attack right before your eyes! It adds its own HTML code to each website you load through it, even when you load it through HTTPS. This code includes Javascript, which is executed in the context of the website you load. They could use this for all kinds of XSS attacks when they would want to. The website demostrated that they can and will manipulate any content you access through it, so you should not use it to send or access any confidential information.

To avoid this, do not use a rewebber service. Use a proxy server properly by entering it into the connection settings for your web browser. In that case your web browser is aware that it is using a proxy server and will expect a TLS certificate from the actual destination, not from the proxy. Any eavesdropping or manipulation by the proxy become impossible in that case.


Does Google flag all subdomains for malware/phishing if one is infected?

Short answer: No

Longer answer: It seems Safe browsing is using some threshold, which is not told.
Usually, such flag happens against minor domain owner to force them to fix their website. For bigger web services provider, normally the sub-domain will get away from complete flagging and only specific confirmed bad subdomain(s) will get flagged.

How can a host be protected from such (mis)use

You can't. What you can do is submit a false positive request(make sure you clean them up or use a patched CRM, etc) to safe browsing and wait for them to change the rules to flag bad subdomain explicitly.  If you get the domain from others, it is important to inspect the infection track record from virustotal, don't be careless like those character that moved into haunted-house in horror movie.  The good news is, unlike horror movie haunted house,  safe browsing will remove the flag after it find out bad content has been removed.

Safe Browsing FAQs will give you some idea how GSB flag the web contents. If you want to learn how it is responses to the various scenario, you need to create your own honeypot to gather bad URL and measured it against google safe browsing. Or you can use data from phishing or malicious URL report site like phishtank to "gauge" the google safe browsing response.


Is it more secure for SSH clients to use a Private Key (RSA-2048) or a long random password (256 bits of entropy)?

Quantum computing is not yet a reality, so it is premature for you to invest resources in combating this ahead of the SSH standard.

Assuming identity of the server is verified, both options are equally secure, as they are both stored in a file on the client computer, and both have a sufficiently large amount of entropy.

If you accidentally connect to the wrong SSH server, the Private Key approach is more secure.

Personally, I'd go for both approaches combined. Include a private key, as well as a not-so-long password which you can remember. This way if your Private Key is stolen (e.g. physical access), the attacker still needs your password.


What is your process for wiping a lost Blackberry or similar device?

There are folks on here who will be able to answer the technical perspective on these things way better than I, but the biggest issue I see in most organisations is the delay from when the user loses the device or has it stolen, and when they report it to IT. This is a procedural issue which corporate culture typically generates.

The solution we find that works best is to avoid placing personal blame on the individual for losing a device, but just to make it very quick and easy for them to report it so it can immediately be disabled and wiped. If done quick enough, the wipe command can be sent to the device before casual attackers may have gained access to the data, and in any case will prevent the SIM being used.

The big worry, and I'm sure @RoryMccune or @GrahamLee will describe this fully, is that the assumption should always be : if the attacker has the device, they have access to the data on it. Yes, there are third party tools to make this harder, but a determined attacker can always prevent a wipe (by not allowing the device to get a signal - no wipe command)


Yes, an attacker can perform a man-in-the-middle attack against your requests over the network and replace  the file your requested with his -malicious- own.


How can I recover steganographically hidden data from a photographic copy of the image?

There are multiple ways to perform steganography using images.  The kind most people are familiar with today is to embed invisible (or barely visible) data in the data of the image file.  That means starting with an ordinary image file, then using steganographic software to modify the file to embed the secret message, then publishing that photo so it can be viewed by a conspirator.  Such modifications can be as simple as LSB; or they can hide data in the JPEG quantitization of the image; or they can invisibly hide data in an embedded thumbnail image or the metadata of the photo.  Different schemes have different visibility.

Consider selecting a "more visible" steganographic algorithm than just LSB.

One example might be to modify a GIF palette substitution steganography scheme.  Using GIFs for stego can be done by choosing 128 doubled colors instead of 256 single colors, then choosing high-bit or low-bit versions of each pixel to transmit the message.  Because the low bit colors in the palette are the exact same color as the high bit colors, the stego is normally invisible (although the picture quality is degraded due to the reduced number of colors in use.)  By altering each of the high-bit colors slightly, you could make them more visible to the camera.  The advantage of using the GIF scheme is that you can test your scheme by keeping the color changes small, and tweaking the high bit colors just a little at a time until you can reliably decode the message.

Also, consider encoding your stego data using error correcting codes, such as a Reed-Solomon encoding.  These are used by systems such as QR codes to reliably allow scanning when part of the code is damaged or obscured.  If you don't want to spend that kind of effort, try repeating the plaintext message dozens of times and spread it throughout the image, improving your chances of detecting it from one or more places in the image.

EDIT: In your comment, you mentioned you were trying to use JPEG pictures from your camera. Don’t. They will not work because JPEG is designed to combine “close” colors in order to compress the image, and this will totally obliterate any evidence of stego. You need to process the image file as RAW, not JPEG.

Based on your comment, I now realize you may also run into problems with the color response of your camera, and how it will perceive the colors in your image. The traditional RGB approach probably won’t work, especially since the camera’s RGB color values won’t be the same as your monitor’s color values. If you try this, you may have to calibrate your camera’s color response. Or, you can try converting the colors in your camera picture into a color space better suited for comparisons.

Translating each pixel into the L * a * b color space would probably be the best way to spot differences.

All this is horribly complex, and will probably require a degree in digital image processing. Can you instead find a way to hide a QR code in the original image?


Communication between infected machines via listening to certain port

I don't know what you expect precisely when you ask for "detailed case-studies", but if PC-B has no Internet access, it is a well-known practice for the attacker to use PC-A as a relay between PC-B and the C&C:

PC-B <---> PC-A <---> C&C

To give a more concrete example:

PC-A belongs to the users LAN, this is the computer where people access to their emails and browse the Web. Sadly, one email or web page was infected, thus contaminating PC-A.
Once in running in the LAN, either in an autonomous way or remotely controlled by the C&C, the virus starts to scan the network and try to propagate itself. It reaches PC-B (unpatched vulnerability, poor password or whatever) and contaminates it.
PC-B belongs to another, restricted network with no access to the Internet (with chances that it has access to more interesting resources!). The virus can setup a way for PC-B to use PC-A as a relay to get new orders from the C&C and exfiltrate data.

This relay can take any form depending on the attacker fantasy and requirements. It can range from simple proxy-like features to a full fledged peer-to-peer network ensuring that the virus' network will remain functional even if some relay machines are being decontaminated.


Why are Synchronization Token and Cookie-to-Header patterns un-natural for Web APIs?

In a Web CSRF flow, the server sends the token as part of the response that serves the webpage, so the token is delivered "for free". Typically, the same server is also the target for those POST requests so it can easily validate the tokens.

When you call a Web API, the target is probably a different server so the token will either have to be communicated out-of-band or the client will have to send a request just for the token to use in a subsequent request. In either cases, the Web API server handles double the number of requests, which is wasteful.

Good alternatives are digital signature schemes or HTTP methods/headers not allowed by browsers.


Securing sensitive data in a DB,is using H2 worth it?

Encryption of the database prevents low level file based access to the database evading the database permission system. This is especial useful, if it is likely that an attacker gets physical access to the computer (think of stolen notebooks).

On servers it has the issue on what do to with the key/password. If you store it outside the encryption, you make it easy for the attacker to access it. But not storing it requires manual interaction on a server restart which is often not desirable for availability reasons.

Encryption of the database does not help against an attacker who can leverage an web-application that has permission to access the database via SQL-injection.

Having a second database, especially a second database software increases the attack surface: You are vulnerable to the union set of bugs of MySQL and H2. And you need people who understand both systems to operate it securely.

There is one advantage through: There is only very little code that accesses the authentication information. SQL-injection vulnerabilities in the huge majority of the code will not be able to access to the isolated authentication information.

At my workplace we did this for our web application instead: We use different database connections depending on the role of the user doing the requests. So an anonymous users for example gets a database connection which has very little database permissions.


Testing an untrusted browser extension securely on macOS

I recommend using a VM because it is designed to be securely isolated from the rest of your system. This especially important now that now-publically-known vulnerabilities such Spectre/Meltdown/to-be-discovered-vuln allow simple things such as JavaScript to read memory that they should not have access to.

While it is really slow, I have found that the inconvenience reminds me that I'm on a VM and that it is the home of untrusted code, not personal data.

Regarding using multiple system accounts: it simply puts the untrusted code closer to be your system than it needs to be. In addition, I can tell you from personal experience (I tried out #2 a few years ago, setting up 6 accounts in total) that it will drive you crazy


Guidelines for preventing HTML injection

It's quite simple (in theory):

Always escape user-provided input
Always do your escaping at display time. This prevents issues where you've escaped something for the wrong content type, and allows you to plug discovered holes without having to write a migration for old data.


Yes, you can brute-force a hardware-encrypted SSD drive.

The time it takes to be successful though is up to the method used, the length of the password and the hardware & software capabilities of the machine doing the BF attack (which dictates how many tries/sec can be attempted).


My best guess is "perimeter firewall". Have a look on this, to confirm this, as I am not sure about naming.
http://technet.microsoft.com/en-us/library/cc700828.aspx


Can a school legally access an account that a student logged in to at school?

I think the basic idea here is "unauthorized access." If the school accessed a student's non-school account, there can be a case made for the school accessing that account without authorization.

There are a couple things that could negate matters:

The account is a school account - the school is authorized because it is their account
The network access policy included a clause granting the school permission to access accounts that it discovers
The school did not log into the account, but had a record of what was transmitted over its network to the account


What is the best way to recycle an old hard drive that might still have sensitive data?

Let us consider two scenarios, one where you'd like to reuse the hard drive and one where you don't.

This link shows multiple ways to effectively destroy a hard disk ( Some of these are fun, do take a video)

The other scenario is when you'd like to reuse the hard drive. Here's the basic explanation of data storage -
 Any data you store is stored in the form of bits along with meta-data that tell the OS what the data type is. Also there will be a directory which will tell exactly where on the hard disk is the particular data saved. When you delete something, the directory is rewritten to the recycle bin. The data isn't altered. This data can be easily recovered. When you permanently delete something the data still isn't changed, instead the OS is ready to overwrite the data. If the deleted data was not overwritten, it can still be recovered. Even most quick formattings do the same, They just 'free up space' by erasing directories. To keep your data non recoverable, multiple programs exists. What these do is, they overwrite the data over the entire disk randomly a few times. These make it near impossible to recover data. Although a good way is to reuse the disk yourself and fill it up with games & movies a couple of times over the course of 2-3 months and repeat twice. You should be good to go. A final approach is to reinstall an OS on it, this usually clears up the disk properly. A couple of installs and you should be good to go.


Can I alter the DNS cache on my Computer?

This can be achieved by adding the desired host entries in the host file.As per my exploration,DNS cache files are not available but you can override DNS cache entries by making entries in system host file.

Reference:https://www.rootusers.com/how-to-use-the-hosts-file-to-fake-dns/


Don't delete your entire account to avoid someone else registering it. Instead, delete saved emails and private information, and leave it with a strong password.

Especially if you used that email address to authenticate with other services (Facebook, online banking, GMail backup address, etc.) or gave it to a lot of people, you should keep it in your possession. Otherwise, an attacker could reclaim the address and simply ask these services for password reset links. Or one of your old contacts might write someday, assuming it's still you who owns the address. You should only delete the account if you can be sure that no entity trusts it anymore, neither your contacts nor any services.

Hence, it would have been sensible of Yahoo to block deleted addresses forever, but in their FAQ they say it's actually possible to register a previously used ID:

  Register a previously used ID

  A deleted Yahoo account ID may become available for future use, and you’re welcome to try to register it. However, Yahoo can't specify how long until a deleted ID may become available, and we can't guarantee that it will become available.

So, it's good advice to not delete your Yahoo ID to prevent new ownership and instead delete personal information from it to avoid damage in case of a new breach.


Using data URIs to perform XSS in anchor tags - vulnerability?

However, this code (as far as I can tell) will not be executed on the same origin as the page that contains the anchor tag.

As of July 2017, that's true for Google Chrome but not Mozilla Firefox (and possibly other browsers that aren't WebKit-based). However, Mozilla is currently working to change that behavior.

So, a click on this link in Firefox will alert the current domain, making it a full-impact XSS vulnerability:

click

I'm quoting a developer from this bug report:

  In Firefox data: URIs inherit the security context of the page from which they're opened, just like javascript: URIs. This includes access to cookies. This is a well-known aspect of how we handle data: URIs. Up until relatively recently the HTML spec aligned with what we did. This changed, and now we are slowly working to change this behaviour (but that change is a fundamental one and doesn't happen overnight).

But even without an inherited origin you should avoid allowing user-supplied data URIs where the application expects an ordinary web link, as explained in this thread.


I don't think that you ever want users to have access to the servers private key. Of course, access to the public key doesn't matter.

I think that your other services should be running under non-privileged but still non-user accounts. Then you can change ownership of the keys to root:adm or something more suitable and add the service accounts to the same group. The public key can be world readable.


No, this is not secure.

Let's call your machines local and remote. What you're doing right now is creating a tunnel for X11 from local to local, then running a VNC client over that tunnel and using it to connect to remote. This effectively does nothing, traffic between local and remote isn't going over the SSH tunnel.

Originally it sounded like you might be saying that you were SSHing from local to remote, running a VNC client on remote X11 forwarded to local, then using the VNC client to connect from remote to remote. This would be secure (as long as you trust the remote computer, X11 forwarding is somewhat vulnerable if remote is malicious; I'm not familiar enough with VNC to know if this is better or worse than using VNC directly) but it seems convoluted and unnecessary, and I would guess performance would suffer.

If you want to have VNC tunneled through an SSH connection the correct way to do this is to forward a port from local to remote using ssh -L:

ssh -L [localhost port]:[host]:[host port] remote

This syntax can be a little confusing at first until you figure out what's happening on which machine. [host] here is from the perspective of remote; what happens is that you're forwarding [localhost port] to remote, then remote sends it to [host]:[host port], so what you actually want is:

ssh -L 5900:localhost:5900 remote

That way traffic is sent from local port 5900 to remote, then remote sends it to itself on port 5900. Then you can use your VNC client on local to connect to local on port 5900 (if port 5900 is already used on local [localhost port] can of course be changed to something else).

It's not relevant here because remote is forwarding to itself, but it's important to understand that once the traffic reaches remote it will be sent unencrypted. If you had a separate VNC host accessible from remote and used ssh -L 5900:vnchost:5900 remote the traffic would be encrypted from local to remote, but not from remote to vnchost.

You didn't specify what protocol you were using, so this answer assumes VNC, but it would work equally well for other protocols simply by changing the port being forwarded. Also note that some desktop sharing protocols allow using TLS, which should make SSH forwarding unnecessary when implemented correctly.


Yes, hidden network still send a beacon frame, just without the SSID.

Your wireless hardware sends the estimated received power level to Aircrack-NG. It could be due to unsupported hardware or your hardware is not able to come up with a good power figure for the signal. Check out this forum for some older info, and look at their hardware compatibility list


A hash function works on data, i.e. input and output data. If the data come from a file or network or similar and if they get written to a file or somewhere else has nothing to do with the hash function itself but with a program which uses this hash function for a particular purpose. This purpose can be be to only print the resulting hash value to stdout without modifying the input file. But a hash function can also be used in the process of adding a signature to some section of a file, in which case the file gets modified.


Why is "www." considered unsafe in this HTTPS URL?

I think you are making a huge assumption with your question:

  Why does Chrome consider the "www." in an HTTPS url as a security risk?

as this is simply not the case.

What is happening is that SoundCloud is forcing users from www.soundcloud.com to soundcloud.com with a 301 redirect. The problem is that they are redirecting all traffic to http://soundcloud.com regardless of the originating protocol.

This is simply a configuration issue with the Soundcloud website and has nothing to do with browser or web security standards. There is no inherent risk with the www subdomain to a website.

The solution as you have already figured out is to remove the www in order to avoid the redirect. You might want to make the site's administrators aware of the issue if you are so inclined.


Access encrypted system/files with rootkit

I have encrypted files that I need access to but I believe the BIOS/UFEI/hardware or recovery partition have a rootkit or keylogger now in order to get my encryption password for the encrypted system partition.

Boot from a Linux recovery disk and connect a large enough USB device.

Then, copy the still encrypted disk as a physical disk on the USB device.

Thus, you have not supplied any sensitive information to the untrusted system.

Finally, boot a trusted computer with a clean install of whaveter OS you need, with appropriate drivers for the encrypted disk, keeping it disconnected from the Internet (ensure it hasn't a working WiFi chip), and connect the cloned USB device. Decrypt and use.

You have now disclosed the sensitive information, but done so on a device that is trusted and not connected to the Internet.

If speed isn't an issue, a small Xiantec or Zotac or even Raspberry Pi unit might be able to suit your needs for under USD 49,99.

To prevent the possibility of the trusted device somehow saving the information and transmitting it somehow later on, you can dispose of the whole unit by melting or pulverizing disk, motherboard and any external cards that might have a programmable memory on them. More spectacular methods also exist.


How to fix a repeatedly hacked gmail account (where 2FA is enabled and passwords are changed)?

She must be missing something...let us try this:

First read about the google answer on "someone is sending spam from my email"  here as they state it there: "

The message was spoofed, forging your address as the sender.
The original sender used your address as a reply-to address so that responses would be sent to you.

Neither of these possibilities indicates that your account was compromised..."

There are two ways to check for that:

Get a copy of the email, including headers, and check the originating IP address to see if it was not one you could have been using
If you’re receiving bounce messages from a bunch of email addresses for people you’ve never heard of

If your account was spoofed, they simply created an email that had fake details (usually the “From” or “Reply-to” address), and there is very little you can do to stop this.

If in fact your account have been hacked follow this:

While logged in the account you want to manage access:
https://security.google.com/settings/security/permissions?pli=1 = here you can review all APPs phones and sites that are connect to your account and you can remove this rogue android from here just click on "Android" then revoke access
https://accounts.google.com/b/0/SmsAuthSettings#devices = here you can check the phone that is being used for 2 way authentication and make sure you still have 10 reservation codes
https://accounts.google.com/b/0/SmsAuthSettings#registered = here make sure you make google ask for the code in all computers except the one you are using
Now change your password this should log you out of any connected device and with the 2 way aunthentication they should not be able to get in again

Now if this don't work then we can suspect that the attacker may be regaining the password after she changes it (e.g compromising her pc or if she changes to a not so different password he may be able to brute force it again fast phishing attacks and etc ) if thats the case then i  recommend the usual : only change the password via a phone and do some AV scan on all her pcs.

Another possibility is that her password has been leaked on another site especially if she reuse her password everywhere so she may want to choose for a unique password for gmail for now.