How often should an SSH key pair be changed? I've been using a 1024-bit RSA key for passwordless SSH between my own systems for years. More recently I've also started using it for passwordless access to my hosting providers and to source code repositories.

Is using the same key pair for an extended period of time, and to access multiple resources, an issue?

I'm going to take a different position from others here.  My recommendation: There's no need to change your SSH private key, unless you have a good reason to change it.

Rationale: Crypto doesn't wear out.  It doesn't become weaker with repeated use.

The biggest reason to change your private key is if you have a reason to suspect it has been compromised or is no longer secure.  For instance, if one of your machines is hacked, and you have a copy of your private key stored on that machine, I'd recommend changing your SSH key.  Similarly, if one of your backups goes walkabout, and it had a copy of your SSH private key on it, I'd recommend changing your SSH key.  Or, if you generated your private key on an old Debian system, then it may be insecure and I'd recommend changing it.  However, if you don't have a reason like that to suspect that your private key is compromised, I see no need to change it.

The downside of changing your key unnecessarily is now you have to update the authorized_keys file on every machine you might ever log into.  That's a bit tedious.

I suspect the reason that some folks are recommending you change your private key is for prophylactic reasons: what if one of the machines storing your private key got hacked, and you were unaware, and now the hacker no longer has access?  The hacker may still have your private key.  Therefore, there may be some value to occasionally changing your SSH private key, to limit the exposure in that kind of scenario.  But personally, I suspect that kind of scenario is very rare and probably not worth the trouble of changing your SSH key.  So, if others prefer to change their SSH keys periodically, I can understand their reasons -- but personally, I wouldn't bother.

P.S. If we were talking about a host key (rather than your personal key), then there is an even stronger reason not to unnecessarily change the host key: if you change the host key, everyone who tries to log into that machine will start getting warnings that they might be under attack.  If people routinely see these warnings, they'll start to treat them as meaningless noise (it'll be a boy-cried-wolf situation), undermining their value.  So, don't routinely change host keys without good reason.


What is the difference between Compliance and Auditing in Information Security? I am a student working on my semester project and it's about developing a SIEM solution with Big Data tools to be used in a SOC (security operations centre) and I know that collecting logs can be used whether for Analysis, Auditing or Compliance. Looking up for the difference between compliance and audit, it still seems rather vague to me.

The way this was explained to me at a very basic level is the following:

Auditing refers to seeing who did what, when where, this could include systems and people. You'll probably hear the terms "audit logs" which refers to a series of logs that indicate who worked on a system, when and what they did.

Compliance refers to ticking (or not) a series of boxes after doing your audit. Think of compliance as the following question "Do my actions tick all the boxes?"
Eg. Is access to your customer data restricted to privileged users only?
You then do an "audit" (investigate the access logs) and if no unauthorised users can query the data, your are then compliant, hence you you pass some Compliance.

How do you link them together in a SIEM? Depending on what data you capture and the Compliance Standards you can simply query your data and then start ticking boxes to check the compliance.

This is a very basic explanation from a technical level. Compliance and auditing are slightly different when we are talking about legal, financial auditing and compliance.


How safe is it to use SMB file share on a machine running up-to-date Windows 10 LTSC through the Internet? Running Windows 10 LTSC. Forwarded 445 port on the router to Windows SMB.
Assuming that:

My machine has no viruses in it (fresh Windows installation)
It has been updated to the latest OS release
I am using a secure, hard to brute force, password

How secure is my setup?
Provided that my computer has some sensitive data in it.
Is there a better way to manage files on a remote computer that I'm missing?
Specific questions:

Is data I'm transferring encrypted? PS: heard that starting with SMB 3.0 it is, but how do I check what version I have on my current Windows installation?
Does the latest version of Windows 10 LTSC contain any unpatched vulnerabilities that would allow privilege escalation?

how secure is my setup?

0-day exploits notwithstanding you're secure as long as your users/passwords combinations are secure as well and you install Windows updates immediately after they are released and reboot afterwards.

Provided that my computer has some sensitive data in it.

People generally oppose having CIFS ports wide open to the Internet, however I haven't heard any strong arguments against it. In the past, people had often had trouble keeping their Windows NT/2000 installation secure because the Internet was in its infancy, which meant that many servers had glaring vulnerabilities. Nowadays it has long become a non-issue unless you meddle with Windows updates.

Is there a better way to manage files on a remote computer that I'm missing?

SSH/SCP/SFTP with private keys could be a tad more secure.

Is data I'm transferring encrypted? PS: heard that starting with SMB 3.0 it is, but how do I check what version I have on my current Windows installation?

Windows 10 uses 128 bit AES SMB encryption by default  if you're using SMB 3.1.1.
SMB 2.0 or SMB 1.0 connections are not encrypted.

Does the latest version of Windows 10 LTSC contain any unpatched vulnerabilities that would allow privilege escalation?

Not a single person in the world could answer this question but if we're talking about publicly available data, then the answer will be "no".


