Spoofing cellular data Is it possible to spoof cellular data?
For example place a transceiver some where and communicate with a cell phone similar to wifi spoofing?

Is it possible to spoof cellular data? For example place a transceiver some where and communicate with a cell phone similar to wifi spoofing?

As shown by state actors (see: stingray) and attackers around the world:

yes. it is. And it's not even very hard.

In fact, GSM has a very weak sense of providing authentification of the network to the user. So all GSM networks are relatively easy to "spoof".


Should OAuth2 proprietary client authorization prompt a confirmation window? Given a company named X.

X has an OAuth 2 API available for its proprietary clients and also for 3rd party clients.

When a user P enters the process of authorizing a client, it is prompted with a window (right after authentication) showing several information (such as the application name, the scopes required, etc...) and must either click "confirm" or "cancel" to continue the process.

While having the user being able to confirm/deny authorization requests from 3rd party clients makes senses, does it still make sense to show this confirmation window for X's proprietary clients?

Is there something in the standard that forces to have this confirmation for every authorization request?
Is there a best practice in regards of that, that everyone agrees to?

If OAuth2 sever and clients are provided by company X and the user can see this, a consent question is not necessary.  Such clients are also called first-party clients.
For all clients consent could be given only on first use and is then remembered by the oauth2 server. This way consent is requested only once per client and not for each subsequent authorization.


Is this use of PBKDF2 for generating passwords secure? Reading Security Engineering by Ross Anderson, chapter 2.4.7.1 Password Manglers got an idea that finally seems to solve the issue I have with the existing 'I need to remember a strong* password for too many systems' solutions.

*) my passwords are randomly generated, with a size depending of the level of importance of the service used, with 8 characters minimum and a typical maximum of about 16 characters.

A quick breakdown of what I don't like about the existing solutions:

write them down : not secure, list not always accessible;
store them in an encrypted file : not always accessible;
use a dedicated software : not always accessible.

So, in short, I was looking for a solution that is:

always available when connected to the internet;
secure (nobody can steal or work out my passwords).

So, my question is:
Is it secure to use PBKDF2 to generate password, based upon my master password (12 randomly generated printable ascii characters) and using the website's domain name (stackexchange.com) as a 'salt'?

<?php
$password = $_POST['password'];
$salt = $_POST['publicIdentifier'];

function passKey($password, $salt) {
    $iterationCount = pow(2, 18); // 262.144 iterations
    $outputLength = 20; // because this should be 'secure enough'?

    // Step 1: get the derived key
    $generated = hash_pbkdf2('sha256', $password, $salt, $iterationCount, $outputLength, true); // returns binary output

    // Step 2: encode as Base91
    $generated = base91_encode($generated); // because we want 'special characters' in our password string (websites often require this)

    // Step 3: return the password, sliced down to required length
    return substr($generated, 0, $outputLength);
}
echo 'generated password: '.passKey($password, $salt);

Given that the solution would be hosted on my own trusted webserver and only accessible through SSL/TLS?

If the attacker has access to the code used (posted above), the 'publicIdentifier' and possibly a list of generated passwords, would the above scheme protect against the attacker figuring out the master password?

I'm worried that using a short, non randomly generated string as a salt could compromise the strength of PBKDF2?

This kind of solution has been proposed and deployed many times. It kinda works, but it has a some drawbacks:

If two people use the same mechanism for the same target site, then both their passwords use the same 'salt' (the server name), which is not ideal. Conceptually, you want per-site passwords so that poor security on one site does not impact your security on other sites, so you somehow assume that some of your passwords will be recovered by attackers. If 10 users use your system on the same site, and that site gets hacked, and the attacker gets all 10 passwords, then he will be able to make a parallel attack on all 10 master passwords because the 10 PBKDF2 instances will use the same salt.

To a large extent, this issue can be fixed by using as salt the concatenation of the target site name, and your name (e.g. your email address, which is unique worldwide). Note that the salt does not need to be secret or random; what it needs is to be unique.
You only get one password for a given site. If the site wants to enforce a password change, and the new password must be different from the old one, then the system ceases to be applicable.
Many sites try to enforce "password rules" (minimum length, maximum length, presence or absence of some types of characters...). Most of these rules are remnants of traditional rituals with very little scientific justification, but they still exist. The problem is that all these rules are contradictory: there is no generation method that will produce passwords that will comply with all the sets of rules that various sites employ.

The bottom-line is that while a hash-based password generation method works, you will need to handle exceptions.

If you have a trusted Web server accessible through SSL/TLS, then maybe you could simply store your passwords there ? Possibly with some local encryption, relative to the master password that you type and send to your Web server.


How much can my company track me? It is common sense that companies networks are being monitored and they can track what https you visited. But how much does companies have access to on tracking your usage?

HTTPS and websites are a given to be seen, along with the time and packet used
Login IDs and passwords are also a given to be seen in company's networks

But could they monitor:

