Is using PBKDF2 good protection against brute-force attacks on web application login pages? We've recently had a penetration test for one of our applications.
The Penetration Testing company identified that our application lacks protections against brute-force attacks on the login page.
Ref: https://owasp.org/www-community/controls/Blocking_Brute_Force_Attacks
We've been recommended to implement a captcha to disrupt brute-force attacks on the login page which I believe works well with the context and users of the application.
One of our engineers is insisting that we have enough protection against these attacks because we're using PBKDF2 as our hashing algorithm.
I understand that PBKDF2 slows down hashing computations and prevents offline cracking and in turn also slows down login brute-force attacks, but I fail to see how it removes the need for anti-automation prevention mechanisms? I don't see why we should even allow someone to try hundreds of thousands user/password combinations on the login page in the first place. It does not seem to address the identified problem.
The security company has provided a similar argument, but I'm having trouble convincing my Engineer colleague.
Question: Is using PBKDF2 good protection against brute-force attacks on web application login pages?

You are right that using PBKDF2 does not protect against brute-force attacks on web application login pages. Credentials submitted by users and attackers travel unchanged until the server, where PBKDF2 is then computed. PBKDF2 is therefore only meaningful for offline attacks which have direct access to the correct hashes.
The only scenario where PBKDF2 and brute-force attacks on web application pages would be related is if login pages responded faster than the server computes PBKDF2 hashes. In that case a parallelized brute-force attack would be slightly slowed down. However it would also require a lot of unnecessary computing power and it would prevent other users from logging in.
The same protection could be achieved more effectively and efficiently by implementing in the front-end application logic one or more among CAPTCHA, account lockout and/or password throttling. These controls should ideally be weighed based on client IP address history and reputation (e.g. a Tor exit node having already failed multiple logons should be heavily penalized).


What threats does Android pose to anonymity when internet is accessed by a laptop through USB tethering but over Tor? I use USB tethering on an Android 10 mobile to access internet on my laptop. I use Tor browser (TB) on laptop and keep my OS (a Linux distro) on laptop patched for security vulnerabilities. At times I need to consume certain content from websites which I don't want any intermediary to know about.
Can my mobile device see what data I am requesting and receiving other than that I am connected to a Tor entry node and passing data to it back and forth?
Here's what I have in mind:

I enter security.stackexchange.com in TB's URL bar in laptop
TB establishes a secure connection and sends my request to Tor network.
My telecom provider, the first potentially hostile intermediary I usually think of can see only that I am connected to Tor network. For scope reduction of this question, let us become ignorant and assume that my ISP or any intermediary further down does not have the capability to either see my original request or link it back to me.

So far, reasonably good. But, the first intermediary seems to be the Android 10 device itself. How can I be sure that my Android 10 device cannot know what data I am requesting and receiving other than that I am connected to Tor?
I am concerned because my mobile device is potentially hostile in my eyes. I do not know the capabilities of the baseband OS (which some state sponsored entities may exploit), don't know the vulnerabilities of my Android 10 device which has vanilla Android fused with proprietary code. My mobile device is also at the mercy of its OEM which may not provide security updates for it in future.

As already mentioned in a comment, your phone is an intermediary to the same extent as our phone's ISP. They see exactly the same traffic. Therefore, any technology that protects you from a hostile ISP protects you equally from a potentially hostile phone.
This is under the assumption that the only thing that the phone can see is the network traffic from the laptop. There are actually two ways the phone could be a more powerful attacker. Neither are due to the fact that the laptop's network traffic transits via the phone, only to the fact that the phone is located nearby and connected to the laptop via a cable.

If your laptop's USB stack is buggy, it might allow your phone to attack your laptop. The best remedy is to have an up-to-date operating system (and hoping your adversary doesn't have  a zero-day on the OS drivers) and secure USB firmware (which you don't really have any control over, so don't obsess about it).
A smartphone has a lot of sensors which can observe all kinds of side channels. For example, malware on the phone may be able to figure out what you're typing from the sound of the keys being hit.