Can a caller "Hijack" your SIM information? We have all heard them, rumors about people randomly calling you on your mobile phone number and asking you to confirm something by typing in a specific combination onto your dial pad (the rumor I'm referring to, specifically states 09# or 90#).

When you do, people claim these callers copy your SIM card (information) and make counterfeit copy(s) of it, to do "illegal things" using your number, and of course, your phone bill.

Is this actually possible? Any sane mind would state no, but in theory, can a caller copy your complete SIM card, and/or even get anything else from you then the number they use to call you?

Short answer - no. Currently there is no mechanism that would allow someone to clone your SIM card without having physical access to it. A number of cheap and commercially available devices (e.g. this SIM MAX for $7.50) can clone your SIM card with relative ease - that is, if you place your SIM card inside the device and it extracts the KI.

What you're referring to are scams (quite common in recent times) where scammers attempt to extract as much information as possible from you, and then go to the telco and obtain a "replacement" SIM card, which then they use to make international phone calls, for which you will pick the bill.

Some telecom service providers have lax policies in place, where you only need an ID (can be easily faked) and part of the IMSI number (which the scammers are trying to obtain from you  when they're asking you to enter those key combinations) to obtain a replacement SIM.


Can a business with a single employee gain ISO27001 certification? I would like to bid for contracts where ISO27001 certification is a requirement. I build cloud based bespoke software.
Although I take security extremely seriously - I don't have any formal processes at present. I just try and follow best practice.
How feasible is this?
I assume that ISO27001 is all about processes, checks and balances - can this be applied to a single person?

The short answer is that, yes, an individual can get ISO 27001 certification. As the old joke goes, you can ISO 27001 certify a chair...
All the details you wish to know you really need to ask an assessor.
You might find, however, that the costs of obtaining certification are far greater than the potential benefits because you are an individual. Writing policies, establishing processes, auditing those processes, etc. all take time and resources, which you will not be spending working or bidding for contracts.
But your assessor will have all your relevant details.


Do wifi access points and routers get some kind of data from devices when a device is able to see them? I was wondering if when a router is broadcasting its signal, it is able to handshake with devices that are wifi enabled and looking for a wifi network to connect and get some info from them?

That depends on the scenario, and what kind of information you are worried about.
In order to make the following examples less cluttered, I will always be calling the access point "AP" and the client device "Client".

AP Broadcasts, Client does not want to connect

Depending on how the client is set up, it is possible that the client regularly sends out broadcast messages, containing SSIDs they have connected to before. This is required if those SSIDs are "hidden".

As such, a malicious AP (or anyone else listening) could gain information about SSIDs the client has been connected to. These broadcasts also contain the MAC address of the W-LAN interface of the client.

AP Broadcasts, Client wishes to connect

In this case, the AP absolutely gains information about the client. Afterall, it needs this information to send data to the client.

The client has to disclose their MAC address, and like above, may disclose other information about previously connected to networks.

What information does my MAC address show?

By default, it shows the manufacturer of the NIC (the network interface card), which could give information about the nature of the device. For instance, a MAC address starting with 00:22:AA belongs to a NIC manufactured by Nintendo. So it's probably a game console. Further investigation into the MAC addresses might reveal more information about the device.

How reliable is this information?

Not at all. In fact, anyone is able to change their MAC address as they please. The only thing required for their MAC to work properly is to be unique within the domain. And if it's not, that opens up all kinds of attacks, which I am not going to get into.

The key point is that MAC addresses can be changed quite easily, and thus any information received by a MAC should be taken with a grain of salt.


Can hackers compromise a VM to the point that they compromise your host OS? Recently I was reading up on various security strategies and one that has been around for a while but is starting to gain traction now is working within a VM on your desired OS. If that VM ever gets compromised you can simply revert the system back to date and time you know it was in a healthy state or even delete the entire VM and start again.
This sounds simple enough and so there are OS's that build and expand on this VM idea like Qubes
While reading the info page on Qubes I came across a section that mentions the following:

VirtualBox or VMware Workstation are popular because they’re designed
primarily to be easy to use and run under popular OSes like Windows
(which is called the host OS, since it “hosts” the VMs). However, the
fact that Type 2 hypervisors run under the host OS means that they’re
really only as secure as the host OS itself. If the host OS is ever
compromised, then any VMs it hosts are also effectively compromised.

From that statement I am getting the idea that if I do everything, and I mean everything on my VM and only use the host OS for running VirtualBox and nothing else; is it safe to assume that my host OS won't be able to get corrupted? Or can a hacker identify fairly easy that they're inside a VM and work their way into my host OS?

There are cases where a VM can escape (to one degree or another) the virtualization environment and manipulate data outside of what it should be able to. This can mean that one guest VM can get code executed on a different guest, or even within the host OS itself.

These vulnerabilities are typically referred to as 'escape bugs', wikipedia has a list for some examples: https://en.wikipedia.org/wiki/Virtual_machine_escape

Also, it is pretty easy in most cases to find out that you are on a guest VM. Virtual hardware usually identifies itself as such and you can see that in things like device manager.

Running within a VM is more secure, as a lot of virus/malware isn't going to be trying to exploit guest escape bugs (unless everyone starts running as VM, then you'll probably see an uptick), but it's not a sure thing.


Can I get malware on my phone, if my phone is tethered to my laptop downloading torrents? I used a dongle before getting a phone, but now use my phone as a hotspot. I don't want my phone to get malware or viruses.

Can my phone get viruses if I use it as a hotspot while downloading torrents?

By just passing (potentially malicious) traffic through, it is very unlikely. After all, routers on the Internet are relaying tons of malicious traffic everyday without getting compromised themselves.

However the danger begins when your computer itself gets compromised from a malicious file downloaded via torrents, and from there the malware on your computer could compromise other hosts on your network such as your phone.


Is there a "how to" about Gmail fraud, updated at least once per week? My Gmail account has just been cracked and many of my contacts are receiving fake emails, claiming that I'm in troubles and requesting money.

Searching for advice, using Google, about what actions are to be undertaken, I've found stereotyped and generic suggestions about "good habits", and developed a feeling for them.
But there don't seem to be "contingency specific" guidelines and forensic tutelage. (For example, if someone really sends money, could he arrange that I should reimburse him? Or, even worse, what if criminal use is made of my account ... ?)

Is there a "how to" about current phishing threats on Gmail, that is updated at least once per week?

Remember we are security experts and can't give legal advice:

Most likely it's impossible to figure out how exactly your account was compromised.
Let Gmail team know that it happened, they may be able to help.
Unfortunately, the best you can do for your friends is to let them know you were compromised. If this happened at work, let your IT people know immediately.
Generally, people are not held accountable for the actions of E-mail hijackers as obviously some fraud has occurred. But take a grain of salt with that statement because I'm a hacker, not a lawyer.
In the future make good decisions about how you use your mail. Use a good password, never give it out, keep your browser and other tools up to date etc... it sounds like you've already had a lot of that kind of advice.

Forensics?

To be honest, since you don't control the mail server, you don't have much room to research on this one. It would be a different matter entirely if this had been your own mail server. However, in this case you only have the info Google let's you have. If you want, you can look at the logs described here:

https://support.google.com/mail/answer/45938?hl=en

Perhaps you will get lucky and find a clue. However, in most cases even if you find the attackers identity, there is literally nothing you can do.

As for analyzing the actual E-mails, they are usually pretty generic. If they are being used for phishing you can analyze the linked malware, but again it is often fairly generic. The kind you buy on cheap hacker forums and send to thousands of people, you know?

If you are not a reverse engineer already, I wouldn't suggest it as a first step. Reverse engineering malware is a specialty all its own.

Final Advice

Report it. Reset your password. Make sure you are clean. Move on. Try and live a safer internet life. Life is too short to realize that you're e-mail hijacker used tor, lives in a foreign country, and will most likely never be brought to justice even if you were to prove his crimes to the proper authorities.


My sites have been hacked by cpamatik.com , it passes all security checks with Google and Sucuri, but still redirects, any idea? Almost all my sites got hacked by cpamatik.com virus

All CMS were up to date, plugins, modules etc..(Drupal and Wordpress) , some sites I have logged in to work on, but some sites I haven't touched in months, so the hack wasn't inadvertendly inserted from me login in.

My PC is scanned and clean, actually reformated 2 weeks ago.

Hack sites behavior is a redirect on home page and links.

Site in question are:

wearelao.com
xuzo.com
easyrconbar.com  and many others...

Security scan on my Namecheap.com hosting spitted this out:

----------- SCAN REPORT -----------
TimeStamp: Tue, 11 Sep 2018 14:20:06 -0400
(/usr/sbin/cxs --nobayes --clamdsock /var/clamd --dbreport --defapache nobody --doptions Mv --exploitscan --nofallback --filemax 50000 --noforce --html --ignore /etc/cxs/cxs.ignore.manual --options mMOLfSGchexdnwZDRru --qoptions Mv --report /home/bruneiab/scanreport-bruneiab-Sep_11_2018_14h20m.txt --sizemax 1000000 --ssl --summary --sversionscan --timemax 30 --unofficial --user bruneiab --virusscan --xtra /etc/cxs/cxs.xtra.manual)

Scanning /home/bruneiab:

'/home/bruneiab/access-logs'
# Symlink to [/usr/local/apache/domlogs/bruneiab]

'/home/bruneiab/.nc_plugin/hidden'
# World writeable directory

'/home/bruneiab/.softaculous/installations.php'
# Universal decode regex match = [universal decoder]

'/home/bruneiab/.trash/civicrm/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP.php'
# Regular expression match = [symlink\s*\(]

'/home/bruneiab/.trash/civicrm/vendor/symfony/filesystem/Symfony/Component/Filesystem/Filesystem.php'
# Regular expression match = [symlink\s*\(]   and more...

Hosting company have been on this for 24 hours, but the can't seem to be able to fix it...


In Chrome, how do I see a suspect HTTPS certificate before I visit the site? If I attempt to connect to an HTTPS site with a certificate problem, Google Chrome displays the following:

  Your connection is not private

  Attackers might be trying to steal your information...

It then offers ADVANCED and Back to safety options. Clicking on ADVANCED allows me to:

  Proceed to highly.suspicious.server.com (unsafe)

Question: How do I examine the server's certificate before I visit the website?

Here's how you view the certificate:

Click the lock sign (it should have a red "x") in the address bar.

EDIT to Roger's request: This icon (which could also be a triangle on other versions of Chrome) is clickable on the warning page itself

Click the "Details" link after this text:"Your connection to this site is not private"

Click the "View Certificate" button in the new Developer Tools window that opens up.


Encrypted log entries authorization We have a database table of encrypted log entries, each encrypted entry containing information about the user who created the entry. The entry is encrypted with the encryption key of the particular user.

Users may login into web GUI and enter their decryption key to fetch and decrypt their log entries from the server, without exposing other entries. The problem is there is no way to identify the user prior to decryption (this is a requirement). Also, the user or an attacker having an access to the server possessing the user's decryption key must not be able to decrypt other users log entries.

Second requirement is the performance. There are hundreds of thousands of rows, so decrypting all rows by trial and error doesn't sound viable.

Is there some existing scheme solving this chicken and egg dilemma?

No.
Encrypted correlations between entries require decryption, and are therefore slow. Yet, non-encrypted correlations are forbidden by requirements. It follows that you're forced to use a slow scheme.
Possibly acceptable workaround: split the logs
Use a different encrypted table for each user, with table name selected at random and stored as an encrypted profile property. In systems where encrypted tables are decrypted on-the-fly in memory for each user, this will achieve performance.
The only information leaked is the number of users, which is probably known anyway from the size of the user table, and the fact that some users may have more or less log entries than others. Observation of table sizes will allow to determine which unique identifier maps to which user, but no more.
Possibly acceptable workaround: obfuscate the correlation
Instead of a one-to-one relationship, you might consider employing a one-to-many relationship, where user N can generate any ID at random of the form NP+RAND(P-1). User N's records are all those with ID in the [ NP, (N+1)*P-1 ) range and can be retrieved with a BETWEEN clause. An attacker's inspection of the table will reveal a weak correlation between records, with on average TABLESIZE/P duplicates which will all map to the same user.


How to recover lost zip file password? I have a folder with very important files on my computer and I zipped it with a password for security reasons. Unfortunately, I'm not able to recover the password. Usually, I always use the same kind of passwords but I have done dozens of tries and I can't remember what the password is.
I usually use passwords of 10 to 20 letters with possible upper case letters and numbers which means it's basically impossible to crack it by pure brute force. Since I've tried all the patterns I usually use, I think I may have used a different password from usual so it's not possible to crack it using patterns with brute force.

Basically I don't think there exist IA techniques able to retrieve the password since it can be very long and I have no information about it. So my question is : is there a way for me to retrieve the password of my file ? Since I created it with my user session on Windows, maybe it's possible to deactivate the password for the same user ? I'm not very good at computer science but I hope there is a way to retrieve it because the information in that file are really important.

Recent analysis has revealed exploitable weaknesses in some PKZip variants that some software can leverage, such as the the latest beta of hashcat. These weakness allow for very high speed for 15 characters or less.

If you're willing to study the use of hashcat, and do the work work to get it set up on a system with a relatively modern GPU, hashcat can crack these at pretty high speeds - but the learning curve can be steep.


Strange HTTP request from binaryedge.ninja I found the following strange HTTP request apparently emanating from binaryedge.ninja:

 min-li-ustx-12-13-65991-x-prod.binaryedge.ninja - - [05/Jan/2020:07:18:48 -0500] "GET / HTTP/1.0" 302 212 "-" "-"
 min-extra-grab-108-ustx-prod.binaryedge.ninja - - [05/Jan/2020:07:18:52 -0500] "GET / HTTP/1.0" 302 212 "-" "-"
 min-extra-grab-108-ustx-prod.binaryedge.ninja - - [05/Jan/2020:07:18:54 -0500] "HELP" 400 226 "-" "-"
 min-extra-grab-108-ustx-prod.binaryedge.ninja - - [05/Jan/2020:07:18:54 -0500] "\x1b\x84\xd5\xb0]\xf4\xc4\x93\xc50\xc2X\x8c\xda\xb1\xd7\xac\xafn\x1d\xe1\x1e\x1a3*\x85\xb7\x1d'\xb1\xc9k\xbf\xf0\xbc" 400 226 "-" "-"
 min-extra-grab-108-ustx-prod.binaryedge.ninja - - [05/Jan/2020:07:18:56 -0500] "\x16\x03\x01" 400 226 "-" "-"
 min-extra-grab-108-ustx-prod.binaryedge.ninja - - [05/Jan/2020:07:18:58 -0500] "\xbd\xff\x9e\xffE\xff\x9e\xff\xbd\xff\x9e\xff\xa4\xff\x86\xff\xc4\xff\xbe\xff\xc7\xff\xdb\xff\xee\xffx\\d9\xff\xed\xff\xa4\xff\x9d\xff\xcf\xff\xd8\xff\xe5\xff\x04\xff\x12\xff0\xff\xb1\xff\xbd\xff\xe7\xff\xe2\xff\xdd\xff\xdc\xff\xde\xff\xc8\xff\xcc\xff\xbe\xff\xf8\xff&\xff\x01\xff\x0f\xff\xf5\xff\x06\xff\xff\xff\xf7\xff!\xff\xde\xff\x02\xff&\xff\x0c\xff\x01\xff\xf5\xff" 400 226 "-" "-"

Looking around the web, I see similar log messages on other publicly visible web logs and one suggesting some connection to Gh0st.

Anyone have any idea what this is, and by this company would appear to be attacking my server and others?

The company isn't 'attacking' your servers, rather it's just part of a scan that the company provides as a service to it's customers.

On their website they claim they "scan the entire public internet to create real-time threat intelligence streams...bla bla bla". Basically they scan the internet, and provide the data to their customers.

These logs are probably just the result of them trying to scan whatever HTTP things you've got on your server.

Nobody likes having their server being poked at by a unknown third-party, sometimes you can reach out to these scanning services to get your IP removed from the scanned results -- not sure how effective that's going to be though.


Apache/Linux server, DoS attack from own IP I have an unusual problem I've been trying to diagnose for a while:

It's about a Debian server running a custom compile of apache 2.2 with PHP, Red5, MySQL 5.5 (standard binary), sendmail (distro version), and crashplan.
Every other day I see a high amount of HTTP requests to random files, mostly images - we're talking upwards a thousand concurrent connections.
These requests come from the servers own IP address (!).
It's usually a limited set of files that's requested over and over again. I see no real pattern, but it doesn't look like someone scraping information, it looks like a DoS attempt.
Cron runs a script that temporarily bans IPs with more than 200 connections, so this is usually curbed before it can get really problematic. After 1-3 10 minute bans, the attack usually stops.
This has been going on for months. Since the attacks are caught and curbed, I completely fail to see the point.
It's happening at random times and intervals, but usually around morning times UTC.
No referer or agent is being sent with these requests.

I've checked the webserver and red5 logs for related requests around the same time, in case a script on the server is abused to send queries to itself, but couldn't find anything. There's nothing in the apache errors logs or syslog around that time. Rkhunter didn't find anything out of the ordinary either. The server doesn't source route packets, so spoofing shouldn't be an option either.

I'm at a complete loss as to the method and the reason. Any ideas what to check would be greatly appreciated. :)

UPDATE:
Following Isernis advice, I've prepared a mechanism to catch some information on the next occurrence. This is (a slightly generalized version of) the method: http://pastebin.com/6uSUKVbh

ANSWER:
This is a social media site allowing mySpace type profiles utilizing FCK Editor. Since that is a bit of a security nightmare, the profiles posted by users undergo extensive checks, one of which probes links/images posted. For one I did not exclude the sites own domain in these checks and two due to a bug related to redirects, every link or image was hit 10 times instead of once. So when a user with a profile containing extensive linkage to the site itself hit the save button, the site would DoS itself. :P In particular this concerned one user who has a bazillion items in her profile and tends to save often.

Thanks to Iserni for the right idea how to diagnose this issue!

ANSWER EDIT:
I was wrong about the bug. She actually does have some images 10 times or more inside the profile. More specifically near 1000 links and images to be checked each save. I didn't see that coming. :P

First thing: find out where do these requests come from. It has to be a local process, nothing else is likely to be able to spoof a TCP handshake on a modern Linux platform (nothing, that is, that would then proceed to waste such a feat on requesting random images).

If there are recurrent URLs, you can shadow them behind a RewriteRule so that any such request will actually trigger a script. In the script you can run additional checks to see whether the request is legit (and you will then output the proper headers just as if it was the image the legit client expects), or if it is one of the bogus requests. Against the bogus request you can log e.g. the incoming port. Armed with that, you can query netstat and find out the process. You can also run ps and inspect all active processes in the instant of the bogus request.

I am quite sure that the culprit will prove to be Apache itself (I once had a "cache priming" script go rogue on me due to a vhost modification - I had forgotten putting the script in crontab - and got really weird symptoms, somewhat like yours, until it all came back to me; but your case feels different).

To further refine the scene while containing costs, you can add PID/TID to Apache's CustomLog. Then you will be able to cross-check the requests received from the Apache child gone rogue.

Another possibility is to determine exactly how these requests are made. If through Apache, this means fopen_wrappers, cURL, socket functions, or maybe shell utilities (these should both appear in ps output and result in a much more massive server overload, though). You can prepare a series of script that will:

gracefully restart Apache without any changes
" " , disabling temporarily one of those functions
" " , re-enabling same

After verifying (just to be sure) that a restart does not fix the problem (if it did, it would be a quite different can of worms), you can proceed to temporarily disable - a couple dozen seconds each, no more - one function after another. Suppose that disabling curl results in the system immediate return to normal: then you could restrict investigations to scripts using cURL, and maybe even wrap the cURL function with a logging wrapper.

In case the guilty party turns out not to be Apache, still you will be able to determine what is doing this; then either reinstall the affected program (even if I find it unlikely for any random anomaly to turn a program into a repeat-HTTP-GET-requestor) or inspect its configuration, ancillary data files, scripts, and so on and so forth, looking for any difference from a known clean installation. Since I don't usually believe in gremlins, I expect for some difference to stand out in the end.


How do I isolate/compartmentalize different use cases on one machine? I have a decently powerful desktop running Windows that I use for 2 different use cases: playing games and storing/processing my personal data. As a security-aware person this makes me uncomfortable. A vulnerability on Steam, as I think has happened in the past, or any of the games themselves, can put my personal data at risk. I'm not a security expert by any means, but I have come up with a few options, and I'm not sure which one to go with. I'm not sure which one provides adequate security, so please let me know your thoughts. Here is a list of approaches, somewhat in order, from lowest effort/lowest cost:

Running the games in Sandboxie - is this secure? Would they even run properly?
Separate Windows user accounts, making sure the account for playing games is not an administrator account. If this is good enough, what else do I have to do?
Combination of #1 and #2
Dual boot, so I'll install Windows on a separate physical drive - each Windows instance will be separately BitLocker-encrypted with different passwords (I don't have a TPM chip on this PC), and somehow not allowing each instance access to the other's drive - how, exactly? I have no idea how to achieve that, other than physically unplugging them in turn. This is the method asked in this question > Isolate two hard drives with two operating systems. If total isolation is not possible, will BitLocker prevent data access and meaningful modification? Can malware on the game drive somehow infect the other drive even when encrypted? I am more concerned about data theft, so if malware infecting the game drive wipes out the other drive but can't access any of the data and can't infect the other Windows instance, it's a pain but still better than data theft, as I have data backups available, but if that's the case I need the data corruption to be immediately detected/noticeable.
Running the games in a VM - I have never tried this, I know this is possible and I have both an integrated and dedicated GPU, but I'm not sure my technical skills are up to the task of PCIe passthrough  of the GPU, etc. I have only ever run "basic" VMs.
Building a separate machine entirely - I know this is the most secure way but it's one I really would like to avoid.