Exactly what kind of content I am seeing without opening the links directly? Are they only available to seeing list of links that were opened or all things?
I am opening an app (let's say line or whatsapp) and a picture was shared there, I was just scrolling down without clicking the picture at all, can they see that files/pictures are there?

Also last one case:

I am using my personal phone and personal laptop. However, I am connecting like this:

"laptop > phone > company network"

where my phone shared the tethered connection from the company network

Does this appear in the company's monitoring system that:

Laptop + phone connected to company network
Phone connected to company network

And does this case still available to be tracked by the company on what things I visit on my laptop?

In general if you use https, then the content of the websites you are surfing should not be visible to the company, as the connection between your device and the webserver is encrypted. However they can see, which websites you visited via the DNS queries which happen to be transmitted without any encryption. The same appeals to your phone: As WhatsApp uses end to end encryption they can not see, what content or what messages you get, but very likely they can recognize, that you are connected to the WhatsApp servers.

If you send your passwords only in https connections they won't see those too.

The tethering of your phone should be undetected too: Imagine your phone as a router, from the outside one can only see your router or in this case your phone, but behind that 'router' you can still have a ton of devices. This is because of a technology called NAT.
But this only works if the communication between the laptop and the webserver is encrypted. Otherwise they might be able to identity your laptop via the user agent in the http protocol.

Short summary:
The websites you are visiting can be monitored.
If you use only encrypted connections like https the content won't be monitored.
As WhatsApp is end to end encrypted, they neither can see the messages nor the files which you receive, but they will probably detect, that you are using WhatsApp.

EDIT: As @schroeder and @Steffen Ullrich pointed out:
All of this above does not apply if you trust your companies certificate authority. If you do so, they will be able to read all the content of the packets. This includes the websites you visit and your login credentials. They can see exact the same websites you are visiting.

But at your laptop you are able to decide, which CA's you trust. Furthermore you can see this for example in Firefox if you click the green lock > more informations > Signed by and check wether the signing entity is not your company and if it is a entity you trust.


How can I collect my clients' passwords? I am a web developer who often takes over clients' current website. The clients often send me their CPanel password via email. I know this is bad, but I don't know a safe alternative.

This is what I've come up with...

I have created a 'credentials' form on my dedicated, SSL encrypted server which accepts ONLY the password (no reference to domain or username which I ask for over email)
The form posts the password to my php script which encrypts the password with aes-256-ctr and saves it to a write only directory below the server public dir. The filename will be the client's random, no sequential id number so I can then match it with the domain.
I then SCP the file to my machine and immediately delete it from the web server. No passwords will be kept on here.
I save the password in an encrypted password store on an encrypted USB stick.

I know fundamentally, because the password can be decrypted its not 100% secure, but it is critical that I am able to eventually read this password as plain text.

Can I do this better?

If you're using a symmetric encryption, like AES, then the server can decrypt them since symmetric cipher uses the same key for encryption and decryption.

One improvement is to use asymmetric encryption like PGP. You can put the public key in the server, which allows the server to encrypt messages from clients, you'll then download the encrypted messages and decrypt them with the private key on your own machine.

Even better is if your clients would encrypt against your public key themselves, so the server never handles the plaintext even momentarily (it can even be any regular mail server), doing this correctly is much trickier than it looks but it's the most secure when done right.

For practicality though, I'd suggest using an online password manager that has password sharing feature, like Lastpass.


Is it safe to use 2FA within a password manager relative to using a separate app for 2FA? Nowadays, many Password managers offer options for 2-Factor Authentication such as TOTP. I am really confused regarding this. Isn't the whole point of 2FA is to prove you have a second way of proving your identity?
What kind of security risks would I have if I have both my passwords and 2FA within the same app compared to having them in different separate apps? Does having them within a single app pose any significant risk?

What kind of security risks would I have if I have both my passwords and 2FA within the same app?

What is your threat scenario?
It's convenient. On my laptop, both are available without any external devices. If I log on a website on a computer I don't own, I look up the password and OTP on my phone. The attacker in this scenario will get password, but not secret for 2FA - thus it thwarts many attacks in case of key loggers.
It also thwarts password leaks. If my password is leaked from another site, due to password re-use, 2FA will thwart attackers.
It obviously provides less security than a physical token, as malware on my computer may access the secret - something which is impossible with for instance a Yubikey.
Like so many other security features it's a trade-off between usability and security. It's better security, especially in some scenarios, than no 2FA, and it's weaker than a proper hardware token. It's more convenient than a hardware token, but less secure. It's cheaper than a hardware token, but also less secure...
I use both. For some sites, that would be inconvenient but not fatal to loose access to I use Bitwarden. For others, I carry a Yubikey. So in short - carry out a threat assessment. Who are you protecting against, and what attacks can they mount against you? There's no universal answer; it's a trade-off you have to make for your use case.


Locating device/person who is threatening via a hacked email At work today, someone of limited integrity has been using a group email address, to send company wide threatening emails. " I am going to sabotage this place...  I'm in the building - try to find me..."  Such tom-foolery

How can I find out what device was used to send the email and if possible what person?

While there might be indications and pointers in the email and logs if the offender wasn't careful, email as is doesn't provide any ways of mapping mails to locations.

Content of the mail, including all headers, is totally up to the sender. Thus, you can't trust any info that you extract from the mail itself. I'd call it easy to forge, if there was even the slightest hurdle.

You can look into your server's logs to figure out which host forwarded that mail to you. Usually, that wouldn't make you any smarter - either it's not some large anonymous mail provider abroad, or someone else's mail server, and the account on that used to send the mail might just as well be stolen.


How Point-to-Point encryption eliminates PAN storing? Encrypted Primary Account Numbers (PAN) are stored without any personal info. The intention is to tie it for the refunds purposes.

To move to a PCI-DSS environment, a vendor recommends moving to P2PE (Point-to-Point Encryption) environment. This would also eliminate this requirement of storing PAN according to him.

I am wondering how the refunds will be managed then? Since the current set up permits refunds based on a relation between transaction and a PAN. Eliminating PAN how the refunds can be done?

P2PE usage can eliminate PAN storage, because the POS system will not have access to the cleartext card data to retain from the start.  However, if you need to run subsequent transactions on the same card, such as returns or adjustments, P2PE alone will not help you there. You need to understand from the vendor what your options are.   Their answer may be to say that you will need to contact the cardholder to re-provide the PAN for any subsequent transactions.

To address the problem in a more palatable manner than that, many solutions offer both P2PE and a tokenization feature.  Rather than keep PANs, you would store a token and use that in follow up requests.  The processor/gateway/other relevant solution provider would then swap the token for the PAN when you send them a transaction.


Microsoft support asking me for my phone IMEI? I just contacted Microsoft support on my Lumia phone via the preinstalled "Contact Support" app, about an issue of the language of comments on apps in the Store being in the wrong language (different from my device language, and different from my account's country). After pinpointing the cause of the problem, they said I should just change the region under the "Time and language" section.

But before I left the support chat, they asked me for my email address to "confirm", even though they admitted that they can see my email address from the account I'm contacting them from. They wanted to send me more information about what I can try if this doesn't help. I gave them my email address.

And then they said that they also need my IMEI. Which was weird, so I just left.

Is there any reason they should actually need my IMEI for this kind of rather simple problem with a simple solution? Is it standard routine?
Is there any chance that the Contact Support app was compromised on my phone and I didn't actually end up in Microsoft support?
What is the worst thing someone can actually do with my IMEI? Am I overreacting?

(also, right at the beginning of the conversation they asked for my phone number. I asked why. They said it's standard practice if we lose connection, they will call me right back. I said it seems intrusive, and I'd rather not give it to them. They immediately apologised, and carried on with solving my problem)

Your IMEI is not bound to your IP stack

An IMEI number is used to identify a phone and is bound to each individual device, much like a MAC address is unique to a network interface an IMEI is bound to a device.  Unlike a MAC address it does not exist in your network stack.

IMEI stands for International Mobile Station Equipment Identity.  IMEI numbers are used for identity (not related to personal identity) on GSM networks.

Security Concerns

IMEI is the core of the handset's identity and is used for authentication with the carrier.  It's difficult but possible to leverage the IMEI to pose as another handset and make calls that will map back to the primary users billing and audit trail of calls.

Identity theft is not typically possible as personal information in a handset is not bound to an IMEI, the carrier would need to be compromised in order to map back in IMEI to personal identifiable information.

IF a IMSI and IMEI information can be obtained it would be a another story as both of these numbers could be used to get blacklisted and stolen phones opened back up with the carrier in order to resell them and have them function again in the carrier environment.

I would not be concerned with giving your IMEI to a technical support representative but of course would only want to give it to a legitimate entity for the sake of personal standards, much as yourself, of privacy and personal security.


How good is confidentiality with physical mail forwarding companies? I want to use a mail forwarding company that can receive mail for me and forward it to another address.
I found many places that do this, but I am worried that eventually my stalker would find out that I use this p.o.box, call the p.o.box staff pretending to be me, and get my real address.
How can I minimize this risk?
Any forwarding company that practises strict identity check over the phone/emails?
World-wide ok.

You don't have any guarantee of this. Even with the best intentions, the staff could be duped by social engineering.

You can't really minimise the risk any further than using a reputable forwarding company, but my advice would be to call them and ask about their account security practices. They may also be able to set an account note about your situation, e.g. "customer requests that no information, especially forwarding address, is revealed to anyone who calls in relation to the account, even if it's the customer themselves". At least that way you have some peace of mind over the matter.


The security of dll files in a Client/Server application in .net I'm going to write a Client/Server application. There are some ambiguous concepts in this that I was not able to get answer to after many hours of searching.

As we all know one of the major caveats of the .Net framework is that the DLL files can be decompiled and reverse-engineered on the client's machine.

Now my question is can I put some of the DLL files required by the Client on the Server?

And if true, will it be completely secure or it will still be open to getting reverse-engineered/decompiled by crackers?

As mentioned in a comment above, there are two basic strategies for protecting the IP in your source code:

Make your source code more difficult to understand. This is typically done through obfuscation. Obfuscators attempt to make the source code difficult to reverse compile and/or difficult to understand once they've been reverse compiled. I'm no expert on obfuscation tools so all I can do is point you to this list and suggest you research and post follow-up questions if any arise. Obfuscation is "easy" in the sense that you get the tool, possibly paying for it, and then incorporate it into your build process.
Keeping your code on the server. This involves moving some of your application logic to from the client to the server. There are many reasons to move code to the server. Protecting IP is one. Having logic that requires the server's hardware could be another (common for mobile solutions with low processing power). This is more difficult to implement than obfuscation as it affects your application's architecture. The new architecture would have the client, rather than making a local function call, making a RPC to the server to perform some calculations. SOAP may be the most common technology but there are many others. The exact technology will depend on many factors including the client's and server's platforms (eg: is it a native .NET app, a browser app accessing a .NET server, mobile app, etc...) and you're coding skills.

Hope this helps.


What security problems does copying .Xauthority to another user present? If I want to use a GUI application with another user (example: webbrowser), I can copy the .Xauthority file to that given user's home then I can "su - user" and start the GUI app.

Question: but what security problems does this bring?

There is no isolation between GUI apps on X11, so that allows your user to spy on your clipboard's content, create windows that may look like spoofs of your own windows (e.g. spoofs of your polkit1 dialog or screen locker), record your entire monitor, implement a keylogger...

Just create a guest session, seriously. Or use a VM. I would not trust other technologies with guaranteeing isolation right now on X11. And I would not consider XACE a useful tool for the general public, because it's very low level, and very hard to distinguish between X11 internals and legitimate calls (not to mention some APIs like X11 selections get massively abused and are impossible to mediate in their current form).

If you can run Wayland already, then you could look up this post by GTK+/GNOME developer Alexander Larsson I haven't reviewed it though, but this is experimental, on-going work done by engineers who are brilliant but not necessarily trained security professionals. Use with caution.

You might also find my answer on Should I get an antivirus for Ubuntu? to be relevant.


Are the 'silent' cryptolockers around? A few days ago I noticed a discussion on a website about cryptolockers.
Someone said a cryptolocker operates silently untill it has encrypted all files and then comes visible to the user.

The working method was to silently encrypt all files.
After it's done, the cryptolockers waits a few weeks and activates itself so there is no present back-up available.
If a user tries to open a document in the waiting period, the cryptolocker quickly decrypts the file so you wont notice the encryption.

I don't know if this is true but I haven't heard anyone ever talk about this technique apart from that particular person.

Personally I hardly believe that this kind of cryptolocker exists.
like what if the encrypting process/executable is deleted? does that mean all files slam shut or stay open because it can't communicate with the criminal's servers?

I've witnessed about 4 cryptolock attacks on our network. All were immediately noticed because the files were encrypted. you could also tell by the help_decrypt.txt files located in the encrypted directories.

Greetings,

After it's done, the cryptolockers waits a few weeks and activates itself so there is no present back-up available. If a user tries to open a document in the waiting period, the cryptolocker quickly decrypts the file so you wont notice the encryption.

This does not make much sense. A backup process would also try to access the file, so the file would be decrypted during the backup and thus the backup would contain the original file.

  Someone said ...

Always ask for the source of such a claim. Just because someone on the internet said something it does not mean that it is correct.

Maybe whoever said this has read about cryptolocker which waits before activation, like described at Locker: Cryptolocker Progeny Awakens. But this is about remaining silent for a long time and only after some time starting to encrypt files. By deferring activation until a specific date the ransomware evades dynamic analysis because it does nothing bad for now. It thus can spread without getting detected before all sleepers get activated at the same time.


How can I encrypt all files with .sql extension using OpenSSL? I have some .SQL files in specific folder, so I'd like to encrypt them using OpenSSL.

This apparently doesn't work:

openssl aes-256-cbc -in *.sql -out *.sql.enc -pass ...

Use "find"

OpenSSL is very finicky with its command line parameters. It does not give good error messages at all. And it's easy to mess things up and not notice.

Try this:

Generate some input files

$ for i in $(seq 9); do echo "This-is-file-#$i." > $i.sql; done

$ tail *.sql
==> 1.sql <==
This-is-file-#1.

==> 2.sql <==
This-is-file-#2.

==> 3.sql <==
This-is-file-#3.

==> 4.sql <==
This-is-file-#4.

==> 5.sql <==
This-is-file-#5.

==> 6.sql <==
This-is-file-#6.

==> 7.sql <==
This-is-file-#7.

==> 8.sql <==
This-is-file-#8.

==> 9.sql <==
This-is-file-#9.

Store password in environment variable

(I have a bad feeling about this. No idea how bad this is. But this will have to do for this demo. I clean Bash shell command history but I suspect that this is not enough. -- Someone else will have to answer that in another question.)

$ export mypasswordvariable='Pa$$w0rd'

$ history -c

$ echo -n $mypasswordvariable | xxd
00000000: 5061 2424 7730 7264                      Pa$$w0rd

Encrypt

$ find -maxdepth 1 -type f -iname '*.sql' -exec openssl aes-256-cbc -pass env:mypasswordvariable -base64 -salt -in \{\} -out \{\}.enc \;

$ tail *.enc
==> 1.sql.enc <==
U2FsdGVkX19njV2FbnxtQNEZfOZM49YmCSYCE4cOeKeLZDrfovbzad+dFoxds+uN

==> 2.sql.enc <==
U2FsdGVkX189IIeDm3mJEA8EG56I/mAzasXrtNhEDY8MT1/IOkHS/WKDHH7h69Fo

==> 3.sql.enc <==
U2FsdGVkX1/y3eRAFIIbsreix9nhpg611t3w0jn19Px8lBTjeE44rItSwwaaCudt

==> 4.sql.enc <==
U2FsdGVkX1/jHEXUfqzr0mdtChCIeQhFpRe+P0cOSeJf0Er96fDKD0nKV0nwPpL3

==> 5.sql.enc <==
U2FsdGVkX1/ask3K8Zt0bgvP/u5SL6hiFBz7u6Msc3LgRQXwa9Qgr4o04A8melkl

==> 6.sql.enc <==
U2FsdGVkX1+YRUF/nBKBdV4XIcyyyZBd7slaXMIQCSIvUnEeSkaR6GPYdE57Z1ng

==> 7.sql.enc <==
U2FsdGVkX1/zJSXlPNNJmMO4dfSqyGkweD+wAftmgOHgpT0NIEoexX0pRKQLPDkR

==> 8.sql.enc <==
U2FsdGVkX1/7i3jxHVTbqjA8JycR0+/46nWpJZHQ9HhGAFjRuszi/YLFe+2cWSMG

==> 9.sql.enc <==
U2FsdGVkX1/Zg7v5fgAJWUuBmb1mz/2cGwTwLSNbTHeSsCs3YtBe1fKpjY5CFIJ/

Decrypt

$ find -maxdepth 1 -type f -iname '*.sql.enc' -print -exec openssl aes-256-cbc -d -pass env:mypasswordvariable -base64 -salt -in \{\} \;
./1.sql.enc
This-is-file-#1.
./2.sql.enc
This-is-file-#2.
./3.sql.enc
This-is-file-#3.
./4.sql.enc
This-is-file-#4.
./5.sql.enc
This-is-file-#5.
./6.sql.enc
This-is-file-#6.
./7.sql.enc
This-is-file-#7.
./8.sql.enc
This-is-file-#8.
./9.sql.enc
This-is-file-#9.

Yup. Decryption works.


Choice of authentication when both HTTP and HTTPS are supported I am looking at a system where you are able to choose if you are going to connect to the web application via HTTP and/or HTTPS. You have to authenticate on either one. I know that the best option is to use basic authentication with HTTPS, since then you can choose whatever hashing algorithm you like.

But since both of these are going to be supported, are there any other options than to use digest authentication as a "suitable for both" type of solution?

If you really need to use authentication with plain text (HTTP) then you should make sure that sniffing the credentials will not compromise these. While sniffing is easy with basic authentication, a properly done digest authentication (i.e. with nonce to defend against replay attacks) is much better. Unfortunately with digest authentication you need to save the passwords at the server in clear text or an equivalent.

But the best option is of course to not transfer any sensitive data with plain HTTP and this includes authentication credentials.


Passport information compromised I still have my passport in hand but my purse was stolen with all my passport information and passwords with security questions and answers in it. Should I get a new passport or since I still have my passport am I safe

I would report the theft to the police and highlight the point that your passport information was written down in it. Unsure of the laws where you are but in the UK if your passport has been stolen then you must report it. Obviously you still have your passport but with me not being a hardened criminal i am unsure if a passport can be recreated from the details you had written down.

Or ring the passport office, they will be able to advise.


Windows App Store security It seems like most companies now a days, give you a crappy laptop with some version of Windows on it that allows you to access the internet (sometimes they block YouTube, Facebook, etc.), comes with Microsoft Office, Microsoft Outlook, and whatever internal software they use for their particular business. If you try to install some other kind of software, you will be told that you don't have administrative privileges and to contact your administrator.

This approach makes sense to me from an administrative perspective (easy to set up, maintain, costs, etc.). However, from a user's perspective it can feel a bit draconian and counter-productive (and not fun).

The Windows 8 App Store (http://windows.microsoft.com/en-US/windows-8/apps), may be a step in the right direction for Windows in that it could allow IT Administrators the peace of mind to allow users to download the apps that they think are appropriate for their policies, while also allowing the users the opportunity to be more productive. Is there a case that can be made for this?

Is there a way for an IT department to customize the Windows 8 app store offerings it provides to its users based on its own internal policies? Is there something else comparable out there with similar "app-store" functionality and customization for Windows Vista/7?

It is possible to turn off the Windows Store altogether via Group Policy.  (Item 5 here)

  This setting can be found in Computer Configuration, Administrative
  Templates, Windows Components, Store.

Once that is done, Windows 8 apps can be side-loaded.  Details here.


How much can domain admin really do without access to domain controller? With almost all ports blocked on the domain, there is no way for intruder to remotely access domain controller and do big changes to the domain. Can anyone enlighten me on why a lot of resources are still put into protecting domain admin accounts and how much possible harm can an intruder do with domain admin account without access to DC?

Maybe this will help:

You said:
"With almost all ports blocked on the domain, there is no way for intruder to remotely access domain controller and do big changes to the domain."

All ports blocked? inbound or outbound? This is the idea behind rats/backdoors.

If a domain admin can control any system, they can disable a system from domain restrictions if they wanted to. Leaving them more vulnerable than you'd expect (a monitoring note). If they domain admin wanted access to the domain controller, they'd pretty much just need to backdoor or monitor a user who does have access. They can launch exploits that may require admin privs locally to exploit. Fileshare and vm escapes sell for some good monies these days. I mean, there's a whole world of possibilities. If your single point of failure is your DC, you might want to think about the platform your DC is on. Most people, it's on windows, with other services, on a shitty physical box or virtual instance. If it's in a virtual instance, that's probably within a whole other realm. People have found attackers using dns, http, smtp, irc, xmpp, smb, nss, slack web api, other web api, etc... to pull data about your enterprise out depending on abilities of your network. Some attackers have dozens of malware generators just for these types of network and will rotate between sample structures until something else works (often from phishing).

So, to answer the question, your enterprise is at stake. You don't need domain controller access, which an intruder would have better leverage to attack at with domain admin creds, to own an entire company. That hasn't been thought of as needed or required for many years. The claim that ports being blocked doesn't really change that.

If your entire network has no external access, PoC campaigns have shown that this doesn't really stop someone dedicated to taking your company.

Soo.... The reason why people put so much effort into it is because it's a baseline monitoring requirement if nothing else to attempt to protect administrative accounts that can compromise any system in your enterprise.


How to block or detect user setting up their own personal wifi AP in our LAN? Recently, I found a user plug a USB Wifi stick on his desktop, and set up an AP without password.
How can we detect or block this via firewall rules or other approach?

Something left unsaid, Why is the user wanting a WiFi?  As long as the user feels they have a legitimate need they will continue to find workarounds to any of your attempts at blocking it.

Discuss with the users what they are trying to accomplish.  Perhaps create an official wifi network ( use all the security methods you wish - it will be 'yours' ).  Or, better, two - Guest and Corporate WAPs.

WiFi is not something which needs be banned "just because," however it does need specific attention, just like all other aspects of security.


How do I serve a webpage on a local PC without revealing my IP-address to end users? Are there any ways to serve a webpage locally without revealing IP to end users?

In order to hide your IP address from users you need to make sure that they don't access your server directly, i.e. put some kind of reverse proxy in between. For public sites this can be done by putting a CDN like Cloudflare in front of it. For internally hosted sites this can by done by using services like ngrok or similar.


Mutually Assured Destruction and Cyber Warfare During the Cold War, the U.S. and the former Soviet Union pursued a policy of mutually assured destruction (MAD).  I am wondering if it is safe to assume that organizations such as the National Security Administration and its counterparts in Russia are now pursuing a similar strategy vis-a-vis cyber warfare.  I read in the newspapers about the vulnerability of the electrical grid and the banking system.  Could it already be true that both the Russian and the U.S. governments have the capability of taking down each others' electrical grids and banking systems?

While, as others have said, Mutually Assured Destruction is not something that could apply to Cyber Security, it is certainly true that tit-for-tat cyber aggression has been going on for quite a while and has been pretty nasty over the last few years between the main government supported hacking groups.

Indeed, I believe that the USA did a deal with a large competitive country around 18m or maybe a bit less ago to get them to calm things down.

One of the issues with cyber warfare of course is that it is very difficult to attribute so those of us not involved with cyber military/intelligence can never be sure who is doing what.

The bottom line, though, is that security is certainly not "good enough", not in any industry sector - even a few days ago, one of the US electricity companies found some malware on an offline computer though thankfully not one (at least that they admit to) that was controlling the grid.

Anyone following the cyber security news will painfully be aware of the vulnerabilities in many industries including critical ones such as government, health, city control ("smart" cities), power, ...

However, I do not believe that the capability exists currently for one attacker to take down an entire power grid in any of the major, large, countries. In general, they are too fragmented to be brought down in a single attack.

Similarly, banking is very tightly controlled and banks are very cautious about their systems and how they are interacted with. They have numerous interlocking safety mechanisms to prevent mass fraud or other manipulations. Indeed, the biggest worry with banking is attacks undermining public confidence rather than actual failure of the systems.

UPDATE: MAD does not exist in the cyber realm because of the vast complexity involved and because the physical world is relatively unimpacted (compared to nuclear holocaust).

You can take down a network maybe, a website for a while, you can steal lots of data. But most systems have backups and are quickly restored with new patches and security added.

The worst cyber attacks so far have taken down an organisation for a few days. Sony Pictures may have been the worst admitted too, they were off for a couple of weeks I think but they had appalling security!

One of the biggest current fears in cyber security is un-noticed changes to data rather than mass encryption or theft. We've yet to see a big example of that but I know that there are lots of experts who are worried about that. But even that doesn't amount to world destruction, the worst that is likely to happen is that a government would fail - maybe some lives lost (if certain industries were impacted, like health). Understand that I'm not dismissing such impacts, they are certainly severe, but they don't rank amongst impacts like MAD.

In regard to your comment about banking. Whilst nobody in their right mind would consider banks as entirely "good" actors after the litany of bad things that have happened over the last decade. Most countries have remarkably tight rules regarding banking for this very reason. In any case, most banks carry their own liabilities - even though they may be bailed out by governments, it comes at a terrific price to the people in charge. They are so carefully inspected in the majority of countries that wrong-doings inevitably are found out in the end. There are also too many people involved inside the banks for such things to be well hidden - the well-known banking issues were mainly caused in areas where a relatively few people control everything.


Looking for Information security / risk management table top or card games I am looking for table top or card games related to risk management or information security. A kind of "serious" game that can be used as a teaching tool of infosec/risk management.

I know only about Microsoft's Elevation of Privilege.

I haven't played anything like this myself, but I found this on Google: http://www.itgovernance.co.uk/products/3831 - Is this similar to what you are looking for?


Does encrypting data multiples times over make it any more difficult to break into? Say I have an encrypted zip file with data in it. I feel like I really want this data to be secured so inside that file, I place another encrypted zip with a different password, and then inside that one, I place a final encrypted file with yet a 3rd different password.

The questions I'd like answered:

Assuming all 3 files are encrypted with the same cipher, such as Rijndael 256, is there any actual security benefit to doing this? ie if someone can decrypt the original file, would it be just as trivial to break the next 2?
Would using 3 different encryption ciphers make this arrangement more secured?

NOTE: We're assuming here, that the intruder does not know and is unable to guess the passwords and thus must use alternate means to break in. The passwords are strong passwords which are not susceptible to dictionary attacks.

The problem with simply dogpiling one encryption algorithm on top of another and believing that everything will somehow be "more secure" is that if you haven't studied the algorithms in detail, you won't have a full understanding of their weaknesses, or enough understanding of the side effects of this operation.  That's not intended as an insult, I'm simply inferring from the question that you're not a cryptanalyst, and you haven't done these studies.

Have a look at Triple DES.  It was designed as a replacement for DES once it was recognized that DES was too weak to withstand ever-improving brute force attacks.  DES has 8 byte keys, so logically since DES should withstand a brute force attack of 2^64, Double DES should withstand an attack of 2^128.  So why use Triple DES and not just use Double DES?  It turns out the estimate of strength is not even close to correct.

First, DES discards the top bit of each key byte, so DES has a key size of only 56 bits -- 55 bits once you factor out XOR reflection.  An attacker can store the output of a brute force attack on the first instance of DES, then attack the second instance matching any of the stored outputs, creating a meet-in-the-middle attack.  This results in an attack of 2^55 + 2^55, which is 2^56.  All that work to run DES twice yields a one bit of improvement in strength.

So Triple DES obviously doesn't withstand an attack of 2^192.  3DES does improve this to 2^111 bits of strength, which is still plenty strong, but it's a far distance from the implied strength of 2^192.

It is not obvious that encrypting the output of one pass through DES with another pass is easily broken, yet cryptographers figured that out.  Can you offer strong evidence that your two-layer encryption isn't similarly flawed?

Crypto is hard because the random-looking bytes coming out of an encryption algorithm look very much like they've been successfully scrambled.  But there isn't an attribute you can test for to know if the encryption is effective or if it's breakable.

So the advice generally given is "do not invent your own crypto algorithms".  Going along with that, it is not recommended to invent your own protocols, either; if you must, you have a lot of work to do to prove they're secure.


Concept using ssh to create dynamic firewall. Good or Bad idea? The Goal
Create a secure process to open a firewall port on a server (on demand), start a listening server, and ultimately close the firewall port. This would improve security by not always having a port open for DoS and port scans. With key usage I could restrict/control access to a few select parties.

The Implementation
Most servers run an ssh daemon (sshd) for administrative access. sshd would be configured to run on non standard port and authenticate with pub/priv keys. A (root) user account would be configured with a login script that would open port and close it after a defined period. The script would also start the listening server if it was not already started.

Assumptions and Knowns
The listening server would authenticate and be security aware. DoS and scan vulnerable when listen server running. The hard time out would only affect future connections and not close secure open connections.

Create a secure process to open a firewall port on a server (on
  demand) start a listening server, and ultimately close the firewall
  port.

Your goal seems flawed for many reasons. This would not be scalable in an enterprise environment due to the lack of available ports that could blossom on a heavy day of visits/work. You would always have to have multiple firewalls in round-robin behind load balancing. Further, your firewall would need all types of ASICs to make it work making it a pretty expensive firewall. On the DoS side of the equation, you're wrong. Sending 10gbps to any socket opened or not will kill a 1gb connection regardless of how many drops/rejects (which are not a good idea), that you envision making. The BETTER logic would be to configure your router to only accept connections from trusted sources, and block all of the remainder.

I won't even get into the statistics of client side exploits, phishing, and other attacks your firewall won't stop. But at the onset, your goal doesn't do much but add a lot of overhead and complexities that will likely hinder you in the future.

Your implementation is also flawed and based on security through obscurity (changing the firewall port). You would be better off using standard port with rules in place on that port with two factor authentication. You're assuming an attacker won't find the port. While you may minimize the low hanging fruit, eventually someone will find the port, and although they may not be able to do anything, the can certainly perform a resource exhaustion (DoS) against your firewall. That in turn depending on its placement could outright block all traffic. "Root" access is a horrible idea especially at the egress point, and you're assuming a firewall of this nature would be run perhaps Linux? While it may be, most ASIC based firewalls that need to do heavy hauling tend to consist of JeOS (Just Enough Operating System. But should you insist to go the Linux route, this is what sudo is for.

I didn't bother with assumptions, there is no need to.


What does Gazzang zNcrypt actually protect against? In an effort to increase security of our website, I'm reading up on Gazzang zNcrypt, which claims to protect data in databases from breaches.

Technically, it seems to do filesystem encryption. As far as I know, this is effective against hackers gaining physical access to the harddisk. If hackers manage to login to the DB, SSH, FTP, website or any higher level, they'd just see the decrypted data without effort.

Are these assumptions correct as to the level of security provided by zNcrypt?

I work for Gazzang. Glad to see your question on this forum. Your assumptions are correct in that zNcrypt provides filesystem encryption that protects data on the hard disk from a breach. Depending on your use case, zNcrypt can also help you meet certain compliance regulations.

The TDE can also protect data blocks as well as files, which works particularly well if you're running Hadoop. For added protection, zNcrypt leverages process-based ACLs and software-based key management via zTrustee.


Favicon Redirection Possible Security Flaw I have the domain example.com

When I enter the URL https://api.example.com, Chrome loads the page and also tries to load https://myapp.example.com/favicon.ico, and that request receives a 301 redirect to **http://**main.example.com, and receives the HTML content of it.

I know how to fix it, but I´m interested in what will be happen, because main.example.com is not on https, anyone could attack (DNS replace) and respond to the 301 redirect with his malicious content.
It was a favicon redirect, so Chrome at least didn´t seem to execute the code.
I changed the main.example.com to respond

<script type="text/javascript">alert("hola")   </script>

but the alert was not executed.

So is this a security flaw?

According to your question Chrome was loading a plain HTTP favicon in a HTTPS page without any browser warning. Interesting.

Redirecting to a plain HTTP website is not a vulnerability in itself. However, it is a security flaw if the redirect is accidental and you want your users to remain on a secure, trusted channel to your site.

Script content will not be executed in a favicon but the request could leak cookies if the cookie domain isn't set correctly and the secure flag is not set. An attacker could also do this with your site if the user visits any site under plain HTTP.

If there are any browser exploits that can be triggered from a favicon you could be putting your users at risk here, although the initial redirect and the browser exploit are really flaws in the browser rather than your site.


Is this some sort of scam or do I have stalker? Sender: msmith11@mail.com
Emails are from IP address:74.208.4.200

Emails are weekly. all text, no links, no images. Some Depict sexual fantasies in high detail directed to a female - which I am.
Most recent email stated: wear red tomorrow.
I didn't wear red that day.
Next email stated: that wasn't very red, try harder tomorrow.

Trying to determine if it's some sort of ploy to get me to reply at which my email becomes compromised in some way? Or if I should be watching over my shoulder a little more and looking out for a creeper?
The IP address seems to be on the spam list when I google it. Email address seems generic or fake or spoofed.

Is there other source data in the email to help dig?

Any tips or guidance is appreciated.

Here's an email with all source info.
Its an older one..when I attempted to paste in one that had a lot more graphic content this site told me I was spamming and it wouldn't let me.

x-store-info:J++/JTCzmObr++wNraA4Pa4f5Xd6uensStKY2P46TrDiNfTinmuG66B1kxfqve/2MA8JS8RXbaxzm3yf6YIXD2rqIZc0WhwIWl/p1L+f4iXf2nVV1YNnm/jsljz7aLeeta3K+uNGtkU=
Authentication-Results: hotmail.com; spf=pass (sender IP is 74.208.4.201) smtp.mailfrom=MSMITH11@mail.com; dkim=none header.d=mail.com; x-hmca=pass header.id=MSMITH11@mail.com
X-SID-PRA: MSMITH11@mail.com
X-AUTH-Result: PASS
X-SID-Result: PASS
X-Message-Status: n:n
X-Message-Delivery: Vj0xLjE7dXM9MDtsPTE7YT0xO0Q9MTtHRD0xO1NDTD0z
X-Message-Info: NhFq/7gR1vQ3/ySCLm+UU3K0MkFlT5F3PoTvE/eJ3d7NYFbWcBAaRj1WgObFwMdCskxBwQWS3ii2isDEH8z0x7nIDiTrEJsDLyyBEZPT1LTeiBmEfiUUmCM9dXzCj/LnbctD6hE+NJ1G3XvP13BvxkixB3OfQ7a3mC/MDqwfw4dGeFTbDYgRkCd4+vo3rC8XjECIkBKxd45+U4+dEiaSWSwc1QT8OUQW4jP9JexruBYekeCkh4htrA==
Received: from mout.gmx.com ([74.208.4.201]) by COL004-MC6F36.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23143);
     Mon, 19 Oct 2015 14:01:19 -0700
Received: from [67.4.235.234] by 3capp-mailcom-lxa15.server.lan (via HTTP);
 Mon, 19 Oct 2015 23:01:18 +0200
MIME-Version: 1.0
Message-ID: <trinity-585081ab-4898-4a00-9379-fe56224dfd77-1445288478735@3capp-mailcom-lxa15>
From: "ML Smith" <MSMITH11@mail.com>
To: myemailhere

Subject: Thinking of you. Part 3
Content-Type: text/html; charset=UTF-8
Date: Mon, 19 Oct 2015 23:01:18 +0200
Importance: normal
Sensitivity: Normal
X-Priority: 3
X-Provags-ID: V03:K0:GIcR2OMy3szCgVf9sqGX9G+qJ0IxUP8EHjgUXDwHq1+
 C1lfP+FviRU8qeDbucMVUkFxs408Pky+kqcL+EQSR6smvtD6l5
 bBDGRPIHrQmfKXTkNqlMk3CmwU2Gdpmknjv24Vabf3+dH2qSHw
 LofUvrClybCqUVNabt70NrkPftIFYjiciu4/UGjuKHyedVHQ2s
 npwXR96o9waL0EyVThvtr/TpsEV0omVt76T2khlNturf4Tf/0k
 V/XqayeYJlkLDPebUAWwfGfdNCfPU5fZdoaJLhvI7ROgkXVSpz
 TZcVOuhCXDTgMdv95803p2QijVW
X-UI-Out-Filterresults: notjunk:1;V01:K0:sF4+/cOPXrk=:hqKaETrfzG3ZMBDL6lp5es
 7WClsB/9spHemywn2JvIdGQszdHDSc5r3pgTx1XFB8y9S5ii45dHmzGOgVm2UiO6sLUnFJ88I
 NftaGS2DGI5/oaQlIIq2HIQMnbNdiKbjqFpvravnctHmDDrmUX1Qt28dXz2tqxjaxC1OhyuzJ
 5+IsbPt7+UtBaHAj6jZDUEVsSRUqsjO8yHMn7TOHzo5L22KQbt4jaaydeVlOiX7HmpSLYdtrg
 9p4JdeBm++Ah8l8NMlNsiOV6XjZwGEzozlv6tgLh4bi7duTIgfcEwG8Q/R6IfNtwsiUFJ0GfT
 t9rmRIx4ps79oZqoLPs5CDnZ+ZTJHvjRftwwGts6Bc9ZCOTR4WA8b+DZnltQoVZgGCBlwfT2e
 122Hg8CHMqPzwY7LwH9mLgjwv02jJSgk3zcVirevauRywGnhqenQ6ulFe9g/P9Ic140R/H1wP
 /isGoZvhXQ==
Return-Path: MSMITH11@mail.com
X-OriginalArrivalTime: 19 Oct 2015 21:01:19.0667 (UTC) FILETIME=[4D878030:01D10AB1]

one day i&#39;ll walk up behind you and start massaging your shoulders and youll know it&#39;s me. ill finish and start walking slowly away. wait a few seconds, then follow. the hotel will already have been booked and it&#39;s only a block away. we can be back before anyone notices.

&nbsp;

its going to happen soon kitty kat

This appears to be coming from one or more scammers. By analyzing the mail headers it reveals the IP address: 67.4.235.234

In addition to that, it seems some internal information is disclosed from the sender: 3capp-mailcom-lxa15.server.lan

http://mxtoolbox.com/Public/Tools/EmailHeaders.aspx?huid=a56c17eb-26ce-4d53-b030-e9f1a1447fec

By searching for this internal information disclosure, it revealed that this QWest customer is sending the emails (although it could be a compromised machine) and are found on scammer sites:

Performing a WHOIS lookup on the IP address an abuse email address with instructions on how to send an abuse complaint is found:

I suggest to fill out all the details that they want, including the mail headers (yes, multiple headers) and send a complaint to abuse@centurylinkservices.net

In addition, you could send them the link to this topic so they can see this analysis.

Hope this helps and good luck!


How do I get a count of unique nested URLs in an web application? I'm scoping a web application for a pentest. The  application has a number of dynamic nested URLs. I've crawled through all the URLs in the application via Burp-suite. I need to obtain a list of unique nested URLs in the application. Whats the best way to achieve this?

You can use the copy links function in Burp Suite. Select the top level domain and copy links


Certificate validation to multiple Root Certificates? I found this article and stumbled upon the part:

  So if a client trusts either of the G5 certificates as a trusted root, it will trust any certificate issued by a subordinate CA such as the G3.

As to my understanding of RFC5280 (Section 6.1.1 (d)), the server needs to indicate which TrustAnchor the client should validate the certificate path against. The author of the first article (to my understanding) claims that this indication is not necessary and/or that the client will accept my certificate it it trusts any one of the signing CAs.

So assuming we have a scenario like this:

Root A --> intermediate
Root B --> intermediate
intermediate --> my Cert

where Root A and Root B both signed intermediate and intermediate signed my Cert.
The Server is configured to deliver intermediate and my Cert as the certificate path and will hint that Root A should be the Trust Anchor.

A client will obviously accept my Cert if it has Root A as a Trust Anchor.
Will a client accept my Cert if it has only Root B as a Trust Anchor?
Will a client accept my Cert if it has only intermediate as a Trust Anchor?
Will a client accept my Cert if it has only a self-signed Version of intermediate (but same priv/pub Key and Subject) as Trust Anchor?
Does any answer change if Root A and Root B both have the same Subject?
If any answer is No, how can a server know which Trust Anchor the Client has, as in which RootCA to indicate for the Path-Validation?

I suspect, you are talking about SSL/TLS certificate validation in a HTTPS context.

  how can a server know which Trust Anchor the Client has, as in which RootCA to indicate for the Path-Validation?

server don't know and not required to know about trusted anchors installed on the client. Server sends leaf and intermediate CA certificates (without roots) and the rest is up to client.

Client uses retrieved certificates and constructs certificate chains. During certification path building multiple chains can be produced (due to cross-certification). That is, leaf certificate has more than one path to one or more trusted anchors. Depending on on client configuration (crypto library), only single chain (best one) is chosen and used for the rest process of certificate validation.

Eventually, there might be a case that chains on server and client are different. For instance, server has Root A as a trust anchor (but no Root B), while client has Root B as a trust anchor (but no Root A). If intermediate certificate can be chained to Root A on server and to Root B on client, the certificate will be successfully accepted.

  Does any answer change if Root A and Root B both have the same Subject?

they have to have the same subject, because one of certificate binding in the chain rules is that issuer field of the certificate must match the Subject field of the issuer certificate. Otherwise, the issuer certificate may not be found.

  Will a client accept my Cert if it has only a self-signed Version of intermediate (but same priv/pub Key and Subject) as Trust Anchor?

if crypto library does support use of non-self-signed certificates as a Trusted Anchor (Microsoft CryptoAPI, for instance, does) then it is possible. Then root certificate has no effect in the certification path building.


Is it possible to encode bytes in an buffer overflow exploit that bypass string functions? Disclaimer: this exploit is purely for educational use. In this exploit I play the role of the victim and the software exploited is written by me alone.
I have a simple HTTP server that I want to exploit with a buffer overflow attack. I am sending a maliciously crafted HTTP request that overflows the buffer of a request variable via the strcpy function - the scenario being that the developer forgot to use strncpy.
However, there are two challenges with overwriting the return address in this program that I don't know how to solve:

strcpy will stop copying when it encounters a NULL byte in the source string. Therefore, is it possible to overwrite the return address with a target address that contains the NULL byte 0x00? For example, if the target address is 0x407200, we must write \x00\x72\x40. However, strcpy will return upon the first \x00, and will not copy the \x72\x40. Therefore, is it possible to encode \x00 such that it does not cause strcpy to return prematurely?

Likewise, the HTTP parser in my HTTP server splits the HTTP request into tokens with the space character \x20 as the delimiter. Therefore, is it possible to escape this character, like the NULL terminator above, such that an address that contains \x20 does not get  split into two seperate tokens by strtok?

If not, is this just a limitation of buffer overflow attacks, in that, due to the construction of the program in question it is not always possible to overwrite the return address with a target address of your choice?

Null bytes in your return address are hard to beat. Since its an address as opposed to code you cannot use an encoding stub. There are however a few potential ways to get around this:

1)Find the perfect address. Sometimes the application will copy code onto the stack or other areas in memory. If you're lucky you can find a static location that contain a suitable op code such as jmp esp.

2) Check for Unicode support, multi byte wide Unicode will allow you include null bytes in your payload.