This is movie-plot-level paranoia, well beyond FBI-level attackers, but possibly not beyond NSA-level attackers.
Tor protects you by routing all traffic through an encrypted channel so that any intermediary between your laptop and the Tor network (your phone, your ISP, connections between ISP, the Tor entry node's ISP, the Tor entry node) can see that you're using Tor and can see the volume and timing of data, but not the content nor the ultimate destination of the data. The usual limitations of Tor apply (traffic between the exit node and the ultimate server, a state-level actor that sometimes controls both the entry node and the exit node that you happen to use at that time and manages to correlate packets through timing, occasionally forgetting to use Tor, etc.). None of these limitations are made any worse by having a smartphone as the first network gateway out of your computer.


Does OpenSSH use export ciphers? With all of this talk of 'FREAK', no one has mentioned OpenSSH. It implements libraries from OpenSSL (until recently, anyway). Why aren't people talking about this? is there even a way to configure export ciphers in ssh_config?

OpenSSH is unaffected by FREAK for several reasons:

It only uses a small, carefully-audited portion of the OpenSSL library.  The SSL cipher-negotiation code is not one of the parts it uses.
The SSH protocol is resistant to "downgrade" attacks: the size of the server key is fixed at the time of key generation and the key fingerprint is stored by the client.  If an MITM tried to trick the server into using a weak key (which requires the server to be set up with multiple keys), the key fingerprint would change and the client would refuse to proceed.
OpenSSH does not, and to the best of my knowledge, has never supported "export-grade" encryption.  The weakest RSA key that ssh-keygen will produce is 768 bits, and the default is 2048 bits.  The symmetric ciphers are also quite strong: the weakest supported by the current version of OpenSSH is 3des, which at 112 bits of effective security is a fair bit stronger than the 40 bits permitted by the old export laws.


How to close port 445 (Apple Time Capsule smbd) My default configuration of Apple Time Capsule has port 445 (Apple Time Capsule smbd) open to the world. Online port scanners (shodan/detectify.com) show me that this. What's a bit worrying is the version showing "SMB Version: 1" and I don't need to share files with the world over SMB.

Is it ok to disable this and how would I do that ?

Can Airport Utility do this ?

Don't trust random devices to be secure.

Instead, implement a firewall between 'the internet' and your device, and make sure to block this unrequired traffic at the firewall level. Apple have discontinued the product, and according to at least one chat thread there isn't a firmware upgrade to disable this, nor will one be forth coming.

As a slight aside, this is why people often choose to implement their own solutions rather than using a off the shelf one. Once the manufacturer stops supporting it, you're left with something that'll never be more secure than at that moment. A ticking time bomb if you will.


Decrypt AES 128 CTR with the IVs (counter) but not the key I have the encrypted files, the random IV for each encrypted files and the counter increment function but I miss the key. Is there anyway for me to decrypt the files?

No, there is no way.

The encrypted data and the IV are collectively called "the ciphertext", this is what is sent over the internet when you encrypt something. The details of the counter function (and the details of how AES works in general) are also public information. The only thing that's meant to be secret is the key, which you don't have.

In short, you have the cipher text but not the key. Unless you know of some secret military-level hack against AES, then you will not be able to recover the plaintext, ... that's the entire point of AES.


How to create custom exploit https requests to test a PHP framework I am working on the auto-routing functionality of Codeigniter 4 and I'd like to test it by sending some nasty exploit-type HTTPS requests to make sure it properly resists mischief. E.g., request a uri with .. in the path to see if we might execute some arbitrary PHP file on the server. I've tried a url like https://example.com/subdir/../nested-directory but the double period segments get immediately evaluated prior to the request being sent by whatever client I use. Both Firefox and curl requests evaluated this prior to the server request being sent and in the apache log I just see request for GET /nested-directory HTTP/1.1.
I also tried telnet:
telnet example.com 443
GET /subdir/nested-directory HTTP/1.1 Host:example.com

But this yields a 400 error and this response:

Your browser sent a request that this server could not understand.
Reason: You're speaking plain HTTP to an SSL-enabled server port.
Instead use the HTTPS scheme to access this URL, please.

Can anyone suggest a tool or approach where I can formulate a list of uris to test and rip through them all, writing the resulting output to somewhere where I can inspect it?

For Linux systems, gnutls-cli is available. For example:
gnutls-cli qnap --no-ca-verification
GET index.html

gets the index.html from my Qnap-NAS via port 443. You can of course easily make invalid http requests like your example this way.
If you just want to exploit all sorts of possible URLs with valid requests, then perhaps curl is the better tool.


Why is S/MIME (instead of PGP) recommended for such an scenario? A large MNC with approximately 50,000 employees, and with offices in Asia, Europe and North America. This MNC operates its own PKI environment, with a self-signed Certificate Authority based at its head quarters in North America and Registration authorities distributed across the regions. Non- repudiation needs to be enforced in secure email exchanges.

That's because of "enforced". PGP uses a Web of Trust which is, by nature, decentralized. To enforce things, you need some hierarchical structure with a central point of decision, which X.509 provides (in this case, through the "self-signed CA at headquarters). In the PGP model, each user is the center of his own world and cannot be dictated his trust.


Would SSH MitM attacks utilize spoof IPs? I am presented with SSH log from a SSH server and the said SSH server only accepts connection from 2 known public IPs over WAN.

The content of the log shows that a user was successfully authenticated. However, that user authenticated from an unknown public IP. Here is an excerpt of the log.

Nov 23 06:32:46 SSHSrv-SFTP sshd[13717]: Accepted password for ftpuser from aaa.bbb.ccc.ddd port 5649 ssh2
Nov 23 06:32:46 SSHSrv-SFTP sshd[13717]: pam_unix(sshd:session): session opened for user ftpuser by (uid=0)
Nov 23 06:34:34 SSHSrv-SFTP sshd[13717]: pam_unix(sshd:session): session closed for user ftpuser

I have read around and found that this could be a MitM attack. However, wouldn't an attacker utilize a spoofed IP instead of its own IP?

The evidence you've got doesn't point to a MITM attack I'd say.  With a MITM attack the traffic would typically appear to come from the correct IP address, rather than another one.  Another point worth noting is that MITM'ing an SSH connection would likely cause warnings on the client as the fingerprint of the server would be different.

This looks more like a failure in Access Control.  If the access control is intended to be implemented by the SSH daemon (i.e. it is set to only log people in from specific IP addresses) then it's failing to do so by accepting a connection from another address.

If the restriction is implemented elsewhere (e.g a firewall device) then it looks like a possible misconfiguration in that service.


In CitizenFour, what was Edward Snowden mitigating with a head blanket? A scene in the documentary CitizenFour showed Snowden using a blanket to cover his head and the laptop screen. When asked by Greenwald about this, he answered affirmatively, but I couldn't really understand what Greenwald meant/said.

What was Snowden mitigating by that action?

The Background

The general situation was Snowden entering his password at that time, and he wanted to mitigate visual surveillance, let it be by observation or (hidden) cameras. It seems, Snowden didn't trust anything but his own laptop (if at all) during these first day(s) of contact with the journalists.

He also offered the blanket to the others in the room when they were entering their credentials into their laptops, but they refused, probably regarding this as being overcautious.

The Exact Scene

(Original footage from Citizenfour by Laura Poitras)

  37:35 [Snowden pulling blanket over his head/laptop]
  37:44 Greenwald: Is that about the posibility of...
  37:47 Snowden [still under blanket, interrupts] visual, yeah visual collection
  37:50 [Greenwald looking around the room, seems not rather sure what to think and say]
  37:55 Greenwald: I don't think at this point there is anything in this regard that will shock us. [laughter in room]

Some general chit-chat about never leaving devices alone any more follows.


CSRF protection with Session Id To protect against CSRF, couldn't my page javascript just dynamically insert the session id from the cookie into the body of each HTTP request right before it's sent?

The server would then just validate that (value received from cookie) == (value from request body)...

Quoted from OWASP's CSRF Prevention page:

  Double Submit Cookies

  Double submitting cookies is defined as sending the session ID cookie in two different ways for every form request. First as a traditional header value, and again as a hidden form value. When a user visits a site, the site should generate a (cryptographically strong) pseudorandom value and set it as a cookie on the user's machine. This is typically referred to as the session ID. The site should require every form submission to include this pseudorandom value as a hidden form value and also as a cookie value. When a POST request is sent to the site, the request should only be considered valid if the form value and the cookie value are the same. When an attacker submits a form on behalf of a user, he can only modify the values of the form. An attacker cannot read any data sent from the server or modify cookie values, per the same-origin policy. This means that while an attacker can send any value he wants with the form, the attacker will be unable to modify or read the value stored in the cookie. Since the cookie value and the form value must be the same, the attacker will be unable to successfully submit a form unless he is able to guess the session ID value.

  While this approach is effective in mitigating the risk of cross-site request forgery, including authenticated session identifiers in HTTP parameters may increase the overall risk of session hijacking. Architects and developers must ensure that no network appliances or custom application code or modules explicitly log or otherwise disclose HTTP POST parameters. An attacker that is able to obtain access to repositories or channels that leak HTTP POST parameters will be able to replay the tokens and perform session hijacking attacks. Note, however, that transparently logging all HTTP POST parameters is a rare occurrence across network systems and web applications as doing so will expose significant sensitive data aside from session identifiers including passwords, credit card numbers, and or social security numbers. Inclusion of the session identifier within HTML can also be leveraged by cross-site scripting attacks to bypass HTTPOnly protections. Most modern browsers prevent client-side script from accessing HTTPOnly cookies. However, this protection is lost if HTTPOnly session identifiers are placed within HTML as client-side script can easily traverse and extract the identifier from the DOM. Developers are still encouraged to implement the synchronizer token pattern as described in this article.

No real reason not to just use the built-in CSRF prevention mechanism, almost all serious frameworks have this now.


How an AP blocks Admin Page through Wi-Fi connection? Some home routers (AP) have the ability to block connections to the admin page if it's being accessed through a Wi-Fi connection. In order to login to the admin page you need to get a cable and connect to the network.

How does the web page/service (80 or 443) knows this?
How secure (easy to circumvent) is it?

Is it trough the hardware, firmware or software? Even tho it looks kind of obvious because the router serves both (Wi-Fi and web admin page) I can't get my head around it because of the OSI layers.

Firewalls can look across layers. Assume you're on a Linux system where eth0 is your LAN and wlan0 is your WLAN, and they're both bridged into br0. The following iptables rule would then do it:

iptables -I INPUT -p tcp -m multiport --dports 80,443 -i br0 -m physdev --physdev-in wlan0 -j DROP


Should a DNS server restrict reverse lookups from external hosts? What risks are there in allowing external clients to resolve internal IPs to their domain names? The server is used internally for clients, as well as for external clients needing to resolve a web server's domain. Couldn't allowing these reverse lookups allow an attacker to gather a wide array of information if the domain names contain usable information?

I've never seen a DNS server that does not allow reverse DNS lookups (PTR record lookups).  Moreover, if a DNS server didn't allow reverse lookups, I think that could cause some things to break.  For example, if one of the hosts were used as an outgoing SMTP server, and it was not possible to do a reverse DNS lookup on the IP address of that host, then this would cause mail delivery failures.  See https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/

Note that the PTR record (used for the reverse dns lookup) must be stored in the zone file for the IP address, not the zone file for the domain.


How is the QSS tag used as payload in an XSS attack? I have received a report from a client that lists XSS vulnerabilities. The report shows reflected XSS vulnerabilities. In each vulnerability, the payload reflected is a single, unclosed <qss>

Normally, when I read about xss vulnerabilities I see a lot of payloads that will try to close an apostraphe or an input tag, and then inject a <script> tag or some arbitrary javascript.

What is the significance of the <qss> tag and how can it be used in an xss attack? The only thing I've uncovered with google is that it is a qt style sheet, but I still don't understand its role in XSS

This appears to be a tag inserted by Qualys WAS (Web Application Scanning) engine.

<qss> tags are inserted as input in order to test whether these are encoded correctly as output.

This approach is safer on a live system that testing using <script> tags, which may have unintended consequences as a result of the scan becase the <qss> tags will be ignored by any browser.


How to keep client data confidential when attacked by a ransomware? Hypothetical scenario:

If a ransom-ware attack was to happen which threatened to make public "private client data" if you didn't pay up.

Assuming such a virus exists and you've already been infected, how do you protect your clients confidential data without paying?

As companies are now sidestepping ransom-ware attacks by simply using good backups to restore copies of files, I believe the next logical evolutionary step would be for ransom-ware attacks to threaten to reveal confidential client data, where backups will be useless as a defense.

Also, as far as I understand, no security measure if 100% perfect to attacks, and that you can only reduce your chances of being attacked in the first place.  Therefore, in the inevitable scenario that you do get ransom-ware, how do yo protect client data confidentially?

If you are infected with a virus, then it's too late. Whatever the virus has access to is vulnerable at that point. This is true regardless if the virus happens to be ransomware or some other type of malware. The same thing is also true if a hacker (rather than a virus) gains access to your machine.

The best defense is to take measures to prevent the infection/hack in the first place.

Also, typical ransomware encrypts your hard drive which makes it inaccessible to you, so paying the ransom does not actually protect your data. All it does is allow you to access it again. The best defense against that type of ransomware is good backups. That way if you get hit you can just restore your machine. But you should realize that your data could still have been compromised.

Update: the type of attack you describe would probably not be called "ransomware", it more likely would be done by a live hacker who found some juicy data that they are now blackmailing you with.


Can a nessus scan running on top of a Windows OS do full internal scans of devices using ssh? I am wondering if I did a Nessus scan using a Windows machine how it would log in to a Linux based device.

Windows does not have a native ssh client.  I am aware that Nessus will log into systems given credentials and scan from the inside out.  Does Nessus install a ssh client or does it simply do external scan?

I am particularly wondering about Linux variant devices such as CISCO switches.  In an ideal environment http and telnet admin are turned off to reduce the attack area.

Cisco devices use IOS, and they have the ability to accept ssh connections. Nessus is an ssh client and can perform scans externally as well as by logging in, if the credentials are supplied. It makes no difference if there is an ssh client installed on the server it is being run from.


Is it safe to allow www-data to execute privileged commands? I have noticed several questions on Stack Overflow, like this one, about executing commands with root privileges using PHP. The answer proposed to add the line

www-data ALL=(ALL) NOPASSWD: ALL

to the /etc/sudoers.d file.

Is it a safe approach to solve the problem? Does it create a vulnerability?

This... is atrocious. The whole point of running Web things as a non-root user is damage containment: in case the Web server process gets hijacked through some vulnerability, at least the attacker won't obtain full control of the machine, since he will be constrained by the limitations of the non-root account www-data. But if you give www-data a way to run every command it wishes to, with the rights of any user (including root), and without any further authentication, then you just lost that damage containment feature.

To be fair, www-data + sudo is slightly better than simply running everything as root, because the going-to-root has to be explicit; therefore, common flaws like a PHP script writing files in improper locations would be harder to exploit. But still, making www-data a member of the sudoers looks like a poor idea.


SSL session key usage when browser opens multiple sockets to same server Does a browser tab that opens multiple SSL-secured TCP sockets to the same server use the same session ID and keys for those sockets? I’ve seen pages served using HTTP open 5 or 6 sockets at the same time to concurrently load multiple resources such as javascript, css & image files, and I assume pages served with HTTPS do the same.

Browsers try to reuse the same TLS session for multiple TCP connections to the same server. But if this is possible depends on the server: if the server does not support session reuse a full handshake need to be done for each new TLS connection.

If session gets reused or not can be seen at least until TLS 1.2 in the developer tools in the browser. In the waterfall diagram of a request it gives the timing for the SSL handshake and one can compare the different timings: the first is usually longer than the rest since a full handshake  (no resume) takes more time (3 RTT) than a abbreviated handshake (resume, 2 RTT).


Protect sensitive data from sysadmin prying eyes I'm thinking about this problem. What if I have to manage sensitive data (i.e. health data), and I use a managed server?

I'd use encryption of course, but if they have root access they can see conf and source files, so they can know encryption keys.

What would you do, on a Linux environment and PHP scripts?

Could I write the interface that encrypts/decrypts and "compile" with hiphop?

Well, the hard truth is that if somebody has physical access to your hardware, they basically will find a way somehow. Using encryption is still worthwhile in that it will slow down attacks and prevent "casual" release of data, but as long as you don't control your own hardware, you're limited.

In the business world, this is covered by contracts and certifications which are backed up by audits. For example, Amazon's EC2 has a laundry list of accepted data protection standards..


OWASP CRS Anamoly scoring,, ModSecurity WAF I'm getting into OWASP CRS with ModSecurity and was investigating the way OWASP calculate the anomaly score in the REQUEST-901-INITIALIZATION.conf they set the following lines :

setvar:'tx.anomaly_score=0',\
setvar:'tx.anomaly_score_pl1=0',\
setvar:'tx.anomaly_score_pl2=0',\
setvar:'tx.anomaly_score_pl3=0',\
setvar:'tx.anomaly_score_pl4=0',\

and in the REQUEST-949-BLOCKING-EVALUATION.conf they do the following :

SecRule TX:PARANOIA_LEVEL "@ge 1" \
    "id:949060,\
    phase:2,\
    pass,\
    t:none,\
    nolog,\
    setvar:'tx.anomaly_score=+%{tx.anomaly_score_pl1}'"
enter preformatted text here
SecRule TX:PARANOIA_LEVEL "@ge 2" \
"id:949061,\
phase:2,\
pass,\
t:none,\
nolog,\
setvar:'tx.anomaly_score=+%{tx.anomaly_score_pl2}'"

Q1: Of course the paranoia level will be 1, 2, 3 or 4, so why do the "@ge 1"? which will be evaluated on every paranoia level?

Q2: When they do the setVar "setvar:'tx.anomaly_score=+%{tx.anomaly_score_pl2}" the equation will be tx.anomaly_score=tx.anomaly_score+tx.anomaly_score_pl2; is that right ? And how this logically applicable if my request is being validated by multiple rules?

Q3: I would like to have a detailed example of how the OWASP CRS calculate the anomaly score and use it to deny the requests.

I try give the answers for your question instead of comment :).
Q1: TX:PARANOIA_LEVEL "@ge 1" means about if TX:PARANOIA_LEVEL >= 1, and all four PL will match. Please read the reason above the rule.
Q2: yes, the += is same as you wrote there.
And how this logically applicable if my request is being validated by multiple rules? - the rules evaluated one-by-one, as you (or the rule maker) listed them (grouped by phases). If a rule contains a value giving action like above, then just evaluated - but the TX (or tx) means transaction, so for every request has an own TX collection.
Q3: I think the best start point would be this. It's a bit outdated, but the basics are there. A quick summary: every rule has a severity level, which could be one of the notice (with points 2), warning (3), error (4), critical (5) (these are defined in this file. Every rule activated on different PL (paranoia level), so the chosen score (variable) will incremented by the severity value.