I think you would need to dual-boot, as installers often require elevated privs to do anything meaningful, and there would be no guarantee that some residual process isn't running that may access your higher-value data, encrypted or not - at some point you will unlock it.
On that note: you might consider VeraCrypt for your non-game system volume and data (encrypted at rest while your gaming os instance is running). At boot time, you would select this partition (or drive) and then you will be prompted for the password from which to derive the volume master key. (This occurs courtesy of a custom pre-boot authentication boot loader termed system encryption.)
If you find yourself needing to boot into Linux, cryptsetup can mount a VeraCrypt volume, which gives you additional recovery or access options.
One caveat: but if that's the case I need the data corruption to be immediately detected/noticeable - any of the ciphers for VeraCrypt will operate in XTS mode, which means there is no authentication of the ciphertext data block. This means that you won't receive any notice of corrupt blocks 'til you next try to use them. My understanding is that BitLocker also uses XTS mode.
To achieve this goal, you would need to check the integrity of your files from within the secure Windows instance using some hash, and you would need to store the previously calculated baseline hashes with authenticated encryption. (Even though XTS will provide confidentiality, of the files' contents as well as your database of file hashes, it can't validate the integrity of the encrypted data.)
Edit, eg: each line in your baseline file contains the filename and hash of each of your work files. Now, use a tool such as Gpg4win to store the signed+encrypted baseline file. All of this can be automated, except for your typing the password to unlock the private key used by GPG when it verifies the most-recent copy of the signed+encrypted baseline data file, before your script checks the integrity of your work files. You could also run this verification independently in a Linux live usb/ iso without even booting Windows.


SAQ-D Service Provider without a CDE We provide a shopping cart service with integrations to multiple third party payment processors (PayPal, Authorize.net, etc.) where all payment processing happens on their networks (i.e., no CC data enters our networks). Some of our prospects have said that we're a Service Provider in their eyes since we control the redirect to the payment processors.

Since we have no CDE, can we response "N/A" to all SAQ-D SP requirements that reference the CDE?

I'm trying to narrow down our scope which I think is just the server that performs the redirect. However since it neither stores, processes nor transmits CC data, I'm having trouble figuring how we fit within SAQ-D SP.

I'm sure we'll need a QSA at some point but I'd like to figure out as much as possible so I can at least have an intelligent conversation and a list of questions before contracting with them.