3) It may be possible to spray the heap and make a predetermined address increasingly likely to contain your payload. This predetermined address can be chosen to not contain null bytes.

Good luck


Do simple Linux servers really need a non-root user for security reasons? Playing devil's advocate,

Let's assume I purchase a Linux server from a hosting provider. I am given a password for the root user and am told I may login using SSH. The only purpose this server has is to host one or more websites, possibly with SSL properly configured and enabled.

My initial login will be to install (via a well-reviewed and widely used package management system) and configure (by editing files in /etc) a web server, a database, some software that does not access the Internet, and a web-application server (PHP-FPM, Unicorn, that sort of thing). The package management was smart enough to set up unprivileged users to run the servers, a configuration I maintain.  Next I put some website files (PHP, Ruby, Python, etc) in /var/www, and chown all the those files to be owned by the same unprivileged user that runs runs as the web server process (ie. www-data).

In the future, only I will login, and only to update the web site files and to perform some read-only operations like reviewing logs.

In the scenario above, is there any security-related reason, why I should create a non-root user account to use rather than the root user? After all, almost every command would be run with sudo had I logged in with a non-root user.

Please Note: I understand there are many universally compelling security and non-security reasons to use non-root user(s). I am not asking about the necessity for non-root user accounts. My question is strictly limited to the limited setup I describe above. I think this is relevant because even though my example is limited, it is very common.

