Are Multi device usage and bots in Telegram an excuse for only ssl encryption? Telegram's E2E encryption is not secure. See: Is Telegram E2E Still Insecure? and Is Telegram secure?

Lets asume its is secure and talk about the "excuses" why E2E encryption is not always used. It is only used in secret chats, from ONE device to another ONE, but not between all devices from one account to another. Groupchats are also insecure.

Is the key exchange between two devices with the same account really so hard to implement, that it is still easily usable for everybody?

Another excuse is, that bots could not read chats (in human vs bot conversations), when they are E2E encrypted, but couldn't it be implemented? Isn't this the same situation then writing with a real person?

TL;DR: Secure key management is hard. Who knows, but probably eats into profits.

I would think that the big problem is that if Telegram is going to allow you to do any sort of crypto and present yourself as the same person across multiple devices, they have to do one of two things: manage the keys for you, or allow you to manage the keys. If they manage the keys for you, then they hold the keys, which means they can be subpoenaed or stolen. If they encourage you to manage your own keys, it probably opens users up to a lot more opportunities to misuse their own keys, resulting in a less secure product.

If you you want E2E encryption in chats with bots, I suspect it's not an issue of what is possible, but rather what is cost effective. What is the use-case for needing encrypted chat with bots, and how much would it cost to develop, implement and maintain? Again, assuming a profit motive, why should telegram increase costs on its revenue stream? What liability do they assume by managing keys?


Hidding ip address in a peer to peer connection I'm curious is it possible to hide the ip address in a peer to peer connection. Mainly considering you have 2 computer connected remotly in a browser session. I would like to know if it's possible to hide the ip.
Lets say A chats with B in a browser session chat build with Java script.  But i want that A not to be able to inspect the page and see B's ip, or donno network tool from chrome and vice versa. The idea is the user to be able to get in contact only if they agree both to.

You won't be able to do this with a direct point-to-point connection. You'll need a central server. That way, each connected client only knows the server's IP address.


Lots of 'unidentified exploits' detected with w3af I've been running some scans across a few different networks and on certain sites I will get a flag about an unidentified exploit in the log. When I review what the exploit is, most of the time its a POST'ed value similar to what an SQLi looks like. But after doing some testing they aren't SQL injections.

They mostly look like d'%4([random texts])90mhitoe24z'"0. with in a button or somewhere in a form. Are these false positives or are they actual exploits that aren't defined in the plugin code for w3af?

Not sure what you're finding because your question lacks detail, but it looks like you have the audit.generic plugin enabled and you're actually seeing something like: "Possible unidentified vulnerability" or "Unidentified vulnerability".

If this is the case, what w3af is telling you is that you should look into those HTTP requests and responses because they might be potential vulnerabilities.

If you don't want to see these potential vulnerabilities anymore, simply disable audit.generic plugin. On the other side, if you're interested in knowing where they come from, please read the source code at "plugins/audit/generic.py"; but to sum up:

w3af sends 'd\'kc"z\'gj\'\"*5(((;-*`)' and an empty string to each input parameter
w3af sends something "normal" to the same parameter
If the HTTP response for those requests if very different, flag them as a potential vulnerability

PS: I wrote w3af.


Revocation of intermediate trusted CA My question is related to the revocation of intermediate CA. Suppose I have a device  that performs the revocation checks on the whole chain and assigns the intermediate CA's a trusted level.Now suppose one of those intermediate CA's got revoked, how would the device get to know about its revocation since it has already trusted it and would never throw an error. How is this handled in real world ?

That intermediate CA's certificate should specify how revocation can be checked.  If the device performs revocation checks then it is going to access the CRL, use OCSP, or something similar.  That response should specify that the intermediate CA certificate was revoked.  Assuming the device processes this response appropriately it would no longer trust the intermediate CA certificate even if it was previously trusted.

In the real world a common problem is sometimes a device or software isn't designed to check for revocation at all.