This depends how you do the integration with the payment processor. Let's pretend for a minute you are a merchant - then the correct SAQs would most probably be SAQ A or SAQ A-EP depending on the integration / re-direct / IFRAME / JScript.

As a service provider you can't complete A or A-EP but you must complete D or undertake a full Report on Compliance. What you need to do is follow the guidance contained in these FAQs about basing an full PCI DSS assessment on a reduced set of requirements contained in one of the other SAQs.

https://pcissc.secure.force.com/faq/articles/Frequently_Asked_Question/Can-a-partial-PCI-DSS-assessment-be-documented-in-a-Report-on-Compliance-ROC

https://pcissc.secure.force.com/faq/articles/Frequently_Asked_Question/Can-SAQ-eligibility-criteria-be-used-for-determining-applicability-of-PCI-DSS-requirements-for-onsite-assessments

I know you asked about SAQ D and not an onsite assessment but the principles outlined in these FAQs are the same for a Service Provider SAQ D.

To answer the question about what the CDE is for SAQ A and SAQ A-EP there's another FAQ you might find helpful.

https://pcissc.secure.force.com/faq/articles/Frequently_Asked_Question/How-do-PCI-DSS-Requirements-2-and-8-apply-to-SAQ-A-merchants

It's basically anything that can directly affect the integrity of the redirection.


Why is XSS scored with partial impact to integrity in CVSS V2? From CVSS v2 complete guide :

  "SCORING TIP #2: When scoring a vulnerability, consider the direct
  impact to the target host only. For example, consider a cross-site
  scripting vulnerability: the impact to a user's system could be much
  greater than the impact to the target host. However, this is an
  indirect impact. Cross-site scripting vulnerabilities should be scored
  with no impact to confidentiality or availability, and partial impact
  to integrity."

I know cross-site scripting is divided into 3 main types: reflected XSS, stored XSS and DOM-based XSS.
However, why is XSS scored with PARTIAL impact to integrity instead of NO impact to integrity? If an XSS vulnerability is a reflected XSS, can the XSS be scored with no impact to integrity?

Example for impact on integrity:
Say, there is a profile update page which has CSRF token implemented , but reflected XSS is also present. Now you can steal this token with the help of XSS and you can cause unwanted changes in the profile of the victim. Here is the article for your reference.

Many of the XSS vulnerabilities were marked with PARTIAL impact because in CVSS v2, only target host should be considered for calculating the impact. XSS is a vulnerability which affects the browser of the victim also and cause more damage to the victim's machine.

This is improved upon in CVSS version 3 which states:

  Whether a successfully exploited vulnerability affects one or more
  components, the impact metrics are scored according to the component
  that suffers the worst outcome that is most directly and predictably
  associated with a successful attack.


External Penetration test by third party I am planning to engage a vendor to do pen test on my external systems. I know that pen test has a set of systematic steps .. just would like to gather some industry experience. Normally, at which stage of the pen test would you most likely stop, to give you enough justification that your system is indeed vulnerable. In my technical requirement specs I could just state, "if manage to breach, touch a file, make it hidden etc" and stop. OR i could jolly well say, "proof to us you can get root and then stop the pentest".

What are some of your own experiences in this?
thanks

The "scope" generally does not state something like "You can't root the machines", as a client you want to know if this is possible IMHO. Once root access is acquired it's basically game over anyway.

What the scope should say is the amount of servers and its server names / IP's and that it the assessment is restricted to these devices only. This to prevent that once a machine is compromised, the security consultants start to work their way in to the rest of the network.

Let's asume that there is a buffer overflow in a daemon or an application. Would you want them to spend time on exploiting this buffer overflow or find more vulnerabilities?

Generally, as a security consultant, I explain the situation to the client that given enough time the buffer overflow could most likely be exploited. I will ask if they want us to continue on exploiting this or spend time in to looking at other parts of the system.

Also, we report high and critical vulnerabilities immediately and have a daily evaluation on the findings.

Talk to the consultant(s) on a daily basis, communication is key here (something the consultant(s) should do towards their clients anyway IMHO).


IPSec Host-to-Host VPN (RedHat) needs IP Forwarding? We would like to build a Host-to-Host IPSec VPN (both RedHat Linux). Is it really mandatory to activate IP Forwarding which is by default deactivated because of our security policy (/etc/sysctl.conf net.ipv4.ip_forward = 0)?

I understand that the VPN adapter have to forward traffic to other network adapters. However, the security risk is that these two servers are becoming "routers". These servers have multiple network adapters in which the traffic should be separated.

What controls should/could be implemented? For example, iptables to minimize the security risk?

I just did some research on this as I am in the same seat as you; I've set up a VPN but wanted to make sure that I'm not forwarding the world.

Enabling forwarding in the kernel, doesn't mean that everything will pass through iptables firewall. However, if the firewall allows all forwarding, you might be in big trouble. Luckily iptables seem to DROP forwarded packets by default. To have a look at your firewall forwarding policies, execute iptables -L FORWARD.

FORWARD is the chain where firewall rules for IP forwarding reside. If you are curious about the different tables and chains a forwarded packet goes through, have a look at https://www.frozentux.net/iptables-tutorial/chunkyhtml/c962.html.

This is what my FORWARD chain looks like on an Ubuntu machine, using the ufw firewall, with a single VPN:

# iptables -L FORWARD
Chain FORWARD (policy DROP)
target     prot opt source               destination
ACCEPT     all  --  192.168.0.0/24       192.168.1.0/24       policy match dir in pol ipsec reqid 5 proto esp
ACCEPT     all  --  192.168.1.0/24       192.168.0.0/24       policy match dir out pol ipsec reqid 5 proto esp
ufw-before-logging-forward  all  --  anywhere             anywhere
ufw-before-forward  all  --  anywhere             anywhere
ufw-after-forward  all  --  anywhere             anywhere
ufw-after-logging-forward  all  --  anywhere             anywhere
ufw-reject-forward  all  --  anywhere             anywhere

Some things to note:

The default action is DROP (policy DROP, good!).
The only two ACCEPT rules are for established IPSEC connections (policy match dir in pol ipsec reqid 5 proto esp and policy match dir out pol ipsec reqid 5 proto esp). Those rules have been automagically added by my IPSEC application.
My FORWARD chain above delegates to ufw-before-logging-forward chain etc. When I investigate them I see no additional ACCEPTs. That is, I should be safe.

Here's an excerpt from iptables -L where I look at the delegated chains:

# iptables -L
[...]

Chain ufw-after-forward (1 references)
target     prot opt source               destination

[...]

Chain ufw-after-logging-forward (1 references)
target     prot opt source               destination
LOG        all  --  anywhere             anywhere             limit: avg 3/min burst 10 LOG level warning prefix "[UFW BLOCK] "

[...]

Chain ufw-before-forward (1 references)
target     prot opt source               destination
ufw-user-forward  all  --  anywhere             anywhere

[...]

Chain ufw-before-logging-forward (1 references)
target     prot opt source               destination

[...]

Chain ufw-reject-forward (1 references)
target     prot opt source               destination

[...]

Chain ufw-skip-to-policy-forward (0 references)
target     prot opt source               destination
DROP       all  --  anywhere             anywhere

[...]

Chain ufw-user-forward (1 references)
target     prot opt source               destination

[...]

Chain ufw-user-logging-forward (0 references)
target     prot opt source               destination


Store encrypted user data in database I have a web application that has the following use case:

User creates account with username and password -- hashed password is stored in database.
User logs in (persists across sessions) -- login token is stored in cookie.
User inputs and submits text data -- data is stored in database, but is sensitive and shouldn't be exposed even if database is compromised.
Only the (logged in) user, and no one else, can read the submitted data.
For convenience, user should not need to enter any passphrase to encrypt/decrypt the data.

Is this feasible? How should the data be encrypted?

You can use a key derivation function to convert the user's password into an encryption key. Then you would use a cryptographically secure pseudorandom number generator to generate a separate key that would encrypt the user's data. You would then use the derived key to encrypt the generated key. The resulting ciphertext of the data encryption key could then be stored safely in the user table of your database (call the field "encryptedkey" if you like). In this way, the user's password will become the means to decrypt the user's encrypted key. The key that actually encrypts the data is only decrypted long enough to decrypt the data that it encrypted. You'll need to store that key in the session in order to avoid the need to ask the user for his password on each decryption occurance.

Alternatively, you can store the key encryption key on a Key Management Service such as that offered by Amazon AWS. This way you would retrieve the key from Amazon over TLS using only a reference to the key. Of course in this case you will still need to store the authentication credentials for the KMS somewhere in your architecture, possibly in a remotely retrieved highly secured config file.

Random Number Generator ⟶ Helps create Key #1.
This key encrypts your data.  It stays constant over time.  You must generate this key when the user first registers.  Use a CSPRNG (cryptographically secure pseudo-random number generator) to ensure sufficient randomness and unpredictability.
Password ⟶ Converted into Key #2 with PBKDF2.
This key, Key #2, is used to encrypt Key #1.  You'll want to persist Key #2 in the user's session.  Store the encrypted form of Key #1 in the user table, in a field called (perhaps) "encryptedkey".
Changing passwords
Whenever the user changes their password, you only have to execute step #2 again, rather than encrypting all of your data, all over again.  Just convert the new password into a key (Key #2), re-encrypt Key #1, and overwrite the old value for the encrypted form of Key #1.
Encrypting/decrypting data
When the user has logged in, execute step #2.  Once you have the password converted into a key, just decrypt Key #1.  Now that you have Key #1 decrypted, you can use Key #1 to encrypt and decrypt your data.


Is my checkNumber() function secure? function checkNumber(number) {
        event = document.all ? window.event : number;
        key = document.all ? event.keyCode : event.which;
        window.event.keyCode
        if(key<48||key>57) {
            if(document.all) { event.returnValue = false; } else { event.preventDefault(); }
        }
    }