There are a few reasons:

traceabilty: Commands run with sudo are logged. Commands run with bash are sometimes logged, but with less detail and using a mechanism that is easy to block.
privilege separation: almost every command is not the same as every command. There's still plenty which doesn't require root
file editing: the web files are owned by a non-root user and run by a non-root user... so why would you edit them with root?
attack mitigation: Consider the following totally-not-even-hypothetical scenario: Your workstation gets some malware on it which filches your FTP/SCP/SFTP/SSH login out of the stored authentication database from the appropriate client and transmits it to the attacker. The attacker logs on to your device to do some mischief. Now, can they cover their tracks, or will what they do be visible to you? I talk to someone new more than once every week to whom this has recently happened.
automated attack mitigation: A hacked server in Brazil is scanning your network and pulls up a listening SSH server. What username does the attacker use for his automated attack? Maybe webuser, or test, or www or admin -- but more than any other: root.

There are certainly many more reasons, but these are the first ones to come to my head.


Is dereferencing a null pointer in C a security risk if the program isn’t a daemon, but a small script lauched as a separate process for each request? The following code is part of a program that is spawned at every request by the nginx’s ruby on rails script :

static void time_t_to_dos_time(time_t user_supplied_time_t, int *dos_date, int *dos_time)
{
    struct tm *t = localtime(&user_supplied_time_t);

    *dos_time = t->tm_sec / 2 + t->tm_min * 32 + t->tm_hour * 2048;
    *dos_date = t->tm_mday + (t->tm_mon + 1) * 32 +
        (t->tm_year + 1900 - 1980) * 512;
}