Why ARP Poising is not working for some sites? I am using following link for arp poisoning our Wireless LAN.
http://www.irongeek.com/i.php?page=security/ettercapfilter

But the thing is, it is working only for some sites. Even some some http sites are not modified with this.

What is the reason behind this?

Does the sites any mechanisms to prevent ARP Poisoning?

The answer to your question seems to lie within the link you have referenced.

Computer programs follow specific instructions, and in this case the ettercap filter is set to:
replace("img src=", "img src=\"http://www.irongeek.com/images/jollypwn.png\" ");
replace("IMG SRC=", "img src=\"http://www.irongeek.com/images/jollypwn.png\" ");

The character string "IMG SRC =" is not the same as "IMG src=" or "img title='123' src=". If the website developer has used a set of characters different from your filter in any way, then the filter will not work.

  Keep in mind that this filter does not seem to fire off for all images, it's a little hit and miss

This may be so for the logical difference as explained above or a part of a packet congession/load release mechanism that drops some of these packets without filtering.

  Can sites mitigate ARP?

No. These sites have either adopted a different style guide for img tags or maybe they simply don't have one. Like irongeek says, ARP mitigation is most effective through static cache, IDPS, or Arpwatch on the local network.

I would suggest reading a more detailed overview of the ARP, IP and frame delivery protocols for a better understanding of the exploitation and mitigation of this attack vector.


Ethical question regarding accessible sensitive data at school Skip to the fifth paragraph for the actual question, before that is some background.

I am a highschool student with an interest in computers and penetration testing. Given the restrictions placed on student-level access on the computers at my school, I often attempt privilege escalation in order to gain more complete access to resources that I need (at times school-related, but restricted nonetheless). Although I do that type of stuff pretty often, I never really expect any major success.

A while ago I was taken aback to discover a local admin account without a password, but that did not provide access to anything I couldn't already access, with the exception of the C:\ drive and tools such as the Task Manager and Command Prompt. In other words: it was far from a big discovery for me.

More recently, I stumbled upon a Fuzzy Security post-exploitation/privilege escalation tutorial (here) which mentioned looking for sensitive data in config files left behind by automated desktop setup. I know from quite a bit of searching that the 513 computers on the schools network have been set up in this way. I was still surprised to find the network admin password in plaintext in C:\sysprep\unattend.xml.

Since finding it, I have further investigated what can be done. The things I have found range from accessing all student and teacher files (which, in some cases include exams and exam keys) to remotely connecting to the school server and the district server to add users as students, teachers, admins, and staff, and modify said users' netlogon files to cause them to run malicious programs when they log on. Much of this I have investigated but not tested for fear of being caught.

My question is whether or not I should tell the school tech staff before someone who would abuse it finds it, and if so, how to go about doing so in a way that wouldn't result in my punishment. My worry is that if I report it, evidence of my explorations of network admin capabilities will appear malicious to them. I want to do the right thing, but I would rather not get in trouble if that's what would happen as a result.

Although your intentions are good, schools and colleges are notorious for being heavy-handed with this kind of thing. They may well want to kick you out for (a) violating school policy and (b) making them look like idiots.

My advice would be to detail the problems you found in an anonymous letter, explain very clearly that you're not trying to be malicious or attack the network, and you just want them to know about the issue so that they can fix it. Explain that you're writing anonymously because your education is valuable to you, and you're worried about the number of cases where schools take things the wrong way, and you'd prefer not to become part of that statistic. Drop the letter in a mailbox, addressed to the head of school, at the school address.

Usual opsec applies here: don't tell anyone what you're doing, don't brag about it to your friends, don't include any details that might identify you (e.g. your year or any subject you study), and don't write the letter by hand (print it out!).


Is the security seal on samsung phones proof that the phone has not been tampered with? Samsung phones come with a security seal that says you should not buy the phone if it is broken. Is this proof that no one has tampered with the phone?

Is there some way to take off the seal and paste a new one. Perhaps with special tools?

Someone, could also just take the phone out, do whatever he wants with it and then using some machines create a new box and seal, right? What do you think the possibility of this happening is? I don't think this would be hard to do.

No. They exist primarily to make you comfortable with your purchase.

As Steve noted in his comment, most anti-tamper seals are actually easy to tamper with. The attacker just needs to dedicate some time to defeating that particular make/model of seal.

This is similar to standard door locks, which you probably have on your house. Any decent locksmith or a well-equipped thief can compromise a standard lock in a matter of moments. Depending on where you live, there are likely dozens (if not hundreds or thousands) of people who could walk into your house on a whim.

The seals may have a deterrent effect on casual handling, but they are completely ineffective as a security measure. There are some anti-tamper products that are truly difficult to defeat, but no one is spending that kind of cash to "protect" consumer products.

This would be disparaged as security theater if anyone seriously claimed it offered some measure of protection.


How would one recall a worm? Hypothetically, say I wrote a worm, call it W1, just for fun/to see if I could, and it had silently infected a large number of computers attached to the internet. Say it didn't do anything but just run on the victims' computers, silently, but without doing anything malicious. However, I'm sure I would have broken some law or another so I decide I want to silently and inconspicuously recall the worm so it is no longer running on anyone's computers so I don't get in trouble.

How would I go about doing so? I would assume the best thing to do would be write a second version of the worm W2 that again silently infects as many computers as possible, and if it detects my original worm tries to remove it. However, there are a number of problems with that:

First, not every computer already infected with W1 will be able to be infected with W2. They may have gone offline, or their virus detection could detect W2 but not W1.