This is my function for preventing users to enter anything but numbers. But still not sure if it is secure since users may interact with it via a textbox. Thank you.
Textbox code:

<input name="TCashpoint" type="text" required="required" class="LBInput" placeholder="Enter only an integer." onkeypress="checkNumber(number)" maxlength="9">

PS: This is the client side code.

All client side code insecure by design. Unfortunately no matter how well you code your function, it can be easily bypassed by the end user. If this data is going to be passed to a server please validate it at the server end as well.

Client side validation is purely for 'usability' and not security (i.e. let the client know that they have added an incorrect answer, genuine users will change their answer to conform, malicious users will edit the code or use a proxy to send off malicious text). For security you must check it on the server side.


Clarification of relationship between CORS and CSRF To summarize:

CSRF is an attack where a page in a different window/tab of the browser
sends nonconsensual request to an authenticated web app, that can typically
be prevented from server-side by checking the Referer, Origin header of the
request or including anti-CSRF token in request header or body.
CORS is variously defined in different sources, that might roughly be
summarized as: a mechanism that host-of-origin-B indicates to the browser
how or whether a host-of-origin-A content should access its resources.

Cross-origin-related attacks and party responsible for defence

Nonconsensual "state-changing" requests: The server.

Be it a treacherous form submission, XHR/fetch request from a
"second-origin" page, the server need to recognize and reject them.

Cross-origin data (credential, privacy) leaking: The browser.

Be it a media tag (img, video, audio), XHR/fetch request, the browser must
isolate those data from the access of "second-origin" pages.

Q1: anythine else?

Purpose of CORS in cross-origin settings

To let browsers make informed decisions on how:

To make concensual "state-changing" possible cross-origin.

Q2: Is there an real-world example of concensual cross-origin
"state-changing" user action?

To allow "creative" ways of collecting and using of digital assets hosted
at "second-origin" host(s) by the script.

Misc.

Q3: CORS doesn't help browser protect users from malicious digital asset hosts
determined to steal data from users? But honest origin servers can prevent them
from submitting CSRF requests?

Bit of a rambling question, so bit of a rambling answer also.

CSRF can also be defended by including a custom header on XHR requests, and with same site cookies.

CORS is not variously defined; it is a W3C standard. What sometimes causes confusion is that CORS is not really a security mechanism.

Cross-origin data leaking is an area of active research and requires defences both built-in to the browser, and in both server-side and client-side application code.

Q1) The main other cross-origin attack is cross-site scripting. Defences needed in both server-side and client-side application code. Clickjacking is another one. There are probably some more although I can't think just now.

Q2) I've found most uses of CORS are for reads. Some REST APIs have permissive CORS settings but require a security token in requests. This lets third-party domains access the API, once the user has authorized them, e.g using OAuth.

Q3) That's right, CORS is not a security mechanism and doesn't in itself defend against anything. It does sometimes stop people using insecure alternatives like JSONP so it can help security.


How do I assess and mitigate the security risks of a VNC tool? I love VNC. I've regularly used it for some time, and while I haven't needed it in the past couple months, it's a resource I would like to continue to use in the future.

However, with new reports about TeamViewer, it raises a question in my mind that I had somewhat stupidly decided was unimportant and ignored: how do I establish trust in the security of my connection?

I realize a significant part of that relies on trust in the (likely proprietary) software I am using to establish a VNC connection. However, were I using TeamViewer at that time (thankfully, I was not), none of the standard security checks would have been useful: I had 2FA, I had a unique password set on my account, and I'm not storing my passwords anywhere on my computer.

Is there a way to mitigate or minimize this security risk? How do I assess the threat to my security?

Is there a way to mitigate or minimize this security risk?

Sure.

Only use trusted remote-desktop software. Some operating systems come with a default one, though it may not always be the ideal piece of software. This software need not be proprietary, there are open-source options to choose fome.
Use strong authentication, never short or simple passwords.

For a super-secure setup, you can handle this be using a secured connection to the server, with something like an SSH tunnel. Using port-forwarding, the VNC server can be configured to only accept connections on the remote desktop ports from itself and not any external connections.
If that's not an option, definitely use a strong random password and ensure that your communication to the server is encrypted. If you password is sent in plain-text, it can be intercepted. VNC itself it not necessarily encrypted.
Additionally if possible, you can use a firewall to limit access to only the local network. Still use a password though, a compromised local device can still do damage you don't want to spread.


High Interaction Honeypot design I've been writing a high interaction honeypot which has required some interesting design decisions, for instance I want the honeypot to get attacked not the underlying infrastructure/ software. Fun stuff.

However I've got an issue and was looking for best practice advice.

Basically the honeypot is an insecure web application which has the ability to change the password.

Now suppose Attacker A changes the password he could expect to come back as Attacker A and use the password he has just set. However if Attacker A clears his browser (I had been tracking via a session cookie) he'll become Attacker B but would still expect to get in on Attacker A's password. At the same time Attacker C might try and access but the password set by Attacker A might be really hard/ not default and I'd miss the opportunity to get Attacker C.

I can keep all the passwords and let them long in by any of these plus the defaults but risk Attacker A having set a new password typing in a default and it still working - acceptable risk?

or I accept that its unlikely to get two people at the same time and reset everything all the time, but accept Attacker A might come back and wonder by the password he set no longer works but the defaults do?

I've basically written code behind someone's web site so don't really want to modify any of the JavaScript or anything as this might make it look unlike the real deal.

Why not just accept all the passwords, you could, every time they set a new password, add it to a password list. All passwords in the list will be accepted rather than just one password. It might get spotted, but I believe the likelihood could be quite low OR it could be seen as a vulnerability.

You could then add some behavior to make it less obvious, for instance add logic  which says that if you have seen the IP before, then the password must be the password that the person last set from that particular IP. This will not cover people using proxies which change their IP constantly, but it should give you some coverage.


Could Meltdown/Spectre be exploited from C#/.Net (or other managed languages or the Midori OS)? First off yes the correct answer is patch your OS/system. That aside:

Does the memory managed features of a language like C# prevent it from being used to exploit the Meltdown security bug?

What about if you use the unsafe keyword?

Bonus question:
Could Meltdown/Spectre be exploited on the Midori operating system?

Could Meltdown be exploited from C#/.Net (or other managed languages)?

It can even be done from JavaScript.


How to export application metrics out of PCI environment I am building a credit card tokenization/payment-processing service. As these services need sit in pci-compliant environment, I find it hard to export the application metrics & logs. Anyone knows how is this usually handled?

For detail:
I am writing the service in Java and using StatsD to record the application metrics. I want to export these metrics out of the PCI environment to graphite, as such I could monitor and set up alerts for the services.

Any ideas are welcomed!

You'll just have to follow your PCI procedures. You'll have to create a change that allows the statsd server to exist. A manager will have to review/ok the change.

It will cause a few dependent changes and activities:

add a new statsd server to the DMZ (network change, system change, system hardening, configuration standards)
add the statsd service and graphite service to the allowed services on the network
record the new server in your equipment overview
update the network diagrams
Allow selected servers to access the statsd service. Be sure to practice least privilege principle. (firewall change)
Allow the statsd service to (only) access the remote graphite service (firewall change)
If applicable, update procedures to add "allowing access to the statsd service" as a default configuration for new machines. Be sure to practice least privilege principle.
Consider wether this change constitutes a significant enough change to need a penetration test
Kick off an internal vulnerability scan which includes the statsd server
Alter the application to include statsd support (application change, code review)


Can slightly lowered encryption standards remain secure? State security agencies argue that lower encryption standards, but "secure enough" to resist mundane, everyday interception, would allow security agencies to defend against terrorist attacks.

Would such a lower encryption standard exist in such a form that the bad actors would be unaware of the lower encryption yet keep "regular people" secure?
Would such encryption be resistant to interception by bad actors? Could we trust it? If so how?
What would prevent bad actors from implementing their own, stronger encryption?

For the record, I am interested in the technical reasoning behind the strategy and whether as an engineering approach it is sound at achieving the goal of reasonable privacy alongside security. I'm not interested in subjective, editorial based discussion around civil liberties/privacy.

Cryptographic tools don't age out in the same way cars do: they don't lose a small percentage of their strength each year (actually, they do as computers become more powerful, more on that later *). Often, a critical vulnerability is found in the algorithm, or its popular implementation, drastically reducing the attack effort.

For example, brute forcing TLS chipters would take ages, but Heartbleed attack allows you to reveal private keys withing minutes. Anyone with a computer can exploit this bug, not only security agencies.

Similarly, SHA-1 is not broken (yet), but for a very similar algorithm, SHA-0, collisions can be found within hours on consumer hardware. Should this attack be extended to SHA-1, it will be instantly and hopelessy broken. That's the whole reason it is being phased out now, before that happens.

So in practice it's very hard to find "lowered encryption standards" which are still secure enough to protect from common criminals.

*) A good example of a cryptographic algorithm which has actually aged out peacefully is DES. To this day, brute force attack remains the practical option, however, computers have made such tremendous progress since the 1970s that such attack can be performed in less than 1 day on top modern hardware. DES is used to this day in form of Triple DES, which is somewhat unefficient (requires 3 times the effort to encrypt/decrypt but only 2 times the effective key size) but still quite secure.


Are exploits 1:1 with vulnerabilities? I know that for the most part, there are some small differences between thoughts on a lot of matters in terms of definitions in security.

What I am asking about is whether exploits are considered to take advantage of a specific vulnerability, or whether it is OK to say that multiple exploits take advantage of a single vulnerability. For example, we know that SQL has many types of exploits through SQL injection attacks. Do we say that the vulnerability in SQL to being manipulated through being sent unexpected commands is the vulnerability itself, or is it the specific command which is able to perform the exploit action which is the vulnerability, meaning it is a 1:1 rather than a 1:* relationship?