localtimereturns 0 if the value is too large to fit in astruct tm. So when the program tries to readt->tm_sec, it will attempt to read memory address 0.
In that case, the program immediately raisesSIGSEGVand the server returns :

HTTP/1.1 502 Bad Gateway
Content-Length: 13
Content-Security-Policy: default-src 'none'; style-src 'unsafe-inline'
Strict-Transport-Security: max-age=31536000
Vary: Authorization,Accept-Encoding
X-Content-Type-Options: nosniff
X-Frame-Options: deny
X-XSS-Protection: 1; mode=block
Date: Tue, 28 Jun 2016 12:59:10 GMT

502: Failure

It appears to me to be a simple bug without any security concerns at all as the program is designed to only run on that website.
Would this be correct ?

Dereferncing a null pointer can be a security risk on some architectures and operating systems, and whether it is a daemon or a handler or whether the function or method itself accesses the file system is not the sole determining factor in risk assessment.  One cannot easily enumerate all exploits of indeterminate operations from source code alone.

In the code provided, the null is in the RHS (right hand side) of the assignment in the corresponding AST (abstract symbol tree) in all six cases.  That means that security cannot be breached inside the function because of a null t.

There is a small risk, but it involves more than the mentioned dereference.   It involves the subsequent use of the address space pointed to by the last two arguments.  If invalid results placed into the target of those pointers could cause a security breach, then it is important to test t before dereferencing it.


