If I am using a VPN with allowed multiple connections can each user/device be able to view traffic of the other user? If I am using one a VPN Service, but it allows up to lets say 8 devices to connect, are all the devices/users able to view traffic from other users/devices?

Or is each VPN connection creating its own tunnel, thus its basically saying that only 8 Tunnels can be made/created at once?
Also once connected to my VPN is it possible for someone to de-authenticate me, using my VPN also, if someone is messing around with a Wifi-Network? I mean in theory if you can think of something it can be done, but I am wondering if this is an issue that happens often?

Why I am asking is I am living in a house with multiple people, I notice they are having some fun upstairs sometimes, by trying to setup multiple hotspots with the same Wifi name, I am concerned if its possible that they can do session-hijacking even if I am on a VPN connection (as one time I noticed a message on a service I use that I never wrote, but when checking logs of sessions, the only sessions open are the ones I am aware of.) I know I had not written this message, thus I am interested in how it would be done if i was on my VPN. Although I notice they disconnect the wifi often sometimes having me reconnect to my VPN etc.
On my end I have setup my VPN to disconnect me from the internet, once my VPN connection drops, but I am wondering if reconnecting right away might cause another security issue (assuming vpn's have handshakes also just like a wifi hotspot)?
Would it be safe to say I should invest in my own wireless router and setup a firewall? I wanted to originally use my Linux box with two wireless cards, setup a new wireless network with a firewall and then create a new Hotspot, thus protecting my devices a little bit more.

TLDR: No

Long answer:
Although you may be using the same credentials for each device, each device will have to set up and maintain a unique tunnel and will have a different IV for each tunnel.
From server's point of view, you're simply accepting up to 8 different concurrent connections (IP:Port pairs) for the same identifier, be it an username or a certificate.

In case you're behind a NAT device, like your home router, every device will have it's own RFC1918 IP address.
In this case even though the public IP address is the same from the server's point of view, it will distinguish between them by simply looking at their IP:port pair as everyone will be using a different port to communicate to the outside work, courtesy of NAT/PAT translation.

To sum it up: Even if you tried to intercept all traffic, you'll figure out that there's no no way to intercept of infer what's going inside each tunnel. (This is not particular true if the same IV is reused or due to implementation errors or known flaws but that's not the scope of this question.)


password generating algorithm I read the question about the relevancy of the xkcd password creation algorithm.

Would it be more secure if you used a string of common words with a function that only you knew that would rearrange the characters of said common words?

Define a string of common words and a function f that rearranges the characters in the string in a pattern. Then let your password = f(string).

Using the xkcd password as the starting string: correcthorsebatterystaple.

f = rewrite correcthorsebatterystaple in a seemingly random but logical way.

So f(correcthorsebatterystaple) could become something like

csbthaapolteotrerrryseect

Would this have a greater level of security?

What if you allowed f to be any kind of transformation including transformations that added new information?

The short answer is No.

This is a classic example of Security through obscurity which while it may work sometimes is considered a bad idea because it never works out in the long run.

As in my answer to the other question it comes down to threat modeling. Consider the following two scenarios.

1) Attackers have downloaded a database of usernames and passwords with all the passwords stored as SHA1 hashes. They use rainbow tables or a dictionary of common passwords and try to break the weak passwords.

Is your system more secure? Yes, csbthaapolteotrerrryseect is unlikely to be in a password dictionary.

2) Attackers have downloaded a database of usernames and passwords with all the passwords stored as SHA1 hashes. They are targeting you and know your function, or maybe your function becomes wildly popular (like the xkcd one has) so the attackers run your function over their dictionary.

Is your system still more secure? No people will be looking for csbthaapolteotrerrryseect and similar passwords.

Kerckhoffs's principle is often used in cryptography and states that

  A cryptosystem should be secure even if everything about the system, except the key, is public knowledge.

This is a great asumption and it is used in the xkcd comic. Even if you know everything about how I generate passwords (including the list of words I use) there are still 2^44 possible passwords. Plus the huge advantage of the xkcd style is that it's easy to remember and type.


Scanning for GXHLGSL.txt in server logs I have found in my server access logs that someone is trying to access GXHLGSL.txt file. It looks like automated test (it was right after trying wp-login.php).

When I googled that file I found it on several sites. It contains word TEST.

What is a purpose of it? To mark sites that allow file uploads?

There sure are a lot of sites out there with this file. It looks like someone trying to test the ability to upload a file, or upload a file and then modify it maybe.

I can't find any description of this file name being from a specific vulnerability scanner, I'd say you are right that this is a bot and not human, they could be marking sites as Google seems to index them, though I'd expect malicious users to attempt to cover their tracks and not leave evidence behind of their visit.

Things you could do - delete the file, check your permissions on your upload directory, make sure no one can execute anything, check your permitted file types and how you are preventing them, consider banning this IP and consider preventing indexing via robots file if you don't need it.


Reflected XSS Prevention plugin Is there any plugin out there which prevent reflected XSS? Plugin could be either for firefox or chrome.

Thanks.

Chrome ( and most likely Firefox ) already prevent execution of scripts when they are given in for example the URL parameter, maybe even other things like a request body, and then proceed to give you a warning.

See also Does Google Chrome protect against cross site scripting (XSS)?

Also when you search for XSS prevention in the chrome extension store, you will get results.


Is it possible to detect malicious software just by analyzing the code structure? I'm a newbie to software security. I'm designing a network and I was wondering is it possible to detect if a program upgrade being downloaded on the network is malicious just by analyzing the structure of the downloaded executable?

I tried some literature search but couldn't find much. Any help is highly appreciated.  Thank you!

No you can't, not all the time reliably. To detect viruses simply by static analysis would likely contradict Rice's Theorem which says that such problem is undecidable.


Is the NHS wrong about passwords? An NHS doctor I know recently had to do their online mandatory training questionnaire, which asks a bunch of questions about clinical practice, safety and security. This same questionnaire will have been sent to all the doctors in this NHS trust.

The questionnaire included the following question:

  Which of the following would make the most secure password? Select one:

  a. 6 letters including lower and upper case.
  b. 10 letters a mixture of upper and lower case.
  c. 7 characters that include a mixture of numbers, letters and special characters.
  d. 10 letters all upper case.
  e. 5 letters all in lower case.

They answered "b", and they lost a mark, as the "correct answer" was apparently "c".

It is my understanding that as a rule, extending password length adds more entropy than expanding the alphabet. I suppose the NHS might argue that people normally form long passwords out of very predictable words, making them easy to guess. But if you force people to introduce "special characters" they also tend to use them in very predictable ways that password guessing algorithms have no trouble with.

Although full disclosure, I'm not a password expert - I mostly got this impression from Randall Munroe (click for discussion):

Am I wrong?

By any measure, they're wrong:

Seven random printable ASCII: 957 = 69 833 729 609 375 possible passwords.

Ten random alphabetics: 5210 = 144 555 105 949 057 024 possible passwords, or over 2000 times as many.

Length counts.  If you're generating your passwords randomly, it counts for far more than any other method of making them hard to guess.


How Secure is Microsoft ASP.NET Core Identity? Someone told me about it and showed me the characteristics of version 3:

  ASP.NET Core Identity Version 3: PBKDF2 with HMAC-SHA256, 128-bit salt, 256-bit subkey, 10000 iterations

Which was from Andrew Lock's website.

Assuming it is implemented correctly, if an attacker was to get access to one's database, would any kind of attack even be feasible to find the same matching hash?

"How Secure is X" is a subjective question unless you are talking about something which is provably secure (like a randomly generated one time pad) or undeniably secure by today's standards (like AES-256). Unfortunately, this is not one of those cases. For most uses I think it would be fair to say that Identity version 3 is "secure enough", but there are those that still advocate taking it a step further by increasing the iteration count or using a different hashing algorithm.


Why are email clients prevented from seeing the envelope? Being able to compare the envelope values against the header field values is potentially useful for detecting fraudulent (e.g. spoofed) mail.

However, email servers, when receiving mail over SMTP, are not required to record the SMTP envelope values in a way that makes them available for retrieval by email clients. Email clients are therefore typically only able to retrieve each email's headers and body, and perhaps - depending upon the mailbox format (mbox vs mh vs maildir...) and the method by which the client is accessing the mailbox (POP3; IMAP4; directly on the server...) - some additional metadata like whether the mail has been read yet. But the email client will typically not have any direct access to the envelope.

Some email servers may, of course, be configured to add envelope information to the headers of emails before delivering them to the user; but this does not seem to be required by any standards documents of which I am aware.

In the physical world, by contrast, mail recipients typically do have access to the envelope. (The exception might be if, say, an executive makes their assistant routinely shuck incoming mail from its envelopes before handing it over.)

