How do you Secure VOIP in a large organization As part of a large organization looking to implement VoIP, to get on the bandwagon of savings and converged network focus, I'm being asked to look at the security concerns to develop a policy to help define a direction.

Since I'm a geek first, and a security person second I started immediately down the road of "What is currently possible" when it comes to securing VoIP.  I've implemented VoIP at other organizations in the past few years, and I'm familiar with vanilla MGCP and SIP as call control mechanisms.  But from what I'm aware (and what the NIST so handily reminded me with their publication on VOIP security) is that in terms of a secure implementation there are very few options.

MGCP is not built for security, it performs call handling and does that job well.  If you were to put an MGCP interface open to a large audience it could be used to perform anything from toll fraud to silent monitor setups, depending on what features your system supports.

SIPs on the other hand allows for authentication and encrypted call handling with TLS (aka SIPS.)  I've heard Cisco implements MGCP and SRTP to give you an encrypted conversation, but since MGCP itself isn't secure it seems to break the trust model and requires an IPSec secured channel to facilitate this over the wider network securely.

I guess ultimately my question is: Is there really an option beyond SIPS and SRTP that provides end to end secure authentication, maintains integrity, and confidentiality or should I just write the policy to such that ultimately it will specifically require these technologies?

The environment requirements include anything from a mixed desktop environment in a relatively secure environment to a work at home scenario for the end users.  Ideally one specification should be used to define the "minimum" required for all.

TLS doesn't provide end to end security in SIP, because of the routing architecture.

SIP messages are transmitted from the user agent through SIP routers, and TLS encryption only happens between user agent and routers and between routers.

You could use S/MIME to encrypt and/or sign parts of the SIP messages from one user agent to an other.

For media streams protection, SRTP and ZRTP are fine.


What kind of backdoor can be made after hacking wi-fi? I'm interested to know if A hacks B's wifi password, what can A do to gain persistent access to the router even after B changes the wifi password? Secondly, how can we detect the backdoor and patch it?

An attacker with admin access to your wifi router can install a firmware "update" that contains any number of nasty things, such as a back-door for shell access or a secret password that will always allow access.

Real life example: The DNSChanger trojan configured a rogue DNS server that would direct all of your advertising traffic to the DNSChanger team's own advertising network.  This was quite invisible; who cares if you're getting ads from a different ad network?  Doubleclick, for one.  DNSChanger has a really great takedown story and presentation if you're interested.

(DNSChanger was primarily a Windows trojan, but it also compromised wifi routers, which are a lot harder to repair.)

To safeguard your router, make sure its firmware is up to date and that your admin password is a strong one that is very different from both your access password and the router's default password.

Detecting a compromise is basically impossible.  If you are concerned, wipe the router:

Remove the antennae and LAN cables except your own laptop (to prevent access for now)
Copy the configuration down on a piece of paper (a compromise could come with a backup!)
If it's possible, try a factory reset (you can't trust it, but it could help)
Flash the router with the latest firmware (even if it's the same version you have installed)
Copy the config back to the device
Change all passwords
Reattach the antennae and LAN cables


RSA vs PBKDF2 for password storage (theoretical) I know this is not the right way to store passwords, but I'm asking this from a theoretical perspective:

Suppose a web site's passwords were encrypted with RSA asymmetric encryption and the private decryption key was discarded, effectively making it a one-way trip. Now these password "digests" were somehow leaked.

Would it take any longer to decrypt the RSA encrypted passwords than it would to crack the passwords had they been hashed with PBKDF2?

The two situations are not comparable. Indeed, RSA encryption, like all other asymmetric encryption algorithms, is a randomized process: if you encrypt the same data twice, with the same public key, you do not get the same encrypted message twice. This is by design: since asymmetric encryption uses the public key which is, yay, public, everybody can encrypt data with that key. Since we want to avoid exhaustive search on the data itself, we need this non-deterministic behaviour. As described in PKCS#1, at least 8 random padding bytes are appended to the input data before applying the modular exponentiation which is at the core of RSA encryption.

This has two consequences:

This may not be cracked by enumerating possible passwords. If the attacker "guesses" the right password, he still cannot know that the password matches the encrypted one.
Nobody can tell whether a given password matches what has been encrypted. Therefore, a RSA-encrypted password cannot be used to verify passwords (if the private key is lost), contrary to a hashed version of the password. Your passwords are as good as lost, and no server will be able to tell whether a given password is correct or not by using these RSA-encrypted passwords.

So it does not really make sense to compare "cracking times" between RSA and PBKDF2.

Now, of course, some wannabe programmer might have imagined something which vaguely looks like RSA, but without the random padding, and thus can be used as a password hash. This would indeed be a (homemade) password hash. Assuming that the said programmer did not botch it too thoroughly (an already quite optimistic assumption), then brute forcing would apply, with as much efficiency as the algorithm allows: this is simply a matter of trying passwords, a process which goes as fast as the algorithm is fast. Also, possibly, this not-quite-RSA password hashing would be unsalted, allowing for parallel attack of multiple passwords with cost sharing. PBKDF2 includes salts and also configurable slowness (with an iteration count), precisely to better resist such attacks.


Why can hardware assisted virtualization be a security issue? Avast antivirus has an option for disabling "Enable hardware-assisted virtualization". If it's enabled, how is it a security issue?

My research suggests that you have misinterpreted the meaning of the setting, e.g., see
this thread.

Avast is capable of using hardware-assisted virtualization to provide better anti-virus protection.  However, because this can cause compatibility issues with other software, an option is provided to disable this functionality.

That is, if you turn off the "Enable hardware assisted virtualization" you are not telling Avast to disable hardware virtualization on the PC; rather, you are telling Avast not make use of the hardware virtualization functionality itself.


If I visit a HTTPS website when using Tor, is my IP exposed? HTTPS is an end-to-end encrypted connection. Given this, does the website I am visiting know my original IP? The website is only available over HTTPS (not unencrypted HTTP).

No, it won't.

The thing is that when you use HTTPs over TOR you:

you use the public key of the server to encipher your message (so nobody except the server will be able to read your message).
then you pass the HTTPs message (which, remember, is encrypted with the public key of the server) to a TOR node,
this TOR node to another, and another and...
finally, the last TOR node will send your encrypted HTTPs message to the server (that includes your key for the session); the response is encrypted by the server with this key and you will be the only one to be able to decrypt the response from the server.1

So the graph should be as follow:

---> "Tor message"
===> "HTTPs message"
[T]  "Tor Node"
[S]  "Server"
[U]  "User"

[U]-->[T1]-->[T2]-->[T3]-->...[TN]==>[S]
[S]==>[TN]-->...[T3]-->[T2]-->[T1]-->[U]

And yet still your communication will be secret.

If you want to learn a bit more about how your connection is secret you can learn about the key exchange in this page.


How does someone with HubSpot Sidekick knows when I opened their sent email? This app claims to know when recipients opened the emails that were sent to them. Tracking clicked URLs is fairly straightforward. What I don't understand is how a 3rd party can possibly know when I open their email?

Does web-based email clients automatically provide reading-proof to all emails? Because I remember Outlook was asking me whether I wanted to actually send proof of reading or not. If so, how do I disable it?

They track opens the same way every other email sending/analytics company does it: by inserting a tracking pixel within the HTML of the email. If your email client blocks image loading by default, then you won't be tracked. If you load the images, or your client automatically downloads the images (iPhone email client) then you're being tracked.

You can see more information about how this works precisely here: http://en.wikipedia.org/wiki/Web_bug


Can someone know my IP address through Thunderbird email attachments? Can someone know my IP address through Thunderbird email attachments?

Can a cunning attacker manage to find my IP address through attachment 'images' in emails that I unsuspectingly open?

Yes, they can, and they don't even need to be especially cunning to do so. But you can prevent it.

When you receive an email in HTML format, the emails HTML code can embed images from an external webserver. Many email clients (not just Thunderbird) will then connect to that webserver to download the image. That way the webserver will learn your IP address. When the sender sends a mass email, they can embed an unique image URL in each individual email. That way they know if, when and from which IP address each email was opened. This is very useful for spammers, because it allows them to measure the success rate of their spam filter prevention measures and identify email addresses with a high view-rate so they can send them even more spam.

You can prevent this in Thunderbird under Tools->Options->Advanced->Privacy->Block loading of remote images. You will then no longer see images embedded in HTML emails which are not attached to the email themself, but most emails of that kind are spam anyway.


Is passphrase strength increased with this strategy? I have been reading a bit about passphrases strength and weaknesses. I will take this answer as example.

TTT says, among the other points:

  Although there are hundreds of thousands of words in the English language, we (probably) only need to try brute-forcing passphrases using the set of the most common words. We'll assume there are 3000 words in that set.

Leading to an entropy (correct?) of

  3000^7 = 2.2 * 10^24

This makes the (generally understandable) assumption that the passphrase will be in English.

My question is: removing that assumption, i.e. that each word is from a different language, and that I do not necessarily need to speak that language to remember how to spell one (or two) word(s) [*], how would one compute the entropy of such a passphrase and estimate if the passphrase strength benefits?

[*] : this is to remove the possible drawback of reducing the languages space by knowing the target, i.e.: "I know they speak only English and Spanish, thus the passphrase can only contain those two languages"

See Kerckhoffs's principle/Shannon's Maxim. It's very difficult to accurately estimate if an attacker will know or guess the word list you use, so to get an accurate lower bound on passphrase entropy it's simply assumed that they know exactly how you created the passphrase.

If we assume they know you're creating a passphrase by choosing words randomly from a list, and they know that list, it's clear that including words from different languages doesn't really matter. What matters is the size of the list and how many words you randomly take from it. A list of 2,000 English words and 2,000 Spanish words will result in passphrases of the same strength as a list of 4,000 English words.

It could be that, in practice, this will make it more difficult for the attacker, but it is hard to say by how much. Using words from multiple languages is one of the more common ideas to "strengthen" passphrases, so it may also be that it doesn't accomplish much of anything. It's more useful to know that "it will take an attacker at least X guesses to have Y% chance of finding my passphrase" than "I think this passphrase is pretty strong".


How does the public key get authenticated during an ssh session When using SSH, my private key is stored on my computer safely and my public key is given to the other party I wish to communicate with.

I understand that the two keys are mathematically related, and so what is encrypted with the public key can be decrypted (only) with my private key.

When I started an SSH session now, communicating with a Linux server, I received a message "Authenticating with public key "imported-openssh-key" "

What exactly is happening here to authenticate it? My guess is the server simply writes a known message to me, encrypts it with my public key. I then decrypt it on my side with my private key and send the message back to the server where it compares the message.

Is this how it works or is there something more mathematically complicated behind it?

What about this description?

  The client begins by sending an ID for the key pair it would like to authenticate with to the server.
  The server check's the authorized_keys file of the account that the client is attempting to log into for the key ID.
  If a public key with matching ID is found in the file, the server generates a random number and uses the public key to encrypt the number.
  The server sends the client this encrypted message.
  If the client actually has the associated private key, it will be able to decrypt the message using that key, revealing the original number.
  The client combines the decrypted number with the shared session key that is being used to encrypt the communication, and calculates the MD5 hash of this value.
  The client then sends this MD5 hash back to the server as an answer to the encrypted number message.
  The server uses the same shared session key and the original number that it sent to the client to calculate the MD5 value on its own. It compares its own calculation to the one that the client sent back. If these two values match, it proves that the client was in possession of the private key and the client is authenticated.


DMZ Firewall settings I am involved in project where I have to install a new server for a new application to a preexisting production network.
The new server shall sit in the DMZ and two controllers will sit on the production network.
The network has one firewall with an extra module for the DMZ. The server application requires many ports to be open to communicate with the outside. But I have been told that I should also open up the ports between the dmz and the production net so that the server can communicate with the 2 controllers(bidirectional communication)
So my question is this. What is the point in having the DMZ if the same ports are open on the firewall. I could understand if there were more open on the dmz to internet side than the dmz to network side, but if they are both the same I cant see what the protection is. Can any tell me if I am wright or wrong about this?

The DMZ should generally be the only network publicly accessible; versus the private network ("Production net"?), where no ports should be 'directly' publicly accessible. Connections between the two segments are largely dependent upon your application's requirements.

The key is that the private segment is not directly accessibly, so one (or more) devices would need to be compromised to get to them.

If the private network (non-dmz) needs to connect to a DMZ server, that is assumed to be more trustworthy than an Internet host connecting (you're more trusted server is connecting, versus anyone in the world).


Should I regenerate new SSL private key yearly? Im' renewing my certificate every year. Since I have to make a CSR, should I also renew my key pair at the same time, or is it ok to get a new cert with the same key ?
Please supply any security standard backing up your answers.

As I'm now going to renew my SSL cert for my domain, and wonder which approach I should take.

Thanks.

Reasons to Regenerate

In case there was a private key compromise you didn't know about
If you are renewing your cert, why not?

Reasons to Not Regenerate

Adds little (if any) extra protection
As CA compromises become more common-place browser plugins are remembering visited site's certificate fingerprints in order to check for changes (a type of anomaly detection). Changing your key will change the fingerprint.
Unnecessary work

This was the best I could come up with. I think solely for #2 on the Not list, I wouldn't do it. You can look at these though and weigh the reasons given your specific setup.

If anyone else has any to add, let me know.


SAML and kerberos what to use where I came across SAML and kerberos, both are used to establish identity using assertions (tickets)  so is there an overlap in their use ?

Can somebody highlight their differences and point which technology is a better fit where.

thanks

update to add some context, there are some web services in an intranet environment where only a closed set of users should be allowed to access it. Is this requirement better suited for SAML or kerberos

SAML is used over the Internet. If you have a web application you would use SAML. SAML is just a standard data format for exchanging authentication data. You would typically use it for a web SSO (single sign on).

Kerberos is used in an enterprise LAN typically. Kerberos requires that the user it is authenticating is in the kerberos domain.

Not really a lot of overlap in my opinion.


New Linux virus "watchbog". What could be the cause? This question had already been brought up here, but was poorly answered with generic answers, like reinstall everything and no actual solution and cause.

So here's my story:
There is a new virus out there which creates a process called "WATCHBOG" which eats all CPU from the server. After further investigation, I found out that this virus is mining cryptocurrency.

Full story:

Server specs:
OS: Ubuntu server 16.04.5 LTS
Software: Apache2 with virtualhosts, MYSQL, PHP5.6, PHP7

When I found out that this web-server is infected, web pages still worked but awfully slow. The first thing I see is the watchbog process which eats all CPU, so I tried to kill it, but it reappears instantly, and everything is so slow that it is almost impossible to operate the server.
Next what I thought- "ok I need to terminate this process" So I thought I will put "* * * * * killall watchbog" in crontab , so I opened crontab,
and found out that its compromised as well. I removed this new entry from crontab, i deleted the watchbog file, and after a minute or two everything magically reappeared.
Crontab got compromised again to run some kind of remote script and the watchbog process was up and eating cpu again.

I tried to find anything useful on the web, and found these articles:

Here's is the most helpful one:
https://sudhakarbellamkonda.blogspot...50061219193777

After following this article the watchbog virus still reappeared so I came up with this solution:
Open a screen session as root and then run this loop: ( while true ; do killall watchbog ; done )
and leave it running in background by detaching screen session with CTRL+A+D.
I posted as well this solution in that blog.
and here is one other post, but nothing really is helpful there
https://unix.stackexchange.com/questions/487437/a-strange-process-called-watchbog-is-hogging-my-entire-cpu-and-i-cant-get-rid

So I tried fighting this virus many ways, changed passwords, reinstalled SSH, etc, with no luck. Meanwhile I created a new Ubuntu server with the latest 18.04.1 LTS. We installed all latest webserver stuff, enabled UFW, opened web and ftp ports, then migrated WWW data and SQL, changed IP back to original servers IP, and..... there it is AGAIN!

The virus came back on the new machine

I think probably this virus infects the system by using some vulnerability in web-server software, So we found out that WGET and CURL is responsible for distributing the virus around the system, now we are trying to understand how it got there.

If you have any tips, please help me to find the vulnerability.

P.S.
This is my first question, judge me softly please :)

Did a lot of digging on this. It's a pretty new script that runs some older code. Shout out to twitter, google translate, notpad, and general boredom.

Watchbog is a miner script that downloads several utilities to compromise a system in order to perform cryptanalysis. As part of the package it has several features.

It determines the architecture of the OS being used
It determines the kernel version for exploit
It downloads the appropriate tools to a location within /tmp for exploit.

Once the script is up, it looks for several commands from Pastebin such as to update, run scripts, or other. It's my assumption that the attacker is still using pastebin and there do not appear to be any updates for this yet, but the script is smart enough to look for that.

After checking for updates, the script backsup cron and completely re-writes it with SEVERAL references to the script to ensure that it is getting updated and run inspite of any user attempts. It's pretty exhausting reading through this part of the code, but it is definitely doable.

Once the CRON tab is running the way it should, the account can look at it's credentials. If needed, it leverages cve-2017-16995. More information can be found here:

https://www.exploit-db.com/exploits/45010

This allows a standard user to attain root and begin executing scripts as needed. It runs a few basic tests to make sure all the components are working (Curl, wget, python, OS calls) and then launches the full application to begin the mining.

Looking online, it appears that the file can be easily used to impact a site which allows XSS attacks. In addition to locking down the allowed sites for script building, there are a couple of other targetted areas that you may want to review for patching.

They use the mail spooler for the root account. There is an email that has a shell script embedded in it. The one that launches Watchbog.
The above comment mentioned SOLR. The source I found from China mentioned that there was a potential XSS opportunity after the use of CKeditor, a popular rich text editor for websites. Definitely something to keep in mind.

Take aways:

PATCH everything. The vulnerability used impacts the following kernels:

'4.4.0-31-generic',
'4.4.0-62-generic',
'4.4.0-81-generic',
'4.4.0-116-generic',
'4.8.0-58-generic',
'4.10.0.42-generic',
'4.13.0-21-generic',
'4.9.0-3-amd64',
'4.9.0-deepin13-amd64',
'4.8.0-52-generic',
'4.8.6-300.fc25.x86_64',
'4.11.8-300.fc26.x86_64',
'4.13.9-300.fc27.x86_64',
'4.5.2-aufs-r',
'4.4.0-89-generic',
'4.8.0-58-generic',
'4.13.0-16-generic',
'4.9.35-desktop-1.mga6',
'4.4.28-2-MANJARO',
'4.12.7-11.current',
'4.4.0-89-generic',
'4.8.0-45-generic',
'4.10.0-28-generic',
'4.10.0-19-generic',
'4.8.0-39-generic'

Don't let root get email.

Keep yourself protected from XSS.


Why can't I test XSS Vulnerability? I am using DVWA and having trouble executing a simple, reflected XSS vulnerability. Entering the suggested text does not produce a popup in either Firefox or Chrome. Are there any settings that I need to adjust to execute the reflected XSS attack? Is there something else that I'm missing?

If it's a reflected XSS vulnerability, many modern web browsers have features that prevent it from executing.  I believe if you look in your console it will display a message if it detected malicious input and prevented it from executing.

Take a look at this question for more info.

I believe it's possible to disable this feature if you start chrome from the command line and pass in the --disable-xss-auditor flag.


How to mimic an emotion? Microexpression is a brief facial expression according to emotions experienced. It is also one of the most powerful SE (social engineering) weapons. However, they are very hard to master.

Are they any exercises, techniques, training, or methods that help you learn how to genuinely mimic emotions with your facial expressions?

Any information on how to learn and improve this art is most welcome.

The single best way to begin in this area is to raise your awareness of others:

When conducting social engineering attacks, being very aware of this is part of understanding your target's reactions. Courses in social awareness, knowing your target, Neurolinguistic Programming and even sales training all build in elements of this, but it all comes down to practice and time - you can only get so far with theory.

Once you gain an awareness of what to look for, you will be able to look in a mirror to see what your face does.

And, disappointingly, you are likely to find at first that your microexpressions aren't controllable at all!

A suggested way to progress is to try and imagine basic emotions (like joy, sadness, terror etc) and seeing how they affect your expression. See what happens when you hear something sad but are thinking about something happy - that disconnect is what can happen when you are confronted by a target - your conscious mind is concentrating on not getting caught, which is different to the response of someone authorised to be there. So try and become adept at imagining and feeling the emotions of whatever character you should be.

Associated with this, being relaxed about the scenario should also reduce the magnitude of microexpressions, which makes them harder to pick up. Again, this will come with practice. I still find social engineering to be a challenge, as I'm often thinking about possible outcomes of any confrontation, rather than just going with the flow, knowing the scenario inside and out.

tl;dr - practice, be relaxed, gain familiarity with the scenario, and practice


Hijacking of my site I have my site xyz.mysite.com this is sitting on Cloudflare.  I was reviewing my Apache logs and I saw a website as a referrer I did not recognise. I went to the site and it redirected to my site xyz.mysite.com totally bypassing Cloudflare.  How can I break this link?
My .htaccess seems just not to work.
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^https://(www.)?referrer.com/ [NC]
RewriteRule .* - [F,L]
Blocks with a forbidden 403 legitimate url access and the forwarding site.  If you could correct my .htaccess I would appreciate it.
Your advice will be most welcome.

Description of the problem
You have a site xyz.mysite.com on Cloudflare (ip 1.1.1.2) which sits in front of your real server (ip 9.9.9.9). A different page, www.othersite.com is showing the contents of your site and you want to block it.
Possibilities
I see a few options on what could be happening:

www.othersite.com is resolving directly to your real ip 9.9.9.9 You get the connections directly from the clients
www.othersite.com is proxying your content by connecting directly to 9.9.9.9
www.othersite.com is proxying your content by connecting through Coudflare (1.1.1.2)

If the issue is the first one, you could simply filter based on the host header used, blocking them:
RewriteEngine on
RewriteCond expr "%{HTTP_HOST} != %{SERVER_NAME}"
RewriteRule .* - [F,L]

Or just redirect them to your real site:
RewriteEngine on
RewriteCond expr "%{HTTP_HOST} != %{SERVER_NAME}"
RewriteRule ^(.*)$ https://%{SERVER_NAME}$1 [R=permanent,L]

If the issue is the second one, you could block the IP addresses they are using, althouth they might then change how they connect to bypass it. So instead of blocking the addresses you don't want to connect, you can simply allow just those that are allowed. Since you only want those accesses from Cloudflare, you can filter that. Cloudflare publishes their IP ranges at https://www.cloudflare.com/ips/ and your problem the one stated on Only allow certain IP addresses to access site with mod_rewrite? or Redirect a range of IPs using RewriteCond.
Thus your .htaccess may end up as
RewriteEngine on
RewriteCond expr "! -R '173.245.48.0/20'"
RewriteCond expr "! -R '103.21.244.0/22'"
RewriteCond expr "! -R '103.22.200.0/22'"
RewriteCond expr "! -R '103.31.4.0/22'"
RewriteCond expr "! -R '141.101.64.0/18'"
RewriteCond expr "! -R '108.162.192.0/18'"
RewriteCond expr "! -R '190.93.240.0/20'"
RewriteCond expr "! -R '188.114.96.0/20'"
RewriteCond expr "! -R '197.234.240.0/22'"
RewriteCond expr "! -R '198.41.128.0/17'"
RewriteCond expr "! -R '162.158.0.0/15'"
RewriteCond expr "! -R '104.16.0.0/12'"
RewriteCond expr "! -R '172.64.0.0/13'"
RewriteCond expr "! -R '131.0.72.0/22'"
RewriteCond expr "! -R '2400:cb00::/32'"
RewriteCond expr "! -R '2606:4700::/32'"
RewriteCond expr "! -R '2803:f800::/32'"
RewriteCond expr "! -R '2405:b500::/32'"
RewriteCond expr "! -R '2405:8100::/32'"
RewriteCond expr "! -R '2a06:98c0::/29'"
RewriteCond expr "! -R '2c0f:f248::/32'"
RewriteRule .* - [F,L]

(ranges of Cloudflare as of November 2020)
This would work for case #1 as well.
Finally, in the third case, they could be hitting through Cloudflare. You could block them based on the CF-Connecting-IP header provided by Cloudflare, but they should really get blocked at Cloudflare level rather than at your server. I suspect you won't be on this third case.


SSL inspection detection An interesting question was recently asked about SSL inspection, and that got me wondering if it is actually possible, from the end user (or even server side), to detect if the SSL link is being monitored or not?

One method for an IDP to decode SSL traffic and decode HTTPS packets is to use a root certificate in SSL forward proxy mode.
How are these root certificates issued to companies? As I understand it, such certificate could be used to decode any SSL traffic.

EDIT: Ok for the root certs, but what about detecting SSL packet inspection, is that feasible at all?

From the outside, eavesdropper can passively access everything that is sent "in the clear" as part of the initial steps of a SSL/TLS connection. This includes the fact that SSL is used, the protocol version, the agreed-upon set of cryptographic algorithms, the server certificate, often the intended server name... Once the initial "handshake" is complete, outsiders only see encrypted data, which they cannot decrypt; note that the target URL is part of that encrypted data (the target server name may be visible in the handshake, not the rest of the URL). It must be said that while encrypted data is opaque to eavesdroppers, the length of such data is not; depending on the cipher suite, the length may be known to external spies with single byte accuracy.

Such passive-only recording of packets in transit cannot be detected from either the client or the server (by definition).

To access the contents of the SSL tunnel, inspectors must somehow hack into either the client or the server. There are products meant for deployment by administrators of big (corporate) networks, where this "hack" is embodied by an additional "root CA" inserted in the store of trusted roots of the client system. This extra root CA is controlled by the proxy, which generates on the fly a fake certificate for the server you try to reach, and basically runs a man-in-the-middle attack. This can be detected on the client side by asking your browser to display the server's certificate, and see to which root CA this certificate attaches to.

However, inserting an extra root CA in the trust store requires privileged access to the machine (i.e. as Administrator) and whoever could do that, could have just as well installed less conspicuous spying software such as key loggers and screenshot grabbers. Therefore, if SSL contents inspection is at all possible, then undetectable inspection is also possible. The extra root CA is for SSL contents inspectors who act on an official basis and do not feel the urge to hide their eavesdropping.

Conversely, if your machine is "clean" (untouched by would-be spies), then SSL (HTTPS) will protect you against external inspection of your data. This is one of the core features of SSL.


How to setup a shell account provider? I want to provide ssh/shell access to one server, is similar to what you can find here https://shells.red-pill.eu/. what should i keep in mind before giving access?

I was thinking on
* cgrups (memory limit)
* disk quotas

what else should i think of before giving access? i want to avoid abuse of the server/network before hand.

Thank you!

You will surely have to handle a whole truckload of messy things if you really want to do that. And if you are doing this alone, it's way more than you can probably handle.

Assume that every user will try his best to abuse your server, attack other servers, mine cryptocurrencies, send spam, host porn and warez, steal each other passwords. And you will have a small army of misbehaving users doing that all the time.

First, you will have to harden the server as paranoid as you can, it will have to be barely usable to be harder to be abusable. List all SUID programs you have, and determine if they all need SUID. Remove the SUID bit from any program you can live without.

Subscribe to all security lists you friend Google can give you. And follow them. You must be sure to patch any bug on the programs you have as soon as you know there's a bug, because your users will know before you and will exploit. Have a policy that allows you to reboot the server any time you want, with no forward notice, for any reason. Patch and reboot.

Properly configure SELinux or AppArmor on the server. They will help you keep your clients away from each other, and will log misbehaving programs or users. Use the logs to ban users later.

You will have to setup a beefy firewall, with both ingress and egress filtering to limit the traffic to known bad places. Dropping all Tor traffic will be good. And define traffic shaping, and bandwidth allocation and allowances by user. And ban UDP. And torrent, and DHT, and anything  loosely related to P2P.

Put a good IPS/IDS in place on the server, and on the gateway. If anyone gets root on your server, he can put a rootkit on the server and mask his activities. Having a IPS/IDS on another server will help you detect discrepancies. And secure that gateway the better you can. It will probably be the prime target for hacking.

You would like to remove compilers and a lot of interpreters from the server, so your users will have less room to misbehave. And limit the disk quota. And mount /tmp with the noexec flag. And mount /home with noexec too. And hunt down every world writable file/directory, and change the permissions. World writable directories are easy to abuse.

And log everything. Twice. On the local server, and on a remote server, a hardened and hard to access server. When someone from your server abuses another party, you may be liable to some extent. Having documented all access will help you steer the blame away to the user.

And use a log manager (like Splunk). You will not be able to read all the logs you will be generating and parsing them by hand. A log manager will help you detect faster when someone abused the server, and kick them as soon as possible.

Have a draconian TOS, EULA, Service Agreement. The most draconian your draconian lawyer is able to write. And have one lawyer write it, so it will be valid when you have to sue one user who used your server to commit fraud. And be the BSfH (Bastard Sysadmin from Hell) when dealing with them. Don't let your users break any rule twice, kick them out of the door on the first offence.

And don't even think about providing this for free. You must have some way to punish the bad users, and having them paying first and using later, and losing access if they abuse your service can turn down some bad users. Charging someone 500 USD for Abuse fee (with all supporting documentation) will help you.

And securing you server is not an activity, it's a day to day routine. Every day you will have to harden something.

And I wish you luck.


Is there any actual security benefit to restricting foreign IP addresses? I am currently outside the US trying to log in to my health care provider's website and the connection just times out. I reached out to them on Twitter and they told me that as a security measure they block connections from outside of the US and suggest I use a VPN.

So great, I can use a VPN to solve my problem. But I am curious, is there any real security advantage to this sort of IP address blocking? I am a geek (web developer), but not a security specialist so I am sure I am missing something, but it seems to me that if I can use a VPN to connect from Europe then any reasonable hacker would just do the same thing.

The concept is "reducing the threat surface". If there is an expectation that no connections will be made from a certain geographic area, then it makes sense to block that area, because, by definition, it is not legitimate. In theory. (For a health provider, it's a weird choice since customers might want to manage their health while traveling, but this is a side issue.)

For one company I worked for, there was a list of countries that listed the Top 12 worst offenders for cybercrime, and we did not have any customers in those countries. So, it made sense to block them.

Could attackers use proxies/VPNs to attack from an allowed IP? You bet.
Did they? Who knows.
Did we experience high volumes of attacks from those 12 counties anyway? Oh yes.

We saw an immediate 80% drop in traffic to our webservers when we started the geo-IP ban.


Authorization over Internet without storing user details We have a requirement where we are creating an user generation page over internet for various vendors.

This was earlier done by our operations team on intranet. For each vendor to create a unique ID that was used for various purposes.

How can we authorize users accessing the registration page hosted over internet?

Note: We don't save the vendors data in our system as they keep changing frequently.

Edit 1: One way we have been discussing is to introduce a 4 eye check. This way once the user has registered, It can be approved by two individual(both internal users- which role will have this priviledge is yet to be decided). Once they have approved that the user reistered is legitimate, we can save his details and then use it for authenticating the user.

Since, the vendors keep changing regulary, we are planning to introduce a 30 days inactivity threshold, after which the vendors ID will be disabled.

Please let me know if this is correct or if there is a better way to do it

You can use a one-way encryption method to encrypt user data (i.e. username and password) and store the encrypted form on your server side. This way, no one can retrieve the data. To authenticate the user (i.e. during log in), you encrypt the password using the same algorithm and you can make sure that they both match. You can use one of the following encryption methods: SHA-1, Salted SHA-1, SHA-2, Salted SHA-2, MD5, or crypt. I would recommend bcrypt and you can also try scrypt.

Otherwise, if you want the user to be able to restore the encrypted data, then you need to use two way encrypting methods like AES where you can save the encrypted data on the server side, and restore it at the client site using the private key.


Using OWASP Top 10 for assigning vulnerability severity in a security assessment In a research, I aim at prioritizing vulnerability patching for web applications. Since web application vulnerabilities do not have severity scores assigned like done for vulnerabilities (CVEs are assigned CVSS)  i thought of using OWASP top 10 2017 as a measurement yard-stick. More specifically, I want to employ a scale of 1-10 for vulnerabilities such that vulnerabilities with CWE(s) within A1 are  assigned 10 and A6 are assigned 5. Will this be fair/reasonable enough or are there better ways for doing something like this ?

Update: Just stumbled upon CWSS and realized it is designed for scoring web applications using CWE categorization. For example
2011 CWE/SANS Top 25 Most Dangerous Software Errors were scored using prevalence scores.

Does anyone know if something similar is available for top 10 2017 ?

I don't think that using the ranking in the T10 as priority really makes sense. The T10 is ordered based on a combination of prevalence and risk. For an individual vulnerability, prevalence is irrelevant, all that matters is risk. Even for risk, the T10 makes lots of generalizations and, by necessity, cannot determine business risk for your company. From Top 10-2017 Note About Risks:

  This rating does not take into account the actual impact on your business. Your organization will have to decide how much security risk from applications and APIs the organization is willing to accept given your culture, industry, and regulatory environment. The purpose of the OWASP Top 10 is not to do this risk analysis for you.

I don't think that anything will be as accurate as basing priorities off of the CVSS score for each vulnerability.


Can a bad guy be judged for gaining access to sensitive information? Assuming a hacker has sent somebody malware. It's a trojan (digitally signed by TeamViewer) which runs automatically when windows starts up and sends the login info to a web site using GET (sniffer proved) and runs in background so the victim could never see what's happening. So, the attacker connects to victim's PC using normal TeamViewer client and copies files containing sensitive information. Can the attacker be judged for this hack?

Some known facts:

Victim has sniffer logs
TeamViewer logs
ISP Can confirm the sniffer logs
Attacker's IP is static and it's not behind NAT and it's not using VPN - all the stuff goes directly

The bit that's going to bite you is going to be the following:

If the attacker can be pinned down, and you end up going to court, do you have all the requisite "court tested" components in place.

For instance, are your logs stored in an malleable medium?  For each transfer of those logs were they checksummed with the minimum checksum required by law?  Do you have a clear chain-of-custody for that evidence up until the point you turned it over to the authorities? And ultimately the most important part, will the authorities consider the case?

If not and the above pre-requisites are met, you might be able to prosecute them civilly if they are within the court's jurisdiction.  I am not a lawyer, and not a native of your country for what it's worth.


Understanding the signing and verification process through a CA I have been researching on this topic and I need to understand the exact signing and verification process when made through a trusted CA. From what I understand, this is how it works at a very high level:

You buy a certificate with a trusted CA
The private key of this certificate is stored securely on the server
Messages are signed using the private key of this certificate
On the client application, the CA store is loaded, and verification is made against it. Verification succeeds if your certificate is trusted by the CA, and fails otherwise.
If the private key becomes compromised, you revoke the certificate, and you buy a new one. Any clients still verifying with the revoked certificate will fail verification.

Now my question is; since every CA has its own public key, and the client is verifying against that CA, and not directly with my public key, how is the link between the CA's public key and my own public key (which is signed with that CA) made? Is this linking function done internally by the CA?

Thanks in advance.

Now my question is; since every CA has its own public key, and the
  client is verifying against that CA, and not directly with my public
  key, how is the link between the CA's public key and my own public key
  (which is signed with that CA) made? Is this linking function done
  internally by the CA?

The certificate issued by the CA that contains your public key is signed with the issuing CAs public key. When you present this certificate to the client it must validate that the CAs signature is valid and comes from a valid CA (among other things).

If the CA is an intermediate CA then in turn the cert containing it's public key is signed by a CA higher up in the chain, continuing in the same manner until a root CA is reached. When a client validates your cert, in turn it validates all the intermediate CAs up to a root CA.

Edit: As Jenny D pointed out, the issuing CA will provide the chain back to the root CA if it is an intermediate CA. You can see this chain (e.g. in Safari) when you inspect a certificate for a website (in this case for google). (Google Internet Authority G2 being the issuing CA and GeoTrust Global CA being the root CA).


Two factor authentication vs. user experience I'm wondering if there's any reason to implement a username/password with 2FA or, from the user's perspective, just settle with a username/2FA code. I'm trying to seek a healthy balance between the ease of a sign in process and not requiring a user to remember a (difficult) password.

Of course I know adding a password makes it more difficult but does it weigh out to the security something like Google Authenticater app also brings.

Any thoughts on this?

I would not recommend omitting password. TOTP (what you call 2FA) is usally only 6 digits long, which is not recommended as strong enough. Another problem may be, that someone may have access to the persons phone for a short time. That is not a problem, if they would need password as well. The TOTP code would change quickly, so they can't write it down and wait till they will obtain the password. But it would be a problem if it does not, because they could just log-in immediately.


Extreme buffer size consequences What are the consequences of allocating and then populating an extremely large buffer in C? Can a stack have a maximum size and if so what are the security mechanisms that enforce this.

What are the consequences of allocating and then populating an extremely large buffer in C?

If a process grows excessively large in virtual memory it can result in thrashing.

  Can a stack have a maximum size and if so what are the security mechanisms that enforce this.

This question has been asked and answered here: how does the linux kernel enforce stack size limits?

Related: Linux Stack Sizes

From the getrlimit and setrlimit man page:

  RLIMIT_STACK

  This is the maximum size of the process stack, in bytes.  Upon reaching this limit, a SIGSEGV signal is generated. To handle this signal, a process must employ an alternate signal stack (sigaltstack(2)).

  Since Linux 2.6.23, this limit also determines the amount of space used for the process's command-line arguments and environment variables; for details, see execve(2).

The limits such as RLIMIT_STACK are enforced by the kernel:

  DESCRIPTION

  The getrlimit() and setrlimit() system calls get and set resource
  limits respectively.  Each resource has an associated soft and hard
  limit, as defined by the rlimit structure:

       struct rlimit {
           rlim_t rlim_cur;  /* Soft limit */
           rlim_t rlim_max;  /* Hard limit (ceiling for rlim_cur) */
       };

  The soft limit is the value that the kernel enforces for the corresponding resource.  The hard limit acts as a ceiling for the
  soft limit: an unprivileged process may set only its soft limit to a
  value in the range from 0 up to the hard limit, and (irreversibly)
  lower its hard limit.  A privileged process (under Linux: one with
  the CAP_SYS_RESOURCE capability) may make arbitrary changes to either
  limit value.

  The value RLIM_INFINITY denotes no limit on a resource (both in the
  structure returned by getrlimit() and in the structure passed to
  setrlimit()).


Would siloing passwords into their own locked down schema improve security? First off, I don't know how hackers get at an entire password table and steal them.
I don't know if the owners of the website are to blame or what, but I am wondering if it involves logging into the DB or not.

Assuming that hackers steal passwords by logging into the DB with application or admin users, what about putting passwords into it's own schema with air-tight privs?

PASS.Passwords having the hashed password and UserId primary/foreign key to the User table.

The only permissions any DB user has to PASS schema would be execute procedure. Not even the DB admins would have read privs.

Authenticate by executing IsAuthenticated(@UserId, @HashedPassword) returns bit.

Create password by executing Create(@UserId, @HashedPassword) returns bit.

Update password by executing Update(@UserId, @OldHashedPassword, @NewHashedPassword) returns bit.

And that is all you get. No user having permissions to actually read even the hashed password, would hackers still be able to steal the table even if they compromised the environment?

The majority of the big password dumps are done with sql injection.  Isolating your authentication database from the rest of the program is a defense in depth strategy because you are planning on the fact that one developer may introduce a SQL Injection vulnerability.  The vast majority of SQL databases do not allow query stacking,  and should be difficult to obtain arbitrary remote code execution using SQL Injection.  Dumping the administrative password or other authentication credentials using SQL Injection (sqlmap rocks) is a very common attack pattern in the wild.

OAuth is an even better approach.  Google and Facebook are popular OAuth providers;  they not only have more users but more resources to devote to security.   A system is most secure when security threats are avoided entirely.


CRIME attack - If Javascript can be injected on the attacked machine, why not directly sending the cookie to a remove server? I read about the CRIME - How to beat the BEAST successor? question and answer, but I don't understand that: If Javascript can be injected and run on the attacked machine, why not directly sending the secret cookie as an AJAX request to a remove server hosted by the attacker?

Quote:

  Suppose that the attacker uses some JavaScript code which can send arbitrary requests to a target site (e.g. a bank) and runs on the attacked machine;

Because the JavaScript will be running from a different origin - the Same Origin Policy will prevent example.org from grabbing the cookies from bank.example.com.

Example.org does not even have to have been compromised. A Man-In-The-Middle attacker (let's call her Mallory) could have intercepted a connection from the victim (let's call him Bob) to the benign site Bob visits over plain http. e.g. http://example.org.

Mallory injects some JavaScript into the responses received from example.org which will run in Bob's browser. Because this JavaScript is received from example.org in the eyes of the browser, this JavaScript cannot access cookies on bank.example.com. Mallory cannot manipulate traffic to bank.example.com because this connection uses https, and all cookies are marked secure and/or HSTS is used.

However, using the CRIME attack, Mallory can use the JavaScript to send requests from example.org to bank.example.com and then monitor the network traffic. With enough traffic sent to bank.example.com, Bob's cookie values can be determined.


How does YouTube prevent automatic piracy? When I visit YouTube, my browser accesses the website and begins to play whatever video I select.  By its very nature, this involves YouTube sending the content of the video to my computer.  Not only this, but my computer clearly caches the audio/video information which is being sent, as demonstrated by the fact that I can move backward in a video without reloading the entire thing or the bits after it.

Based on this, how does YouTube (or any other media sharing/streaming site) possibly prevent the theft of their content?  I look in my browser cache, and I don't see a fully downloaded video, so clearly there's at least some obfuscation going on.  Does the site instruct the browser to only cache the data for a short period of time?  Does it somehow scramble the information in transit?  Obviously whatever security measures they do use aren't perfect, as evidenced by sites which facilitate actual, direct download of content.  But I'd like to understand how they can possibly attempt to prevent it in the first place.

The relevant practice you're describing is leeching and the immediate connotation is inappropriately as harsh as the term "junk bond".

Your conceptual description is accurate but YouTube's content is leechable, sites like HuLu, even CSpan go to greater lengths to protect their content by instructing your browser to cache the content in your systems RAM instead of the disk even overriding your browsers preferences. Other measures such as storing the content in an encrypted manner that requires a rapidly expiring cookie for deciphering along with layers of redirection on the server side that strives to isolate your system from directly accessing the content which is being proxied from internal media servers to the web server, then you.

YouTube employs those measures for the premium content like day pass $9 movies but the never ending competition between the content providers and the labeled pirates keeps prevents the topic from becoming stale.

Whether you can access the actual source FLV, MP4, etc files or have to rely on sniffing the content with a purpose built packet sniifer (even VLc and RealPlayer has mechanisms to record the stream as analogous as a VCR), isolating content from unapproved capture is impossible.

I love the wording of your question because it has all of the hallmarks of a SecPro with more of a traditional background in law enforcement, policy auditing and it seems like the earnest curiosity of someone on the quest to learn more and that is becoming rarer in this profession.

If you google for "leeching tools" you'll get a Chicago thick phonebook of results and just starting with FlashGot or FlashVideoDownloader as FireFox add on's will demonstrate the semi obfuscated URL's. If you hate FireFox and prefer IE, you can use the ANT Downloader, it's FF and IE compatible.

My own experiences, I've found Firefox addon's more capable for this leeching in its depth and breadth of choices, while Chrome seems to be lacking especially when trying to leech video from YouTube or any other site in the google family.


What is an Albert sensor? Recent news articles have started to talk about government networks deploying "Albert sensors" (e.g., this article).  What is an Albert sensor?  And how effective is it?

Going purely from context, it sounds like maybe an Albert sensor is a network tap for a network intrusion system, checking for known signatures of attacks (like Bro/Snort/Zeek). Maybe?  I'm speculating wildly.  Is it anything like that?  What's known about Albert sensors and how effective they are?

Any chance it's this: https://www.cisecurity.org/services/albert/ ?

It says it's a Suricata based IDS (not clear to me what they add to plain Suricata, maybe this is a subscription to threat signature updates?).


All weak Debian openssl DSA keys More weak keys?  32768 weak keys can be downloaded for analysis, but are there more?  Three times as many?

There is much information about DSA-1571-1 openssl -- predictable random number generator.  There are even several websites to download weak DSA keys, or blacklisted key fingerprint hashes.

The presentation Predictable PRNG In The Vulnerable Debian OpenSSL Package -  The What And The How says that the PRNG depended not just on the current process ID, but also on the host architecture and "internal state".  Later in the presentation, a reference is made to "(2^15 − 1) × 3 keys".  32768 (2^15) keys is the most DSA keys I have found. (See https://hdm.io/tools/debian-openssl/debian_ssh_dsa_1024_x86.tar.bz2)

Are there other weak DSA keys due to this PRNG problem?  If so, are they due to host architecture and "internal state"?  What are these other keys?  Can they be generated from the known set of 32768?

If so, are they due to host architecture ...

Yup.

From the talk: "times three, because there are three combinations between endianness and bitness".

From the Debian wiki (archived here): (text reformatted by me)

  The broken version of OpenSSL was being seeded only by process ID.

  Due to differences between endianness and sizeof(long), the output was architecture-specific:

  little-endian 32bit (e.g. i386),
  little-endian 64bit (e.g. amd64, ia64),
  big-endian 32bit (e.g. powerpc, sparc).

  PID 0 is the kernel and PID_MAX (32768) is not reached when wrapping, so there were 32767 possible random number streams per architecture.

  This is (2^15-1)*3 or 98301.

.

  Can they be generated from the known set of 32768?

Dunno. Don't think so. Debian has packages for them: (text reformatted by me)

  Scope of the blacklists

  The current official blacklists (in openssh-blacklist) cover RSA-2048 and DSA-1024 keys as generated on 32-bit little-endian, 64-bit little-endian and 32-bit big-endian systems. That's sufficient to cover users who used the default key length, but not if some of your users decided they wanted a longer keylength.

  For non-default keys, see openssh-blacklist-extra which contains RSA-1024, RSA-4096, and (an empty) DSA-2048 for all three architectures.


How does FileVault 2 work with multiple decryption keys? With FileVault 2, you can encrypt the hard-drive such that users on the computer can decrypt it with either of their passwords

How does this work?

My guess would be that it really encrypts the drive with a master key, then encrypts copies of the master key using valid user's passwords. Enter your password, and the system decrypts the master key. It then uses the master key to decrypt the data.

UPDATE

I found a cnet article which says:

  The way FileVault 2 works is that the OS sets up a recovery partition
  that is used to store the encrypted keys used to unlock the
  encryption. The recovery partition is created for all Lion
  installations and is used for maintenance of the system, but will be a
  requirement to have if you wish to enable full disk encryption on the
  boot drive.

  When the system boots, it accesses the recovery drive and loads the
  login screen to present to you. When you then supply your password it
  unlocks the boot drive and continues to load the OS and your user
  account before dropping you to your desktop. As a result of this, the
  preboot login screen may show much quicker on systems with FileVault 2
  enabled than on those that do not.

This doesn't exactly tell (and the exact details are probably not out there), but it could be as I originally said. What I described would be more secure than just storing the master key in plaintext.


Are Password Strength/Entropy test web sites safe? Are web sites that do Password Strength/Entropy tests like for example

http://rumkin.com/tools/password/passchk.php
http://www.passwordmeter.com/
https://howsecureismypassword.net/
http://www.passwordstrengthcalculator.com/

safe? Can I trust that they won't add my last password tested to a database of passwords?

Since you already came to the conclusion that it would be possible, it is safe to assume, other people might have had the same thought. It's also safe to assume, people might have had those thoughts with a different intention than you had.

So: Most likely there might be one site or more that actually do exactly what you would think they do. It's even worse than you think: A quick check of some of those sites shows that - besides their own JS - they include third party javascript e.g. for ad-placement and so on. So even if they do not log your passwords, a third party might decide to do so.

You can (if it is implemented purely in JS) read though the code and decide if it is "clean" or not. However this could change with every call you make to the site so I suggest not using them. By the way: at least http://www.passwordmeter.com/ does give you all the calculations in plain text. You can simply do it by hand or write a short script, that tests everything for you.

BTW: I just realized, that very site does not even use transport layer encryption. That's my facepalm of the day.


How can I Bypass ip block mechanism? I want to pentest a specific web application with automatic tool like Burp Suite and IBM Security AppScan. However, the website uses a prevention mechanism for attack. When I started automatic tool, it blacklisted my IP address.

In my opinion, I can change my IP address periodically but this method takes long time.

Is there any bypass mechanism for this prevention method?

Your IP is blacklisted for a reason, not just because you use Burp or Appscan. A possibility is that they have a mechanism to detect:

Too many connections to the site
An offending User-Agent
Too many malicious HTTP requests

Try to discover first how or why it classifies you as malicious and try to circumvent then the protection.

Web sites does not usually blacklist IPs. Usually legitimate users do a lot of requests to a site so blacklisting them should easily would cause DoS events.

An offending User-Agent is a possibility, but I think with a low probability. Try changing the User-Agent to something friendly.

The last possibility, in the case it is really blacklisting your IP, is that they implement a WAF. The WAF is detecting malicious packets. Try WAF bypassing techniques to avoid the WAF blacklisting you.


Detecting unknown keyloggers On a Linux system, is it at all possible to detect unknown keyloggers?  Keyloggers which are new and haven't made it to any detection software's database?

Yes, it is possible to detect unknown keyloggers and other malware, usually through computer forensics (Volatility or EnCase are well-known software for doing that).

Keylogger detection, as for viruses and other malwares, can basically be achieved through two methods (I simplify for answer's clarity) :

Signature based detection
Heuristic based detection

Obviously, an unknown keylogger will not get caught by signature-based detection products (it can be though, in case of code-reuse for ex.), and you will have to rely on heuristics or behavioral detection, which usually generate a more false-positive results.

Fortunately, the thing is that keylogger developers usually rely on well-known methods to develop their malicious code, and that allows researcher to quickly find and detect them. Such methods are for example:

Using Loadable kernel Modules
Using System Call Table hooking
Using SSDT Hooking
Direct Kernel Object Manipulation (DKOM)

But generally, if your system has been compromised at kernel level by an unknown malware, the only thing you can do is get rid of it and reinstall a clean one, as kernel level modifications can be almost impossible to detect if done properly.

You can read this ESET Paper on detecting unknown malwares, or this one from Symantec, or just Google for one of the many interesting paper/article on this topic.


Prevent bypassing of SSL Pinning in android application I am creating an android application which is able to ping the server for certain information and return them. There are a few methods by which a user can bypass the pinned SSL certificate of an android application by using tools like Frida, Objection, etc.
Is there a way to prevent the bypass of SSL certificate in android. so that, the user cannot be able to see the traffic?
(assume the user phone is rooted)

No there isn't. Your app is a guest on the system, the user is the owner of the device is the master. They get to decide what your app can or cannot do, and there isn't much you can do about it.


Full Disk Encryption within a VM, how secure is it? Just a quick query on basically how to secure a VM for a home computer for a number of uses (such as securing work related data in a good enough fashion whilst in its native environment).

I'm not looking for absolute top notch security, otherwise I wouldn't be looking at this for a home computer. So for the Work scenario, I'll be using a VPN within the VM to connect to the office network. I just want to make sure the data within the VM is properly isolated from the host OS, so getting to the data is much harder than it normally would be.

Would simply enabling Full Disk Encryption in the guest OS within the VM do the job for this? Might I need to bother with wrapping the VM images in a TrueCrypt container? Like I said, I'm not looking for super top-notch security, just for a good enough solution that doesn't expose my data needlessly.  The Host OS itself is not encrypted for now, but that might change. I fully expect that given enough time, resources and willpower, anyone can and will get to that data. I just want to make it so that there are enough barriers to discourage or prevent most attempts, or delay considerably any attempts to gain access.

The fact that there is a VM on my machine doesn't need to be disguised, since I'm not necessarily looking for plausible deniability, etc. I'm not THAT paranoid!

To protect your VM, you really have three options.  Each of them is probably equal to the other in terms of security, provided that you use them properly.

Whole-disk encryption within the VM.

Never save the VM machine state - always shut it down completely.
Do not use the host system's sleep, suspend, or hibernate functions while the VM is running.

Wrap the VM files in a TrueCrypt container.

Make sure to only open the container when you need it, and close it when you're done.
Do not use the host system's sleep, suspend, or hibernate functions while the container is open.

Whole-disk encryption of the host system.

Do not use the host system's sleep or suspend functions - always hibernate or shut down.

Each of these can be used independently or in conjunction with any or all of the others.  However, keep in mind that multiple layers of encryption may begin to significantly impact performance.

Personally, I would start with option 3.  If you don't want to go that route, or you want to add another layer of security (e.g.: have a different encryption key for your VM than you do the host, on a multi-user host system), I'd pick option 2 next.


Securing Laptop's Wireless When ones goes into a public space, like a train or plane, how does one prevent their previously joined SSIDs from being broadcast? I noticed that my phone and tablet tend to try to join these networks and it can efficiently build a list of places I've been to in the past without too much effort. The accuracy might be off, but you'd know that I've traveled to Starbucks at least once.

If there isn't a solution outside of just disabling WiFi on my mobile devices, is this just a specification of WLAN devices? Also, if solutions exist, I'm curious specific about Android, Linux and Windows devices.

It is a risk, it may even compromise the PSK of the broadcasted SSID if a rogue AP is set up for that purpose (to capture the handshake).

If any "Autoconnect to any Wireless network" toggle is available on those systems, you may be able to avoid the probe requests, but as far as I know, it's not usual to find access to that option.

Anyway, this talk about attacking clients and how to disable the probe requests of SSIDs on different devices may be interesting for you: http://www.slideshare.net/rootedcon/ral-siles-wifi-why-ios-android-and-others-fail-inexplicably-rooted-con-2013


SVG files and billion laughs attack SVG files are susceptible to billion laughs attack. Our website allows users to upload/submit markdown files and we run the .md file through marked.js before rendering it. Now images in the markdown get rendered as,

<img src="https://evilsite.com/badsvg.svg"/>

in the webpage. Browsers will prevent any <script> in badsvg.svg from executing.

Now evilsite.com can serve badsvg.svg that contains billion laughs payload. This is how different browsers handle it,

Edge/IE - Not impacted as it has a limit on entity expansion (you can see it in the logs in console)

Firefox - Also seems to have a limit on entity expansion

Chrome - No limits, it tries to expand all entities and eventually run out of memory and there's no option but to close/kill the tab

This related bug on Chrome was marked 'wont fix' - https://bugs.chromium.org/p/chromium/issues/detail?id=617891

This is client side DOS and the site basically becomes unusable for any user on Chrome. How do you suggest we prevent this type of attack? Disallowing users from referencing resources from external domains seems an extreme measure.

As a workaround you could implement something like a SVG proxy on your server which rejects SVG files which trigger the dos and link all SVG files through the proxy e.g. /svgproxy?f=https://evilsite.com/badsvg.svg. But of course there would be a performance disadvantage even if that could be limited by doing the check only for chrome users.

A not too costly way to detect a bad SVG is to try to render the SVG with a process which has a memory limit. If the rendering fails its a bad SVG. You could try ImageMagick which at least sometimes also rejects bad SVGs by itself.


Finding mechanism of unauthorized data access on OneDrive/Windows 10 An ex-girlfriend has demonstrated an ongoing ability to access files stored only on my Windows 10 x64 PCs and Microsoft OneDrive.  How can I find or trace the mechanism by which she is doing this?  Details:

Months ago, before we broke up, she had both unsupervised physical access to one of the PCs and admin access before I password protected my single user account.  (Nobody has since had physical access to the PC when I was logged in.)
I have changed the password to my Microsoft account that includes OneDrive, but she has subsequently demonstrated access to new files.  So this is not a simple matter of password compromise.
She is not exceptionally technically savvy, but she knows people who are.  Those people have never had physical access to my devices.
I have done a complete physical inspection of the device to which she once had access.  There are no evident appendages or modifications to the hardware.  (And she is not skilled enough to confidently open computer case, much less place a covert hardware backdoor.)

Given this background, I imagine the most likely vector is an "exploit in-a-box" she was provided and able to install on the PC.  However I have assumed that Windows Defender would detect those because they are well known.  Is this a bad assumption?  What else should I use to scan for known backdoors?

It is possible that she has enlisted a reasonably skilled hacker who is using known exploits to occasionally access either OneDrive or the PC's drive data.

I would prefer to sniff out the intrusion mechanism, or at least some evidence of when and whence intrusions have occurred, before blindly locking down the system.

How can I find or trace the mechanism by which she is doing this?

There's hardly a benefit in that. If you find out, what would you do next? If you think she should be penaltized for illegal activities, you should report crime and your computer should undergo a forensics analysis.

  Months ago, ...

The later you do that, the less successful it will be.

  Windows Defender would detect those because they are well known. Is this a bad assumption?

IHMO that's a bad assumption. I think I can write malicious code in C# which simply runs. I have already implemented a keylogger without any problems. Given enough permissions once, it could run as a service and upload your keystrokes, files etc.

  What else should I use to scan for known backdoors?

From the before: maybe it's not a known backdoor, just some legit looking software.

  I would prefer to sniff out the intrusion mechanism, or at least some evidence of when and whence intrusions have occurred, before blindly locking down the system.

Your computer is compromised. You should return to a secure state as soon as possible. Create an image of the system (use "dd" on some Linux Live system), remove all personal data and run it in a virtual machine if you want to play with it.

Change all your passwords to different passwords. Use KeePass to create different passwords for each service. Have the paswords generated.

Be aware that she may have access to any data and keystrokes you enter on the VM. You should not log into services for which you have changed passwords.

So, what can you look for:

check all running processes including services. Microsoft software should be digitally signed.  Process Explorer provides a convenient way for checking Authenticode signatures.
check outgoing connections. TCPView may help. Wireshark is even more powerful.
check for additional user accounts. Maybe she has created an additional admin account.
check the disk for files with a creation date around the time she had physical access. Agent Ransack and Search Everything may help.


Aren't password managers still incredibly risky? I understand the utility in having one application remember a bunch of long, randomized passwords, but all you'd need is one well-placed phishing scam or a keylogger and they get all the keys to the kingdom.

Has there been any progress in this area? I want to consider using a password manager but feel incredibly uncomfortable with putting all my eggs in one basket. I could theoretically have multiple managers and only remember 3 long passwords or so (try to diversify the risk), but I feel like that only goes so far.

It is frustrating that the best passwords seem to be exactly the ones that you cannot memorize well. Where do I draw the line?

Password managers introduce different risks, they do not eliminate all risks. It is debatable if a password manager is generally more inherently risky than dozens of memorized passwords. Does the risk of a central password outweigh the risks of having dozens of poorly implemented passwords? It might all depend on the implementation.

Password managers automate the process of creating and 'remembering' unique passwords with maximum complexity, and can automate the renewing of passwords on a regular basis. Not only that, but they can highlight the fact that you are not on the login page for the website you think you are on. All these benefits are difficult to pass up, but you need to ensure that your password manager is properly secured.

You are correct in saying that by putting all your eggs in one basket, you run the risk of wide-spread access. But there are ways to mitigate that risk. For instance, some password managers require 2-factor authentication to access passwords.

"Risky" is always in the eye of the beholder. What is acceptable to one would not be to another. Each person/organization needs to make that determination for themselves.


MySQL password rotation: Using a single user to change other user passwords I'm currently working on setting up a password rotation strategy for an AWS Aurora/MySQL based application.
My plan was to use a strategy like this...

Application usernames/passwords stored in AWS SSM encrypted parameters.
Application servers have access to retrieve only their credentials from SSM. Restricted by environment (staging, production etc.)
Lambda configured to run periodically to change passwords in MySQL and store the new values in SSM. Lambda to authenticate with the database using AWS IAM roles, rather than using a password.

The last bit is the bit I'm not sure about. This configuration would require the lambda role/user to have permission to change the passwords for all of the other application users.
Is this a reasonable way to do it, from a security perspective? Since the lambda mysql user will use an IAM role rather than a password, this should retrict it's use to only authorised roles.
The alternative would be to not have a special db user for the lambda to login, but rather to have the lambda function retreive each users credentials from SSM, and then login as each user to change it's password.
Either way the lambda is going to need to have access to each user.
Assuming I can carefully retrieve access to the "lambda_user" in MySQL, are there any other glaring issues with having a user have authority to change other users passwords?
Also, just to clarify, these are application users, not regular human type users who will be using these credentials.

This is the best-practice way to do it, for exactly the reasons you outline. By having the Lambda use a role for authentication instead of credentials, you minimize the number of secrets you keep around, which is definitely a good thing. There are only 2 things worth pointing out:

You can now use CloudFormation to automate the provisioning and deployment of a special purpose Lambda for just this. As a result you can do this with relative ease. I'm not personally a big fan of CloudFormation but I would use it here anyway.

Switching to the metadata V2 endpoints can provide some additional security from SSRF found in your infrastructure as well as other forms of break-in, although that won't be very relevant in this use-case.


Should I validate client and application token on my REST API? I am dealing with this problem. I have created a REST API with some resources. Some are app to app based and therefore I expect to get only the Authentication header with my token (client_credentials token). I am using keycloak to validate the tokens.
Now I am introducing other resources are that are client-owned, these resources receive a token but this time is a user token (password token).
Even though I know by definition this token should be validated only by the user token (since is the owner in the theory of the resource) Im afraid that Im missing the validation of the app token.
Ive seen some app that validate multiple tokens to match multiple security parameters and i am wondering what is the best approach.
The current flow is this:
Having 2 applications

Website APP
Backend APP

Then:

Client logins via keycloak on website app.
Keycloak responds with a user token
User performs actions on the website app using user's tokens given by
keycloak, frontend validates this token with keycloak
Frontend app requests its own token to keycloak, its a unique token
per app
Frontend app calls backend to get non-user specific info, its a rest
call using frontend's app token
User perform an action in the frontend that is user's specific (like
edit its own user info), frontend requests to the backend using again
only the frontend app token.

Having this flow I can notice never validate website app token, except in the scenarios when website app requests information that is not user-related, like requesting list of products, the weather of whatever the backend responds. Should then the frontend gets the user#id front he current session/user token and send it as another parameter to the backend? or should it just forward the user's token? should it request using both tokens in different headers so the backend will validate both?
What is the standard in these cases?
Is there any documentation I can find that denies the validation of multiple tokens or recommends to keep validating just one?
Current flow:

Thanks.

You should not (and cannot securely) validate the application token with a user request, if the user-request goes directly to the back-end. Think of it this way: if your app has N users, your back-end has N+1 different client identities: one for each user, and one for the webapp. Each client can access different resources, and you must never let one client see another client's token.
If the user's client (web browser) can send the webapp's token directly to the back-end, that means the user knows the webapp's access token and could simply send requests as the webapp itself. You presumably don't want to allow this.
Now, if you want to relay all requests through the webapp server and avoid exposing the back-end to the general Internet at all - which can be a good idea, for the sake of flexibility and also for reducing attack surface - then the webapp could take the user's request and forward it to the back-end, optionally attaching the webapp's own token, without the user ever gaining access to the webapp's token. However, this adds very little security compared to just forwarding the request unmodified, and doing that adds little over just allowing direct interaction between the user and the back-end (assuming you know how to lock down the back-end server properly, such that only the user-facing HTTPS endpoint is exposed).


Should I worry about NoScripts anti-XSS warning when making a 3DSecure payment? When I make an online payment using 3DSecure (Verified by Visa or Mastercard Securecode), NoScript informs me that it has stopped a potentially insecure script where site A (the bank or the credit card company) attempts to run a script with the destination at site B (the merchant) using Cross-site scripting (XSS).

NoScript tells me I can whitelist the destination site (the merchant) if I am very confident the target web page is immune to XSS vulnerabilities.  Although I'm quite confident the originating site is safe, I am less confident about the destination site.  I have added the merchant to the whitelist anyway, because I needed to book a train ticket.  As a customer, what risks am I exposed to by adding the merchant to the whitelist?  Can someone steal my credit card details?

3D Secure is a fraud-prevention system:

  3-D Secure XML-based protocol designed to be an additional security layer for online credit and debit card transactions. It was originally developed by Arcot Systems, Inc and first deployed by Visa with the intention of improving the security of Internet payments and is offered to customers under the name Verified by Visa.

And your concern:

  NoScript informs me that it has stopped a potentially insecure script

It's most likely not an actual XSS attack.

This "XSS redirect" happens because the payment page on the website in question is redirecting you to a payment gateway. It is a redirect, yes, and it could be used to attack you yes, but!

You should check for the green padlock in your URL bar on the website you're purchasing from. If there's no green padlock, do not even enter your details.
When you submit the payment, you can see where it's redirecting you, as NoScript gives you a warning. Have you verified that the URL belongs to 3DSecure?

Unless the attacker has access to your machine, and is able to modify the NoScript plugin to report the wrong URL, then you should be fine. However, if an attacker has access to your machine, there are bigger things you need to worry about.

Note that in many cases, ignoring the XSS redirect (refusing to "Unsafe Reload") still allows the payment to go through for me. I am unaware if this is the case on the website you're visiting.

Potential risks

  As a customer, what risks am I exposed to by adding the merchant to the whitelist? Can someone steal my credit card details?

It really comes down to the security of each site.

If you use https, and the certificates are properly issued, a man-in-the-middle attack is highly unlikely.

These https certificates will validate that you are on the correct website while encrypting your connection to/fro. However, your data is only as safe as both websites that handle it. If there's a vulnerability in either website, even if the certificates are valid, it might be possible for your data to be stolen.

It's definitely possible for a website to be hacked, and for data to be gathered on the inside, and then accessed later on. However, most credit card companies promise zero fraud liability. Does yours? While this won't prevent your personal information from getting out, it at least offers some mitigation in the event of a breach.

Should I worry about NoScript's anti-XSS warning here?

It depends. Does everything check out? Green padlocks in your URL bar? Generally, there is no need to worry. However, if either of the websites in question are breached, then no... you can't trust either website at that point.


Why doesn't Google publish Android firmware images with lots of drivers, which will work on lots of devices? Background

The Windows 10 update model

Windows 10 is used mainly on PCs.

Microsoft sells Windows 10 licenses. You buy a license, and then you can install Windows 10 on your PC. Then you can get security updates directly from Microsoft. Microsoft promises that they will continue to provide security updates for Windows 10 for one decade after it was first released.

Windows 10 includes so many drivers that it works on many PC models.

The Android update model

Android is used on cellphones, tablets, and other devices. Tablets have no moving parts, so they can last longer than laptops.

Google distributes Android to tablet makers. Tablet makers create tablets. They combine Android with a set of drivers to create a firmware image custom-made for a particular tablet model. They then install this firmware image onto the tablet model. Finally, they sell the tablet model to individuals and corporations.

Each Android firmware image includes enough drivers to work on the tablet model it was designed for. Experts advise that you shouldn't bother trying to install it on any other tablet model.

The problem with the Android update model

You can't get a universal Android firmware image from Google. Instead, you have to wait for your tablet manufacturer to add drivers to it, in order so that it will work on your tablet model. And your tablet manufacturer might never do so.

The problem

Numerous tablet users are running old insecure Android versions, and they're running these Android versions on devices which the tablet manufacturer has stopped supporting. Therefore, there's no easy way for the users to install patches which fix the vulnerabilities.

My question

Why doesn't Google distribute Android firmware images with lots of included drivers, which will work on lots of Android devices? Google could include the latest security fixes in these firmware images. If Google did this, maybe there would be fewer vulnerable Android devices out there.

Why doesn't Google distribute Android firmware images with lots of included drivers, ...

This means that Google would need to get access to the drivers in the first place and not only by binary but also by source. Only this way they could keep the drivers working when major changes to the software are made: new versions of Android usually use newer versions of the Linux kernel which has implications for the drivers. Getting these drivers as source code will be a big licensing problem because manufactures are not that eager to share the intellectual property which is implicitly embedded in these drivers.

And even if Google had all these drivers they would need to test any software changes against all these phones and phone sub versions because manufactures are repeatedly change the hardware included in the phones to make it cheaper or to work around patent issues. It's a maintenance nightmare which right now gets handled by the manufactures by simply ignoring models which are not the newest.   I don't think Google would like to take over this nightmare.

The best thing of course would be if manufactures would release solid hardware with open drivers and make sure that these drivers get included into Linux kernel. This way it would be much easier too release updates, both for Google and for third parties like Cyanogenmod or AOSP. This way also the supported life of the phones would be longer. Unfortunately this is not in the interest of the manufactures because they rather like to sell new phones than see their older phones used a lot.

Apart from that the x86 environment (PC, Windows) is different from ARM (mobile phones). With x86 you have interfaces which were designed so that you can replace hardware and that hardware can be autodetected. With ARM you instead have the SoC which contains everything and each new phone or even variety of the phone has its own SoC. The OS must have knowledge about the capabilities up-front, i.e. there is no general kernel for all hardware. I think this is getting better, but that's the current state as far I know. Thus in effect you cannot support a single OS with flexible drivers but instead have to support lots of OS varieties which also makes maintenance harder. And of course every manufacture makes its own special adjustments to this OS to support its hardware or to work around bugs.


What are the security issues for generating a RSA private key that is 3 bits in size? And is it possible for me to be able to perform these attacks or would I need to have very powerful hardware?

(Original question)

  What are the security issues for generating a RSA private key that is 1 bits in size?

You can't have a 1-bit key.

The key size of an RSA key denotes the size of the RSA modulus. This modulus is a product of two distinct prime numbers. So the smallest possible value would be 6 = 2 * 3 which fits into 3 bits (6 = 0b110).

It is similarly ridiculous to choose the public key exponent to be 1, because then the private key exponent must also be 1 (the only possible multiplicative inverse). This means that the ciphertext looks exactly like the plaintext. Consequently, this also violates the RSA specification.

  What are the security issues for generating a RSA private key that is 3 bits in size?

For your private key to be secure, the distinct primes that build the RSA modulus have to be much larger since RSA relies on the assumption that there is no efficient algorithm for integer factorization (the task of retrieving the primes from the modulus). For small values however, you don't need an efficient algorithm as it's trivial to obtain the prime factors by brute force. And once you got the primes p and q for modulus m, you can calculate φ(m) = (p-1)*(q-1) (Euler's totient function) and then proceed the same way as in the initial key creation process. You simply calculate the private key exponent d for the known public exponent e by solving e*d ≡ 1 (mod φ(m)). See the key generation algorithm for details.


Stronger Password-based File Encryption on OS X I am wondering if there are any better alternatives than the zip command on the OS X terminal.

My intention is to add a password to a compressed file. I have been using:

zip -j -e -pMY_SECRET test.zip example_file_pdf

I have seen mentions of using the 7zip ie:

7za a -tzip -pMY_SECRET -mem=AES256 test.zip example_file.pdf

But I don't believe this will work (or maybe I'm mistaken) on a OS X machine since there isn't a native port of it. Does anyone have any other ideas or recommendations?

Edit: I have found p7zip which is an ported version of 7zip to UNIX, OSX, etc... Is that something you guys typically recommend?

You can use hdiutil to create a compressed, encrypted disk image from a source folder like this:

hdiutil create -volname NameOfVolume \
    -srcfolder path/to/source/folder \
    -encryption AES-256 -ov -format UDZO name.dmg

For more options, see man hdiutil or poke around in the GUI for hdiutil, DiskUtility.


How anonymous is this setup? I've been fiddling around lately about my security as I'd like to stay completely anonymous on the Internet because we all deserve privacy, and I hope this setup will at least make it hard to find out who I am. Please tell me what I can improve on and change in this setup. All feedback and criticism is appreciated.

Encrypted USB → Debian 8 → VPN →
VM w/ Windows 7 → VPN →
RDP w/ Windows 7 → VPN →
TOR with obfuscated bridges or Firefox.

I plan on adding Socks 5 Proxies when I browse with Firefox. Bridges for TOR are changed on a weekly basis. Both the RDP and the VM running Windows are cleaned daily with CCleaner and logs are deleted. I have three VPN connections running, all with different locations, no logs are kept on their part. However, at times I do not have a VPN running on the RDP because it already has a different IP and I only use VPN when I need to access blocked websites from it.

I've been considering changing my VM's OS to something else as we all know Windows 7 isn't the most anonymous OS out there. I've been thinking about Tails or Qubes but I'm not sure it's possible to connect to RDP from those.

I've also been reading that using a VPN before TOR can be dangerous but I've also read that it can be beneficial. If someone can clarify this please do.

Lastly, how safe would this be to run on home wifi vs public wifi? I'm guessing it would be almost impossible on public wifi but home wifi?

My laptop is decent enough to run all this with no lag or problems, as well as my internet speed. I'm currently accessing from my home wifi and it runs well.

That's actually a pretty bad setup. You are making it over complicated to the point where what you view as defense in depth is actually extra attack surface. For example using a VPN defeats Tor's guard rotation algorithms, which are fine-tuned to reduce the chance that you hit both a malicious guard and exit at the same time.

Using bridges when you are not being blocked by censorship is also a very bad idea It reduces the amount of possible entry points you can blend in with. Bridges are so ubiquitous that chances are, you would be one of the only if not the only person to use that bridge at any given time. That makes traffic correlation attacks much eaiser when an adversary does not have to demultiplex communications from the guard (or bridge) to the middle node. Think about it this way: if you are the only one using the bridge, then is there any doubt that the traffic going from the bridge to the middle node is not yours? Now, if you are using a popular guard, much more work would have to be done to correlation which stream of traffic is yours and which is just noise from other users.

Additionally, you say you change bridges frequently. Just as with changing guards, that is a VERY BAD idea. The first node in the Tor circuit should be long lived. In fact, Tor Project rather recently changed guard parameters to make it even more long lived, because even changing every few months was too quick, and made deanonymizing sybil attacks significantly easier. Their modification of the parameters to keep a single guard for a year or more has made sybil attacks, and other types of traffic correlation attacks much harder. Search the Tor Project blog for "tor guard parameters" for more information on the mathematics behind that.

Logs are kept on your VPN. Just because the VPN service claims not to log does not mean their upstream ISP (which is in all likelyhood something like OVH) does not either. If the upstream ISP logs, which it certainly does, then the claim that your VPN does not log becomes moot.

Using CCleaner is often quite useless. Modern filesystems which are either journaling filesystems (like ext4, jfs, etc) or copy-on-write filesystems (like NTFS, which is partial CoW, btrfs, or zfs) cannot have files or even free space reliably erased. Furthermore, many VM virtual hard disk formats are CoW anyway, so even if you switched to FAT32 or something, it would still not end up being quite useless.

The unnecessary use of VMs and RDP also add to attack surface area. Furthermore, on all x86 and most ARM hardware, it is quite trivial to mount side-channel attacks from within a virtual machine. These attacks are capable of reliably detecting what phrases are being typed on the host, and can even steal keys from the memory of certain insecure cryptographic applications. The attacks that can do this reliably are named prime+probe, flush+reload, and flush+flush, named in order of stealth and efficiency. Furthermore, virtual machines still expose low level hardware to the guest, and trivial escapes are not uncommon at all.

All in all, your setup makes it easier both to deanonymize you from the outside, but also from the inside, by exposing the huge attack surface area of RDP and VMs. I would very, very strongly urge you stop this setup and instead use Tails, or even just Tor Browser on Debian.

Before you try to do anything like this again (creating your own complex setup), first formalize your threat model. Information on threat modeling online is ubiquitous. Until you do that, using Tails is almost always a safe bet for anonymity.


Bluetooth vs USB Mouse Security I had a question regarding the use of Wireless mice and security. In general which method of using a wireless mouse is considered more secure, using a mouse with a USB dongle, or using a mouse that can be used directly with a computer that has a wireless card over bluetooth? In the past, I've heard of attacks geared against major PC peripheral brands that use a USB dongle, that can be performed from across the street of the target. On the otherhand I've also heard of Bluebourne and how it can discover a device's bluetooth band and intercept packets. In most cases, which method of connectivity would be considered more secure from an every day, practical standpoint?

It's incredibly hard nowadays to intercept and attack device bluetooth. It's constantly changing channels as well as it's encrypted and, especially with a mouse, there's a low attack plain with the device. The most they could intercept from your mouse, worst case scenario, is the movements.


Does write permission over a windows service always imply privilege escalation? Context:

Doing a lab pentest on a windows VM, I got a shell as LocalService. I modified the binpath to execute a meterpreter. Then I changed the SERVICE_START_NAME to "LocalSystem" by doing:

sc config upnphost obj= "LocalSystem" password= ""

I got a reverse shell as NT AUTHORITY\SYSTEM

I understand that this works only because Localsystem has no password set. If I were to run this service as "John", I would need to type John´s pass.

So, does this mean that I can own any system just by having write access to one service (and the ability to start it)?  <=> Being LocalService implies easy SYSTEM?

I understand that this works only because Localsystem has no password
  set.

Not correct. The misconfiguration here is the missing write protection for the service object. It has nothing to do with the password.

  So, does this mean that I can own any system just by having write
  access to one service

Yes. This is a classical privilege escalation vector on Windows. Services must be write protected for non-admin users.