Brief staging area for unencrypted files I have an integration workflow where:

A server retrieves remote file via an encrypted connection.  The file is unencrypted. The server runs linux (Ubuntu 14.04LTS).
The file is downloaded to a temporary staging directory.  It could be large (100MB-2GB) so it's not practical to keep it in memory.
The file is encrypted and stored in a secure location for data at rest.  The unencrypted file (from step #2) is deleted using srm.

My question is about step #2

Under this workflow, there is a brief window of time in step #2 where the file sits unencrypted on the server, before it is purged by srm.  Is this a reasonable way to deal with unavoidable file staging-before-encryption, or is there a more contemporary way to perform this staging?

Thanks in advance.

I'd recommend simply encrypting the file while it's being uploaded, and before it's written to disk.  i.e. encrypt the file while it's being streamed.  Assuming you're getting the file in order you can just use standard AES-CBC to encrypt all the blocks of the file and save it to disk.

The window of time while the file isn't encrypted isn't terribly worrisome, but it's inefficient to write the file 2 times to disk, then have to wipe the file.  That way you only write once to the disk for every byte instead of 3 times.


Can you protect corporate email on personal phones without the option of wiping all personal data? Our company recently announced a new IT policy that requires encryption of any personal smartphone used to connect to the corporate Exchange server.  As far as I can tell, they're using Exchange ActiveSync encryption.

Part of this new policy is that in the event you lose your phone, you must immediately report it to IT so that they can wipe all data, including personal data.

It is worth noting that our company does work with PHI data covered under HIPAA.

Are there any effective alternate strategies that would allow for employees to access email and calendars from personal smart phones, but which wouldn't expose employees to the risk of having their personal data wiped?  Or is the ability to remote wipe all data on a potentially compromised phone an absolute requirement for security?

I believe that the company is entirely justified in it's approach.

If you want to avoid the risk of having your personal data wiped out, keep your personal and work data separate. Your company might consider deploying something similar to BlackBerry's Secure Work Space technology that claims to keep work data in a completely separate workspace. This should allow your organization to manage it's data in a secure fashion while still allowing employees to use the phone for both work and personal stuff.


Sorting hosts via open ports using NMap I was tasked with running a NMap scan against our corporate network and compiling a list of only live endpoints. My issue is how to go about separating out the hosts via their open ports (printer/endpoint). For example I want to remove all printers/hosts from the nmap output (-oN) file Corp.txt if port 9100 (printer) is open. The list must also maintain the host name/IP in relation to it's port numbers and open status.

Below is an example of the command I'm running and its output:

nmap -p 80,135,9100 -oN ~/Documents/Corp.txt 10.33.131.1/24

Nmap scan report for itbrn1745.domain.net (10.33.131.13)
Host is up (0.91s latency).
PORT     STATE  SERVICE
80/tcp   closed http
135/tcp  open   msrpc
9100/tcp closed jetdirect

Nmap scan report for itPC.domain.net (10.33.131.37)
Host is up (0.0033s latency).
PORT     STATE    SERVICE
80/tcp   open     http
135/tcp  open     msrpc
9100/tcp filtered jetdirect

Nmap scan report for ap4403.a740 (10.33.131.56)
Host is up (0.0046s latency).
PORT     STATE    SERVICE
80/tcp   open     http
135/tcp  filtered msrpc
9100/tcp open     jetdirect

Any advice into the logic of compiling a list of only live endpoints on the network is greatly appreciated.

Nmap has alternative output formats for exactly this reason. The Normal output (-oN) that you show is for human-readability only, and shouldn't be processed with scripts, since it is subject to undefined change from version to version.

Most fully-featured Nmap output viewers (like Zenmap or ScanHub) use the XML output format (-oX), which is the machine-readable format that contains the full results of the scan, including advanced features like NSE scripts and traceroute. If you intend to use these features or expand your scanning and reporting beyond simple "all hosts with this port" queries, using one of these output viewers or writing your own that uses XML are your best options. There are libraries for parsing Nmap's XML for most common programming languages.

For simple queries like this one, you can also use Nmap's Grepable output format (-oG). This puts all the port scan data for a host on one line along with the IP and hostname like so:

Host: 10.33.131.56 (ap4403.a740)    Ports: 80/open/tcp//http///, 9100/open/tcp//jetdirect///

In this case, you could just grep -v ' 9100/open' to remove those lines.

When scanning, I prefer to use the "all outputs" option (-oA) to save Normal, XML, and Grepable output to the same filename (with .nmap, .xml, and .gnmap extensions, respectively). That way I have all the output formats in case I need to do post-processing or want to quickly do a visual scan through the output.


What makes one random strong password more resistant to a brute force search than another The only way to do this is by making an educated guess on how the brute force algorithm works or probably works.

Lets say you were trying to crack a combination lock with 3 discs each with 10 notches for 0-9.

I would start with 000, 001, 002 and so on, using my very complicated cracking algorithm, the code which would get cracked on the last attempt would be 999 therefor in this instance its the strongest/safest.

We can assume a real algorithm wouldn't just increment through the numbers or work its way through the ascii table.

for example with a 3 digit numeric code you're probably far better off trying 123, 000 and 111 before 001 when trying to crack it. common pin numbers

This goes for other ascii characters

lowercase is far more commonly used than uppercase in passwords(definitely)
special characters are used far less that alphanumeric chars(definitely)
special character "common substations" are more common than other special characters s$,4A@ i!.(probably).
0,1 and 9 are more commonly used than other numbers. (seems likely)

Using the common password method "at least 8 characters including one uppercase letter, one special character and alphanumeric characters" I've created a random* very strong 8 character password of Fs9@lw$a.

My theory is that the following random* strong passwords would be progressively harder to crack.

Fs9@k0$a (password)
Fs9@k0$q (changed "a" to the least common letter in english "q")
FS9@K0$q (convert lower to uppercase leaving 1 lowercase)
FS5@K7$q (change common numbers to other numbers)
FS5&K7?q (changed common special Chars with other special chars)
*%.&K7?q (replace uppercase with special char leaving 1 uppercase char.
*%5&K7?q (replace numbers with special char leaving 1 number.

I am looking for a complete(ish) list of characteristics that a "brute force resistant" password should/n't have.

I would assume that at the top of the list would be the password length, for the example i only used 8 characters ideally you would use the maximum allowed.

If by random you mean select with equal probability out of some well-defined set of possible passwords, then the strength of the password is a function of the size of the set.  In your example, the set is that of three-digit sequences (000, 001, ..., 999), and this set has 1,000 members, so an attacker succeeds on average after 500 guesses.

  I would start with 000, 001, 002 and so on, using my very complicated cracking algorithm, the code which would get cracked on the last attempt would be 999 therefor in this instance its the strongest/safest.

  We can assume a real algorithm wouldn't just increment through the numbers or work its way through the ascii table.

We don't need to assume anything.  What's confusing you is that, for any given random choice, there are some orders that crack it much sooner than average.  For example, if we know that the PIN is 999, the algorithm that tries all combinations in descending order is optimal.

But the attacker doesn't know ahead of time that the code is 999, so why would they pick that algorithm?  If the code is 000—which is just a likely as 999—the backwards iteration algorithm is the worst one.  If you try and do some compromise like 000, 999, 001, 998, ..., then if the code is 500 it'll be really bad.

This argument generalizes: if the code is chosen at random, with all codes getting equal probability, and kept secret from the attacker, then for any algorithm the attacker tries the probability that their algorithm will find the code in very few tries is equal to the probability it will find it in the complementarily pessimal number of tries.  It all averages out—if the set has N codes, the attacker succeeds in N/2 tries on average.

  for example with a 3 digit numeric code you're probably far better off trying 123, 000 and 111 before 001 when trying to crack it. [link to common pin numbers]

If the code was chosen uniformly at random (all codes equally likely), you're not.

Note, on the other hand, that if the codes are not chosen uniformly at random (some are more likely to be chosen than others), then yes, some guessing orders are expected to finish sooner than others.  That's for example how practical password cracking works—the dictionaries and mutation rules and so on are just tricks to try likelier passwords ahead of unlikely ones.

  My theory is that the following random* strong passwords would be progressively harder to crack. [...]

You keep using the word "random" but I think you need to stop and think carefully about what you mean by this.  The key concept here is a discrete uniform probability distribution.  If your codes are chosen that way, there's no clever order tricks to be had at all, period.

  I am looking for a complete(ish) list of characteristics that a "brute force resistant" password should/n't have.

Two properties:

Strength: It should be chosen at random with equal probability out of a sufficiently large set.
User friendliness: It should be easy to remember and easy to input into the devices where the user needs to.  (This can be relaxed a lot if you use a password manager that autofills password fields or allows for copy/paste.)

That's it.  A simple system that arguably meets these requirements is Diceware.  (There is some debate on how memorable the passphrases are, and some proposed improvements to the word list.)


PCI compliance if not storing or transmitting credit card data I have a networked product that we install on customer networks. The device is does not pass any of the CC data, but only sits on the same network (think Nest or Dropcam). The customer networks sometimes include a POS device. We never receive, process, or even see any credit card information. However, since our customer is PCI compliant they want us to be PCI compliant as well.

1) Does PCI compliance require that all of your vendors (i.e me) to also be PCI compliant?

2) All the info and questionnaires I've found are specifically aimed at organizations that actually store or process payment data. Is there a self assessment for situations where I don't transmit any credit card data, but just sit on the same network as POS?

3) If, as this question suggests, I am already PCI Compliant, can I get something that certifies that I don't process any credit card data and am PCI compliant? Note that I don't think I am PCI compliant just because I don't store PAN. The customer would be in trouble if I exposed a security hole into their network (which I don't, but have no piece of 'certification' saying so).