Second, there is the matter of removing W2. Once W2 removes W1 if it finds it (or does nothing if it doesn't), we need to remove W2 or else this whole exercise was pointless. If we program W2 to remove itself before spreading, W2 will never spread. If we program W2 to spread for a bit before removing itself, the computer could become re-infected with W2 (unless we leave a trace there, like a file indicating W2 was there?).

So would this be feasible? Would you be able to remove W1 and W2 without any indication either were ever there? And would it be traceable back to the originator of the worm?

Submit W1 to various anti-virus vendors. Eventually after a few months, W1 will be removed from most computers by the anti-virus and you do not need W2.


Do certificates protect the keys, really? The book "Microsoft Azure Security Infrastructure" in a section on "transparent data encryption", says

  "One solution to the problem is to encrypt high value data in a database and protect the keys that are used to
  encrypt the data by using a certificate. This prevents anyone without
  the keys from using the data."

A certificate doesn't protect the keys (plural, as in public, private) used to encrypt the data, right?

Following on from that, the next sentence is confusing.

  "The encryption process uses a database encryption key. The database
  encryption key is: * a symmetric key secured by a certificate stored
  in either the master database or the server ..."

It's a fine point, but I find x509, certs, etc rather dense being an average programmer and all, in case my question is confusing.

They give a pretty short and confusing explanation of what to do if this is supposed to be prescriptive advice.  But it is basically correct.

If you encrypt bulk data records you are probably using a symmetric encryption algorithm like AES because it is fast.  The keys associated with that encryption could then be asymmetrically encrypted using the public key associated with a certificate.  That would meant possession of the corresponding private key is required to decrypt the symmetric encryption keys to then decrypt the data records.

So to your question, the 'certificate' doesn't really protect the public/private key pair but the symmetric key(s), and your source seems to be glossing over the distinction.  You'd still need some way to protect your private key.


Bank login in foreign country I have friends andfamily that travel/live in foreign countries and compromised unsecure wireless networks and credit card scanners have always been a problem. I was recently asked a question about logging into personal bank accounts and other secure websites from these insecure locations.

I was under the impression that if you are using your own machine and connecting to a site that utilizes HTTPS from the moment you hit (compared to some that just use it on payment or login pages) that you were safe from most "reasonable" threats associated with a compromised wireless network.  Am I wrong?

First of all, you need to disable SSLv3 on your browser, to prevent POODLE attack (SSL3 "POODLE" Vulnerability)

Then, there's no issue using HTTPS even in "not safe" areas, because TLS protect you from Man In The Middle attack, with handshake, end-to-end encryption and Certificate Chain verfication.

One common problem you could encounter, is SSL stripping: the proxy you are connected to can force you to communicate with HTTP only, giving it everything in clear text and then simulate an HTTPS connection with your targeted site. HSTS may prevent such downgrade attack, but it's not widespread actually and presents some limitations with initial requests.


mailto email headers trace IP So I'm working on a defamation case. The person we are trying to trace is using a site like kijiji. They have been telling me that they don't keep any email headers and I know that's not true. If you use a mailto form from the kijiji website, when the email is sent will the email header show the server's IP or the person who clicked send?
I've been seeing different information on different sites I've been doing my research on.

Since it did not come from that persons email client or computer it is really all up to what they log about the user sending the email from the form. I would find it hard to believe that they would not have the IP address of the user logged, since they require many pieces of information. Please keep in mind that if the person is not a complete idiot they may have used a proxy and anonymous email service to hide their identity. Does the site use a relay? (Does not allow users to directly send email to each other) If it does then it complicates things further. In a nutshell, would their info be in the header? Most likely no. But they should be able to give you the IP address of the person that sent the message. Whether or not it will be their IP address or a proxy IP is unknown until you can actually get the IP from them if they hand it over. Don't focus on the mail header. It sounds like it will be useless. Ask to see their database records that stores the IP address related to a posting.


Is there a difference between "symmetric algorithms" and "symmetric ciphers" within the context of cryptography? Is there a difference between "symmetric algorithms" and "symmetric ciphers" within the context of cryptography?  In reading some security exam prep material, the author seems inconsistent when referring to those terms.

Examples of sites using the term "symmetric algorithm":

http://computer.howstuffworks.com/encryption2.htm
https://stackoverflow.com/a/273709/344780

I thought that "ciphers" were algorithms specifically used for performing encryption or decryption (as per wikipedia).

What is the proper terminology to use when referring to (or grouping) things like DES, 3DES, Blowfish, IDEA, MARS, etc?

Can I use the terms "symmetric algorithms" and "symmetric ciphers" interchangeably?

(Sorry if this question is a bit pedantic -- beyond just studying for the exam, I want to ensure I'm communicating properly when referring to the concepts).

A cipher is in fact a type of algorithm, so that's why you see the confusing verbiage. Often a cipher is referred to as 'cipher algorithm,' and for purposes of brevity the term 'cipher' has been oft-used.  However, using simply 'algorithm,' while also succinct; is less clear and explicit.

For usage in Standard Written English, I believe 'symmetric cipher' is a more accurate term, as a 'symmetric algorithm' infers the fact it is a cipher/cryptopgrahic algorithm, but is not explicit in this reference (and, is rather, implicit) -- a 'symmetric algorithm' could theoretically also refer to algorithms not associated with cryptography.

For reference, here's the first sentence of the Wikipedia article for cipher:

  In cryptography, a cipher (or cypher) is an algorithm for performing
  encryption or decryption—a series of well-defined steps that can be
  followed as a procedure.


Safe to email images with personal information? or use encryption for images? It's common knowledge not to email credit card numbers or other personal information. How about emailing photographs that contain personal information, such as a photo of a deposit?

Regarding plain text, hackers can easily scan emails for text that matches. Is it worth encrypting photos to be sent by email, say in an encrypted zip? Or is this overkill?

Emails are not protected. If an attacker is specifically against you and has technical read access to your emails, then he will be able to open pictures and see their contents. Encoding text as pictures is good only to deter robots. This uses the known facts that although human brains are, as far as computing goes, remarkably feeble, they are outstandingly good at image recognition. That's the reason we write with, say, writing: our brains are easily trained to recognize contiguous ink blots as letters (or other glyphs), filtering out visual noise automatically.

CAPTCHA systems use the same principle. They try to defeat automatic scanners. In practice they don't work so well, in part because attackers have learned to hire cheap human labour to do the image recognition part.

An encrypted Zip is something really different. This is cryptography. It does not work on the hardness of recognizing letters within a picture; it works on the hardness of breaking an encryption algorithm if the key is not known. An encrypted Zip will deter attackers, and prevent even targeted, human-controlled eavesdropping; but it will do so only if the decryption key (the archive "password") can be conveyed to the intended recipient without showing it to the attacker. Do NOT write the Zip password in the email itself (don't laugh, I have seen it done -- you may cry, though; that's what I did). A Zip archive protected with a password that you give to the recipient over a phone call ought to be effective against most attackers (if the bad guy taps on your emails and on your phone, then you probably have bigger worries).


Encrypting content using same secret key as hash? OK - I'm trying to design a system that can provide personalised/differentiated content at minimal expense to the server.

One of the designs I'm currently exploring is where the request is somehow signed using a key/value pair where the value is secret, e.g.:

Original URL: /posts/foo?format=json

Secret pair (known to server and client):
    ABCDE: 12345

Hash: HMAC('/posts/foo?format=json', '12345')

Actual URL: /posts/foo?format=json&ABCDE=<hash>

(A safer method would be to include in an HTTP header, but let's ignore that for now).

Obviously, a non-safe action would have to have a nonce (to avoid replay) - but I was hoping to not demand a nonce for GET requests, and instead just return the content symmetrically encrypted using `12345' (the secret value) as the key.

This means that the hash for a particular URL could be precomputed by the server, and it could just return the (cached) encrypted content.  If the content included a message-digest (again using 12345) then this could be tamper-proof over insecure connections.

Are there negative security implications to verifying using a hash like this, or using this symmetric key as the secret?

(Edited: replaced "sha1" with some HMAC)

As I read it, your question boils down to: is it safe to use the same key for both symmetric encryption of some data, and a MAC on some other data ?

It is possible to build a (somewhat contrived) example where such usage is not safe. For instance, the symmetric encryption could be a custom stream cipher where the stream consists in HMAC values computed over successive value of a counter; in that case, the MAC using the same key could interact with encryption and leak information. However, with "normal" encryption algorithms and HMAC, risks are low. The same could not be said if the MAC was CBC-MAC: using the same key for encryption in CBC mode, and for CBC-MAC, is a deadly sin.

In general, it is best if each individual key serves a unique purpose. The generic method, here, is to have a "master key" K, and derive from that key, using a one-way Key Derivation Function, a key for encryption and another key for the MAC. In practice, this can be as simple as hashing K with SHA-256, and splitting the 256-bit output into two 128-bit halves; the first half is to be used for the encryption, the second half for the MAC. This is secure based on some partial one-wayness assumptions over SHA-256, assumptions which are quite reasonable.

SSL itself uses its own KDF, which is called, in the SSL specification, the "PRF".

If the secret key is somewhat weak, i.e. is derived from a password, then attackers observing the exchange may use what they saw to run an offline dictionary attack, i.e. try potential passwords; this is "offline" in the sense that attackers do that on their own machines and don't have to talk to the honest server for each try. Offline dictionary attacks are a problem. Running the protocol within SSL is a good way to thwart such eavesdroppers.

If there is no SSL, the same attackers could turn active and modify the encrypted data returned by the server. Thus, the encryption system should also include its own MAC. Combining MAC and encryption is known to be tricky, so modes which do the job properly (like GCM) are highly advisable.

More deviously, attackers could also make fake errors. If you send your GET over plain HTTP, an active attacker could intercept it and return a fake 404 response: since there is no encrypted data in a 404 (indeed, the point of the 404 is to state that there is no data at all), the client has nothing to verify, and cannot reject the 404 message as fake. Depending on what you use your protocol for, this may induce security issues. To protect against active attackers, all responses from the server should be authenticated, including negative responses (404). But, at that point, you are on the verge of reinventing SSL...

On a similar vein, an active attacker could return an old response from the server. Suppose that at some time, data block D1 was stored on the server, and could be obtained with a GET. Later on, the data block is updated with D2. However, the key has not changed, and the GET request from the client is still the same. An active attacker could substitute the D2 from the server by a copy of D1, as previously intercepted.

This can be avoided by using a nonce -- a client nonce, sent by the client; the server then must dynamically compute a MAC on what it returns, and the MAC input must include the client nonce. At that point:

the protocol is no longer as lightweight as could be hoped for;
this really looks like a homemade SSL.

Summary: it is not easy to outperform SSL. SSL is relatively complex, but that complexity is (mostly) intrinsic to the hardness of the problem at hand. A communication protocol which resists to impersonations, alterations and replay attacks, will have to include a number of finely tuned cryptographic elements, and will not be substantially simpler or cheaper to operate than SSL.

If you can arrange for your client and server to share a common high-entropy secret key, then TLS PSK cipher suites will give you good performance and about as little complexity as is possible (no certificate, no asymmetric crypto).


VPN only for a specific software In our company we have a software which requires a VPN to be connected in order to properly work. However that is not the only software we use here. The problem is that other software get way slower when the VPN is up. Apart from that, we don't want all our data traffic to pass through this connection.

Is there a way to isolate the VPN connection specific for a single software?

Is there a way to isolate the VPN connection specific for a single software?

I would isolate the VPN for a specific route.
This can be achieved with the system routing configuration.

This specific routing options for a VPN are called in general Split tunneling.

Is the software contacting always the same endpoint at the other side? Then it's pretty easy, since you only have to add a single IP (subnet) to route through the VPN.


Verifying resident program "integrity" before every run I am aware that operating systems verify authenticity & integrity of a program file while installing a program to a system.

My question is, do popular OS's provide a way to verify (and warn the user if modified/tampered with by malware on the system) the integrity of a program that resides on a disk, every time a user executes it? My program contents would be signed and would carry a certificate from a valid CA.

I'm also aware that malware could just replace the entire program, and remove any code that asks the OS to run a integrity check. But i am interested in only detecting attacks such as a DLL proxying attack, where the whole program is not replaced/modified.

Linux supports IMA, the Integrity Measurement Architecture. This is a feature which stores a cryptographic hash of every file in extended attributes on the filesystem. When a page from a file is loaded, the entire file is read, hashed, and the hash is verified. The hash is part of a hash tree, verifying the hashes all the way down to a single trusted root hash. This root hash can be signed or protected in the system's TPM. Attempts to load a file that has been changed will return -EIO.

Because the entire file must necessarily be read in order to calculate its hash, a performance optimization called demand paging, which loads only the requested pages into memory rather than the entire file, will no longer function. This can increase the start up time for large executables or executables that link against number of large libraries, especially on slow disks.


Do not trust all intermediate certificates I have a trust store containing SSL certificate chain up to Root CA certificate:

Root CA -> Intermediate CA - SSL certificate

According what I saw as a best practice, only Root CA certificate should be added into trust store because SSL server should be sending SSL certificate together with its Intermediate CA certificate, and therefore we can verify the whole chain.

But what about the situation where I would like to trust only one particular Intermediate CA which issued SSL certificate and not other?

Managing party of Root CA can issue another Intermediate CA2 which would be then also trusted by my application. How to avoid such situation?

Including Intermediate CA certificate into trust store does not solve that, because Intermediate CA2 certificate would be still trusted.

Your trust store should contain the certificates you trust. If you trust only a single intermediate CA, and not its root, you should include the intermediate CA's certificate and not the root's.

Once a chain of trust can be built to a certificate in your trust store, it doesn't matter if that certificate was issued by another CA or not.


Wireless card simultaneously in monitor mode and managed mode I am looking to create a small first project to further my self education into infosec. I will be putting this on my Github.

My idea is to create a script that automates the process of deauthing all users on my wireless network except myself ( the machine running the script ).

I understand that:

all deauthed users would most likely immediately reconnect if the password is saved in their system
during the process of the deauth my wireless card would be in monitor mode

So, the solution to this could possibly be to simultaneously have my wireless card in monitor mode and managed mode. This way I could continuously deauthenticate all MACs ( except the machine running the script ) and "browse the web" at the same time.

Is this possible?

Or possible to add another wireless card via usb dongle and approach that way?

You can use one card in monitor mode to deauth clients and capture traffic at the same time but the card itself can only be runned in one mode because the mode is kind of a binary option.

What you can do is using the internal card of your laptop in managed mode to connect to a network and the attached wifi card in monitor mode to capture and deauth clients. That would be possible.


How to integrate AAA and otp We have AAA services enabled in our organization (about 1000 clients). We want also to add otp (one time password) service. What are the main security concerns about integrating them. Is there any available solution (preferably based on Windows Operating System) available.

The OTP should integrate with your RADIUS server. I guess you are using NPS?
The SafeNet Authentication Manager integrates with NPS and you can use different kind of OTP tokens (preseeded and seedable tokens).

You can seed the eTokenNG OTP, i.e. you write the secrets on the tokens yourself.


ssh into a server with knowledge of ca bundle Let's say I had a ca bundle with many certificates in it on my server. I accidentally gave this to a team of programmers I have hired. Could they theoretically use this to somehow ssh into my server or mysql db?

Did you give them any private keys?
If so, maybe, depending on how your service is set up. You need to immediately revoke the certificates for those keys, and replace the private keys (and certs) with new ones on all your servers.
If not... no. Public keys are, after all, public. Certificates only contain public keys (and some non-key data) and are also public.


Recent ESLint hack or how can we protect ourselves from installing malicious npm packages? Recently, eslint-scope and eslint-config-eslint packages were hacked in an interesting way - one of the maintainer's account was compromised by an attacker and a new "patch" version with the malicious code was published to the npm registry.

This malicious code was executed as a "post install" script and attempted to evaluate a certain JS code from a pastebin site and to steal npm authentication token from a local npmrc file sending it to the histats and statcounter endpoints inside the Referer header. More attack details can be found here. Interestingly, that this problem was discovered because of the syntax error appearing in the malicious code implementation.

Taking into account that it took a few hours for the ESLint team to address the issue, a lot of npm authentication tokens were stolen which means that other packages may get contaminated in the same manner in the future.

How could we, as npm users, protect ourselves from future similar hacks when installing dependencies from the npm registry?

Three words: Supply Chain Management. Except that in our case the "supply" is dependency or "third party libraries".

This isn't a unique problem to npm. This a general problem in software development. It's the equivalent of googling for a manufacturer of "screws" then use the first manufacturer of "screws" you see, don't ask about the specs of the "screws", then use these "screws" and hope they'll do the job right and don't break, erode/rust too fast and can handle the strain... without ever having checked whether those screws have been tested, have proper quality control.
We can do this because usually no people die if your software is buggy or vulnerable. If a structure collapse because the screw were buggy... that's a different story. There's accountability there. There's no such accountability in software... except when you're working in a few industries where lives are actually at stake when software bugs happen or when huge and expensive machinery breaks (and/or then endangeres lives) if your control software is buggy. And I mean that dead serious. You can't just use a third party library without some rigirous checking on an embedded device controlling dangerous machines if you must be able to uphold realtime communication to control some process in real time and everything goes boom if the third party library you use produces a CPU fault because it's buggy... because then your machine is going to get damaged for real.

The problem with software development is that we "google" for "some library" providing "some functionality" and then we just "npm install", "go get", "pip install" it and we're happy. There's no verification process in there. How do you know the package provides what it claims? Do you know how well tested it is? Do you know if it's still actively maintained? Do you know what the API stability guarantees are? You can "go get" some package and the package is completely broken a week later because even "officially" looking go code might not have any API stability guarantees.

What version constraints do you use? foo >= 1.5. What if foo >= 1.6 introduces a backdoor? Somebody compiling your code with the newest versions will have this backdoor in it. What if you use foo == 1.5 but there are different mirrors and the mirror your colleague uses to build your software containes a malicious version of the package? And don't forget: If you install/use a package/library? You not only need to verify that package/library... you need to verify the whole dependency tree.

What we'd need is a certification process. Once a company/developer thinks their package is ready they publish it and then independent code review and security companies review the package and once there's a reasonable degree of confidence that this package is "secure" to use they'll sign it. Then you're only allowed to use dependencies that are signed and you use hashes in addition to versions such as foo == ("1.5", "abc734defef373f..").

How do you apply this to npm?

Don't install npm packages without review. Who's the author? What's the general code quality? When was it last updated? What were the last few commits? What does it's install do? Does it have proper tests? What's the code/test coverage? How many people are using it? Who's using it?

Software development is focused on providing updates, new things, updates, new things. Proper testing and proper "third party code management" costs A LOT and most usually neither the companies nor the consumers are willing to pay that price. Afterall, it's always "risk vs cost". If the cost of a security vulnerability is some users having stolen their credentials... nobody cares. They can't sue you.. at worst it costs you a bit in "public image". If the worst is a buggy software that doesn't work for some users... you can afford a few pissed of users who were using the free version anyway...
This would probably change if there were such a thing like "warranty" for software and accountability for software bugs (which kinda exists for when you pay someone to write something for you) but since a lot of software is open source which comes with exactly zero warranty/guarantees (that's actually one major drawback of this) or it's software that you're using for free this is just not going to happen for that kind of software.

This problem also exists for using third party javascript on your website. Same thing. The problems are almost completely the same regardless of what language, frameworks, technology you use: If you want to be secure... you need to verify third party code.

One other thing:

There are packages/libraries that provide only little utility... things you could've written yourself in 3h... maybe a day. This isn't a problem if you don't care about more dependencies (and more dependencies complicates your dependency management) but if you do... it's sometimes actually less effort to just not use such simple libraries and write the functionality yourself so that you have full control over it and can properly test it. Rule of thumb is that if it takes you longer to verify someone elses's code than it takes you to write it yourself... then write it yourself. This also applies if you only need one or two functions from a whole framework. It's much easier to properly check your two versions of some function rather than including and verifying a whole framework because frameworks themselves have dependencies and you'll have to verify them as well.

Other than that: ... you could block traffic to non-whitelisted websites during the installation process which means that this exacty specific attack wouldn't work but that doesn't work against malicious install scripts that just delete random files or insert backdoors into existing files or whatever. You'll have to carefully read through the installation scripts.


Should I ask a user to re-authenticate if the browser thumbprint changes?  Is a server side library available? Is there a security benefit to using the browser's thumbprint in addition to a session identifier to identify a unique session?
Would it then be advisable to ask the user to reauthenticate (or simply refresh the session token) if the thumbprint changes?
Edit 1

Is anyone aware of server side implementations (DLLs) that I can incorporate into my own project?

Ideally I'd like a C# ASP.NET MVC compatible version, but I'll keep it open ended so other platforms may benefit as well.
Edit 2
A lot of these answers describe issues with a particular aspect of the thumbprint (screen resolution, etc).  These "unsafe" values can be omitted from the session thumbprint, or perhaps they are a non issue, depending how the session expiration / renewal works.
There may also be values not present in the panopticlick website, that may be beneficial to tie to the session as well.

Many things on which the thumbprint is defined may change quite often. For instance, the list of supported fonts. Also, some browsers implement transparent updates; Chrome is notorious for that: some updates can be even applied without requiring the user to restart his Web browser. Any such update can change the thumbprint.

As a user of a "secure" site (i.e. a site where there is an obvious need for security, such as online banking), any such apparently spurious "security reset" would make me nervous and jumpy. I do not think making your user nervous is a good thing; also, this would train them to reenter their credentials at random moments, which is bound to make them careless and vulnerable to phishing.

Therefore I advise not to deactivate a session because of a thumbprint change. Anyway, if an attacker can steal a session, he can probably mimic the thumbprint as well, so the envisioned security feature would catch only non-attackers, which is of questionable overall efficiency.


I can see login credentials on Facebook while using Maxthon browser So i've noticed something that really bothered me and i was kinda freaked out about how it's even possible. But i didn't want to come here just like "Hey, how is this possible?" so i wanted to make proprer research and i eventually found the answer(almost-that's why i am here). I am also here, because i am deffinitely not the only one, who is wondering how is this possible, so i want to point this problem out a bit.

So i was at my friend's and i wanted to just quickly demonstrate him MitM attack via android app ZAnti. It is really powerful app and i wanted to show him, what an attacker could see when doing (ARP) MItM. So i was showing him many interesting things and i said to him, that if the page is using HTTPS, i can see nothing, but it's still pretty dangerous. Well, he wanted to see so he logged onto his facebook and his password popped up on my phone...
And it was at this moment i knew, something isn't right here.

He absolutely freaked out but it blew my mind. At this moment, we started to make theories about how those Chinese devs of Maxthon hacked NSA/FBI, stole their private SSL/TLS keys of facebook and now they are using them and silently stealing peoples' facebook accounts. Well, this is obviously not true.

Anyway, first thing that came to my mind was this site and how i need to post question about this asap. But i wanted to give you enough data to work with so we could collectively figure something out. So i will start posting the """research""" as it is deffinitely worth checking out.

First i needed to replicate the attack. I fired up my Opera browser and tried the same thing. Nothing. Absolutely nothing. I didn't even see that i connected to facebook(because ZAnti filters https requests as they are useless). So i tried hrej.cz(it's just local webpage that i know is http and i use it when i want to make sure my MitM is working) and it was there. So it's working.

So it was really because of Maxthon so i went to download it and try it again. And i saw. It was there.
The app uses SSLstrip by default so i thought that it might be because of that, but facebook uses HSTS so it wouldn't make any sense. But as i checked the URL bar my security brain part died for a second. I was browsing facebook via HTTP.

I am sorry for my localization. It's all in Czech but i will try to translate the most important

The green bar says that the site is "certified by CEAIA".

But facebook uses HSTS! Well, as it turned out, facebook really does, but Maxthon doesn't support it. And this is where i answered my question but it raised another one. Why facebook still process http requests ? I mean, facebook could just block it and not even allow it. Where is the catch ?

By the way, Maxthon was among other browsers recommended for Win10 when my friend installed it for the first time. Kinda scary that it's so insecure.

It's pretty simple. As you say, and Maxthon does not yet support HSTS. So for this reason Maxthon will be susceptible to MITM attacks unless you specifically use the https:// prefix for www.facebook.com.

  The green bar says that the site is "certified by CEAIA".

I find it misleading that they would show the site as certified when the connection is insecure. Perhaps I mis-understand the meaning of this message from Maxthon?

  Why facebook still process HTTP requests?

Probably this is not true. (except that they would provide HTTP 301 redirects to the secure site in addition to an HSTS header)

The more likely case is that SSLStrip is communicating with Facebook over HTTPS. Only Maxthon thinks it is HTTP because of SSLStrip.

  By the way, Maxthon was among other browsers recommended for Win10 when my friend installed it for the first time. Kinda scary that it's so insecure.

It's insecure if someone is tampering with your connection and you forget to use the https bookmark.


EMV Security? How is it possible that it's secure? I recently read some articles on EMV and the various ways in which it has been improved over the years.  I then read this which shows that it has been possible for some time to exploit EMV via a man in the middle attack.  In reading up on how that attack worked (and watching the YouTube video), I heard that it's not possible to copy an EMV chip.

Now I'm not an engineer by any stretch of the imagination, but I really don't understand how someone can be so sure that it's not possible to copy a chip?  I mean it's a chip, it's there on my card for all of the world to see...   I'm not debating the merits of doing this at all, my interest was peaked at the fact that people claim that a little bit of metal cannot be copied...

If you answer this by saying, it can/can't be copied please provide some references, as I'm looking to further my understanding of how this 'miracle' of modern day security really works! :)

Also, I have Googled my ass off trying to find more information, I even read the EMV 4.2 specification, but there is nothing which explains WHY it is truly secure.

I've tried to tag this question as best as possible, but I don't know enough about the topic to find all of the right tags... Anyway, please provide me with any insight you might have :-)

EMV is a communication protocol, and by implication it specifies what data must be stored on the credit/debt card. It doesn't specify what technical measures protect the card as a physical device. EMV is irrelevant to your question.

To understand why a chip isn't so easy to duplicate, read about the physical security of smart cards. There isn't much public literature on the subject, both because it's somewhat of a specialty topic and because some of the techniques are unpublished.

There is a good treatment of smart card security in Security Engineering by Ross Anderson, §14.16.2 in the chapter on physical tamper resistance (§16.6.3 in the second edition).

Cloning a circuit is not easy in the first place: you need some moderately expensive laboratory equipment. Smart cards are designed so that you can't extract their data from just connecting to their designated input/output ports: you have to reach inside the package. Tamper-resistance techniques, which you'll find at least in the more expensive smartcards (the ones used for credit cards tend to be more secure than more basic uses such as building access badges):

Random glue logic: randomizing the physical layout and adding extra circuits that don't contribute to the logic, to make reverse engineering the circuits harder.
Packaging made of chemical susbtances that cannot easily be peeled off, the idea being that stripping off the packaging is likely to damage the chip as well.
Self-tests in software that disable the card if something unexpected happens, which makes active attacks (that perturb the execution) harder to pull off.

The equipment cost for a bench to run active physical attacks on a smartcard ranges from $10K for a basic probing station (capable of probing the less resistant models) to “a year's delay, a budget of over a million dollar, and no certainty of success” (cost estimates by Ross Anderson).

Physical tamper resistance is usually not the weakest link in the chain. A lot of attacks are of one of two kinds:

Combined logical and physical attacks: observe the behavior of the chip in certain conditions. For example, measure the timing, the power consumption (including DPA) and the electromagnetic radiation emitted by the card. These are side channel attacks, often combined with execution perturbation (observe the chip while under unusual conditions such as extreme temperature, or bounce a laser to cause abnormal execution).
Countermeasures involve a combination of hardware and software. For example, cryptographic primitives are implemented in such a way that the power consumption profile of a cryptographic primitive does not depend on the key. The code contains self-check that abort the execution or return safe wrong results (denying the transaction) or even mute the card if the hardware is not behaving as it should.
Attacks on protocols, not on the card itself. The attacks on EMV published by Anderson and others are of this kind.


Is using a VPN like changing your ISP? I am asking this question from a security perspective (not privacy)

I have read that using a vpn can prevent hackers including your isp (who could be working for the government) from doing mitm attacks. Is this correct? That using a vpn has security benefits? It can provide security against the isp and government?

But then that means the mitm attacks can be performed by the vpn.

So is it a matter of who you trust? Your isp or the vpn? And if you don't trust your isp then you can be safe from the isp by using a vpn?

You've got the main idea correctly: if you fear that your ISP would sniff or manipulate your traffic then a proper VPN will protect you against this. But then you have to trust the VPN provider instead. Only that you often have more choice in choosing a VPN provider than an ISP and that VPN providers might actually want to excel in terms of privacy while your ISP might have different interests.

But note that a VPN might protect you less than you think, i.e. watch out for IPv6 leaks or DNS leaks caused by improper VPN implementations or configurations.

  I have read that using a vpn can prevent hackers ...

The VPN provider can only protect your connection between the VPN entry (usually your system or your local router) and the VPN exit. The VPN exit is usually not the endpoint of your connection, i.e. there are still MITM attacks possible between the VPN exit and the site you visit. And a VPN will also not protect you against a malicious or otherwise insecure web site. But you've bypassed at least your ISP and if the VPN exit is outside the reach of your government you increased your chance to bypass your government too (as long as the trust in the VPN is actually justified).


Retina tells me I do not have permission to scan a range. I have full permissions. Why? I am using Retina via BeyondInsight 5.2.0.410 to scan my network.

Occasionally, I get the error message "You do not have the required permissions to scan the entered range" which doesn't make sense because within BeyondInsight my account has every permission.

Any pointers on where to look?

Reading the fine manual, I found this tidbit about permissions:

  Manual Range Entry
  Allows the user to manually enter ranges for Scans
  and Deployments rather than being restricted to Smart Groups. The
  specified ranges must be within the selected Smart Group.

[Emphasis mine]

On a hunch, I tried this:

Go back to the Assets tab
Choose "All Assets"
Try running my scan again, manually specifying a range like I did the first time.

And it worked!

The problem is that retina still confines your scan to the Smart Group you chose in the Assets tab even when you choose to scan a single IP address or IP Range.

In summary:

To avoid a permissions problem when manually entering an IP or IP range to scan, first choose the All Assets Smart Group.


Fomat String vulnerability used to display data outside the function stack frame? if we run the following code using the input "hi", the output will simply be "hi"

main(int argc, char **argv)
{
          char *secret = "This is a secret 1\n";
          char *secret2 = "This is secret 2\n";

          printf(argv[1]);
}

however, if we run the program with the input "%s" the output will be "This is a secret 1"

from what I understand, the reason for this is that when printf is fed with the %s format string, it  does not check to see if a string data has been pushed on the stack therefore if there is no string supplied, it will fetch the next data stored on the stack which in this case is our secret string. So for each %s it will fetch the next data on its stack frame and display it in string format.

My question is, keeping in mind that (main) and (printf) each have their own stack frame, how can %s cause printf to display data that does not belong in its stack frame ??(both secret string are in main)

however, if we run the program with the input "%s" the output will be "This is a secret 1

No, this is not guaranteed. It may print out the string contained in the secret variable but that is merely a coincidence. You are right that main and printf each has their own stack frames. printf will print out whatever memory address the stack happens to be pointing at at the moment. The nice thing about format string vulnerabilities like this though is that you can essentially read arbitrary amounts of data just by passing in various format strings.

I find this paper to be a nice introduction to the vulnerability.


How does neighbor know when WiFi/Internet is used? A neighbor, somehow, knows, when I connect to the Internet - and begins shooting something at my home (ice pellets).  Is there a way to prevent people from seeing my SSID/internet connection?  We are on cable Internet;  I heard that was akin to a party line.

Since you are talking about SSID, I assume you connect over a WiFi Network to your cable modem.

WiFi is open in the sense that anyone can listen to the packets anyone exchanges with the WiFi access point, even when the connection is encrypted.

It only requires a WiFi network card/USB Stick etc. working in promiscuous mode, and you can see all packets in the air, of any network. With this, it's possible not only to see whether a device connects to any network, but which device, for how long, and how much data it exchanges.

This has been done for various purposes, one is to keep track of employee's work hours.

Here's more information about the topic, but a quick google will reveal much more: https://www.howtogeek.com/196998/your-devices-broadcast-unique-numbers-and-theyre-being-used-to-track-you/


Good way of storing lots of third-party passwords I've consulted this question, but I'd like to hear some more input.

I'm building a scraping app that is going to act as an aggregator of sorts for a large number of businesses which use a few popular (in that industry) tracking/staffing/inventory management systems. In order to access those and scrape the info, we need their usernames and passwords so they will get accessed a lot.

What I've surmised from my research is that the optimal route would be to set up a separate node on AWS whose sole purpose is to house the passwords, and make it accessible only internally and only to the node that will be doing the work.

I will be providing an API: ask for a scrape and ye shall receive the results later (results not actually being sensitive).

Now, is there a way to add a password on top of all that, or is that more or less enough? This will not be an application that's known far and wide, but I'm concerned as losing the auth info would be a catastrophe for these businesses.

There are off the shelf secure solutions for this.

You could store the passwords in a password manager like Hashicorp Vault or Thycotic Secret Server and use their APIs to retrieve and use them as needed for scraping.

Rolling your own is also an option. Adapting the example from this blog about using Amazon KMS with DynamoDB is one straight-forward option for doing that if you are using AWS and have Java programmers on staff.


What does "hacked" actually mean? In the context of a) information security and b) an operating system such as Windows 10 or OS X, what actually constitutes a "hack"? Most non-technical end-users associate the term "hack" with the deliberate stealing of information or an event where somebody had unauthorised access to their data. However, the CSO website seems to have a much broader definition of a "hack" to include fake AV messages, pop-up messages and browser redirects.

So if you were documenting a problem with an end-user system which had "pop-ups", would you really feel comfortable in reporting that the system was "hacked"?

https://www.csoonline.com/article/2457873/data-protection/signs-youve-been-hacked-and-how-to-fight-back.html

The term "hack" has many meanings depending on context and popular use and has both malicious and benign meanings.

In general, it means that someone intentionally circumvented system design or controls in order to get the system to do something the designers did not intend.

You can hack a system to provide new, helpful functionality, or you can hack a system in order to let it permit you access to something it was designed to keep you away from. There is a desire in many circles to call a "malicious hack" a "crack" so that there is a clear distinction.

In your scenario, you see the effects but you have no idea about the intent. Therefore, you cannot conclude from the effects alone that there was intent or what that intent was. If the user permitted the malicious activity, then it is no longer a "hack" or a "crack".

So, no, I would not be comfortable with concluding that a system has been "hacked" because I saw pop-ups. Yes, there is undesired system behaviour, but there could be a number of reasons for it.


How to verify certificate with very little information Lets assume there is a server and a client and you want to connect those two.
Server has a self-signed certificate, and prior to establishing the connection for the first time (enrollment) the server creates a client-certificate, and a one-time-password for the specific client. (initiated on server)

The admin has both machines in front of him, and then types the one-time-password into the client (assume secure transportation of the token to the client). The client then connects to the server (https) and on success, it identifies with the one-time-password. The server then sends the client-certificate to the client.

The insecurity is in the moment of the first connection. As the client does not know the certificate of the server (and it is selfsigned), someone could hijack the connection and redirect the client to a  "bad server" and send the one-time-password to that one without even knowing. (Intranet should be most likely fine, the real danger is when this is done over the internet)

There is a way to fix this completely: not only give the client a one-time-password, but also the fingerprint of the server-certificate. Unfortunately this cannot be done in this scenario, and I can only transfer 4 to maybe 6 or 8 byte for the purpose of validating the certificate.

I know this does not establish complete security, but I guess it is better than no check , right? How easy would it be for an attacker, to create a certificate that has the right url and matches .. say the first 4-8 characters of the fingerprint. Is the is there a way to get it more secure with only 4-8 byte?

A theoretical solution is to do a first connection with TLS-SRP. This is SSL, but with a special cipher suite which does not use any certificate; instead, the client and server are authenticated to each other with regards to the knowledge of a common "password"; this even tolerates low-entropy passwords because it is inherently immune to offline dictionary attacks. Within this initial connection, the server should transmit a copy of its "normal" certificate, to be used for further connections. This strategy is used in some cases for pairing Bluetooth devices.

Unfortunately, not all SSL/TLS libraries know SRP. GnuTLS does.

If you can get the first 8 true bytes of the fingerprint (not 8 hexadecimal characters), then this can be enough. Generating a fake certificate which matches the first 8 bytes (i.e. 64 bits) of the fingerprint is technologically doable, but expensive (think a few hundreds of PC running for some months).


What is the best way for securing data transportation between sites If I have number of computational nodes (over cloud for instance) and I would like to transfer data between them. The data over the network has to pass through as fast as possible and the encryption and decryption should be minimized. What is the best way for doing it in practice?

I'd first try SSL/TLS - https.  That's easy, there's lots of great info on it, you can use websockets to keep the connection open to improve your speed (much of the SSL/TLS slowdowns are in the handshaking at the beginning of each connection).

If that doesn't work for you, look at Quic - https://www.chromium.org/quic - Google's 'https' over udp protocol - designed to be both fast and secure.

Whatever you do, try to avoid inventing your own protocol and/or encryption - it is much harder than you might think to avoid all security holes.


Ethics question, post-publication of 'DIY hack' that implies security hack I've read this post at length, but I believe this question is subtly different.

Consider this scenario: a municipal, non-profit organization has a website with authentication (username, password). The authentication protects user data; money is not involved (if that matters).

With the best intentions, Person A publishes an auto-login PHP script with full details of the login procedure (specific URLs, session info in cookies, etc), provided that a user has a valid username and password.

[Edit]: this script uses PHP/cURL. It is not part of a webpage; it is executed from the command-line. It contacts the website URL, establishes a session, and sends an HTTP POST to login. The script may continue to pull user data as appropriate for the domain.

On one hand, the PHP script simply mimics the protocol used by the browser: there are no exploits. The intent is "DIY hacking", my term for "power users doing innovative things". This is not white, grey, or black hat stuff.

However, it is true that the script/info can easily lead to a derivative work that iteratively probes for authentication details: a security hack.

[Edit] as clarification (for commentators and others), consider the following:

The municipal, non-profit organization does not dedicate many resources toward security. This includes default passwords, login attempt limits, and so on.
Before publication of the PHP script, if a black hat wanted to compromise an account, s/he would have to automate the browser, use a network sniffer, or research the login details and write the PHP script, etc.
After the publication of the PHP script and login details, a black hat could reasonably modify the PHP script (a derivative work) so that, given a username, it simply iterates over possible passwords until one is found. It might also probe for other usernames. The work to research login protocol is already done and documented.

My question is: does Person A have an ethical responsibility to alert the organization that the info has been published? does Person A disclose the possibility of the derivative work?

Similarly, if Person B discovers the publication and realizes the potential consequences, is there a burden on Person B to alert the community, even though the derivative work does not exist? That is to say, does s/he proceed as described in this post?

From what I understand of your question, my opinion is No.

You describe a web based brute force tool, sans the brute force capability. In short, what you describe is a couple of lines of code that almost anyone could make in a couple minutes. There exist many web based brute force tools, so if this particular script didn't exist, it wouldn't make much of a difference, as most attackers probably have their own tools they are familiar with and wouldn't need to use yours.

Most web based login functions are pretty basic and easy to reverse engineer due to the nature of the web. Most sites are HTML/JS that do not use compiled code, and most don't obfuscate their scripts.

If the design of the login function is so secret that the details cannot safely be disclosed, then there are much larger security implications than some script floating around. You shouldn't need to hide the process of authentication in order for it to be secure, this is considered security through obscurity and has no place on the internet.

The server side should be enforcing login rules that limit the number of unsuccessful attempts. It really makes no sense to move security away from the server to the client as there is no realistic way of controlling what a client is doing.


Why doesn't Tornado have session I've heard that cookies is less secure than the session.
For example, if a web uses a cookie to detect if an user has logged in or not, people can forge a cookie to simulate a false user because he can read the cookie and forge one easily. Here is a link that I've found: Session vs Cookie Authentication

Now I'm using Tornado with python to build a website. Here is a simple example of the module of login with Tornado: https://stackoverflow.com/questions/6514783/tornado-login-examples-tutorials

To my surprise, there is no session in Tornado. Its doc says that there is the secure cookies but I don't think it is safer than ordinary cookies.

ordinary cookie:

browser ------- I'm Tom, my password is 123 -------> server

secure cookie:

browser ------ &^*Y()UIH|>Guho976879 --------> server

I'm thinking that if I could get &^*Y()UIH|>Guho976879, I can still forge the cookie, right?

If I'm correct, why doesn't Tornado have the session? Or is there some way that can make the secure cookie is the same secure as the session? Maybe that I erase the cookies when the browser is closed can be safer?

I've heard that cookies is less secure than the session.

You must have misinterpreted  something. In fact HTTP sessions are usually implemented using cookies.

  I'm thinking that if I could get &^*Y()UIH|>Guho976879, I can still forge the cookie, right?

Sure you can change the cookie, but will it be accepted by the server as valid? If you take an actual look at the documentation you'll see:

  Cookies are not secure and can easily be modified by clients. If you need to set cookies to, e.g., identify the currently logged in user, you need to sign your cookies to prevent forgery. Tornado supports signed cookies with the set_secure_cookie and get_secure_cookie methods. ...
  Signed cookies contain the encoded value of the cookie in addition to
  a timestamp and an HMAC signature. If the cookie is old or if the
  signature doesn’t match, get_secure_cookie will return None just as if
  the cookie isn’t set.

Thus, if you try to manipulate the secure cookie the framework will notice and treat the cookie as invalid, i.e. like the cookie was never sent in the first place.


What are sensitive Wordpress site directories I'm penetration testing a website for a friend. It runs on WP and has directory indexing enabled. I would like to provide a PoC of why this is an issue, but I've never used Wordpress so I don't know what a sensitive directory on it is.

What are some sensitive wordpress directories that shouldn't be publicly accessible? Only one I've gotten into is wp-content, but it simply contains photos.

On Wordpress, user-generated content is supposed to go into /wp-content while other file names and directories (content inside /wp-admin, /wp-includes) are mostly static and predictable as they belong to the Wordpress core.

Directory listing inside /wp-content can help you enumerate uploaded media files (/uploads), themes (/themes) and most importantly plugins (/plugins). Being able to list all installed plugins without tedious guessing helps to quickly identify outdated versions - which is a great advantage since vulnerable plugins are one of the most common entry points. I've also seen some plugins use their own caching mechanisms and store potentially sensitive data in files with randomized names. A /tmp directory inside /wp-content is common, too.

While that's not limited to Wordpress, you might also stumble upon database backups or legacy files with changed names (e.g. wp-config.php_old) that you wouldn't discover by brute forcing paths. To identify all user-generated files I'd suggest you simply spider the index and diff the directory structure against a default installation.

But although directory listing on Wordpress facilitates information gathering, it usually doesn't pose an immediate, exploitable threat.


Does a security breach on a site with Google login mean my Google account is compromised? Firefox Monitor has given me a warning that Lumin PDF has been hacked.

However, I use my Google account to login to Lumin, which I believe means Lumin did not store a password for me.

Does the Lumin PDF hack mean that my Google account may be compromised in any way?

The warnings for Firefox Monitor don't seem to ever go away, even after changing relevant passwords, so I am unclear on the status of my accounts with sites they warn me about.

If you are using the "Login with Google/Facebook/etc." option, then, no, that site does not get your password.

You actually log into Google/Facebook/etc. and then they tell the site that you successfully logged in.

If you want to know more, the technology that is used to do this is called "Single Sign On". All the guides online get very technical, but the idea is that the site trusts Google/Facebook/etc. to tell them that you are you (authentication).


What information in sent in the clear when git redirects from HTTP to HTTPS? If a user tries git commands pointed at an http://gitlab.example.com address (and they have not connected to this domain before), the gitlab.example.com server redirects (or rewrites) to https://gitlab.example.com (note the s) and requires a correct username and password.

What information has the user sent in the clear? Has the user compromised their, username, password or project files and data?

E.g.

git remote add origin http://gitlab.example.com/namespace/projectname.git
git push https://gitlab.example.com/namespace/projectname.git
git clone http://gitlab.example.com/namespace/projectname.git
When they have connected at least once to this domain:

git checkout -b feature1
git push master

They should be fine, as git won't send username/password (even if stored in a preconfigured credential file), unless the web server indicates that authentication is required in order to proceed. The redirect to https happens before the server requests credentials, so at no point anything other than the path of the repository requested is being sent in the clear.


Data on VPS is safe, or can accessed on rent VPS Virtual Server? I rent a VPS server for two months to test a webapp. I insert data into SQL on this server and want to host web app to this virtual server for test.

Can that server owner that rents a VPS to me or any others access my data and source code of my app?

I change the remote desktop Password (admin) and install a Password for SQL.

Can the owner steal my data?

The owner has the access to the machine which is equivalent (or more) of physical access to a physical machine. For example, he can clone it, event silently while it is running, and then "play" with the clone in a safe sandbox environment.

There is only a very limited defense against it, for example you can use disk encryption on the virtual machine in a configuration, where the decryption keys are only in the RAM. It still doesn't avoid the data stealing from the hosting side, but significantly hardens it: he can't "play" only with the persistent disk image, but requires also to analyze your disk encryption software to extract the key from it in runtime. In the best case, you can make this data stealing so hard as cracking a binary software image.

There are various algorithms to process encrypted data without decrypting it, but this all is only a hot research topic today.

The only for sure defense against such stealing is if the sensitive data is not on the VPS. For example, the VPS can be a datastream-level gateway to an out-of-VPS service which uses strong cryptography (including MitM protection) - if the keys are unreachable from the VPS, the hosting will have no way to decode what is going on.

You have no way to do any similar hardcore trick on Windows.


Is it safe to encrypt some data which contains a uuid while also sending the uuid as metadata? I have a json data-interchange format where I send messages like the following:

{
  "revision": { "client": "f0ede1da-7314-4e59-99f7-a3a71dcab11f", patch: ["hello world", 0] },
  "client": "f0ede1da-7314-4e59-99f7-a3a71dcab11f",
  "version": 101
}

I want to encrypt the value of revision but I need to send parts of the message unencrypted to ensure causal, once-only delivery of messages.

If I were to encrypt only the revision part of the message so that the result payload looks something like:

{
  "revision": /* CIPHERTEXT */,
  "client": "f0ede1da-7314-4e59-99f7-a3a71dcab11f",
  "version": 101
}

and the client uuids in the unencrypted metadata and encrypted revision matched in almost 90% of cases, would this make the encryption easier to crack?

You are essentially asking if a known plain text makes it easier to decrypt data. Of course a known plain text makes it theoretically possible to try all possible keys for decryption (i.e. brute force attack) and check if the result matches the known expectation. But this is not feasible if the key space is large enough. Apart from that it depends on the exact (but in your case unknown) encryption algorithm, i.e. if this vulnerable to known plaintext attacks or resistant to such attacks.

Apart from that: since you only want to make sure that the combination of "client" and "version" is only used once you could also combine these values and hash the result with SHA-256 or similar. This way you get a unique value for each combination of "client" and "version" but the value is not reversible and thus you don't face the problem that you encrypt data known to some attacker. There is still some known plain text though due to the structure of the message (starts with "{" etc). And even if the encryption algorithm you use is resistant to known plaintext attacks (modern algorithms usually are) it might be worth to hide the "client" and "version" this way.