blocking direct access to files via url input while still allowing a script on server to access files I am trying to accomplish the following and have been unsuccessful. I would appreciate any insight. Scenario: http://www.mydomain.com/filename.html  is a webpage.  On this webpage I am running a viewer script that calls up documents (.png,swf, pdf) and show these to my visitors when they visit the .html page.Right now you can still access the pdg, swf, and pdf files by going to http://www.domainname.com/viewerfiles/nameoffile.png (or swf or pdf). How can I block the direct access
(http://www.domainname.com/viewerfiles/nameoffile.png) but still allow the viewer resting on the html page to access the files located in the viewrfiles folder. I have tried .htaccess method but you can still access the files directly. My goal is to allow visitors to view and print the files from the webpage but I do not want scrappers
and bots indexing/taking the .pdf, png, swf etc and hosting them on other sites. Thanks!

It is not possible to do what you want to do, for fundamental reasons.  The user controls the client.  From the server side, the server has no way to distinguish a legitimate browser that happens to be making a request for an image on the page (a case where you want to serve the image) from a malicious user who is trying to directly access the image (a case where you don't want to serve the image).  These two situations are indistinguishable from the server's point of view, so the server has to behave the same way in both cases: either serve the image in both cases, or don't serve it.

You might want to revisit what you are actually trying to accomplish, and see if there is some other way to achieve it.  What are you trying to prevent?  What threat are you trying to protect against?

If you are trying to prevent scraping, one thing you could consider doing is making the images available only to logged-in users.  You will have to decide whether that is appropriate for your site, or if it is not a good match (maybe you want the web pages and images viewable by everyone).  Another option is to set up your robots.txt file to kindly request that bots not download the images.  You will be forced to rely upon the good will of the bots.  Well-behaved bots and scrapers will usually obey the instructions in robots.txt.  A malicious user can always ignore the robots.txt file and scrape your site anyway, but unfortunately, there is no way to prevent that: a malicious user will always be able to download any content that you've decided to make available to unauthenticated users.  So robots.txt is in some ways arguably about the best you can reasonably do, in most situations.

See also How do I prevent people from stealing photos from my website? and how can I prevent people from using my images from my website.


What OpenVAS tasks (scans) should I be running? I have recently set up OpenVAS on my local office network. I have run a few tasks but I was curious on what tasks I should really be running and within what timeframes?

clarification

I'm currently going through Cyber Essentials and essentially just need to know what vulnerabilities I have and what assets are on my network. But again I'm unsure if I should be doing anything more other than just these two.

Any help would be great

There's a couple of different approaches you can take with Vulnerability scanners like OpenVAS and they'll produce somewhat different results.

Uncredentialed scanning, you just provide the IP addresses and the scanner assesses what it can from the network perspective. What it's doing under the covers is completing a port scan and then assessing against a database of known issues for the ports that it finds as open.

You can also provide credentials to the scanner, which allows it to sign into the system and review the configuration and software installed to find more vulnerabilities.  this approach will produce a lot more findings as it'll pick up things which aren't visible from a network perspective.  However this depends on the scanner knowing about the device/OS to be reviewed, some scanners have better coverage here than others.

VA scanners can also sometimes identify new vulnerabilities by doing things like fuzzing web applications, but it's worth noting that this carries some degree of risk that the applications scanned will react poorly.

If you're looking to improve your security I'd recommend credentialed scanning as part of your security programme. It finds more issues and tends to have fewer false positives.

If your goal is more compliance oriented, then probably best to start with matching the scanning that the auditor will complete and make sure you address all the issues from that.


How to disable x-oracle-dms-ecid cookie During a security audit, our client found that we are sending to the client a cookie called 'x-oracle-dms-ecid'. They asked to disable it or change its name. We have been reading all the Oracle documentation available, but we couldn't find any useful reference.

So my questions are:

How can this cookie be changed or disabled?
What exactly is it used for and what are the possible consequences if we change it?
Is it really a security incident?

Disable by adding the following lines in your Httpd.conf:

Header unset X-ORACLE-DMS-ECID
Header always unset X-ORACLE-DMS-ECID


When using FDE, is there any OS/software allowing to get back from hibernation without requiring the disk encryption key? This question is a spin-off the following one: Are encryption keys wiped from RAM before hibernate, or how to do it (Luks and Truecrypt).

In this question, an answer quoted the following message (the initial source was a comment left by a visitor on Bruce Schneier's blog):

  If people use hibernate or sleep mode, or lock the keyboard, they are
  potentially vulnerable in other ways. Just bring the computer back up
  to the login prompt, and start attacking the ports looking for an
  unpatched vulnerability. So a computer that is not completely shut
  down effectively bypasses the protection of full disk encryption --
  even without the cold boot memory attack.

I fully agree for the sleep mode and locked keyboard, but regarding the hibernation is there really any OS or disk encryption product that weak?

As per the different Linux boxes I went through, this scenario is clearly impossible. The hibernated boxes have got the same properties as the shut down ones (the only difference being the possibility of a configuration mistake since one must not forget to encrypt the swap partition too, since it is where the RAM data is stored during the hibernation, but this is done by default by the installer so it remains unlikely).

For this to be possible (get back to a login prompt when retrieving from hibernation without being asked for the disk encryption password) it would require that the OS stores its RAM data, including the disk encryption key, outside of the encrypted partitions, which if not caused by a configuration mistake just seems to me as a complete dumb architectural choice.

2 months later, there is still no evidence that computers in hibernation are less safe than shut-down computers, as far as FDE is concerned.

I therefore consider that the quoted comment was erroneous and mark this question as closed to avoid it to pop-up on SE front-page.

However, if anyone else has got such evidence or if there is any evolution of the situation, feel free to add a new answer, SE will notify me :) !


Memory injection in games I'm currently researching memory injection attacks on games in Windows 7/10.

After reviewing several threads on this topic, there's a few questions which are still unclear.

DLL injection can be easily detected by using introspection. Even if you patch and sign an existing DLL, the SHA1 will mismatch and cause red flags, assuming the game client has detection for all this. Correct?
Memory injection can be used to inject malicious code, however this can apparently only be achieved by using a signed kernel module as the memory space is protected from being read/written by other processes. Correct?
If a kernel module is used to inject into a processes memory, is the process able to detect this? For example, lets say there's a string in memory which points to a disk path (/conf/something.cnf), if that was overwritten with a string with the exact same length, would the process be able to detect that memory was overwritten?

Answering in reverse order, because your later questions are predicated on inaccurate assumptions in your earlier ones:

3: Not if the injection code is sneaky enough. In theory, a process can, of course, scan its own address space and detect stuff that doesn't belong. That procedure that does the scanning needs to be in the process somewhere, though, and in practice you can just edit it out when doing your injections.

2: Incorrect. Any process can be debugged by another process running with the same security token as the debuggee, or with a superset of the token's access (that is, a sandboxed process under user A can be debugged by a non-sandboxed process under the same user), or by any process with elevated privilege (SeDebugPrivilege, which is normally only Administrators but could be other processes). See, for example, WriteProcessMemory. If you want to make the memory executable, you'll probably need to have used/use VirtualAllocEx/VirtualProtectEx. If you then want to start a thread (in the target process) executing on your injected memory, see CreateRemoteThread.

1: You're confusing DLL injection  and something else, probably DLL squatting (which doesn't seem to be a well-known term, but it what I use and have heard used for when you place your own copy of an expected DLL further up the load path - for example, in the program's own directory - than the real version). DLL injection (where the process did not expect to load that DLL) is carried out in a number of ways, commonly using memory injection as above (inject the name of the DLL, use CreateRemoteThread to start a thread that calls LoadLibrary in the target process with the injected DLL name as the parameter). That DLL could then, of course, edit the process to do things like disable or bypass any introspection code that the DLL's author knew about.


How to determine which program accessed the Mac Camera? The green light on my laptop's camera just flashed on and then off after 1 second. I am extremely concerned about this since I am not running any programs which could have enabled the camera.

I checked Console.app and found only this:

AppleCamIn::power_on_hardware

In Sharing settings, I only had File Sharing enabled for my Public folder, which is empty (I've since disabled the setting).

Is there a way to see which process requested camera access? I am worried my laptop has been compromised. I'm running Apple Yosemite, the latest stable version.

Both Debian and BSD you can use lsof command.

In your articular case, you can run:

lsof | grep -i "AppleCamera"

Documentation of lsof related to your OS.


Are Skype drive-by attacks theoretically possible? Long story short, I was on my iPhone when this Skype account tried to send me a "picture" but before it could download (I saw what looked like a downloading bar) I left the message and blocked the user.

Unfortunately, I was also logged into Skype with Windows 8.1 (the crappy version that takes up the whole screen all the time) and I opened the window to log out before anything could be done.

However, I can't find the file directory that Skype saves files in (I read that it stores it in the Documents folder?) but I haven't used Skype for file transfers yet so the directory might not have been created. Or the malware deleted it to cover its tracks?

Anyway, Wireshark seems to show some packets in red that go to Amazon AWS which I hear is where a lot of hackers use to carry out their hacks.

So do you think my computer has been compromised or are there legitimate websites that use Amazon AWS IP addresses?

Although it is certainly theoretically possible that your system could be compromised by vulnerabilities in Skype and/or Windows 8,  there's no indication that your system was cracked in this case. It could have been a hacking attempt, or it could have been ordinary skype spam. I'd suggest you set Skype to prevent contacts or at least file transfers from non-contacts.

Amazon AWS is for the most part legit, a cracker would have to be pretty stupid to open an AWS account in their own name and be tracked. Besides, why pay for it when you can crack an insecure server and use it for free? AWS, like the rest of the servers out there is only as secure as the people maintaining it, if malicious traffic was coming from AWS it was most likely coming from a compromised legitimate site.


Is redirecting in htaccess providing enough security for sensitive pages? I made files with MySQL database login details. Using .htaccess, I redirect every user from /Config/config.php to /index.php. I am wondering whatever this is secure enough - this means whatever is enough to stop users from viewing /Config/config.php?

This can provide adequate security, if configured correctly.

I can think of one common flaw: with Apache and rewrite rules, it is often possible to construct an URL that points to the same file and is not redirected. For example, requesting /Config/config.php redirects, but requesting //Config//config.php does not. This is because the rewrite rule matches an exact URL, not any variation.

Another common error when using redirecting for security is sending the header to redirect, but not preventing the page to render. An attacker can then access the pages by removing the Location header. However, this is typically an error in the application and not when using Apache to do the redirection.

A better way is to place the config file outside of the web root. So you have index.php in a subdirectory public, and config.php outside of this directory. This reduces the possibility that you expose the configuration.


Why was the Hail Mary Cloud named so? The Hail Mary Cloud was a botnet that slowly and intelligently attempted to bruteforce SSH logins. Why was it dubbed the Hail Mary Cloud though?

The name is just a reference to the Hail Mary Pass:

  A Hail Mary pass or Hail Mary route in American football refers to any very long forward pass made in desperation with only a small chance of success, especially at or near the end of a half.

It's been used as a metaphor for anything desparate with little chance for success, which brute force attacks always are. If you read how it works it's sorta clever, for brute force, but each action is very low chance of working, which is why it needs a Cloud to work:

  Each attempt in theory has monumental odds against succeeding, but occasionally the guess will be right and they have scored a login.


URL rewriting of session cookies I stumbled over this in the ASVS 3.0.1 (V3.6). I wonder what this is, I couldn't find any meaningful explanation.

This seems likely to refer to the practice simply writing session tokens into the URL as part of a GET request in the form of SomeAction.do;jsessionid=863F3D24DEFA?Id=19. This is obviously bad practice and not advised.


Is displaying what server I am running on the error pages a security risk? I just noticed that my 403 Forbidden (the default, not a custom one) page displays some server info:

  Apache/2.2.3 (Red Hat) Server at ... Port 80

Is revealing this information a security risk?

Revealing that information is a security risk, in the context of a security assesment of your website. (I'm talking about checkbox style assesments here)

Nothing more than that - it just makes fingerprinting the webserver more difficult, but by no means impossible - not even hard. It will not hinder any attacker specifically targeting the website not even a bit, although it will force him to take actions that will possibly hit some IDS. It may hinder some automated crawlers or mass attacks. though.

I would categorise this to the 'best practices' list.


HTTP Server: Response time on login request I have a site on which I would like to prevent an unauthenticated attacker from knowing if an account exists. On the site, passwords are hashed using bcrypt, so login requests must do a bcrypt comparison (strength 12) – which takes CPU time.

My concern: the server response time varies depending on whether the user account was found or not. If the account was found, the bcrypt comparison runs to check the password; if not, the function can return immediately. On my local machine, I'm getting ~600ms response time when the account is found, while I'm getting ~30ms response time when it is not. In production, just add network latency to both.

In short, as a client, I could determine whether an account exists.

My question: Is this something I should be concerned about? And if so, what's the best solution – an artificial wait? A lower bcrypt strength? A faster hashing algorithm?

Yes you should be concerned about this. Its a possible side-channel and it reveals information about your system.
Some possible defenses (that are being used) are:

Use a pseudo random minimum wait delay. (this means that a valid or invalid response will take about the same amount of time)
have an invalid response do all the calculation steps of a valid response (just with a invalid as return value). this is CPU intensive but often employed through ignorance. (the engineers just make everything go through all the steps)
Incremental Delay (each attempt doubles a delay factor) the iphone employes this for example.
Use a central authentication service that employs some defense against this. either through traffic or some other means.


Is it possible to bypass SNI-based censorship using IP fragmentation? The government announced that it will start SNI-based filtering next year. And I also heard that Russian goverment and ISPs implemented it already.

Although Cloudflare & Firefox are testing Encrypted SNI, I think it takes time for ESNI to be applied by most of the websites which are not hosted by Cloudflare. Until then, I and all the others in my country have to use VPN or something.

So I decided to make a program that arbitrarily fragments SNI field so that ISP can not eavesdrop it (using IP fragmentation). I thought that it would be already implemented by someone, but I found that there is nothing related to it.
Is it infeasible? Or nobody made it?

It's unlikely that IP fragmentation will be able to evade SNI-based censorship. The reason is that SNI is part of TLS, not raw IP. This means that it's very likely that the equipment doing deep packet inspection (DPI) will be statefully re-assembling fragmented IP packets before analyzing them. The days of evading firewall restrictions by fragmenting IP addresses is long over.

The only real solution is to use an encrypted or obfuscated proxy or VPN, with the proxy server operating outside of the range of the SNI filter, such as in another country. There will be a slight hit to latency, especially when connecting to South Korean websites, but it is necessary.


Would a per-file encryption system any more or less secure than volume encryption? Guessing they're the same, but not 100% sure.

UPDATE: My mistake for not clearly stating the it would be assumed the keys per-file, or for a whole volume, would be the exact same -- not to mention the encryption method use would be the exact same. The only difference is if it's executed on a per-file basis, or on a collection of files.

They definitely are not the same thing.

Consider what you learn from having a disk encrypted compared to unencrypted. When it's unencrypted it leaks a large amount of information. How much space is available? How much is used? What files exist on disk? Etc.

However, with each file encrypted, it's possible to use different keys per file, so if one key is compromised the other files are potentially safe. If the disk is encrypted then one key in theory unlocks everything.

More or less secure is relative to what you are trying to protect against. FDE won't protect against a curious child who already has an account on the system, but it would protect against someone walking away with the disk. File level encryption will protect against a child trying to read or write to the file, but if the key is stored on disk and someone walks away with the disk, the files are readable.


How harmfull might be predictable bytes when using AES-CTR I use AES-CTR to perform on the fly encryption of packets. Each packet is 16 bytes long, however, depending on what is being transferred, the 16 bytes may not be used.
So far, unused bytes are left to 0.

I'm not a cryptographer, but I'm wondering how helpful this can be to an attacker to have such an information. Knowing the protocol, you can guess a few bytes per packet in general, but with these bytes left to 0, you can actually guess most bytes.

Would it be recommended to instead use random padding instead of zeroes ?

What you are describing is somewhere in between a so called "known plaintext attack" and a "ciphertext only attack".

While these were (and sometimes still can be) a problem for older cryptosystems and modes of operation, in the recent history of cryptography cryptosystems and modes of operation are usually specifically designed to be resistant to such attacks.

There is currently no known attack (citation obviously not given) against AES-CTR in which (partially) knowing the plaintext results in a non-negligable advance for an attacker.

TLDR or TCDNU: Iff you use AES-CTR correctly, this should not be a concern. However, you might want to consider using AES-RCTR or AES-GCM. Especially the latter has many advantages, two of which being readily available implementations and being tamper-proof.


Can a BIOS password along with a HDD password prevent evil maid attacks? By definition evil maid attacks involve altering a device in an undetectable way. So if I lock the BIOS, set the HDD to boot first and put a HDD password will this prevent it?
Access to the computer won't be possible as the HDD would be the first to boot and would ask for a password, so no one could try and brute force the BIOS password.And if some one tries to reset the BIOS password then I will find out as it will become clear to me the password has been removed.

If an attacker has complete physical access, they could take out your drive, and from another computer, remove the password and access the drive; the ATA password spec may prevent BIOSes from allowing drive access, but there are readily available tools that can simply remove this protection. Even if this feature actually protected the drive, the drive's firmware could be tampered with or replaced, or perhaps the adversary could go to the trouble of putting the disk platters into another drive that is not locked.
Even if they couldn't get the drive to work, maybe they could find a way to install malware into the UEFI/BIOS, or install some hardware keylogger that allows them to enter your passwords at a later time.
To summarize, while this may be effective against a casual intruder, someone with enough time, equipment, and expertise will not be stopped by these protections.


Is it safe to have a mysql server on a home computer? I installed a mysql server 5.7 in my home computer but I am afraid if someone scans my ip with nmap then he will simply find open mysql port no. 3306 as windows service and then he can simply bruteforce to gain access if I have a weaker password.
So, using a complex password will be enough? What else configuration can i do.

I do hope your Windows system is not accessible from the Internet, as in, there is no firewall between your Windows system and the open Internet.

You can configure either or both mysql and Windows Firewall to only allow connections from certain networks or computers. It depends a lot on what other systems use this mysql server, if there are any ... if the only system using the mysql database is your home computer it is installed on, then you can limit connections to loopback (localhost, 127.0.0.1) and you should be so much safer.


What is the point in having arbitrary username requirements? I've looked around on Security.SE, but couldn't find much related to the following problem:

I recently signed up for Chase Quick Pay as my method of being paid by a part-time job. I've heard of stupid password requirements, but never stupid username requirements.

When I enrolled, I didn't really take into account how weird it was (I really should have, because I have forgotten my username twice in the past 3 months due to the policy):

Now, the Stack Exchange engine has so graciously pointed me in the direction of a question with a good answer by @Polynomial that says it all in the first sentence:

  The authentication strength should come from the password, not the username.

So, quite simply put: what is the point of having requirements like this on a username?

Edit: For clarification - are there any real security benefits to having these kinds of username requirements?

Bonus: I just looked at my own bank's username/password security policies, and found the following (not that abnormal):

Note: I don't really understand the point of disallowing 'X' as the first letter... anyone who can answer that gets a +10!

There are two main arguments for enforcing requirements/restrictions on username choices.  The first is that making usernames more difficult for attackers to predict helps resist online guessing attacks.  While usernames aren't necessarily considered to be as secret as passwords they are one of at least two pieces of information that must be stolen to impersonate a user.  We shouldn't dismiss the advantage of this information remaining unknown to attackers.

The 2007 paper Do Strong Web Passwords Accomplish Anything? (PDF) evaluates the threat of online password guessing and considers the what our options are to combat it.  A site can enforce a stricter password policy which may hurt usability if users struggle to comply and experience frustration with the process.  Or the site can enforce some username restrictions and keep the password policy the same.  Their theory being that if an attacker has to try a lot of possible combinations it doesn't matter as much whether that's due to easy usernames and complicated passwords, or semi-complicated usernames and semi-complicated passwords.

This ignores a third option of the site adding a second authentication factor to supplement the security of a password while leaving usernames alone.  It also requires the site to work harder to avoid disclosing valid usernames that attackers can then pair up with possible passwords.

The second argument is that by enforcing somewhat unique username requirements a site can hope to deter users from choosing the same credentials they've used on other sites.  This is a very real threat and it's a difficult one for a site to do anything about besides enforcing unusual usernames requirements (or assigning IDs themselves).  However, one awesome study from 2010 monitored actual username and password reuse by people between their banks and other sites.  The study found that people did indeed reuse their bank password on other sites 73% of the time, but also found that even if a bank enforced unique username conventions people would then reuse that username on at least one other site 42% of the time.

So enforcing unique username requirements lowered the chances of credential sharing, but certainly didn't eliminate that possibility.  But that lower risk may still be seen by some sites as worth the inconvenience to users.

Another possible reason, that's less of an argument and more of a requirement, is legacy system compatibility.  Whatever potentially old software is doing back end processing behind the snazzy web front end may have been coded to only accept usernames formatted a certain way.  Without ripping out and replacing that software the site may be stuck passing on the restriction to customers.  The 'User IDs cannot begin with an X' line leads me to believe this may be a factor in your case.


Keystroke logging and virtual machines I wanted to know if someone can log my keystrokes if i am on a virtual machine.
Is it more secure to use a computer or a virtual machine on that computer.

RedGrittyBrick is right.

Here's how it would work:

Keylogger is on host machine: even VM sessions will be keylogged.
Keylogger is on virtual machine: only VM will be keylogged unless it escapes the VM.
Keylogger is hardware-based: same as #1: everything can be captured, but this includes things even outside of the main operating system, as long as it's all going to the hardware. This means anything on your machine, including BIOS passwords, boot passwords, disk encryption, etc.


Is StartSSL.com a trustworthy site? I just got the following email:

  Dear StartCom customers,

  This electronic mail message was created by StartCom's Administration
  Personnel:

  StartCom, a leading global Certificate Authority (CA) and provider of
  trusted identity and authentication services, announces a new service
  – StartEncrypt today, an automatic SSL certificate issuance and
  installation software for your web server.

  StartEncrypt is based the StartAPI system to let you get SSL
  certificate and install the SSL certificate in your web server for
  free and automatically, no any coding, just one click to install it in
  your server.

  Compare with Let’s Encrypt, StartEncrypt support Windows and Linux
  server for most popular web server software, and have many
  incomparable advantages as:

  (1) Not just get the SSL certificate automatically, but install it
  automatically;

  (2) Not just Encrypted, but also identity validated to display EV
  Green Bar and OV organization name in the certificate;

  (3) Not just 90 days period certificate, but up to 39 months, more
  than 1180 days;

  (4) Not just low assurance DV SSL certificate, but also high assurance
  OV SSL certificate and green bar EV SSL certificate;

  (5) Not just for one domain, but up to 120 domains with wildcard
  support;

  (6) All OV SSL certificate and EV SSL certificate are free, just make
  sure your StartSSL account is verified as Class 3 or Class 4 identity.

  StartEncrypt together with StartSSL to let your website start to https
  without any pain, to let your website keep green bar that give more
  confident to your online customer and bring to online revenue to you.
  Let’s start to encrypt now.

  Please do not reply to this email. This is an unmonitored email
  address, and replies to this email cannot be responded to or read. If
  you have any question or comments, just click Here to send your question to us, thanks.

  Best Regards StartCom™ Certification Authority

There are several sketchy-sounding phrases, like and have many incomparable advantages as:

I did glance at the startssl.com website, and it didn't exactly inspire confidence, other than it had the green bar in the URL for StartCom Ltd.:

Is this a trustworthy CA that just happens to have poor English copywriters, or is there some kind of history that one should be worried about?

[This answer was true in June 2016.  It is not in $NOW; see Wikipedia.]

Yes, StartCom is a legitimate Certificate Authority.

On the plus side, they were at one time the only provider which would hand out free SSL certificates which were recognized by the major browsers.  (There's competition now in Let's Encrypt).

On the minus side, their web site design and implementation is clunky, non-intuitive, and lacks pretty.

(The danconnor link @ZN13 provided appears to be someone wanted more pretty and didn't expect rigidity out of the CA process...........

............you should expect rigidity out of the CA process.)


Vulnerablity counts by platform I've been asked to compile a list of the number of published web vulnerabilities or exploits grouped by platform.
With the understanding and caveat that numbers are just statistics, shouldn't be used to predict the future, are totally unfair, worse than lies and damn lies, and probably will kill your cat, etc., etc.: Do these numbers exist anywhere? How can such a list be compiled?

My attempt
I figured the CVE database was a good place to start; you can download their entire database in CSV format and then just grep it. Which seemed reasonable enough, except it appears that there isn't enough data in each row.
For example, of the 59 CVEs this year that mention "Wordpress", there are 14 that don't contain the letters "php". So clearly grepping for "php" won't net the right result. Presumably neither will any of the others.

The data don't have to be perfect, they just have to be reasonably substantiated (i.e. not pulled out of one's derriere), and most importantly the measurement should be neutral (that is, shouldn't obviously favor or penalize any given platform), except to the extent that any one platform is naturally more popular than another.
Recent numbers (last year, this year, whatever) would be best, but whatever exists is even better.

I know of two pieces of research in the research literature that study the incidence of vulnerabilities on different platforms:

An Empirical Analysis of Input Validation Mechanisms in
Web Applications and Languages.  Theodoor Scholte, Davide Balzarotti, William Robertson, Engin Kirda.  SAC 2012.

This paper analyzes over 7000 CVEs that reported XSS and SQL injection vulnerabilities in 79 web applications.  Then, it uses this data to estimate the prevalence of different kinds of input validation vulnerabilities in different web programming languages.

The paper's analysis finds some differences between languages. For instance, in the data set, 50% of web applications were built in PHP, but 80% of SQL injection vulnerabilities were in PHP applications, so the paper concludes that web applications written in PHP may be especially at risk for SQL injection.  In contrast, web applications written in Java appear to be less prone to XSS and SQL injection vulnerabilities.  See the paper for more discussion.

Exploring the Relationship Between Web Application Development Tools and Security.  Matthew Finifter and David Wagner.  WebApps 2011.

This paper analyzes the relationship between the choice of programming language and web development framework vs security, by looking at code from 9 teams who built the same web application (same spec, same functionality) in different languages.

The paper does not find any evidence that choice of programming language affects the security of the resulting application.  The experiment does find evidence that the degree of support for security (particularly automatic support for escaping, sanitization, session management, etc.) benefits security.  It concludes that, because of the small sample size, additional experiments would be helpful to gain a deeper understanding of the effect of programmer tools on web security.


Cryptographic Security of Dynamically Generated, Non-Random Salts So when it comes to security, when I have an idea that seems good, but no one else seems to be doing, I try to assume that I'm overlooking something obvious or otherwise significant.  This is one such case...

The context of this question is an authentication system that I'm beginning work on.  I've implemented similar systems in the past, and generally have my head around the "salt and hashing" thing, but I'm by no means an expert in cryptographic security.

As I was in the process of defining the storage for 16 random bytes of salt on my user records, it occurred to me that there may be a way to reduce the attack surface in the event that someone has stolen or otherwise accessed my user data.  I'm operating off of the following assumptions:

If a hacker steals my user data, they have access to a salted + (repeatedly) hashed representation of the user's password, and the salt value itself.
If the hacker wants to determine the plain text value of that password, they have some bruteforce labor in front of them.
However, given the salt, the search space of that brute force attack is greatly reduced.*

*I'm not 100% sure that point three is correct, but it makes sense to me that if a brute force algorithm can assume that the pre-hash value consists of <8-or-so-bytes-of-password> + <16-bytes-from-stolen-salt> (or similar combination of the password and salt values), then we've reduced the search space by algorithmically significant quantities.

<obligatory mid-question apology for the length of this question here>

So with the above being my current line of thinking, the solution that I'm considering essentially boils down to using known, constant values about a user to dynamically generate a salt for use during the hashing step.

Given that salt values don't really need to be cryptographically "anything", so long as they are unguessable to the point of requiring bruteforce discovery, is it sufficient to essentially take some transformation of, say, the provided username and password (e.g., apply some SHA-2 goodness and proprietary ciphers), and use that in the hashing step?

Of course if someone were to steal the code as well, the "secret" salt generation is pointless.  The only added security I'm attempting to achieve is forcing the hacker to steal both my data and my code if they want the convenience of the reduced search space described above in point 3.

I hope I've adequately (and not too verbosely) described my question and reasoning.  The specific question I'm hoping to have answered is whether or not this is a cryptographically (or otherwise) secure means of storing and comparing user passwords.

Edit: It appears the key points of my question may have gotten lost in the noise above.  Let me try to be more explicit:

Does having access to the salt used in generating a hashed value substantially aid a brute force attack on discovery the actual password?
If so, does it therefore make sense trouble the hacker with having to steal my code in addition to the data itself?
Is the general approach of dynamically generating the salt (using reproducible, non-random, but unguessable means) ill-advised?

You are somewhat mistaken about the role of the salt. It is not meant to be "unguessable by the attacker". If it was meant to be unguessable, it would be a piece of confidential data, and we would call it a "key", not a "salt".

The salt is there to make the password derivation process unique, in order to prevent an attacker from making economies of scale when attacking several passwords. If the attacker tries to guess three passwords, it must cost him three times as much as attacking one. One big fat example of "economy of scale" is a big table of precomputed hashes for common passwords (or its evil offspring, the rainbow table, which is just an enormous precomputed table with a trick to keep it merely huge). In the presence of a salt, there is not one hash function, but one per salt value; or, said otherwise, a precomputed table would be specific to a given salt (the one used during the computation) and worthless for attacking any password which does not use that salt.

Of course, if an attacker could get a copy of the hashed passwords but not the corresponding salts, his task becomes very hard indeed. But this is not a plausible scenario: if you have a storage area where you can put the salts out of reach of the attacker, then why did you not store the hashed passwords there too ? So the security analysis assumes that the salts are known to the attacker. Their usefulness stems from their uniqueness: no two distinct hashed passwords, on the same or different systems, at the same or different times, have the same salt value (not even two successive passwords for the same user: when you change the password, you also change the salt).

You can generate and store salts in any way that you see fit, even with a "dynamic generator", as long as the probability of reusing a salt value is negligible. This is so precisely because they are supposed to be public and need not be "unguessable" by the attacker -- unguessable things require heavy artillery.

There is a slightly related concept which has sometimes been called "pepper": a secret key which is also inserted into the hashing process (see this previous question). That key is shared system-wide. The idea would be that a unique key is easier to keep confidential than a whole database of hashed passwords, at least in some configurations (e.g. you keep it in a private configuration file, not the SQL database). The "pepper" concept implies a more complex management (one more thing to backup and not lose, or share between front-end servers) and is worth anything only in the fringe scenario where an attacker can dump the user database but not the complete host system. In any case, the "pepper" does not realize the uniqueness property that the salt provides, so the pepper must not replace the salt -- only possibly complement it.


How can I ensure my dll has not been modified? I have an old project in VB which created an unique pc code from MAC address and disc id. This was used to identify a pc so credentials cannot be used between pcs.

This project migrated to C#, and I encapsulated this logic in a DLL which simply calls a method that returns the pc_id.

The issue I have now is that it's damn easy to just create a new DLL which has the same class name and method signature and return whatever pc_id they wish.

How can I ensure the DLL my program is referencing is actually mine?

I thought of comparing the hash of my DLL with a hardcoded one, but is this safe between different OS? Will the hash of the file change between file systems?

Or which method is preferred when ensuring files integrity/origin?

For Windows binaries, I would suggest to digitally sign the file.

Where you use certificates, almost the same technology of HTTPS.

Introduction to Code Signing

SignTool

Then you should use Windows cryptographic APIs to verify the signature of loaded DLLs.

I know that to get this done, you need lot of work.
But, for Windows, this is the safest path. If SHA hashes are not enough, this is the alternative.


How do we know the AuthKey in Pixie Dust attack? I've been reading about the Pixie Dust attack from various sources, that provide a low-level explanation of how it works.

In the values

E-Hash1 = HMAC(AuthKey, E-S1 || PSK1 || PKE || PKR)

and

E-Hash2 = HMAC(AuthKey, E-S2 || PSK2 || PKE || PKR)

PKE and PKR are known.
PSK1 and PSK2 are the first and last 4 digits of the 8-digit PIN respectively.
The E-S1 and E-S2 values are supposed to be random. However, in some implementations they are generated with insecure PRNGs and can be easily guessed.

So in every description of the attack, they say that we can brute-force the PSK1 and PSK2 values and recover the PIN.

However, HMAC uses the AuthKey as secret key to generate the E-Hash values. If we don't know the AuthKey, how can we brute-force the PSK values?

I didn't find a source that incorporated the part of how the AuthKey is found. I hope that someone can shed some light on this.

The AuthKey is known as such:

When the registrar receives M1 he generates his public key and rnonce and can compute the

DHKey = SHA-256(gAB mod p, 192)

and subsequently the

KDK = HMAC-SHA-256(DHKey, enonce || EnrolleeMAC|| rnonce)

Finally the AuthKey is derived as part of

AuthKey|| KeyWrapKey|| EMSK = kdf(KDK, “Wi-FiEasy andSecure Key Derivation”, [256, 128, 256]).


What are the security risks of basic authorization in SOAP requests? What are the security risks of basic authorization in SOAP requests?
I know that the username and password are concatenated and sent in Base64 in an HTTP header on every subsequent request, but it is still popular in SOAP WS.

I can think of three points:

You must use HTTPS, or password will be sent in plaintext. But you need HTTPS for all authentication so this is not specific to basic auth. (I wouldn't really care about the fact that the password hits the network multiple times instead of once. Either you use HTTPS, and then it is fine, or you don't, and then just sending it once is already a catastrophy.)
Browsers will have to cache the password instead of just a temporary token of some sort. Maybe not a huge issue, but still.
You must make sure that the passwords are properly hashed on the server side. This is not always the case for common implementations, so be wary! Since the password has to be checked every request, proper password hashing comes with a higher performance penalty, especially if it is a busy system.


Risk associated with problematic linux permissions on files and libraries I started tweaking my linux system a while ago, before I understood the security risks related to having files with problematic permissions, such as 777.

I wanted to check if I had left some problematic permissions hanging so I tried find / -perm 777 and find / -perm 775.

I happen to find a lot of files matching those permissions, such as ruby gems, node modules, etc.

Is this normal and should I be worried?
Are there more permission numbers that are to be avoided (outside 777 and 775)?
Is there any more efficient way to check and/or correct bad permissions on a system scale?

Is this normal

Impossible for us to say without more data, but there are normal processes that can cause this.

  and should I be worried?

Sloppiness is a more likely explanation than maliciousness, so, not deeply.

  Are there more permission numbers that are to be avoided (outside 777 and 775)?

The numbers have meaning, and it's the meaning you need to worry about.

7 is octal for '111' which maps to 'rwx' and means 'read: yes, write: yes, execute: yes!'

5 is octal for '101' which maps to 'r-x' and means 'read: yes, write: no, execute: yes!'

You were told 777 is problematic because each digit means a different set of users: user, group, and other.  7 in the third digit means that other ('everyone not already specified') can write to the file, which is often a bad thing, because you shouldn't trust absolutely every user (including service and software users) on your system.  Especially if they're writing to a program or a library that gets loaded into a program, they can make you execute malicious code.

Likewise, a 7 in the second digit can be a bad thing if you don't trust the group that it's granting write access to.

  Is there any more efficient way to check and/or correct bad permissions on a system scale?

The best way is to use your distribution tools; see this answer which was written around SUID/SGID concerns but is equally valid for loose write permissions.  Note that this will not catch the most likely cause of accidental looseness, which is installing software modules (e.g., with pip rather than apt) with a non-restrictive umask set for that user.


Best practice for serving sensitive data? Our invoice vendor serves invoice images via http and does not require any type of authentication.

 EX: http://example.com/companyid/image.php?id=Lhjjfkedhf_739567395

Using HTTPS would be a good start but what about how the id is generated? They claim it's randomly generated and follows no sequence but is there any risk in someone writing a script to try and ping random ids to see what returns a response?

The first directory is a company directory so any brute force attempt would still allow the hacker to filter by company id.

Disclaimer: Without knowing the specifics of how the ID is generated, everything is just a guess.

The ID, Lhjjfkedhf_739567395, appears to be a concatenation of two components, a 10-character upper-/lower-case string and a 10-digit number. Assuming that is correct, there are 5210 possible values for the string and 1010 possible values for the numeric portion. It seems very unlikely to me that these values are independent (though with a sample of one, it's hard to know). So let's just assume that only the letter portion is truly random and that the numeric portion is some internal ID that they use.

5210 has the an order of magnitude of 1017. As this is such a large number (there are approximately 107 seconds in a year), it means that the vast majority of the possible values will be unused. As such, iterating through them or randomly guessing values to find a used one, especially as it seems you need to make a network connection to confirm each guess, would take a prohibitively long amount of time.

This analysis will only be correct if the initial guesses I made about the format of the IDs are correct and if they use a secure random number generator. Otherwise the situation could be much worse.


Can an attacker replace the hash of a download, a download, and the public key? I have a question about DSA and GPG. Suppose you are trying to verify a downloaded file is 'legit' (i.e., no malicious code and it is the intended file). I'll just use Ubuntu's 16.04 LTS ISO image as an example. Following through the instructions, I get the general idea (please correct if I am wrong):

Download the ISO, the SHA256 file and the SHA256 file signature
Get the Ubuntu public key from the key server
Verify that the SHA256 file was signed using the Ubuntu private key with the public key using DSA.
Compute the hash of the ISO and compare the hash with the hash in the SHA256 file.

Now, maybe a stupid question, but couldn't an attacker instruct you to download his own key instead of Ubuntu's, a malicious ISO, the hash of the malicious ISO, and a valid signature of the hash of the malicious ISO? I guess a simple way to defend against this is just cross-compare the public key against a bunch of different sites (as this key has been around forever), but what if the public key is not as well known. If the site is fully compromised, I feel like the attacker could trick you into downloading the wrong key!

If the site with the instructions is compromised the attacker can replace all instructions. This means that he can specify a different key to use for verification or omit the verification information completely, that he can specify a different URL for download etc.  That such a compromise can happen shows the hack of the Linux Mint site in 2016 which was changed to point to compromised download at this time.

A site compromise can actually quickly be detected if a site is monitored for changes, which is hopefully the case for important sites. But an attacker does not even need to compromise the original site. Instead the attacker could buy ads for search engines which direct you to "alternative" download sites if you are looking for the downloads. These download sites are in full control of the attacker so he can publish anything there. Such alternative sites are also not detected when monitoring the original site. This type of social attack is very common with downloads of openoffice or similar where a simple download openoffice might lead to a result page which is full of advertisements pointing to download sites. These then usually provide "enhanced" installs which add additional software but could also provide a compromised version.

There is not a lot one can do about this. The underlying question to all of this is whom you can trust. Even if your new computer comes pre-installed with Windows you have to still trust the vendor that the version you have is the original one and that no harmful software was installed additionally. History shows that this is not always the case and that even seemingly trustable vendors add harmful software.


Someone faxed me a bunch of black paper I work for this telemarketing company, and when I went to work this morning all my fax machines' outputs were jammed with black paper with the faded words "f*** you" transcribed on each of them.
I looked it up and it says its an electronic attack called a 'Black Fax', what should I do?

By law, faxes have to have the sender's phone number printed across the top. This is by law, not technical requirement, which means it's quite possible to not have that information, or at least not have it correct. Either way, you should have call records available from your phone company to help track the perpetrator.

Armed with that information, go file a police report (and assuming USA, an abuse report with the FCC), and then wait for the dream of justice that may or may not ever come.

You may also want to consider an electronic-only fax option. All-black TIFF files cost a lot less to produce, so the effect of such an attack is minimal. You could roll your own using the appropriate software and a fax modem, or you could subscribe to a commercial offering.


Danger of hidden html form uploading users local files without their knowledge Is there a danger that a webpage could have a hidden form with a file upload input and js script that would try and take a random guesses at files on a users system and attach them to the form and submit it ?

The js for instance could try and and submit the form multiple times trying for files like /users/name/documents/finances.xls or /users/name/documents/creditcards.xls obviously the list of files and locations to check for would have to be quite extensive and even then theres no guarantee.

Is this a danger or do modern browsers have procedures to prevent this ?

It's not possible for a web page to set the path of the file to be uploaded, the user has to select something or type it in.


Is there a way to block your ISP from controlling the password of your main router? I got internet installed at my home earlier today by Bright House Networks.

When I asked the installation technician about changing the router administration password, he said that he can change it to what I want while he is on the premises, or otherwise I can call them and they can change it remotely.

My concern is that if they are controlling the password, they can control the settings in the router as well (and some of these I prefer to control on my own). I understand that I can completely-mess-up-the-connection between my home and ISP but in the worst case I can always reset the router to the default values and, if needed, after that call the ISP. I do not think I need them controlling the password to the router.

So the question I wanted to ask is if there is a way to block the ISPs remote access to the router? (I have some ideas on how to do this myself but wanted to see what the community says)

Blocking ISP access to their own device is not a clever idea.

Instead just buy another router and connect between ISP's router and your computers. Then move all configuration related to your LAN to your router and configure ISP's router as bridge (or put your own router in DMZ).

This way ISP will have access only to the bridge, and not to your LAN.


Is it safe to recycle unshredded credit card receipts? Is it safe to recycle unshredded paper credit card receipts?  Can identity theft be helped by data disclosed on most vendor's receipts?

Most credit card receipts will contain your name and the last 4 digits of your card number.

I can think of several companies that either currently verify by last 4 digits or have in the past verified by last 4 digits. These are companies such as Apple, Godaddy, Paypal, etc...

So while the chances are low, it's still possible that someone could perform some degree of identity theft with this information.


Using Google Docs to share passwords Background
Often developers and clients need to exchange passwords to be able to access some services. Of course the best option would be to never use someone else's credentials to log in, and instead create a different account for every user. And of course there's always the option of using a remote-desktop application to be able to work on a client's machine without having to share any passwords. But these options are not always viable. Plus, often clients don't have enough experience with security or even computers at all, so you can't really expect them to understand cryptography, use GPG, etc., or be willing to install and learn to use other software, or follow complex rules without some irritation (like having to send pieces of passwords over different channels, or spell out long passwords on the phone, etc.). This is such a common scenario that the vast majority of professionals I've worked with keep on sending or requesting passwords in plaintext via email (and of course they don't even delete those emails afterwards). Because it's easier.
So I thought of a method that is almost as simple as sending an email, and at the same time it should provide enough security compared to other methods available in the same scenarios.
The method

Create an empty text document on Google Docs. Then, if you have any credentials to communicate, just write everything in this document. Otherwise leave the document empty.
Share the document with the other party, who must have a Google account (but everybody has one today).
The other party opens the document (they must be logged in to their Google account). If they have any credentials to communicate, they will write them in this shared document.
When all the information has been exchanged, you (the owner of the document) just delete the shared document.

Pros: very easy even for the laziest people; all the info is encrypted during the transmission (thanks to HTTPS); the info is deleted as soon as possible; Google's security is supposed to be better than the average provider; seems more secure than email, SMS, or voice calls in general;
Cons: what are the cons? Am I missing anything? All the cons I can think of don't seem to fit the threat model. In other words, I'm afraid the weaknesses of this method cannot be mitigated in a scenario where some people aren't experienced enough or don't care enough about security. So passwords can be stolen if a machine is compromised, or if a Google account has a very weak password, or if a Google employee manages to access Google Docs data... but if we add such threats to our scenario, then we are going to have much bigger problems (and good luck finding a solution).
So the question is: does my method make sense? What are the real cons? Am I missing anything?

What you have proposed is analogous to texting a password (but with TLS). As long as the doc is a separate channel from the account in question, and there is nothing relating the password string to its account, then you have a similar threat model.
The doc can be downloaded, saved, undeleted. A compromised Google account exposes the password strings. But all that is similar to a texted password.
So, it would seem that the approach improves on email and text by ensuring deletion of the central doc, ensured TLS, and access logging. It does not appear that the process introduces any more threats than email or text.


Test Android Secure Encrypted Traffic For testing android traffic encryption I have configured a VPN client in my phone. What simple test I can perform in my home wifi network to verify that the traffic is really encrypted and secure?

If the server is located somewhere else, you can check if the traffic is being tunneled through the VPN server by checking what IP address you are coming from. Visit a site like http://www.whatismyip.com/ with and without your VPN software enabled on your phone and see if it is a different IP address displayed.

Capturing the traffic from the air is a little bit tricky involving some steps like having a wireless card that supports monitor mode and software that makes use of the monitor mode.

A simple way of inspecting all the traffic to and from your phone is to pass it through a device where you can run a pocket inspection tool. Here is a tutorial about using Internet Connection Sharing in Windows to set up a hotspot on your PC: http://lifehacker.com/5369381/turn-your-windows-7-pc-into-a-wireless-hotspot. Connectify Hotspot is also a simple software to use: http://www.connectify.me/hotspot/.

Once the traffic from your phone passes through your PC, you can use Wireshark on your PC to inspect the traffic for unencrypted text.


Is it appropriate to tie application-level encryption keys to AD profile The underlying tech is Windows DPAPI and .NET's use of it via ProtectedData. In our scenario, we have an application that runs across various servers, Web Api's, websites that users can log into and windows services running in the background. All of which run under a specific AD account for the application.

The encryption keys are stored against the profile and this allows all components to access the data. All working ok.

However, is there an inherent risk in associating the keys with an AD profile in that any manipulation/corruption to the profile may result in the application no longer being able to access the data? Or is this risk so low as to be negligible?

Would it be better to use .NET's other cryptographic objects to store the key at an application level so that AD is not involved?

I had initially searched on the site and found this post on symmetric encryption and linked to a good whitepaper by Microsoft which does outline some of the weaknesses of DPAPI but doesn't quite address whether it's appropriate for a large, somewhat distributed application. I think there's some risk but I don't know if it's high enough to be worried about in the long term.

Looking at some of the risks/issues/questions:

AD was never designed for online use with issues like what we saw in 2016.
Do the service account meet the Principle of least privilege?
Integrity : What happens when the profile gets corrupted? Do you have backups? Are they encrypted?
Confidentiality : How confidential is the data and how much will a breach cost you?
Availability : How long of an outage can you afford?
Detecting a breach : Are you monitoring for unusual activity?
After a breach : Can you revoke the keys? How do you issue new keys?
Other options designed for distributed systems such as vault or octopus deploy
Knowns

It depends on the industry you are in that will effect your risk. It's rarely a single persons decision and should be communicated to the business.

tl dr Personally I would advise against AD for a distributed system as a glorified key store as MS has Key Store Management Services.


Burp suite doesn't send accept-encoding header When I send a GET request with Burp, it doesn't have "Accept-Encoding" header on it's header. Because of that, I can't get a js file from a website (It returns 406 response).

But when I add "Accept-Encoding: gzip" header manually on Repeater section, application returns 200 response.

I checked Firefox's "about:config" section, it's in default settings.

I installed "Modify Headers" plugin to Firefox, add "Accept-Encoding" header. Still, I Don't see this on my request headers.

I couldn't find any Burp plugin which adds custom header to requests.

How can I solve this issue?

Under the proxy options there is a setting "Strip Accept-Encoding headers in incoming requests". Disable this if you want gzip encoded responses.


User Account Control and outside processes I was using TeamViewer (a remote desktop client) to log in to a remote computer running Windows 7.

While logged in, the Java updater prompted me for administrator access to run an update check. Out of habit, I pressed AltY (for "Yes") to grant the updater permission. This worked, and the updater ran.

However, doesn't this entirely defeat the purpose of User Account Control? Much like CtrlAltDelete, isn't it supposed to prevent programs from providing input? Why was TeamViewer able to trick UAC into thinking that I was physically at the terminal pressing the keys?

When teamviewer is installed it includes a daemon that runs under the system account. The client that is started under the users account only provides instructions to this daemon.

As this service already has elevated rights assigned at the time of installation (the creation of this daemon) it is possible to directly emulate key strokes as coming from the local system.


Can anti-virus/virus protection be used to spy on you? I'm a complete noob when it comes to these subjects. But here goes...

Let's say someone is using a VPN, TOR, or some other tool to enhance their privacy. As I understand it, you are discouraged from using plugins, various apps, and other things as it may compromise your privacy. Does this extend to anti-virus/virus protection as well? If someone such as a hacker or the NSA didn't want to try to crack through your VPN or anything to get your info, could they target your anti-virus/virus protection to get to your info.

If not, then is it safe to use anti-virus/virus protection if you are concerned with your privacy and also use VPN/TOR?

Any software you install on your system can compromise the system and thus affect security and privacy. This can be done either willingly or because of bugs in the software. And this is doubly true for software which runs with elevated privileges, like Antivirus usually do.

And while Antivirus might like to protect you they often have critical bugs which might make your system actually less secure. For more information read High-severity bugs in 25 Symantec/Norton products imperils millions from 2016, Critical flaw in ESET products shows why spy groups are interested in antivirus programs from 2015, Google bod exposes Sophos Antivirus' gaping holes from 2012 or Google researcher blasts Trend Micro for massive Antivirus security hole from 2016, just to name a few.

Apart from that many Antivirus inspect HTTPS connections since encrypted connections are also used to transfer malware. And sometimes they implement this inspection in a wrong way and thus make man in the middle attacks possible which were not possible before. Read The Security Impact of HTTPS Interception for more details.


Meterpreter HTTPS detected by IPS I am busy with security testing on a clients network and was asked to show how "easy" AV evasion is. I created a nice powershell reverse HTTPS file through veil-evasion, which is not detected by the Symantec virusscanner (testing with Norton Deluxe).

So that was easy enough, but when I run it the IPS part of the virusscanner (I tested it, it is purely the IPS) still detects meterpreter network traffic.
As far as I can see with Wireshark the connection gets to the "Hello, Certificate, Server Hello Done" message and is killed then and there.

My question is how does the IPS detect this? What in the meterpreter message is triggering this IPS? And then, what to use to circumvent this still using meterpreter (and not have to write my own backdoor)?

By default, Metasploit generates self-signed certificates with a random 4-character CN. Some aspect of that cert is most likely what the IPS is triggering on.

You can override this by providing a certificate in PEM format in the advanced option HandlerSSLCert.


Closing handles of a process as a regular user Here's the situation: As an adminstrator, I am able to stall the application by closing 2 handles held by the process. (Using ProcExplorer) . Is there any way/hack I can use to close file handles while as a regular user. handle.exe and ProcExplorer wont let me do so as a regular user. Is this because of Windows' security or because of ProcExplorer and Handle.exe's limitation ?

Considering the only way you could get to the process is through debugging hooks (I think). The Local Security policy in windows 7 has the following for the debug permission:

  Debug programs

  This user right determines which users can attach a debugger to any
  process or to the kernel. Developers who are debugging their own
  applications do not need to be assigned this user right. Developers
  who are debugging new system components will need this user right to
  be able to do so. This user right provides complete access to
  sensitive and critical operating system components.

  Caution

  Assigning this user right can be a security risk. Only assign this
  user right to trusted users.

  Default: Administrators

If this is the case only users with this permission could cause the issue you're referring to. Your bigger issue is users that are able to escalate permissions, but that's the battle we all fight.


Is it a bad idea to use a domain name to access my VPN? I'm using a VPN mainly as a way of limiting access to my servers as it has a static IP address.

Is it bad practise to use a domain name to access my VPN? That is, is it fine to use vpn.example.com, or should I access it using the IP address?

If your IP is completely static, you could obviously use the IP address safely and reliably.  But you're fine using the CNAME, as long as you trust the entity hosting your DNS zone file.

If they're not trustworthy, or if they're sloppy, it's conceivable that some third party could substitute their own DNS records for yours and redirect vpn.example.com to their own "bad guy" server instead of your legitimate one.

It's always possible that you could get DNS-hijacking malware on your computer, or malware that fills your local hosts file with bogus entries. But if that happens, it's just as likely the the malware is recording your keystrokes and mailing them home, so you're compromised anyway in that situation.

Having said all of the above, however...

Are you connecting to your VPN from a lot of potentially suspicious places (open hotspots on the rough side of town, hotels, Internet cafes, etc.)?  If so, there's always a chance that those systems have been compromised and are pointing at poisoned DNS servers.

At least two mitigating factors jump to mind, though.

The first is that depending on the VPN technology you're using, you should get a warning if the server you reach isn't the one you intended to reach. OpenVPN uses assymetric encryption and your client VPN keys won't work with a rogue server unless that server has somehow been loaded with your server's private key (in which case you're already completely compromised). Microsoft's SSTP VPN (another HTTPS VPN) is protected with a SSL/TLS cert and should bark at you if the cert on the server isn't correct, and so on.

The second thing is that even if the DNS at some public WiFi hotspot has been poisoned, the owner of the poisoned DNS server would need to be specifically targeting your vpn server's CNAME in order to redirect you to a poisoned VPN server or relay. Unless you're a high-value target of some kind, that seems fairly unlikely.

EDIT: There are also anti-malware packages and other services that always redirect your machine to their own DNS servers.


Given a set of ports is there one that is more likely to bypass a firewall? I've been trying to solve a homework question in a beginner infosec class, and I was stumped on an issue and I didn't really know of the right place to ask. If it isn't then please let me know.

Given the following ports,

8080/UDP

6667/TCP

53/TCP

443/TCP

if somebody was developing malware, which would be the most likely to be used by it to bypass the firewall?

I know that 53 and 443 are DNS and HTTPS respectively.

My way of thinking about the problem is that it's likely a firewall would be set up to not drop incoming HTTPS traffic so that would be the best one to develop malware for, but I feel like there's possibly a trick to the question I'm missing. Also it's probably possible to eliminate UDP 8080 because it falls out of the commonly used UDP service range, meaning it's likely to be blocked by default.

Any insight or explanation would be helpful. Thanks!

Things don't really work how you assume. A firewall CAN drop all incoming 443 traffic and allow only outgoing connections and then connections that have been initialized from inside the firewalled area towards outside.
As for the port numbers:

6667 is used by IRC so it's likely to be blocked anyway.
That UDP 8080 may be used for anything, including P2P so it's also likely to be blocked.
TCP 53 is mostly used internally for DNS zone file transfers, but it may be needed for zone communications between areas, so it may represent a vulnerability but it will not likely be open by default.
In the case of 443, if you host a server that requires authentication it is likely that you will need it open.

So given the limited choices above, it's all about what the target network will use: will it use UDP for P2P transfer, will it use IRC, does it host a secure server or will it use zone transfers ?
After determining that the attacker will probably choose the right option for the target. Generally, out of them, assuming all are available I'd focus on 443 because it will have encrypted traffic and you could hide your own traffic there or on the UDP port as secondary because P2P traffic is heavy and infiltration is easier when there's heavy traffic.


Social Engineering and Police Officers The Story:
Yesterday at 12pm a neighbor of mine was pulling into his driveway, and saw that his van's back-window was shattered. Well, this neighbor and I have had some trouble with each other in the past (only noise complaints though) because he is in a band, and plays in his garage; however, it was not me who broke the glass on the van. As soon as he came home, he immediately marched across the street to me while I was exercising in my garage. Upon arrival he raises his voice, and presumptuously threatens to call the cops even though he had no idea who did it in the first place. I, being responsible, told him I did not do it, and will show him video evidence (I have a camera mounted above my garage). Since my camera covers nearly five houses, it can clearly see his house. So as I'm returning from the house with the USB at hand, a cop is walking towards me from his house, and my neighbor was pointing at me. Without any hesitation I told the cop I may have video evidence of who did it. He was interested in the footage, so without thinking twice he plugged it straight into his laptop (running windows XP), and there wasn't anything on it useful (the light just so happened to be at the right spot and the right time). So he simply returned the flash drive to me, and told my neighbor that he couldn't do anything about, regarding the evidence. The day ended there.
Conclusion:
Nonetheless last night I sat up thinking about what had happened, and the fact he hates me. It didn't strike my attention, however, that the cop plugged the device into his laptop in his cop car, the one he uses on-duty. I just thought to myself... could this have been all a setup, and could have sensitive data been compromised?
Questions:

Should an officer directly plug an "outside" USB device directly into their on-duty laptops?

If this is an issue, what security concerns does it raise, and what damage could this have caused?

Do most police officers receive training to prevent Social Engineering?

Also, sorry for the verbose story, but it helps to undertsand whats going on. I'm a student in Computer Science, but know only the basics of security (for programming). With this being a real life story that happened yesterday, I'd really like to understand the risk this may have produced for others.

While it is within the realm of possibility that it was some sort of setup it is extremely unlikely, it's much more likely to be exactly as it appears to be. You offered to show the officer something which could help with an investigation, and he took you up on it. Your neighbor would have little to gain from trying to game the officer. As per your questions:

Should an officer directly plug an outside USB device? NO! There's no telling what malware is on a USB stick with the potential to expose confidential information. He should have taken it and given it to a tech to open in some sort of sandbox environment
There are 2 security concerns here. One is that the officer's computer could have been compromised, giving access to police records and databases. The other concern is you could have picked up malware that was on the officer's machine. That would enable criminals to access your data.
Do police officers receive training to prevent Social Engineering? Yes, extensive. Think about their job - a police officer will have daily contact with many people who have an interest engineering the police. Perps are desperate to get the police to think it wasn't them, and some people try to use the police as a tool by accusing others of crimes they may not have committed. Most police officers quickly develop a sensitivity to manipulation, and learn to not trust people's motives. As for whether they have specific training about IT it depends where it is, some PDs have training and some don't

As for what's the actual risk it's probably very low. It doesn't look like anyone has much to gain in this situation.

As an aside, it may be best checking your local laws for camera surveillance, in many places across the world it's illegal to have a camera without either a permit or some sort of posted notice. You don't want to expose yourself, even if it seems harmless, or even helpful.


Infected usb flash drive detection and cleaning Want to know what all type of malware infections are their that hides themselves in a pendrive completly and infects machine silently.How to detect this type of malware as they cannot be seen.

How to proceed for analysis.

Typically you would use an anti-virus program to detect and prevent infections from external storage devices. This is only as good as the AV protection installed. A good, up to date AV can protect systems against the majority of infections, but there is plenty of malware that use unknown vulnerabilities which will not be stopped by any AV program. So there's no way to prevent all malware infections from portable storage.

The approach many companies take is to prevent external storage from being used in the first place, which is inconvenient to users, but prevents that threat vector.


How do I measure compliance to Information security policies? I work in an organisation with 3 levels as far as information security is concerned. I'm sitting at level two where we develop policies and also assist with the standards. One of the most difficult things which have come to light is how to measure compliance to policies. The risk managers at level 1 need some sort of measures to evaluate whether they comply with the set policies or not.
I have tried to put metrics (KRIs) together in order to achieve the purpose.

How practical and detailed should the metrics be?

A good information security policy should very clearly state a number of things. At least the following:

The reason why it was implemented
its goals
its scope
its boundaries (the things it does not apply to)
clear requirements towards the assets that are part of the scope
controls that meet these requirements
responsibilities

There are (at least) two kinds of policies that are self-written. The ones that set organizational rules and the ones that set technical rules. The latter are sometimes called 'standard' or 'guideline', for instance 'Guideline for configuring Windows Server 2012'. If you are the person that is giving names, try to give the same name for the policies with the same scope.
A very small policy that sets organizational rules could look like this.

Employees noticed that visitors tend to stare at their screens
To reduce screen staring this policy will be implemented
This policy applies to employees of level 1
It does not apply to employees of level 2 and 3
& 6 All employees are required to lock their screens if they have a visitor in their office. If the visitor needs to look at the screen, because of business reasons, employees have to make sure, that the visitor is only able to see what she needs to see. This can mean to close all other windows, even if this harms productivity while the visitor is there.

7 managers are required to monitor this behavior on a sample basis.

How can you measure compliance with policies that set organizational rules?
You can't really. (and also auditing)
You can ask employees if they comply with the policy. On the one hand this is risky, because your employees will often times answer as they think is socially expected and so will their managers. On the other hand if the process of asking is thorough, this can yield good results. If your employees do not necessarily have to fear backlash if they don't comply with a policy, they will be more honest. A nice side-effect: can also ask them why they don't follow the given rules. There is often a discrepancy between how processes are planned and built - and how they are "lived".
You could test employees with regards to what they know about a policy and its details. But then you will only know if they know about the policy, not if they enforce the rules that are set there.
Because of these problems some organizations do the following: when it comes to policies that set organizational rules.

implement policy
employees have to sign statements that they will comply with policies that are published companywide and that apply to them
publish policies companywide and/or to the respective groups

How can you measure compliance with policies that set technical rules?
Auditing.
The best way to do this, is auditing. There are all kinds of audits with all kinds of different scopes. If you want to measure if your controls are effective (= meet the requirements) and if they have been implemented correctly you should hire an auditor or look up auditing techniques. I would recommend hiring because 1) audits are tedious and 2) having an outside perspective can be very helpful to find flaws in processes and controls.

Get to the point! How do auditors measure compliance?
Well... there are different techniques which really depend on what you want to measure.
There is the basic: X machines of Y, so Z% have vulnerability with a CVSS score of 7 or higher. - You'd measure compliance with a policy that sets rules with regular vulnerability scans.
Compliance will most of the time come down to "yes/no/partly". The rules that have been set in a policy could look like the ones you can see here.
For instance:

"The auditor should verify that management has controls in place over the data encryption management process. Access to keys should require dual control, keys should be composed of two separate components and should be maintained on a computer that is not accessible to programmers or outside users. Furthermore, management should attest that encryption policies ensure data protection at the desired level and verify that the cost of encrypting the data does not exceed the value of the information itself. All data that is required to be maintained for an extensive amount of time should be encrypted and transported to a remote location. [...]"

These can be very easily measured with interviews of experts and technical audits. For instance: what TLS version is in use, how is back-up data encrypted, etc.
There are also more complex goals that can be set up before an audit but these are probably not what you are looking for, because they require complex processes and controls to audit. These things are normally not set up via policies.

In the end it comes down to the auditor and the technique she chooses. If you hire someone, arrange this beforehand.
If you don't choose to audit you will have to define how much risk is reduced after a policy has been implemented and: 1) employees don't know about the policy, 2) employees always comply with the policy and all the varying degrees between these two.


How secure is GnuPG conventional encryption (with defaults)? How secure is the encryption of files when using GPG this way?

gpg -c personal.zip

It will not use any keys or other lines. And how good is it compared to TrueCrypt?

Note that I will upload encrypted files to my email for backup reasons, and bigger files go to 4shared and they will be public. Is it secure (assuming I'm using a good password)?

It depends on the quality of your pass phrase really. If that is long enough, generated securely and kept secret such as 128 bits from a random device, very secure:

> dd if=/dev/random of=- bs=1 count=16 | md5sum
d41d8cd98f00b204e9800998ecf8427e  -

GPG will, in this mode, encrypt with CAST5, but you can use a different cipher, such as AES256. (To make use of 256 bits, take two MD5 outputs as the key, or create 32 Bytes of random data some other way.)


Protect hdd from writing permanently I am looking for a way to permanently lock an external hdd to read-only mode without a way for the external attacker to make it writable. If it is not possible to use a password or pin to make disk writable, I am ok with a permanent write-locking solution. The goal is to prevent unauthorised third-party from adding any files to the disk or modifying files on the disk and claiming that those files or their changes belong to me.

I know that DVD is a typical solution for this but I need to make 1TB to 2TB of data read-only, so DVDs are not an option.

Is there a way to physically write-lock hdd in any way? I am ok with using any hdd of any maker, either completely external or a 2.5 hdd that can be put into external enclosure. It is ok for me to cut something (like a wire). It just has to be either a password protected change (not OS dependent), or a complete hardware damage to write capability of the drive.

I searched both here and on the Internet in general but could not find the answer.

Edit: exclude password/pin, looking for a permanent solution to make the drive read-only.

What you're looking for is called a WORM drive (Write Once, Read Many).  Historically, solutions in this space had more in common with tape drives than with hard drives, but there are some common products.

To quote from the literature for GreenTec, a vendor of one such implementation (emphasis mine):

  WORMdisk™ technologies protect data from Ransomware, accidental or
  intentional modification, alteration, deletion or re-formatting with
  capacities ranging from 500 Gigabytes up to Multiple Petabytes.
  WORMdisks™ act like a one-way data diode where data can only be
  transferred one way, from the disk to the host (i.e. read-only) and
  cannot be transferred from the host to the disk media (i.e. written).

  Protection is performed at the physical disk level, and is embedded in
  the disk drive itself, so it does not matter what operating system or
  access controls are placed on the disk, the data cannot be modified.

CD and DVD media are cheap options which can be used for this, but have limited capacities.

WORM solutions are relatively rare, and as such, generally more expensive per megabyte.


What is untrusted data I was reading the basics of XSS prevention on owasp xss rules. But the issue is rather abstract. The term "untrusted data" is often used. Every rule reminds not to insert untrasted data in the certain places in the page content like:

HTML comments

scripts

attribute names

tag names and so on...

But what is untrusted data?
E.g. i'm sending data (user name) from the serverside that has been extracted from database. Is this data going to be trusted data?

E.g. the user submits the form and sends the text input value or the client makes any request (with parameters or not). Is this data going to be untrusted one?

Anything the user inputs (or can control the value of) is untrusted. Always filter and validate.

Anything dynamically generated that may consume user controllable data is untrusted. Always sanitise.

Basically anything is deemed untrusted if you are not 100% in control of it.

  i'm sending data (user name) from the serverside that has been extracted from database. Is this data going to be trusted data?

No, apply the rules above and you will see if the original username was not properly validated and/or the output is not sanitised the user name, could be <scrip>alert('xss')</script> basically a stored xss value or any other value the user or bad actor wants.


Using PBKDF2 with AES and SHA2 I use the following inputs to encrypt using AES:

UserPassword (plain text)
SecretKey
RandomIV

I use the following inputs to encrypt using SHA512:

UserPassword (plain text)
RandomSalt

I'd like to enhance both encryption methods above by using key derivation functionality. I will use the .NET Rfc2898DeriveBytes Class which requires the following:

MasterPassword
Salt
Iterations

For AES:

Should I use the AES SecretKey for the PBKDF MasterPassword param?
I currently generate an AES RandomIV and store the IV+CIPHER in the DB, when upgrading to use PBKDF is it correct to do the following:

Do not generate an AES RandomIV
Generate a new random Salt for the PBKDF
Use the first x bits of the DerivedKey as the AES SecretKey
Use the second x bits of the DerivedKey as the AES RandomIV
Store the 'new random Salt'+CipherText in the DB
Both the AES Encrypt & Decrypt methods will have a PBKDF Salt param rather than an AES IV param (ignore the fact that they are both just byte[]'s)

For SHA512:

Is it correct to use the UserPassword (plaintext) for the PBKDF MasterPassword param (instead of securely storing a secret MasterPassword like AES)?
Should I use the SHA512 RandomSalt as the PBKDF Salt?
When calling the SHA.computehash method, should only the DerivedKey by hased, or should the salt be appended to the DK?
How many bytes of the DerivedKey should be encrypted, 64?

Lets get some ground rules out of the way.   SHA512 isn't an encryption function,  its a hash function.  PBKDF2 (Assuming you are using the newer 2nd variant...) isn't a hash function or an encryption function,  its a way of using a hash function and is commonly used to generate the key for an block cipher or stream cipher.

In most situations I don't think PBKDF2 is very helpful.  The problem being that if you use a hash function like SHA512 with PBKDF2 then an attacker can still use an FPGA or GPU cluster.  Bcrypt is more difficult to attack using these technologies than PBKDF2+SHA512,  regardless of the number of rounds you choose to use with PBKDF2.   You could use PBKDF2+Bcrypt,  and that is not a bad choice, however I still think that scrypt is a better choice because both CPU usage and memory usage are variable,  where as with PBKDF2 only CPU usage and the hash function used is variable.

Up next your IV design:

Use the first x bits of the DerivedKey as the AES SecretKey
Use the second x bits of the DerivedKey as the AES RandomIV

Ok,  so based on this design I would conclude you have no idea what an IV is or why its used.   So the point of an IV is that at no point will you encrypt the same message with the same key+iv.  Your proposed design is in clear violation of CWE-329.  The attacker can know the IV,  that doesn't matter,  but it must always be random.  There are a few reasons why,  and I suggest picking up a copy of Practical Cryptography because it has an entire chapter devoted to this topic.

Also CBC mode isn't authenticated,  I am a fan of OMAC1 mode.


Is using both client side certificate and JWT for IoT device redundant? Is there a case to be made for authorizing with both a client side certificate and JWT for an IoT device?

Are JWTs good enough (assuming following of the specs)?

And if client side certs are truly needed, what of expiration dates? (set the client cert expiration way out into the future, etc)?

Only reason you need the additional JWT is if there are going to be different claims and identities being used with the devices that require seperate privileges.

Now as this is IoT do you have a way to revocate and update certificates? Are you able to handle all the required certificate operations?


Required skills before jumping into vulnerability research Hello I'm a beginner into IT security. I want to become ethical hacker. So I know how to use metasploit to write exploits, and how to use different fuzzers, but I think this isn't enough. I can read and understand code from a lot of languages including basic assembly - I can convert simple assembly code to C code or Java to C or C# to C and a few other language to C. But I'm not the best programmer - I'm  fairly familiar with data structures but algorithms are my weak point. I can't code good programs for example. If I start editing kernel I will die but I won't do anything new or good. I know that the question is without specific answer, but I have no idea where I can ask professionals. What programming skills do I need before jumping into vulnerability research?

Well vulnerability research implies that you have a really good knowledge of how thing work. For starters I think that knowing assembly and C is the best way to start. A really good assembly knowledge will help you with reverse engineering and finding vulnerabilities.

Personally I'm learning really hard assembly language and C. You'll also need practice (a lot of practice) in a lab environment. Personally I think this 3 books will get you really stared:

1) Shellcoders HandBook

2) Hacking The Art of Exploitation 2nd Edition

3) Gray hat hacking


I am not getting meterpreter sessions when I am connected to an Openvpn I have a router and the ports required for the backdoor to connect back to the listener are forwarded to my machine's internal ip.
It all works fine only when I am not using VPN.

But after connecting to a VPN I don't get any sessions. Also tried to host apache server on my machine with VPNn connected but it also
doesn't show up but without VPN it works.

So if anyone else has encountered such problem and has found a solution to it
then help me out.

Any help will be appreciated.

In order to get a session both the attacker and victim machine should be on same network.
A little background on VPN
When you are connected to a VPN, you are probably on a private network and the victim is simply connected to the internet.
This makes the difference, in order to a get a session you have to be on same network but right now both the attacker and victim are on different network as you are connected to your VPN.

So, in oder to get a session you will have to connect the victim machine to the same VPN as yours. This is because VPN can connect your machine into remote LAN.
NOTE :
This will only happen when you are using your VPN IP.