As your system is within the same network as the client systems which may handle cardholder data, your system can be included within the scope of the customer's compliance. In this regard you can be considered a connected system. From the scoping page of the PCI DSS: The PCI DSS security requirements apply to all system components included in or connected to the cardholder data environment.

It sounds like your system component is within or connected to the cardholder data environment (i.e. the environment within which the POS or other device handling cardholder data is situated).

It sounds like the client should either segment your device at a network level to remove it from the cardholder data environment or include your device with their scope of their compliance. To do this, you should provide the client instructions on how to situate and maintain your device in a secure manner.

As you can log on remotely to your device, you could attack the customer's network internally. Is the Linux device hardened, is it kept up to date, is logging enabled, what user management is in place, is IP tables configured? Does remote access require two-factor authentication? Each of these are questions which a QSA will pose in regards to the security of, and potential threat/vulnerability posed by the device.


Why is it a terrible idea to implement restrictive measures in .bashrc? Asking this because apparently there are multiple people who genuinely don't realize just how bad of an idea this is, and I want there to be a single, easy-to-find place for them to go / be sent.

There are a number of reasons this is a bad idea.

First and foremost being that bash, fundamentally, is written to facilitate users doing whatever they want to do. It was written to make it easy to do anything you'd want to do a vast number of different ways, and as a result it's possible to do most things a vast number of different ways. It was not written with access controls in mind, and as a result it lacks access controls. As a result, adding access controls on top of it, and making certain tasks impossible within it, is a bit like trying to use a bulldozer for needlepoint; maybe not impossible, but very, very difficult.

So, for example, any command run from .bashrc can be interrupted, backgrounded, or killed if the user (or more likely a script that the user wrote) is fast enough (by sending ^C or ^Z). On the command line, users can unset variables, they can open subshells, they can specify direct paths to executables (many of which are in predictable locations), and they can even send things over the network even if you don't have any network-accessible applications available to them, because they can open tcp streams directly from bash.

Now, this is a known issue, and it's why rbash was developed. But even rbash is not a turnkey solution, and at the end of the day even it is quite lax:

  These restrictions are enforced after any startup files are read.

  When a command that is found to be a shell script is executed (see Shell Scripts), rbash >turns off any restrictions in the shell spawned to execute the script.

And then, of course, there's the fact that you must constantly make sure your version of bash is up to date, and that your kernel is up to date and that you're using an explicit whitelisting approach and carefully vetting each application you allow. It's a pretty Herculean task, and most of the time there is a better / simpler way to accomplish what you want to accomplish.

If you have a particular security setup in mind, and you were considering using .bashrc, then:

Do some more research around the internet (Google and DuckDuckGo are both quite helpful for this, although the site you're currently reading is one of the best resources you'll find), and once you have some alternatives in mind and some research to back each,
Ask about your setup here! Read the site FAQ, and try to ensure your question isn't a duplicate, first. But apart from that, this is where you'd want to ask the questions you're having.


Difference between free ssl and non-free ssl? I am making a choice between StartSSL and positiveSSL($4.99/yr). I want to know the difference between them. As I know, SSL is used to encrypted the connection between client and server so that data transferred(cookie) will not be under 'man-in-the-middle' attack.

Doing some searches on StartSSL, I found a website said 'They don't do any verification beyond email address and the domain name, so they aren't good for ecommerce.' What does this mean? Does StartSSL encrypt the data transfered? If no, can you tell me which type of SSL will encrypt data in the connection?

I just want the post data and cookie will be encrypted in https request.

Both free and non-free SSL will encrypt your connection, it's not because you pay less that it offers any less "encryption" features.


Pin change policy for RSA SecurID My company permits remote access with authentication that includes:

username
password/phrase (20+ characters)
User selected PIN + RSA SecurID token code

Our passwords are required to be changed every 6 weeks, and of course the SecurID token changes every 60 seconds.

Recently the policy has been modified slightly requiring the PIN to be changed every 12 months (there was previously no requirement to change the PIN). I can't personally see how this increases security, but I'm not an expert.

What security benefit does a PIN change policy like this give, and more specifically (if possible), what threat / attack is mitigated by this?

Nothing really, if your environment already employs a 20+ character password then this PIN is kind of "doubling up" on this. The RSA tokens are usually deployed as a one stop solution. You log in with your user name, you know the password and you have the token (which gives a code). The trinity of who you are, something you know, something you have.

You have the extra layer of a strong password which is stronger than then pin used for the token.

I mean, correct me if I'm wrong? but i think the only thing that this protects against in these conditions are lost keys or old keys out in the wild that are unknown for some reason. Also an end of life process that is automatic, as the keys that are more than a year old will simply not be useful to anyone down the road.

Some of the more paranoid sysadmins might think if an attacker gets a key and knows who its from it might forever be a risk, since all they have to do is find out the rest of the details, having no end in sight to that system gives the attacker unlimited time, in theory, to do recon. This rule would provide a one year constraint on finding out the rest of the details required. A sort of automatic garbage collection if you will. But that's the only thing i can think of here.


Security Trade-offs in Hardtoken vs Softtoken VPN connections A company I worked with has what seems to me to be a bit of an odd security policy, for working remotely all people need to connect through a corporate VPN to reach the internal networks.  The process though is slightly different for contractors and regular employees.  Contractors need to use a number generated from an RSA SecurID physical device given to them when they join.  Full time employees don't have hard tokens and instead use a company internal piece of software that runs locally on their laptops to get the number.  I was wondering if anyone could give a summary of why a company would chose a to use a physical device vs software for the two factor auth.

That is a common usage. The interesting part in a physical device, is that when you no longer work with a contractor, you ask him to give you back the device and you are sure that he will no longer be able to connect to your system.

Employees are assumed to be more reliable, so a software way is enough. The security is no longer on the physical way (it is easier to copy a software that a physical device), but on a legal way. I mean that the company can fire and/or prosecute an employee that would not respect the security policies. That is just a compromise between the risk and the way to mitigate the risk