If I am correct about this, then my question is: was this decision (i.e. to hamper email clients' access to envelope fields and thereby to hamper their fraud-detection capabilities) the result of an explicit, on the record discussion at the IETF or any other body concerned with setting standards for email infrastructure? If so, which discussion, and when? Links to relevant mailing list posts would be appreciated.

Alternatively, if I am incorrect about this: then in what way?

Alternatively, if I am incorrect about this: then in what way?

You are comparing apples to oranges.

The email Header is most closely equivalent to the physical mail Envelope - even better, the email Header represents routing information that is not accessible to the recipient in physical mail.  So it's not correct to say that email client's access to "envelope information" is hampered.  In fact, by design, the important aspects of "envelope information" are injected into the Header, ensuring that email Headers contain routing information greatly in excess of what any physical mail recipient could obtain.

Some definitions (assuming US mail for simplicity):

email Envelope: The values transmitted using the SMTP HELO/EHLO, MAIL FROM, and RCPT TO commands.  Any of these may legitimately change from one hop to the next.

email Header: The text transmitted after the SMTP DATA command, up until the first blank line, after which the email Body begins.  This likely includes a From: (which may or may not agree with the Envelope MAIL FROM) and a To: (which may or may not agree with the Envelope RCPT TO) header.  This email Header grows as each intermediate mail server prepends Received information, as required by RFC 5321 §3.7.2.  In addition the recipient mail servers may record the Envelope RCPT TO by injecting a header such as Apparently-To, Delivered-To, X-Envelope-To, X-Original-To, etc. (but see footnote below).

physical Envelope: The From address (optional, upper left hand corner), the To address (center), originating postmark (upper right, over the stamp).  There may be additional encodings of the recipient information such as the IM Barcode and the orange barcode, but those are both effectively more-or-less lossy representations of the To address.

Note that RFC 5321 §3.6.3 suggests that SMTP relay servers should never modify anything in the header and body except to prepend the required Received line.  In practice, other headers get prepended, especially with intermediate anti-SPAM/malware relays.

Here's how the email Header incorporates necessary Envelope information

The SMTP Received header is prepended by each SMTP server and describes the Envelope information about itself and the previous server.  Consider this entry:

Received: from mail2.example.com (mail2.example.com [192.168.3.4])
    by lix-xx.members.linode.com (Postfix) with ESMTPS id 838CD4AE0
    for <gowenfawr@mymail.test>; Fri,  4 May 2012 12:45:26 -0400 (EDT)

This includes the EHLO/HELO hostname (the first mail2.example.com), the actual IP (192.168.3.4) of that system, and the DNS name that resolves via PTR (the second mail2.example.com).  This information is useful for detecting fraudulent email.

More envelope information may be logged, as seen in this example:

Received: from NAM01-SN1-obe.outbound.protection.outlook.com
    (mail-oln040092002074.outbound.protection.outlook.com [40.92.2.74])
    by smtp21.example.org (Postfix) with ESMTP id AF320401EE
    for <open@lists.example.org>;
    Wed,  5 Dec 2018 15:28:59 +0000 (UTC)

Here the envelope RCPT TO was encoded using the FOR clause of the Received line.  (Note that per RFC 5321 §4.4 only one entry is permitted, even when there are multiple RCPT TO commands.)

What's not preserved

The MAIL FROM and RCPT TO addresses are either not logged, or may be incompletely logged, into the header.  This may be part of your "tampering" detection concern.  It is a side effect of the fact that SMTP was designed to transport encapsulated messages that may have their own rich addressing and routing information before and after the SMTP phase of the connection.  It's also something with no physical analog.

This design consideration may also reflect that SMTP was not designed to be trusted, simply to work.  As soon as trust considerations arose, they were offloaded to other layers of the connection (PGP, SPF, DKIM, all of these occur "outside" the SMTP protocol).

Let's not forget

Any part of the header or body can be tampered with by a malicious relay.  The more effort you put into making relays log security information, the more you're potentially relying on bad information.  That's why each Received line reflects upon the previous relay, and not the one that's prepending it.

In other words, there's limited value to trying to load more trust into the relays.

As to logging Envelope RCPT TO in the Header, RFC 5321 §7.2 states:

  There is no inherent relationship between either "reverse" (from MAIL, SAML, etc., commands) or "forward" (RCPT) addresses in the SMTP transaction ("envelope") and the addresses in the header section. Receiving systems SHOULD NOT attempt to deduce such
   elationships and use them to alter the header section of the message for delivery. The popular "Apparently-to" header field is a violation of this principle as well as a common source of unintended information disclosure and SHOULD NOT be used.

The market has largely ignored this recommendation.


Why does Gmail (add accounts) using SMTP server recommend SSL instead of TLS? I stumbled something interesting today when I was adding an account to my gmail one. Why is SSL boldly stated as recommended when TLS supersedes SSL?

The links for SSL and TLS is the same: https://support.google.com/mail/answer/22370?hl=en

From that link:

  Select a secured connection

  Check with your other mail service for their recommended port number and authentication type.

  Here are some common combinations:

  SSL with port 465
  TLS with port 25 or 587

The difference, then, is that "SSL" means SMTP over SSL-or-TLS on port 465, and "TLS" means SMTP with STARTTLS on port 25 or 587. So what's the difference between them?

STARTTLS is opportunistic encryption. The connection starts as plaintext SMTP, and the client tries to initiate encryption if the server says that it can. The problem with this is that the plaintext negotiation can be relayed and modified by a Man-in-the-Middle attacker, exactly the way that sslstrip works for HTTP redirects and links to HTTPS.

SMTP-over-SSL, on the other hand, starts with a SSL (or TLS--the exact protocol is negotiated) connection, then SMTP is conducted over that tunnel. With this configuration, the client always expects to use SSL, and can't be tricked into going plaintext.

So the SSL-or-TLS naming is not the real issue. Google is using "SSL" to mean the older "smtps" standard, which is actually more secure in this case. In reality, the service is probably using TLS, and Google's mail servers will negotiate the most secure connection possible, depending on the other service.

EDIT: As @Mehrdad points out in the comments, Google will change which option is "recommended" based on the port number that is selected in the dropdown. This shows that their recommendation is not based on higher assurance of encryption, but on what is most likely to work: port 465 is registered with IANA as 'smtps', and is expected to be SMTP-over-SSL. Ports 25 and 587 are 'smtp' and 'submission' respectively, and are expected to be plaintext. Since I doubt that Google will refuse to send mail over these ports if STARTTLS cannot be negotiated, "TLS" remains the weaker, opportunistic option. It is, however, more likely to be supported than port 465.

EDIT 2: @grawity did the legwork and determined that Google does not, in fact, fall back to plaintext SMTP if STARTTLS is not supported. You have to explicitly select the "Unsecured" option when configuring the server. This is really good work by Google to ensure transport security for emails. Of course, all that has been said already about STARTTLS remains true: it requires this extra step of making TLS a strong requirement to avoid downgrade attacks.


IPSec Protocol Sequence Number On IPSec protocol, how can denial of service (DoS) be prevented or its effect be minimized? For example, assume an attacker intercepts a packet and changes its sequence number to a bogus one (say 10 is changed to 100000). This will make the receiver slide the anti-replay window so far that real packets will be drooped (regarding them as being old) thereby denying them service. How can such attack be prevented on IPSec protocol? Thanks.

The situation you're describing isn't specific to IPSec. If the attacker is in position to modify packets in-flight between two hosts, then his ability to deny service between those two parties in question can't be mitigated.

The solution is to either find the perpetrator (he shouldn't be hard to find given that he has to be along the path between the two hosts), or move an endpoint to a more secure location.


How do WPA/WPA2 cracking programs know when the PMK/PTK is correct? I'm doing some pen-testing on my home wlan with aircrack-ng and it got me wondering how programs like these(eg. aircrack-ng, cowPatty, pyrit etc) really work. Specially, when performing a dictionary-attack on the psk how do they know when the correct pairwise master key and pairwise transient key has been found?

As I understand it, this is the rough diagram of how the WPA auth process looks like(image stolen from wikipedia):

At no point are any PMK, PTK transmitted during this process. So what exactly happens after the PMK and PTK are computed by aircrack? Does it use the PTK to decrypt a later packet in this handshake and verify some known plaintext content in the packet? How does it verify that the PMK and PTK are actually correct?

Pyrit upstream here.

You start by eavesdropping the key exchange between the station and the access-point. The first packet (sent from the the AP to the STA) gives you the ANonce, the second packet (sent from the STA to the AP) gives you the SNonce.
You can now guess a password, compute the Pairwise Master Key and construct the Pairwise Transient Key.

There are now two possibilities:

Either you derive the Key Confirmation Key from the Pairwise Transient Key and compute the Message Integrity Code over the "virginized" packet that transfered the SNonce. You will find that your MIC matches the transfered one if your guess was correct. Make a new guess and repeat the process otherwise.

In case of WPA2-AES, one can also derive the Temporal Key from the Pairwise Transient Key and use that to decrypt some of the traffic that followed the authentication phase. If the first 6 bytes of the decrypted message turns out to look like a LLC+SNAP-protocol-header, the chance is only one in 2**48 that the guessed password is not correct. You may re-check by computing the Message Integrity Code as above.
This second approach is faster than the first one as it requires less computation. You can read about the details at https://pyrit.wordpress.com/2011/04/16/known-plaintext-attack-against-ccmp/


Is Domain Logins a potential attack vector? Say you have a windows server that works as a PDC AD box. Is this a potential Attack Vector for a small 20 people buisness? Wouldn't it be better to simply have an encrypted database file with all the user info always with me? For example someone could enter the building and physically harm the server or gain access to the AD database Info.

Basically, Microsoft Active Directory is a database containing encrypted user information.

But anyway, regardless of the format you're using to store this information, someone able to physically enter the server room and steal / harm the server will damage this information and cause business disruption.

MS Active Directory is a robust technology used by many companies, and it will provide an acceptable level of security when it comes to user management, identification, authentication etc. providing it is configured properly and follows the Active Directory Best Practices.

Note that other technologies might do the same job and will provide the same level of security if they are configured properly as well.


Benefits of placing WAF reverse proxy/transparent in front of web-based honeypots? For my final year project, I wanted to do a comparative analysis of 2 WAF's ModSec/Shadow Daemon and web-based honeypot SNARE/TANNER.

I wanted to find out if there are any benefits of placing WAF inline of a web-based honeypot. Does it defeat the purpose of a honeypot by placing WAF inline? Can WAF add value in terms of deception capabilities or aid in the development of future mitigation techniques? For instance, determine what attacks bypass WAF, if so what attacks be caught by the honeypot? I know this boils down to the honeypots limitations as it's low-interaction and applies vulnerability type emulation rather than actual vulnerabilites.

Would an inline WAF make the honeypot appear more attractive by making it more difficult to attack?
Can consolidating WAF and honeypot attack vector logs though SIEM aid in adding context to the data generated?

The first approach requires a live deployment which I currently don't have time for to test this. The second approach would be ideal because I could use WAF testing frameworks such as WA3F, Web Goat, Imperva ect which would can be tested in a virtual environment.

This research topic has not been done before, I don't know why. I just want to confirm whether it's a waste of time or I’m going about it the wrong way.

Would an inline WAF make the honeypot appear more attractive by making it more difficult to attack?

Many websites are built out having load balancers/WAF in front of the actual web servers. It’s quite common. They’re also used for SSL/TLS termination to boost performance. That said, it does add complexity in that a vulnerability in your WAF implementation could result in the attacker having an alarming level of access. A great example of this is HeartBleed.

  Can consolidating WAF and honeypot attack vector logs though SIEM aid in adding context to the data generated?

Sure, however rules need to be created for the SIEM to digest/correlate the two additional data points.

WAF Benefits

There are two major advantages with placing a WAF in front of your web application honey pot.

SSL/TLS termination. This is pretty much required so the request/response can be inspected.
Prevent the hacking others. The honeypot deployment shouldn’t send malevolent traffic out to the Internet. Nor should it be a place for an attacker to send unsuspecting users. An example being a persistent XSS. Both of these should be prevented so you're not aiding the attacker.

Legal

I'm not a lawyer nor is this the place to seek legal advice.

With that out of the way, there are legal concerns with running a honeypot as brought up in a prior post:

What is the current U.S. law regarding the building of and deployment of honeypots?


Turned on cgi.fix_pathinfo still "dangerous" in Nginx? In this article in digitalocean.com Justin Ellingwood recommends to turn off cgi.fix_pathinfo:

  Inside, we need to find a section that configures the cgi.fix_pathinfo
  behavior. It will be commented out and set to "1" by default. We need
  to uncomment this and set it to "0". This will prevent PHP from trying
  to execute parts of the path if the file that was passed in to process
  is not found. This could be used by malicious users to execute
  arbitrary code

Even though IMHO Justin Ellingwood is very good in writing documentation, I must say this entire passage was somewhat unclear to me.

To take care of this as Justin recommended I ran:

sed -i "s/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/g" /etc/php/*/fpm/php.ini

The article was wrriten in April 2016 and might have been based on somewhat "old" data. I'm not sure this recommendation is still critical in January 2018 and Nginx configurations can be quite dynamic.

To date, is it really critical to do the change recommended there?

I would not describe this change as "critical" per se, but it still has security implications.  I'm not aware of anything that has fundamentally changed since that advice became relevant -- PHP's behavior tends strongly towards backwards compatibility, even when that has security implications.  Imagine you have a server that allows people to upload files to the server, say in a directory called upload.  Now, your upload script is careful to only allow files with certain extensions (say only .png) to ensure nobody uploads a malicious PHP file.

Now, as an attacker, I'll try to write a PHP shell into a file, name the file evil.png, and upload it.  When it uploads, I'll visit http://example.com/upload/evil.png, but I'll discover that this just downloads the file to me -- nginx never dispatched the request to php-fcgi to be processed as php, because the filename ends in .png.

If I'm an attacker who's aware of PATH_INFO, next I'll try http://example.com/upload/evil.png/index.php.  If your server is so configured, this will result in PHP being executed (because nginx sees the index.php at the end) and PHP will walk the path until it finds a component that is a file, not a directory (evil.png) and attempt to execute it.  Then my shell gets executed and I win.

That being said, there's better ways to deal with this by having the NGINX config split the path in advance, so PHP isn't walking the filesystem.

From Neal Poole's excellent blog post on the issue:

# Pass all .php files onto a php-fpm/php-fcgi server.
location ~ \.php$ {
   # Zero-day exploit defense.
   # http://forum.nginx.org/read.php?2,88845,page=3
   # Won't work properly (404 error) if the file is not stored on this server, which is entirely possible with php-fpm/php-fcgi.
   # Comment the 'try_files' line out if you set up php-fpm/php-fcgi on another machine.  And then cross your fingers that you won't get hacked.
   try_files $uri =404;

   fastcgi_split_path_info ^(.+\.php)(/.+)$;
   include fastcgi_params;
   fastcgi_index index.php;
   fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
   fastcgi_pass php;
}


How does Zeus (and other malware) inject code into other processes Recently, I've been studying how malware works, most recently the infamously known Zeus bot, and I've noticed one thing that I don't seem to understand: The malware is said to be able to hook APIs in processes and use them to, for example, steal data. But, if the trojan is itself an exe file, how does it do such things? Does it carry a DLL to do all the hooking, or does it inject shellcode into the process it wants to modify, or something else?

I don't know about Zeus in particular, but generally speaking, it's easy to do this using debug APIs like VirtualProtectEx and WriteProcessMemory. Open a HANDLE to the target process, add some executable memory (with VirtualAllocEx), put some malicious code in there, re-map the virtual address of the executable code of the library that holds your target API as RWX, overwrite the first few bytes of the function you want to hook with a jump instruction that goes to your injected malicious code, and you control everything that function does.

There are plenty of other ways to achieve similar results; the use of the debug APIs and overwriting the entry points of real functions is just one example I've seen in the real world. The malicious program can do this each time the debuggee (victim) loads a new library, including all the ones loaded at process initialization, before the victim's main() even executes.

DLL injection (which can do the hooking from within the process, no need to do anything inter-process at all) and compatibility shims (like are used for running programs in "compatibility mode" for older OS versions, and replace system APIs with different code) are two other handy options.


Facebook Knows About my Search History in Other Browsers I use a private IE window to browse facebook (theoretically no data stored locally). I log in to facebook maybe once every 6 months.

Two months ago, I used Chrome on the same machine to search for Dell computers, a specific model.

Both searches were done on the same network.

I logged in to facebook today, and lo and behold, ads for that specific Dell model (far too specific to be random). How did facebook get this information? Is my internet provider selling all my search history? Is there some other mechanism that I don't know? I thought browser data was isolated.

The answer to your question is "Super cookies"
The trick is about HTTP Strict Transport Security (HSTS) for something it wasn't intended for. HSTS is a modern web feature that allows a website to tell a browser it should only connect to the site over an encrypted connection.

Which makes the cookies for that website work even when you're in icognito mode.

For more information read those references:

Ref_1  | Ref_2 | Ref_3

This Answer is for your question

  "Is there some other mechanism that I don't know?"

But regarding your ISP, I think things are more terrible than storing a cookie :D
And about your question:

  "How did facebook get this information?"

The Method i Told you about. And never forget that facebook stores the search history in their database, so that also may be used in advertisements so make that in mind too.


What is the benefit of the X-XSS-Protection: 0 header in a production environment? X-XSS-Protection is a non-standard but widely used header that instructs browsers to enable or disable their builtin protection against reflected XSS attacks.

Most websites I visit send X-XSS-Protection:1; mode=block or no header at all, which, I think, falls back on the browser's default. On the other hand, Facebook sends X-XSS-Protection: 0, something I've only seen in websites demonstrating the XSS attack.

What could be the reason for this?

Some years ago, in 2009, Internet Explorer had a really buggy early implementation of the XSS auditor, and it was found that perfectly safe websites could be made vulnerable, ironically, by that mitigation. There have also been a few security articles out there showing how IE8's and Chrome's XSS Auditor could actually be used as an attack vector to implement XSS attacks.

More recently, in 2014, XSS auditors are shown to be still very much bypassable.

Facebook did not trust implementations of XSS auditors in browsers from the beginning, and used X-XSS-Protection: 0 since 2009. This also shows some confidence in their template system (XHP), which should be strict enough to avoid introducing XSS vulnerabilities by default.


It is possible detecting threat by only with file information? It is possible detecting threat by only with file information of a file like file's hash(md5,sha1,sha256, etc), file size, mime type,  etc with ClamAV or Comodo AV for linux  with shell command?

It is markable that here file   is absent, only all information of that file is present.

Do a quick search on google and you find a lot of databases.
OWASP offers one with a pretty easy interface: OWASP File Hash Repository.
Simply send a DNS query with the Hash in MD5 oder SHA-1 prepended to hash.sapao.net (see "Testing the system"). If you want to run a large number of queries, I suggest you make a copy of their freely available Amazon AWS image and query local to reduce the load on their server(s).

This does not use ClamAV or Comodo AV, but you can use "dig" for the DNS query and simply "grep" the result.


Proxy traffic via MITM script I want to log and modify outbound traffic on a Linux machine. I currently have one program that sends requests out to the internet, I would like to process these requests and their responses via another script (mitm).

Current Setup...

What I Want...

MITM Script will log requests/responses into a database, and potentially modify either of them before sending the response back to Traffic Source.

I'm able to write my application specific logic, but how can I put MITM Script into position? Ideally I would like to wrap my script into an existing MITM framework, does a framework like this exist?

I'm only handling TCP traffic, multiple ports, not just HTTP traffic.

So if you were just looking at HTTP traffic, I'd have suggested that you'd just want a reverse proxy like mod_rewrite, but if it's arbitrary traffic that makes it a bit more difficult.

Assuming you've written the logic for handling re-writing, putting it in place would likely be done in one of two ways.

If you can specify the destination in the original program, you would specify the destination as the proxy (e.g. point it to 127.0.0.1 [proxy_port]). then configure the proxy program to communicate to the original destination.
If the destination is hard-coded/you can't modify you would usually have to use an OS level solution like iptables to redirect the traffic to your proxy (then as before the proxy would need to know how to get to the original destination)

As to frameworks for this kind of MITM, I'm not aware of any but not really my field so they may well exist..


Secure file deletion vs wiping free space Say I only wanted to delete specific files and want to feel confident they can't be recovered. Is it better to use a specific program (such as Eraser) for wiping only the files, or is it better to delete them normally and then use a utility like cipher.exe to wipe all free space? Obviously wiping all free space will take a bit more time, but if that's not an issue is one more secure or effective than the other?

To be clear I'm not looking to wipe entire hard drive.

There is a possibility, that after deleting specific file and before wiping all disk, freed sectors will be assigned to some other file.

So it will be more secure to wipe a specific file. And then I suggest to wipe all disk in case there were any temporary copies of this file, created by eg. some editor.

Also note that on SSD drives it's not enough to wipe a file, since drive controller can write new data in another sectors or even memory chips, to extend drive life. You can google for TRIM keyword to get more details about this behaviour.


Does Session hijacking/IP spoofing happen in real time? I was reading an e-book about different types of attacks and found this:

  A skilled hacker can intercept DNS replies from servers and replace the IP addresses for the requested names with addresses of machines that the hacker controls, thus providing an easy method for ongoing session attacks.

Does this mean that as soon as the attacker intercepts the packets, software replaces the addresses or does the attacker have to do it manually. If the latter is true, then can the victim tell that they are being hijacked from the delay?

This would be ideally done automatically.

I suggest you take a look at DNS Spoofing for reference then you can try it out (on your own privately controlled network) using something like mitmproxy or dnsspoof both of which are available on Kali Linux to intercept DNS requests and redirect them to your own DNS server, or alter the response as suggested in your eBook.

The problem with DNS is that it isn't encrypted or signed, so you don't know if the response is legitimate.

A mitigation against this attack is to use something like DNSSEC which (in brief) is an extension to the original DNS protocol and essentially adds authentication though signing responses so you know the response is from the server you asked.


Virus Infected: unable to open anti-virus web sites? Recently I installed KMSPico, after that many unwanted softwares were installed on my system, later I uninstalled all of them and removed related folders. But strangely from my system I couldn’t open anti-virus software provider websites like norton.com, avast.com, avg.com. Other websites like Quora, Google, FB are working fine. Also sometimes automatically random websites are opening on chrome. I suspect some virus infected my system.

Did anyone faced similar issue, if so how did you resolved it?

Nuke from orbit ... your system has been compromised and should not be trusted anymore. Wipe everything and start with a new, fresh system.

The virus / malware probably plays with your hosts-file and disables anti-virus or security websites (this one is doing a lazy job, since you seem to be able to surf here...).

But as you dont know, where the virus sits or even where exactly it entered your system, you cant remove a virus with 100% certainty.

After you've created a new, fresh system, make sure install all updates and use the latest virus-scanner.


Feeding entropy pool with my own data Let's state that I have a huge bunch of truly unpredictable random data in file "random.bin". The random data has been created outside of my system and has been securely transfered into my system.
Questions:

How could I feed this file to the OS entropy pool so that a subsequent call to /dev/random by my fancy software will not block?
Would the command 'cat random.bin > /dev/random' (or similar) make it?

Notes:

The question is not about which of /dev/random or /dev/urandom should I use. Long story short, I cannot make use of /dev/urandom due to legacy reason.
Answer must not make use of fancy tool like 'havege'.
Perfect answer would be Unix flavour independent (so working on AIX, Solaris, RHEL, BSD, ...).

Shell command is best.
If Shell command is not possible, which system call?

It is similar but different than question Feeding /dev/random entropy pool? . The goal is different.

This looks a lot like a XY problem: you want to solve X problem doing Y, but don't know how to do Y, so you are asking about Y here.
You are trying to use true secure random numbers and don't trust urandom and want to increase the entropy pool so you can use random. Right?
Don't use /dev/random... That's why /dev/urandom exists. It's seeded by /dev/random, and uses a very strong algorithm to generate random numbers in a non-blocking way. The u on urandom usually means unlimited, so it will never run out of random numbers, unless you are using a diskless station (or a router, or a live CD distro) seconds after booting before /dev/random had time to build some entropy.
Some people will argue a lot about random/urandom, that urandom is not secure enough, that only random have true random numbers, and so on. Don't listen. Use urandom cryptographically secure pseudorandom number generator and be happy. And using random can be a liability and create an incident: it blocks. And that can lead to a DoS not only on your application, but on every other application with developers thinking that using /dev/random is the way to go.
So, if you are loading a large file full of random data, why rely on random or urandom at all? Just read the file. You can even use urandom to define the position where you will read, store the number of records read from that file, and block after reading the random file enough times. It would be terrible for security (the random file is very predictable if someone get a hold of it), performance will be worse than reading urandom, and you have to keep a look on the read count to send another file before the randomness runs out (or it blocks like random).
And Thomas Pornin already wrote about this as well, and this page debunks a lot of myths about randomness too.


XSS attack on websites that allows JS file upload? Consider a website example.com that allows users to upload arbitrary JS files, that are then stored on the server and served to visitors with a JS content type. Could an attacker use this to perform an XSS attack on example.com?

At first, I thought the answer was an obvious yes. But thinking about it, it is not obvious how one would do this? If you just point the victim to the URL of an uploaded JS file, the browser will download and display the code, not execute it. Unless there is some other vulnerability, the attacker can't upload HTML files or force existing HTML files to include the script. Including it on evil.com will not help since it will then not be running in the example.com origin.

I know there are plenty of security issues with file upload, but here I am only interested in the potential for XSS if you allow upload of JS.

That depends on whether or not the website allows file inclusion via URLs, or if the site persists some JavaScript to run again later.

About Remote File Inclusion

Imagine the website has a feature where you can link to some external JavaScript file and run that. If this can be done via a link, e.g. via example.com?src=evil.com/mal.js, then this is a reflected XSS vulnerability.

The ability of the application to interactively load remote JavaScript is not enough. It needs to be done via an URL, so that the only thing the victim has to do is click the URL.

About Persistence

If the website allows users to run JavaScript that others have created, then you may have a stored XSS vulnerability, but it depends on how the site is structured. For example, if you visit example.com/mallory/mal/ and the website asks you if you are sure you want to run mal.js by Mallory and warning about the risks of running untrusted code, then you should be fine. If the website however just runs it, then I would classify this as stored XSS.

About Social Engineering

One might argue that it's a case of self-XSS, where an attacker could social engineer a person into downloading a malicious JS file and running it on your website. While this is a legitimate concern, I would not consider this a huge vulnerability. You could mitigate this risk somewhat by displaying a warning, though users may click that away.


How to further exploit LFI / ssh / mysql I am conducting a pentest where I got stuck on the following problem:
I found a LFI in a php file. I am trying to exploit it and to get a shell or any further usage out of it but until now without any success. I tried

to read log files (apache log files, mail log files, mysql log files, ssh log files, etc.) but none of them were readable (probably due to the missing permissions)
I tried .ssh/authorized_keys etc. but it is disabled as per sshd config file
I tried all possible files on LFI I could find on the Internet and did get some config files but I could not extract any useful information on how to proceed
The only thing I could recover are 2 user names via the /etc/passwd file

Other information I know:

the server is running a mysql database, I do have the db username, db password and database name, but how can i further exploit it if I cannot ssh on the server due to missing credentials?
the server has SSH running

Any other ideas how I could proceed?

First, determine if it is a file include or just a traversal. An easy way to do this is to include a php file (you can usually work out a relative path to an index.php file). If it shows you the php source code then it's traversal and will not result in code execution. Otherwise there are some options you haven't mentioned, such as:

/proc/self/environ
/proc/self/fd/1 (2,3,etc)
php session files (read php.ini for path)
temporary files uploaded via a POST request (brute force path or leak via php info)
php streams/wrappers

If it only reads files then leak application source to find other flaws.

Hope this helps.


the new Nokia 3310 recommended for privacy and security? the new Nokia 3310 (A modern classic reimagined) is very cheap. Do yo recommend it for privacy and security (second phone)?

Network and connectivity
Network speed 2G Networks GSM 900/1800 MHz
Performance Operating system
Nokia Series 30+
Connectivity Connectivity
Micro USB (USB 2.0), Bluetooth 3.0 with SLAM

is this in regards of privacy and security an alternative to iPhone?
I know there is no anonymous SIM card. But other than that there is not much Apps (and other Smartphone features) that can track you. What could possibly spy on the users?

I don't know much about the Nokia. But I do know mobile networks and 2G is no way near as 'secure' as the later networks. Mainly due to a lack of suitable authentication at various stages of the communications channel.

If you are solely concerned with the phone OS, then I would argue possibly as it 'may' have a lower attack surface than the iOS due to lower functionality, but the iOS has a lot more attention from the community and may allow vulnerabilities to be easier to discover? But it's worth considering the pro and cons


What risks am I taking by using an http site to play a video game that just records mouse events? There's this game at http://slither.io which I like to play. Only inputs that I give to it are space bar, and cursor location.
It's not https. Are there any risks?

Yes, there is a risk.
HTTPS ensures not just confidentiality, but also integrity and authenticity. As such, an attacker could hijack the connection between you and the server and inject malicious JavaScript into your session.
How likely is that to happen?
Depends on how you connect to the server. If you are in your own home, then the likelihood is not very big. It's a risk still, don't get me wrong, but I don't want to cause unnecessary paranoia.
On the other hand, if you connect to a public access point (e.g. "free McDonald's Wifi"), then the chance of this happening is much much higher.
How severe is this?
Since there is no sensitive data there, the "usual" things like credential stealing or session hijacking are not applicable. However, depending on how determined the attacker is, they might redirect you to other malicious domains, exploit browser vulnerabilities, get you to download stuff or even get you to disclose credentials for other services (e.g. "Log in with your Google, Twitter or Facebook account to play").
As Eilon has pointed out in the comments, another potentially unwanted side-effect is that your ISP can tamper with the website you use. Some ISPs do this for arguably benign purposes, such as stripping whitespace off the HTML document before sending it to you, while others do more "intrusive" changes, such as compressing images, or even injecting advertisements into the website. While this is not a security-risk per se, it is unwanted behavior that can most effectively be combatted by using HTTPS.
Does that mean you should stop playing?
That depends completely on your risk appetite and whether or not the upsides outweigh the downsides for you personally.


NMAP SSMTP Service Detection When I examined a NMAP -sV scan on a host running Exim on port 465, it uses the standard SYN scan to determine if the port is open, and then issues a Client Hello to which the server responds with a Server Hello. There is a Encryted Handshake from NMAP and Application Data from the server but nothing seems to suggest how NMAP determines what is running on the port, which is quite different than how it identifies other services like IMAP or POP3. So, how does it do it?

Nmap is "smart enough" to recognize SSL encapsulation. In this case, it marks the port as having an SSL tunnel, then on subsequent rounds of version detection it establishes the tunnel, then sends the same probes that would be sent to the plaintext service.

You could see this in action by using stunnel to convert some other service to SSL-tunneled, then scan it with Nmap while running a packet sniffer on the loopback adapter of the target machine. You would see that the traffic looks the same as Nmap probing an unencrypted service.


Recent Facebook XSS exploit details There was a recent XSS exploit on Facebook that posted a vulgar message and got users to click on a link to spread the payload. What vulnerability was exploited, and what can other sites do to avoid a similar attack?

Here is a good overall reference http://cwe.mitre.org/data/definitions/79.html

per www.infosecisland.com:

  From Symantec's Candid Wueest:

  "The vulnerability exists in the mobile API version of Facebook due to insufficient JavaScript filtering. It allows any website to include, for example, a maliciously prepared iframe element that contains JavaScript or use the http-equiv attribute’s “refresh” value to redirect the browser to the prepared URL containing the JavaScript."

  "Any user who is logged into Facebook and visits a site that contains such an element will automatically post an arbitrary message to his or her wall. There is no other user interaction required, and there are no tricks involved, like clickjacking."

  "Just visiting an infected website is enough to post a message that the attacker has chosen. Therefore it should be of no surprise that some of those messages are spreading very fast through Facebook. Some are posting links to infected websites, creating XSS worms that spread from user to user."

  Facebook has patched the JavaScript-based XSS vulnerability, and the company says they are now working to undo the damage done by the attack.

So the issue is related to neutralizing data input into web pages.


Are some passwords more vulnerable to password crackers? Suppose I have a password made of n alphabetic characters. An attacker is given the hashed password and will attempt a brute force attack on cracking it.

I can envision a naive password cracker trying all combinations starting with AAAA...A then AAAA...B then AAAA...C etc until ZZZZ...Z. For this attacker, a password that starts with an A is going to reduce the time to crack by 25 * 26^(n-1) (compared to starting with a Z).

Of course, you could first try dictionary words, variations of dictionary words, and a list of the most common passwords... but if the password was random garbage then at some point it will have to iterate over the entire character space. And if you didn't iterate over the space in some well defined way (i.e. random inputs), then you would need a mammoth amount of space to remember which inputs you already attempted (and you would have to check against at each iteration, thus slowing things down).

You could parallelize the inputs so you attempt A..., B..., C..., ..., Z... at the same time, but at some point you will run out of cores.

How do modern password crackers solve this problem?

The final part of your question is easy to answer:

They do exactly what you have suggested:

dictionary words
common passwords
faster processors
more processors

but they also use hash tables or rainbow tables, which allow the attacker to trade off time before getting the hashes with time taken to break afterwards. In simplistic terms they effectively pre-calculate password hashes (not exactly correct - look at our questions on rainbow tables for more info)

The problem itself is why we always recommend long passwords. Above a certain length they are effectively un-brute-forceable in the lifespan of the universe (or other appropriate milestone)


What is the benefit to using a two-pass AE scheme rather than one-pass? What benefit is gained using a two-pass AE or AEAD scheme rather than a one-pass?  Two-pass is roughly half the speed.

(Note for clarification: that EAX is two-pass does not mean that the input message must be buffered entirely before outputting the first encrypted byte; it means that EAX involves two invocations of the underlying block cipher per data block.)

Many one-pass AE schemes, such as OCB, are patented. Also, the one-pass schemes are also often "one-and-a-half-pass": they imply per input data block one block cipher operation, and one extra operation which is usually said to be "fast" but not necessarily that fast, depending on the context. For instance, on an embedded system with a 32-bit ARM CPU and low RAM, GCM tends to be slower than EAX, although GCM implies only one AES block encryption per 16 bytes of input: GCM also involves a multiplication in the finite field GF(2128), which can be made fast with the help of 64-bit registers or big precomputed tables, both of which lacking on many embedded systems.


What is a secure mechanism for wireless communication between Android and Ubuntu? I have come across a few Android apps that provide various features for communicating with a desktop machine (sending text or typing in one direction or another, controlling the desktop pointer with the mobile device, sending mobile notifications to the desktop, etc).

Most of them rely on both machines being on the same network, running a small server application on the desktop, which opens a port for communication (or the other way round if you're controlling the mobile device from the desktop). Generally they have no provisions for authentication. The obvious security flaws are:

No authentication. Anyone else can easily hop onto the open device/desktop via the open port and control it just as you can.
No encryption. Anyone can read the stream between the two computers.

Most of the open source apps are up-front about this, an simply advise that you only use them on a trusted network. Some also offer USB access via adb.

I am looking for apps that do not have these flaws (or, potentially, suggesting a new mechanism to an existing app). What existing mechanisms are there for communicating over-the-air between an Android device and an Ubuntu desktop? Bluetooth?

(If the mechanism is generalisable to other platforms, that's also great. If it's more theoretical - like a protocol that needs to be implemented on Android - that's valid too, as there are people doing things like implementing mosh for Android.)

Set your desktop Ubuntu to act as wireless access point (if you haven't one already, you may need to add a Wifi card or Wifi USB token to your desktop, but these are cheap nowadays) and configure your mobile device to connect to this access point.

If your mobile device is already configured to use a Wifi network on that location to access Internet ressources, then you may want to configure your desktop to act as a gateway for your mobile device.

On one side (Wifi side) there will be a private LAN allowing your mobile and your desktop to communicate securely,
When your mobile requires to access some Internet resource, he can go through your desktop to fetch them.


Can IP phones be eavesdropped upon if administrator access is available? I am interested in demonstrating an attack to my university's security team on IP phones installed at the university. The IP phone models are Siemens optipath410.

Basically, using nmap, I identified a few IP phones on the network. The IP phone have the following ports open: https (443), telnet (21) and ssh (22). When I visit https://IP address, I get the webpage which asks for administrator password. The default password works here.

Now I have full control over all the settings. Is it possible that I can listen to and record conversations? Is it possible to sniff packets on Wireshark and then convert to an audio stream?

Or is possible to perform a man in the middle attack while routing the traffic on my IP and then forwarding it?

This is the main admin page.

Yes it is very easy if you know the current sip or voip platform use (and you must know because you can access the admin page of the phone)  and you know how to create a sip or voip relay with asterisk or anyother VOIP gateway.

You could then reconfigure phone so they use your voip gateway and send the packet to the IPBX of your university.

This would be like a man in the middle, the problem you can have here is finding which is the user connection credential to the university VOIP gateway, if there's one.


Is it safe to store my passwords in a text document protected by a password? How easily could someone break into a password protected text file like Word?

For modern versions of Word (Word 2007 and later), it appears that Microsoft has got the encryption pretty much right: They use multiple iterations of SHA-1 (since Office 2013, this has been replaced with SHA-512) for key derivation, and they use AES with a 128-bit key for encryption, compared to the older schemes that used everything from a 16-bit key to a 40-bit key. So if you are using Word 2007 or later, and ideally Word 2013 or later, it should be reasonably secure. Formats compatible with versions prior to 2007 will not be secure at all.

However, at least historically, Word has been known to litter temporary files all around itself while you are working on a document. I'm not sure if this is still the case, but remember that Word is a word processor; it's not really designed to keep secrets against a determined adversary who has access to your system. The document password protection only really helps if the adversary can get their hands only on the intentionally saved document file, and nothing else. There are many threat models where this protection would not be sufficient, and many of those would seem to apply to lists of passwords.

So it stands to reason that you could get reasonable protection against certain threats by keeping your passwords in an encrypted document maintained in a recent version of Word making sure to use non-backward-compatible formats.

On the other hand, by using a tool specifically designed to securely keep a list of passwords, you get one that is much smaller (thus far less risk of a bug having crept in, and far more likely for a compromising bug to be taken seriously), tailored for the purpose (thus far less likely to litter plaintext all around), and intended for the purpose (thus likely has useful features such as the ability to generate passwords, set password expiration dates, etc.). That's a password manager.

I discuss this also on my personal web site, where my recommendation is to use a password manager. (Actually, that's currently my second top advice, second only to do not share your passwords with anyone.)

Whichever way you go, wherever you store your list of passwords will require a high-grade passphrase. Remember that anyone who is able to guess that password will have access to all of your accounts; treat it accordingly. I suggest reasonably long Diceware passphrases (also) for this.


Why use MD4 for caching? ccache is a popular tool for speeding recompilation with GCC and other compilers.  It works by caching previous compilations and detecting when the same compilation is done again.  The detection is done using MD4 hashes.

I am curious as to (a) why such a caching tool would use any cryptographic hash function, and (b) of all the cryptographic hash functions available, why MD4 in particular would be used.

Regarding (a), what's the benefit of using a cryptographic hash function, as opposed to some hash function not designed with cryptography in mind?  For example, Java's built-in hash functions don't seem to correspond to known ones used (or formerly used) in cryptography.  Why not use one of these non-cryptographic hash functions instead?  Given MD4's known weaknesses, I can't imagine that it would be chosen out of a desire for greater security.

Regarding (b), assuming that there is some basis for using a cryptographic hash, why MD4 in particular?  I understand that it wouldn't make sense to use a modern cryptographic hash function, since these are generally computationally intensive, which defeats a caching tool's purpose of speeding up access times.  So MD4 must be used at least in part for speed.  But is it absolutely the fastest cryptographic hash function, or are there others that are faster?  If it's not the fastest, what other advantages would MD4 have (over, for example, MD5) for use in caching?

Cryptographic hash functions usually have the property that slightly different inputs generate vastly different outputs. Any collisions should usually have very different input.

This property does not apply to most non-cryptographic checksums. Small changes can result in similar checksums, and in some corner cases some small changes can cancel each other out in a way that the same checksum is generated.

Changes in sourcecode are often quite small, so in the context of checking sourcecode changes the risk of collisions is quite high with non-cryptographic checksums. The version control tool git, for example, uses SHA-1 hashes as unique identifier for code revisions.

Why MD4 in particular? Well, you got to ask the ccache developers about this. It is a quite old tool, and MD5 wasn't standardized until 1992. It might be possible that MD4 was simply the most obvious choice which was available at the time this feature was developed, and later on nobody felt the need to replace the algorithm, because it did what it was supposed to be doing.


Virustotal detecting threats in Suricata rule set Virustotal scans are detecting threats from the Suricata default rule pack located https://rules.emergingthreats.net/open/suricata-4.0/

Is this a false positive?
https://www.virustotal.com/#/file/c20b744a3ca4d8fef3fa23633db7e94edd064d5ea149be0a4ce063a85046b76f/detection
https://www.virustotal.com/#/url/bad1ab778b89d4f8a0a42d0df8b09e37d9ba0e2cffb6169b423e63f9a9fdcafa/detection

Taking into account that the rule sets are plain files that contains rules for snort/suricata I would consider has a false positive, I just download the .tar.gz and there is nothing suspicious there, just the regular files from the set, on the other hand, it could be a fake set and not the official one, better to ask on the mailing list and see the responses if you have doubts about it

[camp0@localhost Downloads]$ sha256sum emerging.rules.tar.gz
c20b744a3ca4d8fef3fa23633db7e94edd064d5ea149be0a4ce063a85046b76f   emerging.rules.tar.gz

Download the same file as virustotal report but nothing interesting inside.


XSS works when I save generated HTML to file, but not directly in browser The hints of XSS game's level2  say that

  Entering a  tag on this level will not work. Try an element
  with a JavaScript attribute instead.

When entering

the resulting HTML after submiting is

   YouWed May 18 2016

and the XSS is not triggered. If I replace it with

post-content=

it fires!

I've copied the whole HTML to a separate file on my computer, run the first case and the script fired!

So what is different from case 1 to case 2? Should case 1 work too?

The relevant code for the HTML generation is the following:

for (var i=0; i<posts.length; i++) {
  var html = '

  '
    + '

';

  html += 'You';
  html += '' + new Date(posts[i].date) + '';
  html += "
" + posts[i].message + "</blockquote";
  html += "

"
  containerEl.innerHTML += html;

As we can see, the HTML is being set in the DOM via innerHTML, which means that the script tag will not be executed, because per-specification, innerHTML does not execute scripts. More on why can be found on the Stack Overflow question script tag create with innerHTML of a div doesn't work.

  I've copied the whole html to a separate file on my computer, run the first case and the script fired!

Presumably you copied the resulting HTML which means it was not created by innerHTML, but permanently in the HTML source, so it ran.


Password 'spatial' pattern? While messing around with the Cygnius Password Strength Test I noticed that if you enter a sequence like

wsdxcv

the test labels it as a "spatial" pattern — obviously because the keys are close together on a qwerty keyboard, if on different rows.

Googling around I can hardly find any mention of the idea, and I can't imagine it'd be especially common anyway (outside of one-handed passwords). Plus there may be multiple keyboard layouts to consider.

So the question is, are cracking algorithms actually likely to take this pattern into consideration?

This method of creating a password by pressing adjecant keys is called a keyboard walk. Password crackers kind of take this into account; they don't explicitly try keyboard walks, but the most common keyboard walks are contained in password dictionaries. So crackers will test for qwerty, not because it is a keyboard walk but because it is a common password.

There are some tools to create dictionaries with password walks:

HashCat's kwprocessor, a keyboard-walk generator with configureable basechars, keymap and routes.
passpat can identify passwords that are keyboard walks.
Generating Keyboard Walks, a blog post and software to create keyboard walks.


Nmap through Burp ¿? I know nmap and burp work at different levels, but in the same way, metasploit allows to set either an http or socks4 proxy, and I know and have used proxychains with Burp also.

But what I want is to see how the requests are done when using a HTTP http-wordpress-brutescript to an server on port 443, too bad because if it would have been to a port 80, at least I could have seen non-encrypted data with Wireshark. Anyways, I prefer to use Burp.

Is it possible to carry this out in some way¿?

You can instruct nmap to use a proxy, in this case you will want to use Burp as your proxy. More information here: https://nmap.org/book/ncat-man-proxy-options.html

edit:
this should work for you seamlesly:

--proxy 127.0.0.1:8080

Assuming 127.0.0.1 is the IP of your burp proxy and its port is 8080


How to configure a VM to protect all my hardware fingerprint from guest OS and softwares? This question was originally Does Firefox in VM have a common enough fingerprint so I don't need tor browser? in Tor community.

  I want to know about what a web browser's fingerprint like in a VM, if
  VM runs a common OS and have default system settings. Can VM be
  configured to not have any of host machine's fingerprint?

  (Here I just want to ask about fingerprint, ignoring IP addresses, web
  scripts and tracking cookies)

Here the VM software we discuss would better be FOSS, like Virtualbox or qemu.

That question could be on not just web browser, but also other kind of softwares.

As the other answer has pointed out, emulating another architecture tends to be slow. This would tip off a would-be attacker there's something going on by short and simple code that tests execution timings.

Beyond installing a virtual machine with all the defaults selected, you could fake the processor and motherboard information. This again wouldn't hold up to any serious or rigorous poking by an attacker.

A simpler method would likely involve "blurring" or "fuzzing" the fingerprint your machine gives. An easy way to do this would be by rotating through virtual machines in a given day, all setup differently from one another.

Regardless, even if you could truly and hypothetically defeat fingerprinting of your machine's components, ad companies spend a large amount of effort on user tracking across devices. You would have to change your browsing habits across many devices to have some tangible effect. This is one of the many reasons I cite for "serious anonymity isn't for casual users".


Can CMP (Certificate Management Protocol) be used to issue certificates to mobile devices? The SCEP (Simple Certificate Enrollment Protocol) is the more like the defacto protocol for device enrollment. It pushes the digital certificates to the device which can be used for authentication, and other cryptographic purposes.

Can CMP be used instead of the SCEP? Since CMP is the standard protocol to communicate with any CA that implements it, can an application residing on the device (say a mobile/laptop) use CMP to communicate with a CA to request a certificate and install it in the device which can then be used for the authentication purposes? And possible the whole life-cycle management of the device identity.

Yes!

Just make sure your device has a toolkit / library for communicating over the CMP protocol, and you should be good to go!

In particular, the 3GPP chose CMP as the main protocol for LTE mobile devices to request certs from a CA, update certs when they expire, and other lifecycle management operations. To facilitate the mobile device use-case, they made some additions to the CMP spec - now CMPv2 - so if your use-case needs some of the mobile-specific CMPv2 message types, then make sure you pick a CA that has CMPv2 support.


XSS Vector without  symbols or equal sign? Just wondering if anyone could help me out with some XSS Vectors that work without having the < or > symbols. Basically the the input is stripped from < and > symbols and any equal signs such that if i were to enter

<body onload="alert('XSS')">

as the vector, only this would be displayed on the page:

body onload

(The < and > symbols are only removed, equal signs are also removed along with everything after them)

The little sideways carrot symbols and equal signs are the only part of the user input that is not sanatized. So there can be parenthesis, semicolons, colons, brackets, etc. Would it even be possible to form a working payload out of a vector that meets these requirements?

So landing an XSS where there's some filtering can be done a number of ways.  An important consideration is where user input is appearing in the resulting page.  For example if the user input is landing in the middle of a JavaScript block then the filters you're seeing won't really slow you down at all, something like ');alert(1); might work just fine.

If you're landing in the middle of an HTML element or in a parameter value it might be a bit trickier.  A first port of call there would likely be to try encoding your vector or adding additional instances of your characters to catch out naive filters that don't canonicalize the data properly before filtering it.  Good sources of potential vectors for this kind of thing are HTML5 Security Cheatsheet and the OWASP XSS Filter Evasion Cheatsheet


How to best manage multiple applications using the internet with Firewall Im not new too Linux (Ubuntu 14.x) however I must admit that I have never bothered with a Firewall until now. Im currently using Ubuntu's inbuilt firewall (UFW) with a graphical plugin (GUFW), which I have configured to revoke all incoming and outgoing connections, with the exception of allowed applications/processes for which i have created rules to manage,

e.g: Allow application 'Steam' both incoming and outgoing, port 27036.

The problem is however that some applications such as Minecraft (yes I play minecraft) for example does not appear to use a specific port for LAN connections. Additionally, other applications will undoubtedly use obscure ports for updates and communications, for which the ports are either not listed in documentation, or are not specific (as appears to be the case with Minecraft).

My current practice is to simply deactivate the firewall for short periods of time, to 'lower the drawbridge' so-to-say, whenever I am using an application which appears to use a seemingly random port. This does not strike me as a particularly efficient method, so too summarise, my questions are:

How do I best manage a firewall with multiple network reliant applications/processes?
Is my current method the most practical one
And if so, is living with a firewall just plain difficult?

usually you trust your egress traffic and try blocking only ingress traffic. Most application do not need or use ingress. statefull firewalls are "smart" and look who initialised the connection.... for example if you are trying to connect to the steam server connection starts from your "end" and firewall will allow responses from steam server, as you "requested" it. However, if you are planning on running a mincraft server you need to know which port is used for the server and allow incoming connections on that port. So in general acceptable security posture for home use is allow all outgoing traffic, and for incoming traffic open only ports that are required when you want other people to access services you provide, otherwise block all incoming traffic.


eIDAS - list of certified qualified electronic signature creation devices In eIDAS there is written in Article 31:

  On the basis of the information received, the Commission shall establish, publish and maintain a list of certified qualified electronic signature creation devices

Where can I find the list mentioned above?


Does PCI compliance really reduce risk and improve security? Might as well bring this hot topic to here!

For those not in the know:  https://www.pcisecuritystandards.org/

A good question, but perhaps you should phrase it "Does PCI harm security".

To answer both questions, I would differentiate very roughly between two types of organizations (even though most fall in between these two extremes):

Security-conscious organizations, that routinely perform business-risk based analysis, have a comprehensive SDL in place, perform all the right moves, etc.
Security-unconscious organizations, that have no interest in anything they are not absolutely forced to do, and especially not if it doesnt make any money.

For the second group, PCI absolutely helps, a lot, in the following ways:

Awareness (now someone is at least allowed to mention security, and hopefully they're all talking about it)
Budget - since otherwise management would never have allocated any resources whatsoever to invest in any form of security, now at least they are forced to at least pay lip-service.
Minimal baseline of least common denominator activities. (Hopefully this includes training the developers, which helps more than any regulation...)

Basically it forces them to acknowledge security, and hopefully some additional good will come out of it.

For the first group, there are two (two and a half) main consequences:

There are (rare) situations where the organization has to choose between a real security solution, and compliance with the generic baseline LCD.
Budget is now forcefully allocated to the minimal, generic baseline LCD as defined by some external group that knows nothing about their business. (This budget would probably be more useful in different security activities / products / etc).
Management is quicker to pass on any security investment that is not mandated directly by the PCI - "if they don't need it / if its good enough for them without, why should we bother?" or "If it was important, PCI would have required it".

In this case, PCI is doing more harm than good, since getting them to build in security is not an issue for these orgs.

However, one benefit of PCI compliance that is shared across the board:

  PCI compliance reduces the risk of the penalties of non-compliance.


Is there an advantage to request the same information if authentication fails? Financial websites (banks, credit reporting agencies, etc.) often use two stages when authenticating you:

Identifier (account number, email, etc.)
Two characters from a memorable word

I've noticed that if I fail to authenticate properly (wrong characters, website error) these websites request the exact same combination of characters from your memorable word.

The fact that this policy appears to be widespread hints that this has some security benefit.

What would such benefits to security be (as I can't think of any)?

It prevents replay attack. If the attacker manages to intercept the partial memorable word from a number of previous interaction, the attacker can simply refresh the page until they are asked the part of memorable word that they know about. Pinning the part of the memorable word prevents the attacker from doing so.

Note that this is simply a poor man's implementation of OTP. A better implementation to prevent replay attack is to use hardware token, text message, or RFC 6238 compliant TOTP app like Google Authenticator.


Was the 2017 NHS attack targeted? The news has been alive with the HNS ransomware story this weekend (13th May 2017) and the coverage has been loose guesswork at best generally.

So what I'm trying to figure out is: Was this actually a targeted attack?, or simply a matter of someone opening a random spam mail (for example) and the infection spreading internally from there?

You'd think the NHS would know a thing or 2 about "infection control"..........!

The short answer is:No.

It was absolutely not targeted because of the use of the remote code execution vulnerability used in EternalBlue (leaked from NSA hack)  to spread the malware , they probably scanned the entire internet for vulnerable systems with exposed 445/tcp port (allowing the exploit of the SMB - an application-layer network protocol mainly used for providing shared access to files)


If certificate authority generates key pair for us, do they maintain/have access to our private key? If they do keep our private key and by chance if anyone within the CA organization listen to our conversation. Isn't it a confidentiality breakage?

This is a bad model. The proper way to request a certificate is to send a CSR (certificate signing request) to the certificate authority
The CSR contains your public key only (it is signed using your private key to prove that you own the private key, and to ensure integrity of the request contents).
You should not use a mechanism where the CA generates the private key for you, it is not needed and only adds more ways for your private key to leak.
Final note: as usual, context matters a lot: if the scenario involves certificate issuance within an organization (eg: internal CA for corporate infrastructure) it might be acceptable, especially if the organization has a good process in place for key management. If possible show the source of the slide, it might make more sense in context.


Web-browser based biometrics? Is there any practice of using biometric mechanisms online - for example, for visual identification via webcam to identify audio-visually the person speaking, or, performing biometric analysis on keyboard input? Particularly flash web control would be useful.

Yes - both are current.

Real time biometric analysis on keyboard input has been looked into by a few teams now. The guys at Pace University seem to have a strong presence in this area. Have a read of :

Continual Keystroke Biometric Authentication on Short Bursts of Keyboard Input
Keystroke Biometric Identification and Authentication on Long-Text Input

The first one is probably more what you are after:

  Short bursts of
  keyboard input  are analyzed to continually authenticate computer
  users and verify that they are the authorized  ones

As far as video goes, all the facial recognition programs used in identifying users in public places work off video streams, either using single frames, or collating multiple frames to improve quality - this is used all over the world.


Demo of web site that is vulnerable to command injection I'm looking for a demonstration web site that shows an example of a web site that is vulnerable to command injection: where I can inject something and get the web site to run a shell command.  (This is solely for demonstration purposes, to help teach others about the dangers of command injection.)  Does anyone know of any demonstration web site like this?

If the location of the command injection vulnerability is not documented publicly, please describe where the command injection vulnerability is (e.g., the page and parameter that is vulnerable).  I'm not looking for a puzzle to learn how to perform command injection attacks; I'm already familiar with it.  Instead, I'm looking for an example that I can use to show the problem to others.

The WebGoat Project has a lesson specifically on command injection ;)


Does Facebook storing old passwords compromise security? Facebook stores old password hashes (along with the old salt), such that if you try to log in with a previous password, Facebook tells you that you updated the password (and when).  Nice user experience.  Except this site isn't ux.stackexchange.com.

So, what security threats are presented by this?

See also about Facebook storing old passwords here and here.

The other answers look pretty reasonable, but I wanted to add a few possibilities.

If an attacker recovers one or more of your passwords from other breaches, it seems like plugging them into Facebook's UI could leak at least a few types of information:

Whether you used the password on multiple services or not.
With known disclosure dates for the breach, they could also gain a data point on how long it took you to update the password.

If pattern-matching on recovered passwords suggests a likely iterator or mutation pattern in your password, it also seems like an attacker could also try one or two passwords they haven't seen in order to support or refute a thesis about how your passwords evolve over time.

I would guess any attacker is somewhat limited in how many such tests they could attempt without someone noticing, but it seems like information along these lines could inform heuristics for how known users change their passwords, improve statistics on how common different update patterns are, and help hone priority lists of users/accounts that are most vulnerable.

These seem like fairly small risks at the individual level, but it also seems like (Martin Bos' post on cracking hashes in the LinkedIn breach is instructive) small heuristic improvements turn into pretty nice levers for recovering more passwords in a large scale breach while simultaneously improving the heuristic/lever.


Android for the Paranoid In the case of a rooted phone, what are the various options to stay anonymous and keep your data secure? I've seen the guys at The Guardian Project work towards this: https://guardianproject.info/apps/

And Whisper Systems: http://www.whispersys.com/

Is there any means to individually protect each application with a password or encryption? Say you want your Image Gallery, SMS / Whatsapp inbox to be encrypted or accessible only by a password instead of a single device password.

You should look for open source solutions whenever possible since closed source solutions aren't subject to as much inspection.  Apparently the Guardian Project's links passed this test.

If you want anonymous web browsing, then you probably want Tor, which the Guardian Project lists.  Off-the-Record works quite well for encrypted IMs, but it's vulnerable to traffic analysis.

The Guardian Project recommends the full disk encryption program LUKS, which sounds good.  You can however protect specific directories under Linux and BSD (Mac OS X) using EncFS's mount-on-demand mode and an external password prompt program.

encfs -idle=30 --ondemand --extpass='.../ssh-askpass' ~/.private.encfs ~/.private

In theory, you'd see an ssh password prompt if any application attempted to access any file inside that directory, assuming 30 min had elapsed since you'd last accessed it.

This will not work if an application attempts to access the data too frequently because encfs will never reach the idle timeout.  Ergo, you might need to play around with exactly what applications support such operation.


In a SAML2 FSSO Web Browser profile (HTTP POST), should the IdP analyse the AuthnRequest before asking the user to authenticate? Context: SAML2 Web Browser SSO profile. (HTTP POST binding). Federated SSO.

If the IdP gets an <AuthnRequest> from the SP, should / must / can the IdP do the user authentication first, or read/validate the <AuthnRequest> first?

(the implementation we have in mind could be based on IBM's WebSeal and TFIM... where it seems the User is redirected to authenticate BEFORE the TFIM actually looks at the <AuthnRequest>. At least, if I'm properly understanding the docs)

Edit: My Context also includes that the User is not yet locally authenticated at the IdP, when the SP's <AuthnRequest> is received at IdP.

The Authnrequest should be validated first check signatures, timestamps and so on. Plus the AuthnRequest can contain information on how the user should be authenticated so logically reading the AuthnRequest comes first.


mitmproxy not displaying ARP-poisoned traffic I have a target computer at 10.0.0.14 and gateway at 10.0.0.1. I successfully insert myself as a MITM by running

sudo arpspoof -i wlp3s0 -t 10.0.0.1 10.0.0.14
sudo arpspoof -i wlp3s0 -t 10.0.0.14 10.0.0.1

And when I run arp on the target machine, I see that 10.0.0.1 is associated with my MAC. On my machine, I then run

sysctl -w net.ipv4.ip_forward=1
iptables -t nat -A PREROUTING -i wlp3s0 -p tcp --dport 80 -j REDIRECT --to-port 8080

Finally, I run ping google.com on the target machine. When I run sudo tcpdump | grep 10.0.0.14 on my machine, I see lots of packets involving the ping requests. But when I run mitmproxy -T --host I don't get anything! What am I doing wrong?

P.S. Here's the result of ifconfig:

enp0s25   Link encap:Ethernet  HWaddr [redacted]
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:20 Memory:f2500000-f2520000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:49445 errors:0 dropped:0 overruns:0 frame:0
          TX packets:49445 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:4511425 (4.5 MB)  TX bytes:4511425 (4.5 MB)

wlp3s0    Link encap:Ethernet  HWaddr [redacted]
          inet addr:10.0.0.6  Bcast:10.0.0.255  Mask:255.255.255.0
          inet6 addr: 2601:280:4900:e583:a64e:31ff:fe63:ccdc/64 Scope:Global
          inet6 addr: fe80::a64e:31ff:fe63:ccdc/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:502914 errors:0 dropped:0 overruns:0 frame:0
          TX packets:306905 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:489697020 (489.6 MB)  TX bytes:70008617 (70.0 MB)

mitmproxy will not display pings, it will only display HTTP (or, with some tweaks, TCP) traffic.


Shared hosting-- whose responsibility is dealing with known vulnerabilities? I've deployed a few dozen Wordpress sites over the last 10 years across a variety of hosts. I have a single client on a particular host I've never used before whose Wordpress site has been hacked twice in the last year. The cause of the first breach is unclear due to lack of evidence (suspect lateral movement from another tenant) but it appears the attacker this time is external and taking advantage of code injection via the user agent string (yes, on Wordpress).

  GET /about-us/ HTTP/1.1" 200 23527 "-" "}__test|O:21:\"JDatabaseDriverMysqli\":3:{s:2:\"fc\";O:17:\"JSimplepieFactory\":0:{}s:21:\"\0\0\0disconnectHandlers\";a:1:{i:0;a:2:{i:0;O:9:\"SimplePie\":5:{s:8:\"sanitize\";O:20:\"JDatabaseDriverMysql\":0:{}s:8:\"feed_url\";s:3738:\"eval(base64_decode('JGNoZWNrID0g...

After the first incident, I pared everything down to stock WP+akismet+cloudflare with a custom theme to eliminate most app-side variables. No other plugins; all stock themes deleted.

Obviously this is a Wordpress/possible theme bug that needs to be addressed but beyond code review and slapping Cloudflare on it to try to weed out bad agents, should I expect the host to be more proactive in filtering out known vulnerabilities at the network level or is that solely the tenant's problem?

Or does this vary by host? Based on their business model I really, really, don't get good vibes from this one at all.

Assume abandoning shared hosting is not an option.

On most shared hosting:

it's the responsibility of the host to configure their machine so that one tenant can't interfere with another tenant
it's the responsibility of the host to update any shared infrastructure, like the OS, routers, etc. If the shared hosting have shared web server or database, it's also the host's responsibility to keep them up to date.
it's the responsibility of the tenant to keep their web applications (e.g. Wordpress) up to date.
it's generally the responsibility of the tenant to implement WAF rules when necessary
it's usually the tenant's responsibility to set their file permissions correctly, for instance if you set your PHP files chmod 777 or if you write sensitive data to shared directory like /tmp, then you're just asking for a lateral attack. Some better configured host configure each tenant to have their own /tmp, but you shouldn't rely on this being the default.


Household attack vectors and mitigations Hopefully this question won't come across too closely to a which product is best as that is not my intention.

I am moving into a larger property and I would like to setup some home security now i'm not 100% sure on I should be aware of and how to possibly mitigate being broken into.
I also do not know the area much at all, it appears to be a quiet English town.

My main concerns are physical security and security of my home network.

Thoughts on physical was to either just get an alarm or some kind of IP camera setup covering the front and rear of the property but after hearing some rather alarming news Nest camera hacks I do however have a few raspberry pi's that could be setup as PI ip camera. But I'm not sure if that would make it more or less secure. One consideration is the property has a shed which will probably contain some bikes and tools which I would like to secure which makes me lead toward camera's
is having a set of camera's considered more secure? and if so, to what extent against what threat.

For home network security, I'm far more concerned the area generally has fairly tech savvy people due to lots of technical companies in the area. I've not moved in yet but I will probably just use whatever is supplied by the CSP with the nicest looking package. I'll then change the SSID and any passwords that came by default.

While I'm fairly technical I do not know that much about security and what I do know I can't seem to apply to this, as in how do I take what I think might be an issue and break it up into threats and actions so on. threat analysis I guess it would be called?

So after all that,

What threats should I be wary of concerning physical security of a home?
What threats are there to my home network?
What actions can I take to mitigate some of the threats

What threats should I be wary of concerning physical security of a home?

Let's start by your use of a branded (or even worse a non-brand) "smart" camera. As you noted regarding NEST and other vendors (Ring), all of them work using their own cloud service. For you to get a push notification that something has moved in your garden, the camera reports to the cloud and the cloud pushed the message to you (among other things like save your recording etc.). By itself, if you are really wary for your privacy I would suggest you refrain from using those solutions. Regardless of whether they were breached or not, anyone with access to your cloud account (let it be an hacker, "the man" or the cloud provider) will be able to see the recordings (e.g. for Alexa, google assistant and Siri, all respected vendors disclosed that there are people listening to what you say in order to enhance their voice detection techniques).

If you decide to trust those vendors (which to be honest i would, for externally facing cameras), than the implementation is simple and straightforward.

If you decide to do that on your own (connecting a dumb camera into a raspberry Pi) than you will need to code your way to detection, notification and alerting (there are several open source projects that can help you). In my view that would be the most secure option as those cameras would not be connecting anywhere outside of your network and will not receive any communications from external locations so they would be easy to segment them and whitelist traffic based on your preference).

  What threats are there to my home network?

That's a 10 page academic research paper grade question. But in short:

Wireless Network: If you expose your SSID (or even if you are not with the right tooling) people can identify your network and attempt to hack it. to reduce that likelihood, first hide your SSID (only people who know your SSID or use advanced sniffers will be able to detect it. Secondly, use a strong access password or a certificate to access the network.
Router Security: make sure you change the default username and password, and periodically check if there are firmware upgrades for your router. if you are still after better security, use the router provided by the ISP as a pure modem and buy a branded router with extra features (from cheap netgear routers to SMB grade checkpoint firewalls)
Firewall and other security features: make sure you enable all those features, prevent any inbound traffic in your router.
Create a guest wi-fi network for your visitors -> they shouldn't have access to your home network and they can be completely secluded.

Hope that would get you started in the right direction.


Why do I need an own certificate to encrypt a S/MIME message? I try to use Thunderbird to encrypt a message. I do not want to sign the message. Encryption is done with the public key of the receiver. I have imported the certificate of the receiver. But when I try to send the message Thunderbird insists on my certificate. Why?

When a sender uses Thunderbird to send an S/MIME encrypted message to a recipient, Thunderbird requires the sender's certificate in addition to the recipient's certificate, so that Thunderbird can send the sender's certificate along with the message to the recipient.  This is done for two reasons:

1)  So that the recipient can verify the sender's digital signature on the message, which is made using the sender's private key that corresponds with the sender's public key in the sender's certificate.

2)  So that the recipient can reply with an encrypted message back to the sender.


Is it safe to open a server application on the internal network to the public internet I am a programmer but I am currently learning about web development in general. I'm creating a server on my local host using nodejs and express. It's available on my local host but I want to test it with a domain I have, so I can access it from any device anywhere.
What I decided to do was change my router settings to direct any traffic it gets on its IP to my computers internal IP on port 3000 so anyone can access the my html pages from my local machine. This was working quite well.
But after some hours of working Bitdefender Antivirus alerted that It blocked some attacks from a specific IP on port 3000. This lead me to question how safe It was to be doing this. The server is running on my home machine that has my regular files and documents.
Of course I'm only serving the html pages for the site but can someone kindly explain the security implications of using your regular home router as a server as opposed to a dedicated server or a web hosting service.
Note 1: I'm not interested in other aspects such as bandwidth since that's not going to be a problem.
Note 2: Also I'm using Netlify's free web hosting right now as an alternate (or instead of the alternate) but it's god awfully slow to load my simplest html page. It takes a while (inconsistent as well) before the browser can even resolve the domain and then loads the content progressively slowly ( I mean you see things like the main image slowly reveal). when using my own router it's blazingly fast; not just on my local machine

It is not safe.
Simply port forwarding internet traffic to an application running in your local network essentially exposes your full internal network to some attacker in case of a bug in the application. And bugs are likely. If the server application is instead located at some hosting provider on the public internet it will not have access to your internal network.
If it is only about testing your application from outside or providing access to a few selected users you should at least add strong  authentication with some proven setups, for example by using nginx as a reverse proxy. Or you could use solutions like ngrok for a more limited exposure of your internal application to the internet. You could also put the application into some container or VM with appropriate firewall rules so that it cannot access the internal network.