All this is just a matter of definition and vocabulary. I have the impression that in your question you are confusing "exploit" and "threat".

A vulnerability is a weakness in a system. This weakness may or may not be addressed by some security measures, may or may not be known.
A threat can be anything endangering the system by exploiting or triggering the vulnerability. A threat can be caused by a voluntary action (someone causes a denial of service by crashing your non redundant server) or involuntary (a fire broke out and caused a denial of service by burning your non redundant server). As you can see, in these examples there is only one vulnerability (the system is non redundant) and two different threats related to this single vulnerability.
An exploit is an implementation of a threat. There can be many different implementations of the same threat.

Take your SQL injection example:

If users' parameter are not properly filtered, a web application is said to be vulnerable to SQL injection.
This vulnerability requires that an attacker has access to the vulnerable page and is able to input malicious content in a way it will be processed by the web app server and trigger the vulnerability. This provides read/write access to the database to the attacker, allowing him to access and modify sensitive information. This is the description of a threat.
A way to exploit this vulnerability would be to put some string A in the field F. This is an exploit. However, using a different string or a different field might also prove to be effective to counter for instance some badly implemented security measures.  Same vulnerability, but multiple exploits could be used.


Sent text by bank I don’t have an account with- Is this a scam? I have received this text message supposedly from NatWest bank (UK), yet I have never had an account with them or given away details to them:

  Our team have tried to contact you regarding your online account.
  Login via the secure link http:// 103.208.86.131 to avoid account suspension.

I looked up the location of the given IP and it said it originated from New Zealand. Is this a virus or other sort of scam?

It's a scam. You don't have an account there, so why would they have your email or phone number? And why host a business critical process on a no-domain address without even using HTTPS? And calling it a secure link? Lots of red flags...

If you open that site, the site will probably use a exploit kit to download and execute malware, or show a convincing login page to make you disclose your credentials.

Usually banks don't send emails or text messages to clients regarding account suspension, email and SMS are not the trusted ways to do so.


Can a web application administrator access the database of that application? We have a web application linked to a database. The database is secured but contains unmasked confidential numbers. Can a normal administrator who can access the application, access those numbers in the database?
Note that there is no tools in the application that generates the numbers.

After reading your question several times, I think I understand what you mean. You're talking about an Administrator in the sense of Joomla! or WordPress administrator. Where an admin is a concept created by the application itself, and that admin has no access to the actual server.

In applications (Joomla!, WordPress, ModX, Concrete5, DotNetNuke, etc.), the administrator is able to install components and plugins that are basically server-side code that is able to read server files and eventually have as much database access as your application itself has. So if your application can store and read the sensitive data, then the application's admin can very likely read said data.


WPS Why Can't Pin be Bruteforced Offline I don't totally understand how the WPS protocol works but why cannot a user get the hash of the WPS pin from the router and crack it in the same way a WPA2 handshake is cracked? (Not pixiewps but bruteforce 8 number keyspace)

A client does not enter the pin like with WPA2, but doesn't the AP send the hash of the PIN to the client in Ehash-1 and 2?

The hash of the WPS PIN doesn't leave the router. It is stored on the router.

Client and router perform a Diffie-Hellman key exchange and then use hashes of the PIN and the exchanged keys to prove to each other knowledge of the PIN. The only way to obtain the PIN is to obtain physical access to the router and somehow extract it from its memory.

But that doesn't mean WPS with PIN is secure. Most wifi routers don't rate-limit the amount of PIN entries. WPS pin's are limited to 8 digits of 0-9. That's already weak, but it gets even weaker because the 8th digit is just a checksum calculated from the other 7 and the access point already gives a feedback when the first 4 digits of the pin are correct. That means WPS with PIN can often be brute-forced in about a day.

A more secure variant of WPS is the push-button method where you press a physical button on the router and then have a few minutes to connect new devices. You just need to hope that :

no attacker comes around in that time window and
no attacker gets physical access to your wifi router and
your router actually allows you to deactivate WPS with PIN while still allowing WPS with push-button. Many don't.

Bottom-line: If you want a secure home WiFi network, specifically look for a WiFi router which does not support WPS or at least allows to disable it.


Loss of hardware asset(such as a laptop) that belongs to an organization What should an organization do if an employee loses their laptop owned by the company. The laptop is used for business purposes, has confidential data and is also encrypted. Are there specific measures that an organization can take to minimise the impact of the asset/data loss?

You've already taken some good steps with encrypting the device, but there are a few other general things you can do:

Require strong passwords, and dial down the amount of time cached credentials last if you can.
Use multi-factor authentication; if your user has a smart card or secure key of some sort, they need to lose 2 things to let someone else in.
Minimise the data stored on the laptop - keep as much as possible on your network and revoke the users credentials as soon as the laptop goes missing (ideally by revoking a certificate on your CA, but maybe by just changing their password).
Keep very important files separately encrypted, using a different password to their login, in a truecrypt volume or the like - that way an attack on the notoriously weak Windows password store doesn't reveal your key.
Set up a remote wipe / locate service (such as Prey) so you can nuke/find it if it goes online.
Set up rules to wipe your keys in case of too many bad passwords - this will give you a fighting chance against an online brute-force attack, and full disk encryption is likely to make offline attacks difficult.

Your organisational policy and process should reflect the fact that confidential data should have a shelf-life after which it stops being important. You should make sure that cases where that shelf-life is long are flagged and that data not carried around. For anything else, you want to aim to keep the machine secure for at least as long as the data is valuable, and that should inform your encryption schemes and other access control measures.


Securely verifying a user based on bio metrics So we all have cameras on our phone, and we all have faces on our bodies(hopefully). We all also have a want to keep our data safe and secure. To that end many companies have tried to make secure facial recognition software or bio metric scans that can't be beaten with a simple picture.

The idea behind it is always the same. We'll use the unique identifying properties of a person to identify them. The idea behind it is pretty solid. However there's always been one problem with it on some of the earlier implementations that were brought out that showed a copy just has to be good enough. With image(facial/retinal) recognition it was beaten with a picture. With full fingerprint scanners it was beaten with silly putty. Now we have new technologies to try and verify them much more "securely".

Microsoft uses Hello, most phones now have a finger scan, and many of these systems with small changes are considered secure. Are they really though? Theoretically most bio metrics can be imitated well enough to fool the scanners with enough time and money.

So this brings the real question into it: How can you confirm they are really that bio metric in front of your scanner?

I've often thought about this and the one theory I've struck upon is using video capture to prove it's a living thing in 3D space(requires two cameras for depth perception), but even then if they wear a good enough mask it can still be fooled.

So how can we ABSOLUTELY make sure that the bio metric we're scanning is the original bio metric and not a good enough recreation out of clay?

Edit: I'm not asking why it's not used much, I'm asking for theoretical ways to make them as secure as possible through changes to implementation. How we currently take steps to make them secure, holes in them, and how we can improve them.

Unfortunately Biometrics are not a good way to identify someone. You may think every part of your fingerprint is unique, but you are wrong on two counts:

fingerprints, like everything else, have a finite number of possible arrangements. Large, but finite.
the sampling process you use reduces this large number down to a much smaller number

A certain amount of leeway is required when assessing a biometric signature - too strict and day to day differences can make it fail (like blood pressure, a tan, water retention etc); too relaxed and you have too many individuals presenting with the same signature.

As an additional factor, it's helpful, but as a stand alone identifier it is not secure.

@ThomasPornin's answer to Why do we even use passwords / passphrases next to biometrics? explains why.


My company sent a phishing email - can they see if I saved the attachment? My company is doing an anti-phishing campaign and sent out a "fake" email to see how many people would open the attachment.  They had previously sent out information about how to avoid these kind of attacks.

So of course I recognized the email as part of the campaign, but my curiosity got the best of me and I was dying to see the code (it was an .html attachment).  My question is: will they know if I saved the attachment to my desktop and then opened it with Notepad?  I guess a secondary question would be is that safe to do in the first place?

I can attach the HTML code if anyone is curious, redacting the company specific information of course, but I'm not sure if that's necessary.  Thanks in advance!

It depends on your e-mail client, its configuration, and the protocol it uses to communicate with the server. For example, in the case of IMAP, in Outlook 2007 attachments weren't downloaded by default, but from Outlook 2010 and onwards, they are.

Although I seriously doubt your company's e-mail server keeps track of downloaded attachments in the first place, if you don't know whether attachments are automatically downloaded together with the e-mail, you could try disconnecting your computer from the network and then opening an attachment you haven't opened before. If it opens without trouble, then you know that attachments are fetched together with the e-mail and that your company won't know you downloaded the HTML file (unless they decide to inspect your computer).


SOC and generic log parsing I am making a conceptual work-flow of a SOC so if we suppose that a SIEM solution is integrated inside an organization's in-house SOC. Also, if the team of the SOC is the one managing the SIEM solution.

My question is when we will face a log format that does not match any of the parsing rules already stored in the SIEM parser then we will move to a generic format and manually add a new parsing rule for this entry. So which Analyst level should be in charge of this task? Knowing that I have:

Level 1 (Triage): responsible for ordinary alerts and closing false-positives
Level 2 (Analyze): basically, this is where qualification of non-ordinary alerts are escalated from L1 to L2 which need further investigation.
Level 3 (Investigation): For deep investigations where we will need to identify attack vectors and actors also apply some data enrichment...
Remediations Team: Where we will contain and eradicate and recover from the incident...
SOC management: handles administration, supervision and service management of the SOC.

It really depends on the SOC and how it structures it team. In the real world Level 1, 2 and 3 analysts may be expected to build parsers/connectors to normalise logs for the SIEM.

Given the descriptions in your question however I would say that none of these roles are right.

The role I would expect to be handle this task would be a Technical Lead. Someone who’s job it is to administer and maintain the SoC tools.


SSH protocol banner is a kind of DOS? In my test environment with Python script I generate on a target server:

SSHException: Error reading SSH protocol banner

simply opening/closing a sufficient number of ssh connection.

Is it classified as a DOS attack against sshd?

Maybe is not classified as DoS attack but I think yes, this could cause DoS if you are able to generate enough traffic. To protect this you can use something like fail2ban


After trying successful SQL injection why the result isn't getting displayed on the webpage? Below is the PHP code I wrote that allows SQL injection with one parameter ie 'id' in this case.
On trying SQL injection via putting this    2' ORDER BY 1;--'   in the parameter (id field ), I get only SQL errors on the page.
On executing the query directly on mysql server ie SELECT * FROM users WHERE id = '2' ORDER BY 1;--'';    I get the below result that is 1 row set along with the error.

mysql> SELECT * FROM users WHERE id = '2' ORDER BY 1;--'';
+----+----------+-----------+------------------+
| id | username | password  | creditcard       |
+----+----------+-----------+------------------+
|  2 | John     | password! | 3123456769384659 |
+----+----------+-----------+------------------+
1 row in set (0.00 sec)

  ERROR 1064 (42000): You have an error in your SQL syntax; check the manual       that corresponds to your MySQL server version for the
  right syntax     to use near '--''' at line 1

PHP code

<?php

require_once 'login.php';
if (!isset($_GET['id']))
{
    echo <<<_END

WELCOME to the KINGDOM

    <form action = 'si2.php' method = 'GET'>
    id <input type = 'text' name = 'id'>

        <input type = 'submit' value = 'cl1ck M3'>
</form>
 _END;

}

if(!get_magic_quotes_gpc())
{
    $id = stripslashes($_GET['id']);

}
$connection = mysql_connect($db_hostname,$db_username,$db_password);
if(!$connection) die ("Unable to connect with MySql " . mysql_error());

 mysql_select_db($db_database,$connection) or die('Could not connect with the database');

$query = "SELECT * FROM users WHERE id = '$id'";