In Windows How to determine encryption algorithm used in certificate How can one determine the encryption algorithm type (e.g. AES, DES, 3DES, etc.) that is used by a certificate in Windows (10, 2012-2019)? Is it obvious, and I'm just not seeing it in the certificate details?

we run a vulnerability scan against our servers. It flagged a few
  certs we use are using 3DES symmetric encryption method, which is a
  weak encryption algorithm. It is unclear how this was determined, so I
  am hoping to be able to see if there is a way to determine this my own
  without having to run a scan every time to find out

Is TLS, the server has a list of cipher suites that it is willing to use when speaking to the client.  This is completely independent of the Certificate.  The vulnerability scanner connects multiple times, each time asking to use a single cipher, and determines which ciphers are or are not in the allowed cipher suite.

You will want to alter your server configuration so that it removes weak ciphers from its cipher suite.  Windows offers a number of ways to manipulate its cipher suites.

The best way to test is to repeat what the vulnerability scanner did.  You can do this for a single cipher using OpenSSL.  You can test the full suite with a single command using the sslscan tool.  And if your server is on the Internet, SSL Labs will test your cipher suite and other aspects of your server configuration as well.


Can anonymizing techniques make you less anonymous? There's a recent report in the news of a Harvard student who emailed in a bomb threat so as to postpone year-end exams. According to the report, he carefully covered his tracks using the best technology he knew about: he used a throw-away email account, and only accessed it over Tor.

It turns out that this last point -- using Tor to send his email -- is what made him easy to find. Officials simply searched Harvard's logs for anyone who had recently accessed the Tor network, which led them directly to the culprit.

Arguably his critical mistake was using Harvard's WiFi for his Tor access; going down the street to a coffee shop would possibly have prevented his identity from being tied to his Internet activity. But in that case, Tor would probably have been unnecessary. And in fact, the interesting point is that his use of Tor completely failed at its primary purpose of providing anonymity, but instead simply provided him a completely false sense of security.

This principle easily extends to other anonymity tools and techniques as well; encryption, proxies, and others: if the tools are not popular, then the fact that you're using them alone makes your activity suspicious, making you an immediate target for investigation, interrogation, etc.

So how do you deal with this? Can you really trust Tor and other anonymity tools to make you anonymous? Would layering these tools help? Or would it just compound the problem?

If you are in a crowd and you wear a mask, but nobody else in the crowd does, then you tend to attract attention...

If you want to remain anonymous, then you must use only tools which do not single you out as a potential miscreant, i.e. tools that everybody uses. A good example is when you pay in cash: this is a mostly traceless payment system, and yet sufficiently many people use it so that paying with cash does not appear suspicious (unless you use cash to pay for, say, a big car).

To a large extent, this illustrates a tendency to miss the point, which is unfortunately often encountered in circles dealing with anonymity: it is what I would call the "game fantasy". When using Tor, PGP or whatever, the wannabe anonymous sometimes feel that he is playing some game with informal rules, in particular a definite and finished scope. The Tor user tends to believe that his adversaries will meet him only in a network-related way. As rumour has it, one of the first reactions of Kevin Mitnick upon his being arrested was to say that Tsutomu Shimomura had "cheated" by calling the cops, instead of trying to defeat him through technical skills alone.

So let there be a lesson: if you want to be anonymous, don't concentrate on the tools. Instead, focus on the big picture. Layering anonymity gimmicks on top of each other does not address the actual problem.

In fact it can be argued that no layering can help Tor in any way, since the point of Tor is to randomize the network path so that sender and recipient cannot be correlated with each other; if something else is needed then sender and recipient were correlated with each other, and the actual use of Tor came to naught. This is a property of anonymity through absence of correlation: it is all-or-nothing. You cannot get anonymity incrementally; you have it all in one go, or you have none. This answers one of your questions: layering does not ultimately help.

To really be anonymous, you have to blend in the background. You achieve perfect anonymity by doing nothing. However, as soon as you try to act, if only to send an email, then you begin to leave traces of many kinds. For instance, when you use a WiFi access from a coffee shop, then you are physically in the coffee shop, so you are in range of CCTV cameras, you leave fingerprints and DNA traces on the premises,...


Reducing risk for malware exposure from USB storage devices I have a somewhat hypothetical situation where I need to re-image a machine using a USB thumb drive, however I cannot be certain that the drive itself is malware free. It is the only thumb drive that I have at my disposal.

The machine that I need to re-image is more than likely infected with some type of malware, so I cannot be sure that wiping a removable drive from that computer will actually wipe it without having it re-infected. Something that I thought might mitigate risk of exposure to another machine would be to use the infected machine and enable BitLocker To Go encryption on the removable drive so if anything malicious was on the drive it would be contained within a encrypted volume, making it safe to wipe on another machine as long as I did not decrypt it.

Would this work or is there something that I'm not considering?

BitLocker would possibly reduce the risk for old-school viruses that embed themselves directly in executable files. However, there is a whole class of USB vulnerabilities that exist at the hardware level, that lives below any partition or file system scheme. While it would protect against some viruses doing their thing, I'd consider investing in a hardened USB drive that offers firmware protection and encryption. Normal consumer USB drives simply cannot be trusted to resist infection when you try to protect them at the OS level. (NOTE: This link is only meant to provide an example; actual research on available options is strongly recommended).


How to Detect Zimbra Sniffing Trojan I am a sys admin of our system, we are running zimbra as email server in our environment. I got the following message from the CEO.

"Everytime I send or receive an email - I get a SPAM ads a few minutes later related to the keyword.  There is something planted in our email system that is 'listening' and causing that to occur."

I am figuring out if this is true. I have checked, no extra port listening on the server. My question is, are there any known Zimbra/Email server trojans which would do something like this? I dont think  this is the case but I need some suggestion about the issue if someone face the same situation.

In case of infection you need to scan the system for certain clues, such as .lnk or related malicious entries that have infected zimbra in the past. A quick manual check would be to match sha1/md5 sum of those files (on the desktop) with the checksums on the net (zimbra forums).

It will be worth capturing some traffic and analysing by using a test email to a lab computer that you can use for experimental reasons. This would help you identify if it's to do with system or email service.

Most of the intelligent infections don't need extra ports as they utilise generic most trusted ports such as 80, 443, 25 used for web/email services.


Chrome extension security I want to install a Chrome extension called metamask. I do not trust this kind of software. (Maybe because I am a newbie)
What can a Chrome extension do on my computer? Is it possible, for example, for a Chrome extension to read a local file, sniff my network interface, perform keylogging?
Does Chrome extension run in a sandbox (like a javascript in a webpage for example)

The extension injects the Ethereum web3 API into every website's javascript context, so that dapps can read from the blockchain.

Because it adds functionality to the normal browser context, MetaMask requires the permission to read and write to any webpage.

Like many Chrome extensions, metamask works by adding extra JavaScript to every page you visit. The metamask script has access to everything that happens to every loaded page. It could record keys and form inputs and transmit that, or read your password or session token and take over your account.
However, it still runs somewhat sandboxed, so it is limited to the browser. It can't sniff your network interface, or read a local file. Keylogging is limited to keys entered within the browser.
Even if the plugin itself is not malicious, it could contain a vulnerability that could then be exploited by any page on the internet you visit.
So browser plugins are fairly powerful. Chrome and Mozilla do some checks before adding extensions to their app repositories, but that does not provide guarantees.


Could PPTP be considered a secure VPN type with idle timeout 0? Ive got a Draytek router which im trying to setup as a VPN host.

The options i have are :

PPTP
IPSEC
LT2P with IPSEC policy
SSL

My VPN client only seems to supported PPTP and LT2P with IPSEC policy.

Ive setup multiple other VPNs on other draytek hardware using LT2P with IPSEC policy in the past, but this time the only option i can get to work is PPTP.

The VPN is to be used infrequently for remote management of other LAN hardware. In managing this LAN hardware i need to login to the hardware in question so passwords are being sent across the VPN.

The VPN will always be connected to from a secure LAN, but im most worried about the data as it transfer through the WAN.

If i set the idle timeout to 0 (as i understand this mitigates man in the middle attacks, due to any increased latency causing the connection to fail, and use 128 bit encryption for the PPTP client connection (the max OSX 10.11 will allow) would this be a secure connection ?

In short, no configuration using PPTP should be considered secure.

Firstly, setting a low idle timeout is not a mitigation against a MITM attack. The idle timeout setting just determines how long the server will allow an idle session to remain connected (and setting it to 0 will actually probably disable the timeout entirely in most implementations). It has no direct relationship to latency. What's more, an ARP poisoning attack (to establish MITM) may not look that different from any normal hop along the route anyway, so latency is a difficult side-channel for detecting this kind of man-in-the-middle outside of a fast, predictable local network. The kind of MITM attack required to break PPTP is much simpler than, say SSL, where the stream needs to be de- and then re-encrypted. The attacker simply needs to capture and forward your packets to break your connection.

The trouble for you with PPTP is that even in its "most secure" arrangement it is utterly broken (see Are there any known vulnerabilities in PPTP VPNs when configured properly?). A successful MITM can not only impersonate you to the VPN, but it can decrypt any captured sessions, which will include the passwords or any other credentials that you need to send to the destination.

So the answer to your question is a resounding no, PPTP cannot be considered secure in any configuration.

Since your options seem limited, though, you may decide that PPTP can be secure enough for your use case. Just be aware that if your connection passes through a malicious connection, there are tools available that can automatically sniff and crack any PPTP sessions. It might not be likely, but if you're unlucky, PPTP is so insecure that you needn't even be specifically targetted, you could simply be a target of opportunity. It really is that insecure.

  My VPN client only seems to supported PPTP and LT2P with IPSEC policy.

It seems to me you should really start here. You need a better client.