$result = mysql_query($query);
if($result)
{
    $rows = mysql_num_rows($result);
}
else { echo "Could not execute the Query:
" . mysql_error();}

if($rows >= 1)
    {

        for ($j=0 ; $j < $rows; ++$j)
            {
                $row = mysql_fetch_row($result);
                echo "Hello $row[1]"."
";
                echo "Your Credit Card Number is  $row[3]"."

";
                echo $query."
";
                //echo $row[3];

            }
    }
else
{
    echo "

Sorry no rows/results could be fetched on query execution

";
    //echo $query;
}
?>

My question is why my code isn't able to fetch the row set and displaying the table entries ? And in case I want to then what changes should I try.

There are possibly two issues with your attempt that cause it to fail:

Syntax for MySQL comments to the end of the line --  requires a whitespace or control character following the double-dash:

  From a “-- ” sequence to the end of the line. In MySQL, the “-- ” (double-dash) comment style requires the second dash to be followed by at least one whitespace or control character (such as a space, tab, newline, and so on). This syntax differs slightly from standard SQL comment syntax, as discussed in Section 1.8.2.4, “'--' as the Start of a Comment”.

PHP’s mysql_query function does only allow one single statement:

  mysql_query() sends a unique query (multiple queries are not supported) […]


Unable to execute PHP shell I have uploaded a simple PHP shell onto a server, but I get one of the following error messages when I am trying to execute a code:

  Warning: shell_exec() Unable to execute 'ls' in .... on line 2

  Warning: shell_exec() Unable to fork [ls] in ... on line

I think that there are some folder privileges that does not allow me to execute my code. How can I evade it?

Since that "open_basedir restriction in effect", is there a way to execute my shell?

The PHP function shell_exec calls the fork system call to create a new process for ls. It seems that the call to fork is blocked by some security policy.

You can still execute any PHP code that doesn't use blocked system calls. So even though you can not run ls, you can still obtain a file listing by running something like this:

<?php
    print_r(glob('*'));
?>


Vulnerability in restricted eval Is it possible to exploit this code?

eval ("\$RequestVariables = \$_REQUEST;");

or

eval ("\$ServerVariables = \$_SERVER;");

I know if $_REQUEST or $_SERVER wasn't an array and if it was a string or int it was possible to exploit it, but in this case its an array. Is it still possible to exploit this code?

No, that's not exploitable.

All variables in the string you're passing to eval() are \-escaped, so they don't get expanded. This means you're always literally evaluating...

$RequestVariables = $_REQUEST;

...which is just an ordinary assignment without any possibility to inject your own code.

  What if they were not \-escaped?

In that case you're still out of luck because $_REQUEST and $_SERVER are guaranteed to be arrays, and the string representation of an array is always just Array, not displaying any contained values.


Is secure tokens send by email secure? I'm struggling with the reset password function of a web app, the way i'm inclined to do it is by sending a token based url to the email of the user and than the user can access and reset its password, but is email a trusted way to carry such sensible data ?

"is email a trusted way to carry such sensible data" No.

Do many websites do it? Yes.

A saving grace is to make the link one-time-use-only and require the user to choose a new password immediately. That way, if an attacker does intercept the email and use it to hijack the account, when the legitimate user clicks on the link later, they will get an error message and know that something is wrong. As mentioned by @Xander, this is far from ideal, but at least it's something.

If you want better security, think about adding a second factor to the password reset tool, like sending a code to the user's SMS, or "where was your mother born?" type security questions, or any of the other standard second factor methods (should be able to get a good list by Google).


Password reset links: random value or authenticated message? Which is better?

Create tamper-proof encrypted password reset token which contains the user id and the expiration time within the encrypted token.
Generate a random token and store it in the database with the user id and expiration date. Look up the token when the user clicks the link.

An advantage I can see with #2 is that you keep control over these tokens. If you want to expire it sooner, you can. A difficulty I see with #1 is making sure the tokens you send really are secure and tamper-proof. You're relying entirely on not screwing up the cryptography.

Does ASP.NET 2.0 have any built-in method for generating password reset tokens?

Creating a random token containing absolutely no information and linking it in the database with a username and an expiration time is by far the best solution.

Encryption (and hashing) is used to store and transfer data that absolutely must be sent.  If there is any way to do something without having to send that data, encrypted or not,  that provides equal functionality and security, you should use that method.  In other words, encryption should be a last resort for securing data.


Two-way PGP email without publishing your key / address to a key server? If I want to have some privacy and avoid the attention of publishing my email address to the public key server web of trust, yet have a secure two-way email conversation with one recipient, what are the ways in which we can share public keys, in order to have the secure conversation?

I am concerned about:

My email being publically associated with PGP. (It is a privacy issue)
My email having spam sent to it as a result of being on the public lists.
The very existence of my email address being easily findable by anyone other than the people I want to communicate with.

I can so far think of ways such as exchanging keys over a trusted, secure OTR IM conversation, or physically/in person, but if you trust your respective email hosts / a third party not to change the keys with a MITM attack, could simply exchanging your keys via unencrypted email be a workable solution for what I want to (or rather, not want to) do?

And do many privacy-conscious people (like members of law enforcement, such as NSA agents) do this to avoid having their (government) email addresses publically 'outed' by being on public PGP key lists? Maybe they have their own private PGP servers within each organication to take care of that?

Confidential Key Transmission

You have to discriminate between to different issues:

Privately transmitting keys

This is your primary challenge, about how to get the key to the other side without revealing it to the public. You can do this on any way you want which you would also trust otherwise regarding transmitting confidential data. If OTR is fine for you, than it also is for transmitting your keys.

Sending keys without using key servers is as easy as

gpg --armor --export [key-id] > key.asc     # Send file key.asc to the recipient
gpg --import key.asc                        # Recipient can import the key

Verifying the validity of keys

This is a completely disconnected problem, which also occurs if not transmitting key data in private (ie., using the key servers). Usually, this is performed by communicating the key's fingerprint (a kind of hash sum) over some secure channel, often face to face communication.

If you already established a trusted, secure channel (like OTR with verified keys), you could use this to do both: you know nobody is able to evesdrop, and the other side is authenticated.

If you trust your mail and network operators not to tamper with unsigned plain text mails (and not evesdrop on them), and governmental agencies are not an attack vector you're caring about, a plain text mail might be fine for doing so. If all you want to do is prevent spammers from getting your key (which includes your mail address), this is very likely sufficiently private way of exchanging keys, just consider who might have access to the transmission path: spammers are probably not among them.

Is it worth the effort?

Or better: how much effort is it worth?

Be aware that anybody being man in the middle will be able to observe whom you're communicating with anyway. Spam is an issue with keys on public key servers, but you have to deal with it anyway. Keeping keys private only works as long nobody makes a mistake; uploading the wrong or even all keys in the local key store is told to happen (and happens easily).

OpenPGP with its key server infrastructure is mainly designed to keep the contents of your communication private, while also ensuring authenticity by sharing your public keys and signatures. While it can be used the way you'd like it to be, keep in mind this is not one of the primary goals. If you want to use OpenPGP without uploading the keys, expect it to get public anyway and do not rely on it if a leaking public key would be a disaster.

Governmental Encrypted Mail Usage

  And do many privacy-conscious people (like members of law enforcement, such as NSA agents) do this to avoid having their (government) email addresses publically 'outed' by being on public PGP key lists? Maybe they have their own private PGP servers within each organication to take care of that?

Very likely, they just don't use OpenPGP. These are centrally organized organizations, which are often better of using hierarchical systems like X.509. And worse, I'd not be too sure usage of end-to-end encrypted messages is widely spread anyway.

If they do, they will most likely use S/MIME and X.509 keys together with an internal key server being integrated in their user database. Very likely there is no full list of keys/certificates available; but when they're already communicating with you, they will very likely share the certificate by signing their mails (in S/MIME, the certificate containing the public key is attached to any signed message).


Can results from DAST (Dynamic Application Security Testing) tools be false positive? I know results from Static Application Security Testing (SAST) can be false positives or real and it is up to the security analyst and developer to decide which vulnerability is real based on the scenario and context.

Is the same applicable to DAST scan results?

Until now I believed results from DAST (Dynamic Application Security Testing) tools are all real / true positive and  need to be addressed. Can some DAST results be false positive as well? Does DAST need the same time and effort from developer and security analyst to filter out false positives?

DAST can absolutely have false positives. It depends on the tool that you are using, but there are some that can give you hundreds of false positives.

For example, a tool might check for SQL injection by inserting a single-quote and checking for an SQL error message, but an error message being present does not necessarily mean that there is an SQL injection vulnerability.

Just as with SAST, you should verify that there is actually a vulnerability before you schedule dev time to fix it.


The role of Machine Learning In Cybersecurity Defense Hackers and malware are one step ahead of cybersecurity experts, and every time technology is released to the market, vulnerabilities will be quickly discovered and exploited.

How effective can machine learning technology be particularly in the defense against SQL Injection Attacks (SQLi)? Is it the correct approach to the problem?

Machine learning technology is certainly better in scope compared to signature based systems. To your example about SQLi attacks, signatures could look for specific commands/strings within the HTTP payload as means for detection. ML based approach can, instead, define the behavior as process spawned on the db server or unwanted read-only operations etc etc. If there is another novel SQLi attack which escapes the signature (string did not match) but the consequential behavior remains same (process spawned or unwanted read-only operations), then ML approach will come out flying.

Having said that, the ML based approach can only detect a behavior it is trained for. In the above example, if the SQLi attack results in a new reverse tunnel opened to another host, but we did not train the model for this behavior, then the ML approach will not succeed either.

(Answer to the previous question on how signature systems differ from ML based systems)

Yes. Signature checks only for a specific vulnerability and multiple vulnerabilities at best. Machine learning, however, focuses on the behavior of the attack which does not necessarily mean how the exploit was handled, but rather post infection activity etc.

Aside: Developing ML based security systems is my daytime job.


What it takes for someone to enter your machine over a public wifi network? I'm browsing the internet over the public library's wifi, visiting non-sensitive websites, some of them SSL protected.

As a Windows user, I have set the network settings to "Public", just for safety.

However, reading about it, I just found out that not only your traffic can be targeted (everything that leaves your machine, enters the network, and hits the domains, whether they are SSL-protected or not), but your machine itself can be infiltrated with some special software.

How difficult would it be for someone to use that kind of software against an average Windows user, who takes basic security steps?

I'd like to asses my risk levels, and see if I'm in the green, yellow, orange or red as an average joe browsing public wifis that some bad guy could target.

Many thanks,

The typical scenario is not to attack the machine directly but instead let the user retrieve the malware itself, i.e. send mails containing malware, make the user visit web sites containing malware (for example link in phishing mail, malvertisement, ...) or attack the user at the network level to inject malware into unprotected (i.e. HTTP not HTTPS) traffic.

Doing such man-in-the-middle attacks to inject malware is not hard for most public WiFi. And it is trivial if the attacker fully controls the access point, for example by simply setting up some trustworthy sounding WiFi (like "PublicWifi", "Telekom" ...) and let the victims gullibly connect to it.


How to ensure Windows 10 is safe from critical security hole reported by NSA on 2020-01-14? All over the news today (2020-01-14) is the story that the NSA and Microsoft have reported a critical security vulnerability in Windows 10.

But I haven't been able to find clear instructions about how to ensure that Windows Update has worked properly.

When I click the Start button and then then type "winver" and click "Run command", I see that I have Windows 10 Version 1803 (OS Build 17134.191)

Windows > Settings > "Update & Security" > "See what's new in the latest update", it bounces me to https://support.microsoft.com/en-us/help/4043948/windows-10-whats-new-in-recent-updates, which doesn't seem to mention security at all.

The Windows Update feature itself seems flaky, confusing, and unreliable.

I'm the most tech-savvy in my large extended family, and I generally try to help others (especially older generations) keep their systems working well, but right now I'm struggling to find a set of steps I can walk them through to confirm that their systems are no longer vulnerable.

The relevant patches that must be download and applied are described in the following MSRC Portal page.

Matching the OS version number to your system, clicking the article number brings you to a page showing the build number your system should show after you patch.

For example, for Windows 10 Version 1809 for x64-based systems, this link shows the resulting build number (OS Build 17763.973)


Why is it a bad idea to store my ethereum keyfile in my Google Drive / Dropbox etc I just bought some Ethereum and I'm in the process of moving my ethereum off my exchange into a wallet.

Now the recommendation around the web seems to be to get your key file (which contains your address and encrypted private key) and put it on two USB keys and put them in two separate physical locations.

That just sounds awfully primitive for a solution and seems only a few steps up above storing money under my blanket.

Why wouldn't I just put the keyfile in my Dropbox / Google Drive etc? It's all encrypted anyway so it's not like the file is useful if anyone can get a hold of it. I believe putting it on the cloud holds several advantages.

Two Factor Authentication - If anyone gets access to it, I'll know about it. If anyone accesses one of my USB flash drives, I won't know.
A cloud computing solution is less likely to suffer a hardware failure. USB flash drives could fail. Maybe I buy a defective batch that all fail after a certain number of years.
After some number of years, I may forget where they are, lose them or lose access to them.

Overall, since my key file is protected by a password, what use is it hiding its location? Doesn't that just increase the risk of me losing it?

NOTE - I've put it here on security instead of on the Ethereum stack exchange because it's applicable for any encrypted file and I'm interested in hearing answers throwing from modern best practice security principles.

This question comes down to how much you really trust service providers like google and dropbox to properly secure your data. If you trust google to keep your information secure and safe, then by all means store it with them.

You ask:

  Overall, since my key file is protected by password, what use is it hiding its location? Doesn't that just increase the risk of me losing it?

This is why most people store their "private key" to their crypto wallets in a secure location (like a lockbox at a bank). The private key isn't password protected, it is usually a string of 12 words that can be used to restore a wallet.


What is a TSA policy OID? What is TSA policy OID? Is it a unique identifier of a timestamp server given by a world wide authority? Does that mean that no two servers can have the same oid? Or is it an identifier of the characteristics of the service the server provides? In this context, can a TSA server have more than one OID? I have seen that this Id is a string of numbers, separated by dots hinting that this ID is comprised of different fields. What is the syntax and meaning of these fields?
Does a user of the server has to mention the OID in the request he makes to the server?

All ASN.1 OIDs are sequences of numbers separated by periods, and designed to be globally unique; see https://en.wikipedia.org/wiki/Object_identifier . The numbers have meaning as part of the sequence, but not by themselves. It's vaguely like DNS except left-to-right instead of right-to-left, numbers instead of names, and most importantly there is no expectation or suggestion that the things identified are computers of any kind.

A TSA policy is determined by some entity, usually an organization such as a business; it might be the same for multiple servers operated by one entity, and possibly for servers operated by multiple entities if they agree. It certainly isn't intended to identify the server; the IPaddress (and usually domainname) always does that, and the certificate probably does, since normally different servers will use different signing keys and thus different certs. In general what a policy means, how it is used, and if/when it is allowed/required depend on whatever system(s) and party(ies) implement it.

If you mean RFC3161, which is probably the most popular but not the only standard for timestamping, it allows (ASN.1 OPTIONAL) one OID in a request and requires one OID in a TSTInfo (i.e. the signed body of a successful response). It says

  ... This policy MAY include the
     following types of information (although this list is certainly not
     exhaustive):

  The conditions under which the time-stamp token may be used.
  The availability of a time-stamp token log, to allow later
    verification that a time-stamp token is authentic.

As you can see this is pretty open-ended -- like for X.509/PKIX certificate policies.

The ability to specify a desired OID in a request is clearly intended to allow for the possibility that the server (to which that request is sent) supports more than one policy, but that's only a possibility, I don't know how many if any actually do.


How can changing your DNS protect your online privacy? Looking at a Unblock-US Features (a DNS provider) on their website it states the following:

  Stay out of the radar of prying eyes.

  With Unblock-us, you’ll have peace of mind knowing that your ISP or
  government is unable to view your online activity. We only
  send a small percentage of data to the websites we support through our
  secure servers, and we never log or analyze any data passing through.

  The solution to this invasion of privacy? When you sign up for
  Unblock-Us, you’ll receive a new set of DNS codes to add within your
  device’s settings. Your true IP address will then be masked and you’ll
  be able to bypass any restrictions or spying implemented by your ISP
  or government, all with this simple switch.

So my question is:

How can changing your DNS prevent your ISP or government from seeing your online activity?

If my understanding of how a DNS works is correct I don't see how these claims are possible

Essentially, it doesn't.

DNS servers let your computer look up where websites and other services are based on friendly names, by converting those to IP addresses. Your ISP provides this as a service, but knows precisely who you are, and what IP your computer has, so can easily look up to see that @user1 has made a request to look at google.com.

A third party provider knows what IP address your computer is on (else it couldn't reply to queries), and what sites you are looking for. If they are a free, registration free provider, such as OpenDNS, that's all they know. They can take a pretty good guess at your ISP, and probably your geographical location (since most ISPs assign IPs based on location), but they don't have direct access to your name, or to any other data you send to websites.

However, even when using a third party DNS provider, the actual traffic between you and websites goes over your ISPs network. In this case, they can see that @user1 visited 173.194.113.80 and made some requests. If the site is running over HTTP, they can even see that you requested pages from a specific host, thanks to header data such as Host: google.com in each request, and the specific pages thanks to the HTTP verb used (e.g. GET /search?q=dodgy+things). If the site is running over HTTPS, they just get the IP address, but that's probably enough for them to work out what site you were on, just not the specific pages you looked at.