How effective is the Mac Open Firmware password protection? I have used Mac's Open Firmware password protection before and I've always wondered how effective it actually is at protecting my stuff.

[assuming a good password]

Would does the firmware password prevent others from doing?
Is it worth the hassle of having to deal with it?
How easy is it to get around the firmware password protection?
Is having a firmware password a best practice?

"Would does the firware password prevent others from doing?"

It stops people who have access to the machine from booting into other partitions, target mode or single user mode. For me this is huge. If you're not encrypting your primary partition, a user could simply sit down at the machine, target boot it and grab anything from your machine. Along with that, a user could boot into single user mode and create new admin accounts allowing persistant access to the machine without the user being any wiser.

"Is it worth the hassle of having to deal with it?"

Depends on your environment. For me, I think it fits for either A) highly accessible machines or B) highly valuable (data-wise) machines.

"How easy is it to get around the firmware password protection?"

If you replace the memory on the machine the firmware password gets removed. So to get by it a person would have to have prolonged access to the machine and the know how to do a hardware swap.

"Is having a firmware password a best practice?"

Again, it depends. I think the highest end security you can provide is encrypted drives with open firmware passwords. That way if the user does have prolonged access to the machine, they can remove the open firmware password but still not read any data. But that's the high end. You have to weigh the difficulties of implementation of this against the damaged that would be done by have a users data lost. Again, think of how likely it will be for users to have prolonged access to the machine and how important the data on there is.


CVE submission - Denial of Service vs. Remote code execution I wanted to ask how to deal with a new remote code execution vulnerability that has the same origin as an already found Denial of Service vulnerability? Can I apply for a new CVE ID for this? This is because the original vulnerability focuses on a Denial of Service and does not contain any remote code execution instructions. Does this count as a separate exploit even though they exploit the same parameter? Or more generally, can I apply for 'similar' but different CVEs?

It depends. If it's the same vulnerability, the old CVE could be updated with the new rating. On the other hand, even having "the same origin" could be a different vulnerability. There are lots of cases of this (in fact, you often even see very similar CVE descriptions explicitely stating "this is a vulnerability different than CVE-XYZ").
Not knowing the specific details, there's little more I can opine. I see no harm contacting the vendor and MITRE (or whatever is the relevant CNA) explaining the vulnerability you found and how it is very similar to CVE-1234.
I think both outcomes are possible: allocating a new CVE or treating it as another instance of the existing CVE. I think it may be more common to give it a new CVE, but different vendors have different position, too.


Application Server  Database Firewall What threats can a firewall between an application server and a database server mitigate that would not otherwise be mitigated when both the database server and application server are behind the same firewall?

The risk is simple: an attacker that gets control over one of those servers would likely be able to compromise the second server. From database to application or the other way around.

If you setup a firewall device between those two, there are two possibilities:

Network (standard) firewall: you won't be able to do much from that kind of device, apart of limiting connections from application server to the database server (i.e. deny connections from DB to application server).
Web Application Firewall (WAF) or any other layer 7 technology: you would be able to prevent and/or detect attacks from one server to another and to restrict trafic as with the previous solution.

So basically the answer is really that you should be using some firewalling / filtering technology between your application and your database servers. A host-based solution can be considered too, in addition to a network device or as the main solution.


How does IPSec protect against IP spoofing? IPsec is a security mechanism that provides peer-entity authentication, data-origin
authentication, data integrity, and optionally data conﬁdentiality. It relies on extensions
to the standard IP header layout and an additional protocol.

The security services that IPSec can provide are:

Authorization–access control;
Connectionless data integrity;
Data-origin authentication;
Peer-entity authentication;
Rejection of replayed packets;
Conﬁdentiality (encryption); and
Limited trafﬁc ﬂow conﬁdentiality.

I am unsure how this relates to protection against IP spoofing.

The simplest answer is that negotiating an IPSec connection requires mutual authentication, which is a way to prove the identity of the entity behind the IP address.  All subsequent communications are cryptographically sound, such that there's no way you can carry on those communications unless you went through the mutual authentication phase.  An attacker can spoof the IP - but they can't convince the other party to trust that IP unless they compromise the credentials used.

It's more complex than that, of course, but that's the gist of it.


How to prevent phishing mails from being successful? I'd like to know what the best methods are to prevent success of phising mails.
This question contains the following subquestions:

What are the best ways to determine incoming phising mails (on a Server and Client side)?
What types of attachements/senders should generally be blocked?
How do I explain/train my users that they shouldn't trust every mail that they're getting?

If you think that there are more relevant questions on this topic, feel free to edit or let me know.
If you have additional information about the topic, feel free to add it to your answer.

Edit: I edited my question to be more clear, although the question you linked answers some of my question, it does not go into the same direction and most of my question is still unanswered. Thanks.

There is no one answer to this, a number of things can help, spam filters will help, but A.They won't catch everything and B. They might filter legit email (especially if you have it set to be very aggressive.) It is really a trade off.

When explaining to users the best thing is general user education.
Explain the risks, explain what to look out for and include them in the process by giving them stakeholdership over the issue, it is their problem as much as it is the organisation's problem. Explain to them that everyone has a role to play when it comes to security.

I have dealt with many diverse user groups over the last few years and have had to relay a number of IT change projects to them and making them feel part of the process has consistently been key to getting them to do is needed/wanted. The standard advice would be as follows;

Check the domain in the email address is correct. For example if you
get an email from someone claiming to be from the Acme Bank make sure the
domain part is consistent with other emails you have from them; i.e
manager@acmebonk.com is the sender address but Acme Banks email is @acmebank.com.
If you haven't had any other mail from them, then why are you getting
email now? Do you even have a service with them, if not then
something may be wrong.
Check the URL's in the mail are legit, visit the website in a browser
and confirm the domain is the same as the links.
Any attachments can be risky, it doesn't matter what they are, there
is a risk and an attack vector in anything that can be attached to an
email.


Is it safe to store passwords in a Browser? We are used to store passwords in Browsers for online login accounts. Where and how those passwords are saved and I hope it is encrypted ?

Normally, the browser prompts for credentials (local) when we try to retrieve a password manually (eg : Chrome).

Generally how safe it is to save online credentials in a Browser?

We are used to store passwords in Browsers for online login accounts. Where and how those passwords are saved and I hope it is encrypted ?

This depends on the specific password manager. Some might encrypt and some might rely on the systems security. Some might store passwords local only and some store it in the cloud in order to sync between different systems.

  Normally, the browser prompts for credentials (local) when we try to retrieve a password manually (eg : Chrome).

This also depends on the password manager. Some ask you if you want to fill in the data, some do it without asking. Some have a master password you need to enter while others do not.

  I have seen there are tools such as Poison Tap where it can exploit browser sessions in a locked machine. Can these tools enhanced to exploit saved web credentials in a Browser?

If the password is filled in automatically (i.e. without asking the user) it might be possible. How exactly depends on the site but with HTTP sites tools like PoisonTap might help. In this case it does not matter much if the system locked or not as long as the traffic can be intercepted and modified. When HTTPS is used it might be possible to do the same if there is an XSS exploit for the site.

  Generally how safe it is to save online credentials in a Browser?

It depends on the quality and behavior of the password managers and also on what the alternative would be. If the alternative is to use the same password for all sites because you cannot remember another one then most password managers probably provide a better security.

See also the paper Password Managers: Attacks and Defenses for deeper information.


Run bash command when spaces and '`/\?&| are filtered? I have some PHP code that run bash commands, and it has a bug that may make it vulnerable to remote code execution.

The executed command would be $(id), but if I execute any other command like ls -la the space is automatically replaced with -. I checked the source as well and I found that in addition to spaces, the following chars are filtered: '`/\<>?&|.

How can I bypass the filter and execute a command like wget link?

Live demo.

If spaces are filtered but not tabs, just use a tab. If both are filtered but $ isn't, you can use ${IFS}.

If you can do command substitutions and spaces, it may help to use various printf format specifiers, tr with ranges and eval to reach forbidden characters.


What happens when a firewall blocks a traceroute? I am trying to find out what happens when you try to access a site using traceroute command, but I cannot find any site that is actually blocking me. Anyway, I wanted to ask what happens when a firewall blocks traceroute? And if I am correct, the firewall blocks all ports that traceroute would use right? What happens to that traceroute exactly?

There is no "blocking" of traceroute, tracepath, tracert or whatever the tool gets called. These commands work by setting the TTL/hoplimit of the packet to a specific value and then expect the host to send an ICMP unreachable back if the TTL/hoplimit expired (i.e. decremented to zero). If a system does not send this ICMP message or if a middlebox (like a firewall) blocks the delivery of the ICMP packet then the host with the specific TTL/hoplimit will show up as unknown in traceroute.


What is a better practice - RSA Encryption vs Windows authentication I have two machines running windows OS with IIS and window OS with MS SQL. In the production web.config file I configure the IIS to use a user name and password when connecting to the DB and then I encrypt it with a key using RSA. The key will be generated using aspnet_regiis and exported into all IIS Machines. Each production server holds only the encrypted web.config file (and an imported key in the secured in the IIS).

The other approach will be to define in the web.config a connection using windows authentication. This will be a lot less work on my side.

Which practice is better ? Which is safer?

There isn't really enough information here to answer that.  If you have a secure means of key storage (such as a good TPM (Trusted Platform Module) or an HSM (Hardware Security Module) that can store keys in hardware, then having an encrypted config file would be more secure than having the authentication in the clear.

That said, the information necessary to break either system is present on the computer since IIS can access it.  If an attacker has sufficient control of the system, neither system will help you that much since they can masquerade as IIS and submit the decryption.

Honestly, I think the Windows Authentication setup properly would be ok, but I would do it by having the site run as a particular user.  Then only give that user permission to connect to the DB.  For an attacker to breach the system, they would need to gain access to an account that has access to the credentials of the service account (at which point they would have control of the application either way) and if they have control of the application, getting the key isn't going to be that hard.

I don't know of any more elaborate ways to add security to the setup, though someone else may have a better idea than I do.


Protect against virus and malware attacks from website ads with iptables Lots of websites spread malware by publishing advertisements that distribute malware. Even YouTube's ad network has been compromised in the past. Browser ad blockers and related plugins have there own problems. Can I use iptables to protect against virus and malware attacks from specific web sites?

I recognize that the sites themselves are still vulnerable to attacks through their site software or server which could compromise the end user. I also recognize that using advanced malware software or a proxy can help with this but I'm specifically looking into how much I can do as it relates to iptables.

For example, say I have a home system setup just for online financial transactions (banking, paying bills) and no other web browsing. I have my iptables setup to only allow traffic to/from specific websites (Citi, HSBC, etc). All other sites and services are blocked.

Can iptables block redirect exploits from advertisements on the websites?

Can iptables block malicious downloads that originate from clicking advertisements on those websites?

If you have your system set up so that only connections to your bank (eg. www.bank.com and www.bankcompany.net IP addresses) were possible, a redirect to a third site wouldn't load. The exploit would need to be hosted on the same site as your bank (which is admittedly rare).

As with many security solutions, it's possible that some bank update makes the website not to work until you unblock some other hosts.


Authenticity of PDF document printed from Word My MS Word Add-In generates PDF preview of DOCX file on client PC and uploads both files to server. I cannot generate PDF on server.

Is there any way to make sure that the PDF is the printed version created by the plugin from the actual DOCX? I need to assure that malicious user of the plugin cannot send the DOCX with modified PDF since the DOCX is used as data for production and the PDF is used as preview for approval.

I'd like to to rephrase your question as this:

"Is there a way to make sure, in a cryptographic way, that two different views of some data are, in effect, related the same information ?"

I would see two approaches to that problem. The first one starts with the data, the second one, with the final view.

Data-centric

In order to implement this, you need to start with a common set of data and describe some type of two way rule that will generate your final views. That can be an XML transform, some type of form description or anything you fancy as long as all important information from the source data can be safely identified in the final view.

For instance, if your data represent invoices, the important element might be amount, currency, client account number, tax code, invoice number, invoice date, etc. You could then transform this data into a document (word, PDF, XML, etc) and you be able to extract that data back from the output document.

In this case, you should generate a separate view of your document that contains all this important business information (typically, an XML document) and design transforms for all your other document types that will output the same format (so you could extract the important business data from each document type).

You then digitally sign that (either with the identity of the emitter or with the identity of the application generating the data, depending on how your trust system is designed). That digital signature could happen on the server when the data is extracted/transformed which means that you can use an application key.

When validation a document, an application can then use the transforms to get a synthetic view of the business data and use the digital signature to verify the authenticity of the document.

If the design is done correctly, you could then safely validate documents even if they have been altered in non-important ways.

The downside of that approach is that it isn't always easy to transform all types of document into the synthetic view. Another downside is that this doesn't work for data that doesn't conform to a normal model. For instance, if you want to handle purely generic data (letters, pictures, etc.) then this approach would probably fail.

Document-centric

This approach is good for document that can't easily be transformed into data.

You need to start with the final document at the location when you can authenticate them. in your case, that seems to be the end user PC. You then generate a small "description" document that contains a hash of each document (typically as an XML snippet) and any important data that should be authenticated and that isn't already covered by your digital signature system.

You then sign that description file and upload it on the server alongside the two other documents. Your server can then verify the signature on the description file and compare the hash of each document with what is stored in order to authenticate them. Since that signature can only happen when the two document exists, it should be applied where they are generated. And since that happen on the client system, it means you should use a key that belongs to the user, not the application.

The downside of that approach is that you depend strongly on what happen on the location when you apply the signature. The key factor here is that you have, in effect, two documents that you want to pair and no easy way to make sure they really belong to the same pair: you're sending one document from your server and are hoping that the client will be secure and send you back a valid pair along with the digital signature. It means that a client could decide to cheat (by signing two documents that aren't a valid pair) or that some form of malware could display one document pair to the user and then sign something else.

One way to (somewhat) mitigate that downside is to make sure you have good traceability: if at a later stage, someone could look at both document and confirm that they are, in fact, two view of the same data and make sure this reviewed is done, you then place a strong incentive on users not to attempt to cheat the system (because the digital signature engage their responsibility). That leaves you with some form of malware on the client system. whether or not that is an acceptable risk is up to you.


Why can a Tor exit node decrypt data, but not the entry node? Me -> Node A -> Node B -> Node C -> destination

The documentation on Tor always states that only the exit node C can see plain text data. How is this possible without me talking to Node C directly?

If I have some plain text data, and want to send it encrypted to Node A, I'd usually do a Diffie-Hellman key exchange, and send the data over. But with that scheme, Node A could decrypt the data.

If Node C was somehow sharing its public key with me, couldn't Node B or Node A MITM the key?

How exactly does Tor manage its PKI? What keys are used to encrypt data where?

Tor uses a routing method called Onion routing. Much like an onion, each message (the core of the onion) is covered with layers of encryption.
image attribution

Your message is encrypted several times before it leaves your device. Node A can only decrypt (peel) the layer A, under which it would see the address of the next node. After the packet reaches the next node, it can only decrypt (peel) layer B, and so on. For each layer, you use the respective node's public key, so only that exact node can decrypt the layer with its own private key.

When the message reaches the exit node, all of the layers have been decrypted and message is now in plaintext (it could also be encrypted if you're communicating with the server under SSL).


Hydra http-post-form based on length of the response is there any way for hydra to understand the correct combination ^USER^ and ^PASS^ in a http-post-form authentication attack based on the length of the body response?
Like in Burpsuite you can look at the length and understand password and username.
So basically how can I setup hydra to look at the length parameter during a http-post-form?

I'm not sure if this is possible to do with Hydra, but I would recommend using ffuf for this.
You can do an HTTP-POST form bruteforce based on length like this:
ffuf -w /path/to/wordlist.txt -X POST -d "username=admin\&password=FUZZ" -u https://target/login.php -fl 480

-fl: tells it to filter out the length you don't want (failed attempt)
FUZZ: is where it will replace words from the wordlist in the request
Although in this approach the username would be static. A little bash scripting hack would solve that.


Bypassing the command/script specified in /etc/passwd Consider the following line from /etc/passwd:

sadeq:x:1000:1000:Mohammad Sadeq Dousti,,,:/home/sadeq:/bin/custom-script.sh

The last part, /bin/custom-script.sh, shows the command/script to be run when the user logs in to the system. Currently, it's a simple Bash script, which presents the user with menu, effectively limiting the possible commands he can execute.

Or, I hope so! Maybe there's a way the users can bypass custom-script.sh, and access Bash directly. Then, they can execute any command within their user context.

  Is there a way to bypass the above Bash script, and execute other commands?

Edit: Consider the following simple case as custom-script.sh:

#!/bin/bash
echo What is your name?
read name
echo Hi $name

Assume there is a (probably unintentional) backdoor.

The default /etc/passwd on Sun workstations of the early 1990s included an entry something like this:

games::0:0:games:/nopath:/bin/false

In other words, an account named 'games' with no password.  Apparently the genius who came up with this idea had no imagination, and assigned it a uid and gid of zero (i.e. root and wheel).  Generally, that was okay, as the home directory was meaningless and the shell was set to a program that always exited with failure.  Furthermore, the default settings for any access by network -- telnet, rlogin, rcp, ftp -- were set to prevent access by any uid of zero.  There was a separate passwd entry for root, with a properly-set set password, home directory, and shell.

This meant if you tried to log in as games, the following would happen:

Logging in as games at the console would at first succeed, but then spawn the /bin/false shell, which would immediately exit.
Using telnet or rlogin would outright deny the login.  Even if it had succeeded, the /bin/false shell would immediately quit.
FTP and scp don't use shells, but they were configured to deny access to uid zero, so you couldn't log in this way.
A GUI login would start up the default GUI services, including a window manager, clock client, and a terminal.  The latter would immediately exit because its child shell would immediately exit.  So you would get an empty screen except for a clock.  (More on this below...)
If you really had to log in as root, you would either have to do that from the console, or first rlogin/telnet as another user on that machine and then su root.  Either way uses the root passwd entry rather than the games passwd entry, and thus works they way root should work.

So the games account appeared to always fail, unless you did a GUI login.  In that case, the only thing that appeared was the clock.  However, you could right-click on the background to get a root menu, with a factory-provided list of programs that users would normally customize for themselves.  (Customizing the menu didn't work for the games account; I don't remember exactly why.)  You could try to bring up more terminal windows, which would all fail.  There was a puzzle game (which may have been the impetus for the account in the first place).  Another choice was to log out.  And then there was the graphical debugging tool, dbxtool.

dbxtool was a graphical frontend to the dbx symbolic debugger, similar to today's gdb.  Being uid zero, you could attach to and control any process on the system, although this was not useful because programs provided by Sun were compiled without symbols.  You could launch a shell, but this would use your SHELL environment variable, which was /bin/false.  However, you could also change environmental variables!  This meant you could get a root shell by the following:

Log in via the GUI as games, without password.
Right-click to bring up the root menu.
Start a dbxtool.
setenv SHELL /bin/sh
(Optional) setenv HOME /
Start a shell with !
Because the terminal is not set, do stty sane

Voila, root shell without password!

So, do not assume that a user can't escape out of an invalid shell.


Sophos virus protection continuously blocking codegv.ru While using google chrome I keep getting a pop-up from Sophos saying "High Risk Website Blocked - Access has been blocked to "codegv.ru"

It happens every time I perform any action in google chrome. Any navigation and it comes up.

I suspect there to be Malware on my computer. I am currently letting Sophos scan my computer.

What should I do if it does not find anything and it keeps happening?

check your chrome extensions - you might have accidentally installed a malicious extension


Should we prevent access to non-sensitive information? I'm having a discussion with devs as we build out a web app which involves users, user generated content, an admin area, api and static content.

Anyone is able to access the majority of template information such as the user account template where users would view and update their information, the template url requires very little digging to find and no authentication to request. Same goes for the majority of administration templates, none of which will function correctly without the correct authentication but it's still accessible for reading.

This allows anyone (authenticated users especially) to gain a solid understanding of how the web app and API's function. Preventing access to this information would only provide a layer of obscurity as the API methods and internal functions would still operate the same - people would just have to make more assumptions.

Currently our reasonings are,

Yes we should prevent access: Only provide resources as required, anything more will encourage malicious behaviour.

No we shouldn't prevent access: It's a lot of extra work, it adds complexity and if we have a security issue this would only provide obscurity.

So my question is:

  should we (and do others) prevent access to this type of non-sensitive
  information?

After further discussion, someone suggested this nightmarish policy:

graphical resources, such as the sign-out icon, should only be available to authenticated users and origins which are expected to display the icon.

Don't prevent access. Don't make things hard for your team. Don't introduce gratuitous complexity, it is the enemy of security, and a sure path to technical debt. Don't look to obfuscation, to an attacker that is a clear sign that more obvious defenses have been overlooked.


How to exploit DRUPAL-SA-CORE-2012-003 I have read the security notices and understand that it "would allow an attacker to reinstall an existing Drupal site with an external database server and then execute custom PHP code". According to Drupal, "re-installation can only be successful if the site's settings.php file or sites directories are writeable by or owned by the webserver user."

I tried to Google for a better explanation as to how an attacker would exploit the install.php file but couldn't find any. I understand that there is a patch and a few quick fixes like the following;

<Files install.php>
  Order allow,deny
  ErrorDocument 403 "Access denied."
</Files>

But what I want to know it, What is the process to exploit DRUPAL-SA-CORE-2012-003?

(Would like a working example to be able to run on my test site)

I've checked the actual code and reproduced the exploit. In addition to all the conditions Polynomial mentioned, install.php must be called when the current database that is configured in settings.php is not available.

To exploit the vulnerability, attacker needs to somehow make a Denial of Service for the database server. For example, he can send multiple simultaneous requests to the site. These would connect to database, possibly reaching database limits (e.g. MySQL 'max_user_connections'). Within that narrow time window, attacker must start the new installation process (which would overwrite settings.php with attacker-chosen DB details).


Understanding a Zenmap output I'm running Zenmap on my Windows 7 laptop. I ran an intense scan with UDP targeting my router 192.168.1.1.I realize that I'm probing into the back end of the router from the inside and that any open ports are nothing to be concerned about. At the time, my iPod (on standby/not turned on) and my laptop were the only connected devices.

In the left-hand window under HOSTS (OS / Host) I have two entries:

  host 2-96--.as13285.net(2.96.*.""")  - (I've hidden some numbers as *)
  192.168.0.1

With host 2-96.... highlighted, and the Ports/Hosts tab in the right window selected, I see 21,22,23,443 all filtered and 80, 631 (IPP) open.

However, if instead I now highlight 192.168.1.1, I see two more services listed, both UDP, and both open: 53 and 1900 (UPnP)

My questions are:

Given that my external IP address (2-96-*-*) and 192.168.1.1 are exactly the same device (the router), why do I see 2 extra services (granted they are UDP) if I look at the 192.168.1.1 scan?
I envisage the NAT and firewall systems as sitting in the middle of the router, between the front end and the back end.And thinking that the back end of my router is waiting to receive any traffic from any possible port inside my network, I would not have been surprised if the scan had said all 65000 ports are open or at least listening/filtered (I know that "listening" is not a state NMAP recognises).So what's so special about the 6/8 ports/services that are detected and why aren't all 65000 found in one way or another?

This is all to be expected.

A router with multiple interfaces can have services listen on just some interfaces.

You're right conceptually that NAT sits between the two interfaces, but normal outbound NAT does not create open ports.

Sit back and chill out :-)


Tools to make a security researchers life easier - tracking vulnerability research I've been a developer for quite some time, and as part of my on-going learning process I've learnt how to spot and remedy broken (and insecure) code written by others. Recently, I've found myself digging through random projects, and noteing down security issues that I've spotted, ranging from XSS, to SQLI, insecure up-loaders to full blown arbitrary command execution issues, and I've found myself wanting to be a bit more organised.

In my occupation, we make heavy use of Jira, and other such organisational tools, but I can't help but think Jira is not only a bit TOO feature-ful for what I want to keep track of. Information I'd want to track would be along the lines of 'Target Identification->Vulnerability Definition->CVE Assignment->Resolution/Disclosure tracking'.

Are there any open source projects out there that you - as security researchers - use to keep track of your discovered vulnerabilities, and their progress through their discovery/disclosure life time? Is there a gap in the 'market' here - could the sector benefit from a tool made to make the life of the security researcher easier?

Looking forward to any opinions you all want to throw about..

Any bug tracking software is the standard for this tool. Vulnerabilities you find are simply 'bugs'. Assign severity, track the vendor's response and follow-up, and detail the issues all within the tool.

Github, bugzilla, Jira, etc. Choose the tool that matches your needs and workflow.


Where is Hashing Used in the TLS Handshake I understand the basic steps in the TLS handshake. My question is, where and how does one-way hashing fit into the steps below? Is it the session key that is hashed? Many texts mention that the original "message" is sent to check integrity, but what is this "message" exactly? I've looked at IBM's documentation on the topic, but am still confused as to how hashing fits into the steps below. Any examples, shown within the steps below would be appreciated.

Browser connects to server secured with TLS (https)
Browser requests server to identity itself
Server sends a copy of its TLS Certificate that includes the
server’s public key
Browser checks the certificate root against a list of trusted CAs
If the browser trusts the certificate, it creates, encrypts and sends
back a symmetric session key using the server’s public key
Server decrypts the symmetric session key using its private key and
sends back an acknowledgement encrypted with the session key to
start the encrypted session
Server and Browser now encrypts all transmitted data with the session key

There are several uses of hash functions within the TLS handshake.

Creating the master secret from the information exchanged in the key exchanged, see TLS 1.2 section 8.1. This is not using the hash function directly but a PRF (pseudo-random function) is created using hashes (see section 5).
Similar the key material used for symmetric encryption and HMAC is derived by using the PRF, see section 6.3.
And the PRF is used again in the Finished message to make sure that the TLS handshake was not tampered with.
On various places digital signatures are done which involve hashes too. You'll find these for example to protect the ServerDHParams for DH key exchange (section 7.4.3).
Another signature is done in CertificateVerify for making sure that the client actually owns the private key for the client certificate.
And of course digital signatures are used in the certificates itself, thus hashes are involved when validating the certificate chain.

And once the TLS handshake is done you'll again find hash functions used for the HMAC or in AE to protect the (encrypted) application data against manipulations.


Is it possible to truly hide content behind a paywall in a single page app? I would like to hide certain content behind a paywall in my VueJS app. In googling around...

Some tutorials recommend storing the currently logged in user in local storage. And then before showing the restricted content, you can check to see if the currently logged in user has permission, eg. localStorage.user.role === 'subscribed'. But local storage is accessible to users, so they could easily just run something like localStorage.user.role = 'subscribed', or just edit local storage directly in the dev tools. (The same thing applies for other forms of web storage from what I understand.)
Other tutorials recommend storing the currently logged in user in Vuex, which is basically just Vue's data model and is conceptually the same thing as storing it in memory as JavaScript, from what I understand. Vuex in particular can be edited my a malicious user, and so can JavaScript more generally.
I suppose a third option is checking the users cookies to see if they have the cookie set for a logged in user, but cookies too can obviously be altered by a malicious user.

So, my question is whether it is possible to truly hide content behind a paywall in a single page app. And if so, how?

You can have a SPA and still have the (real) content be protected.

ie.

Let's say that the paywall data is just text and images.

Publically you expose your standard static assets, ie. index.html, some Vue javascript, your CSS.

All of this handles the look-feel, user interaction with the website etc.

On the backend, you have an API serving up the protected content, and that requires authentication, whether that's cookies, or JWTs doesn't matter. The backend API will only give the data if the JWT or cookie is valid.

So the frontend attaches a cookie or JWT to the requests to this API, and that's how it gets and displays the protected content.

So the malicious user can hack at the javascript all they want, and see what the website might look like for a legitimate user, but they can't see the content itself.

Now note, they might be able to see the shape of the content. For example, if they read the frontend source code and see something like this:

    const response = await fetch("/api/users");
    const data = await response.json();
    const {ssn, address, id} = data;

Then they know what kind of data you returning from your API.

But that's where you could obfuscate that data, like this:

const data = [
    {
        key: "ssn",
        value: 123,
    },
    {
        key: "address",
        value: "foo bar lane"
    }
]

and display it like:

   data.forEach(v=> console.log(`${v.key} : ${v.value}`));

But of course, that might prove unwieldy, it's a question of whether a malicious attacker knowing the shape of your data is really problematic or not.


How can the validity and safety of a software library be checked? So beyond looking at the source code for particular software library, is there a way to vet that it does not contain malicious code? As far as I know from my own research, services like pip, npm, and composer do not provide any assurances(Not that I would really expect them to).

The reason I am somewhat averse to reading through the source is that as the number of libraries I use increases, the amount of source code I now have to go through becomes a huge effort.

So given that I want to use some opensource library X, what steps can I take to verify that it is safe to use aside from reading through all the source?

You have basically two options (provided you can verify your download, e.g., using a PGP signature):

Read the code yourself
Find some way to trust the developer

Reading the code yourself will not only need a lot of time, but an evil developer has a lot of ways to hide a backdoor. So you will need to trust the library authors.

The most important thing there is: Use as little code from others as needed. For example you mentioned npm. A typical project using npm downloads hundreds of tiny modules just to display a hello world message. Each of them could be malicious or break your build, see e.g. the disaster with left-pad.

When you decide you need a library (everything that is too time consuming or too complicated to implement yourself and definitely everything security related like encryption), try to find out which library may be trustworthy and then choose one and try not to use another one in each other part of the code.

There is no straightforward answer on how to build trust. Everyone needs to decide himself. There are some red flags about what code you should probably avoid, but there is no clear indication if a library without red flags is still malicious or not.


What's the best way to test for SQL Injection vulnerabilities? Manual or SQLMap? As part of my job I test for web application vulnerabilities regularly. When it comes to SQL Injection, my methodology is to start by manually browsing the website and spidering it, then, sending the parameters that I suspect to interact with the Database to SQLMap.

Now, I'm wondering if this is the right way of looking for SQL Injection? Will SQLMap be able to find most types of SQL Injection or should I resort to manual testing instead?

Using SQLMap will be helpuf, since it scan for most well-known vulnerabilities and will save you some time and efford. But, the greatest threat is a hackers' imagination and ability to exploit something more complex and unusual than SQLMap can find. For me, the best way to check for sql injection vulnerabilities - and even more types of vulnerabilities - is to think out of the box. Become the attacker, not the defender. These tools (like SQLMap) are part of the solution, but not the solution.


What are some of the worst DBMS for finical software, and why? There seems to be an explosion of new databases,  especially in the non-relational and "NotOnly SQL" offerings.  How does this database fad affect data integrity and security?  What are some ways that programmers can hang themselves by not accounting for strange database behavior?  This question is more about flaws like Time of Check to Time of use (TOCTU) than the usual SQL Injection and Insecure Direct Object Reference.

Does anyone know of interesting attack scenarios or real world vulnerabilities (CVE numbers, papers, exploit code!) that fall under this category of attacks?

Interesting question.  I don't have any specific knowledge of any new DBMS systems that have caused a vulnerability when using a traditional RDBMS would have not led to the same outcome.  As far as integrity goes, I think you make that compromise when you add in "eventually consistent" as a platform goal for a lot of the highly distributed NOSQL offerings.

I don't think it's going on a limb to say that the ecosystem isn't nearly as developed as RDBMS solutions.  That said a lot of the logic that can be found in a RDBMS has moved to the application and is dependent on the developer, which is likely a potential weakness.

Given the reason for implementation is largely scaling related (for Enterprise), would attacks against this platform more likely be attacks against it's distributed nature at least initially.  As an example the Citigroup e-payment flaw, though they probably are using traditional RDBMS.


Is there a term for the combination of principal and credential? In an API that needs to take a principal and a credential as arguments, what is the pair of those two pieces of information commonly called?

FFW Apache Shiro seems to call this an AuthenticationToken. Is that established terminology though?

One common term for this is "Credential Pair", which references the combination of identification token and authentication token, while recognizing that the bare word "credential" is often used to reference the authentication token.

Another term, used less commonly and with less precision, is the plural "Credentials", again referencing the combination of multiple elements.


How to determine if ViewState has MAC enabled when crawling a page? I was using Burp Suite to do some security testing on a site and I noticed that when it detects ViewState it will automatically tell you whether it has MAC enabled.

I'm curious if anyone know of a programatic way to determine if MAC is enabled if you are crawling a site without actually attempting to modify the ViewState, submit it and see if anything blows up?

From what I can tell Burp Suite is doing this just by look at the request (and not modifying/submitting).

The "ViewState" is part of the page, as a hidden field value to be sent back to the server. If the ViewState is protected by a MAC then the MAC value is part of it, so it is a matter of extracting the ViewState value from the page, decoding it, and then see if there is a MAC or not. Burp does just that.

ViewState format is not publicly documented (you are not supposed to fiddle with it) but it has been reverse engineered.


Is sending email between different Office 365 domains (and organisations) secure? Is sending emails between different Office 365 account owned by entirely separate entities secure? I.e. The email never leaves the Microsoft network?

If the two are in the same data centre (E.g. Ireland) then I'd assume this is the case but is it the same between data centres?

I've seen this: https://technet.microsoft.com/en-GB/library/dn751021(v=exchg.150).aspx for setting up secure connections to services outside of Office 365 but that doesn't cover internal situations.

Edit to add: By secure, that the email and it's contents aren't travelling between servers unencrypted and over the public internet.

For example, if I send a document to Colleague A (Bob), and their mailserver is old and has no TLS setup, my email will be sent, over the public internet unencrypted.

Or Bob's mailserver does support encryption however Bob has setup his POP3 mailbox on his client to connect to it without any security, so whilst my email get's to his mailserver encrypted, he downloads it across the public internet unencrypted.

In both these examples, the email and their contents are not secure, they could be intercepted and read without any problems, potentially by any and every network they cross.

On the flip side, does Office 365 maintain the email traffic internally? Even between data centres? Or do the emails go over the public internet at any point? I would assume they are encrypted but is there any documentation to this effect? I have been unable to find anything.

Additionally, as the answer from Jeff shows, O365 will use TLS whereever possible, so TLS will (should) be used between data centres,  I'm still curious is there's an MPLS / Private network between the data centres and the traffic never leaves the O365 infrastructure?

As luck would have it, Microsoft has documented this. The answer to your question is yes. They use TLS 1.2 between any Office 365 groups, and they also use it opportunistically for external destinations, so as long as the recipient's server supports it, that message path will also be encrypted.

https://technet.microsoft.com/en-us/library/mt163898.aspx

and not to humblebrag or criticize, but to find this I literally googled "does office365 use tls to send email"


Configuring docker securly on a developer machine As a developer, I use docker and have a docker server running on my machine. I would expect that docker would not give my user permission to operate on files beyond my user's current set of permissions. The following example shows  that I misunderstand docker's security model or my system is misconfigured:

My user is unable to directly access the system's password file (/etc/shadow) without using sudo and providing a password:

% ls -l /etc/shadow
-rw-r----- 1 root shadow 1275 Dec 18  2016 /etc/shadow
% cat /etc/shadow
cat: /etc/shadow: Permission denied
% sudo cat /etc/shadow
[sudo] password for ryan:
sudo: 1 incorrect password attempt

However, my user is able to print the contents of /etc/shadow via the docker server without the use of sudo or a password:

% docker run -v "/etc:/share" alpine cat /share/shadow
... prints contents of the system's /etc/shadow

I assume this is possible because the docker server runs as the root user.

First, how much concern should this issue give me in terms of security? And if it is a concern, how may I correctly configure my development machine?

Quoting from Docker security | Docker Documentation - Docker daemon attack surface (emphasis is from source):

  "First of all, only trusted users should be allowed to control your Docker daemon".

My take:

Docker's primary goal is to provide isolation of programs / resources using the container concept - i.e., isolation of one container from another.

In order to do this, docker daemon needs superpowers (i.e., root privs). If you "own" docker daemon in some way (e.g., you are part of the docker group) and use that privilege, then you can use the daemon to exercise those superpowers.

From your example command line, it does seem that you are part of the docker group (otherwise you would have to use sudo docker ... ), so it is expected behavior for current versions of docker.

You might want to read that Docker security documentation a few more times to find out what you want to secure and how you can do it.


Identifying and cloning NFC Card double size UID - type mifare plus 7 byte 2k or classic 7 byte 1k I am trying to clone/write copies of an NFC card. I am using an ACR122U-A9 receiver and running nfc-tools on a kali linux VM.

The card I am trying to clone is identified as a Mifare Classic 1k tag
ISO/IEC 14443A (106 kbps), UID SIZE: Double with the use of NFC TOOLS for Desktop and following command:

mfoc -P 500 -O <filename.dmp>

Furthermore, it tells that

Fingerprinting based on MIFARE type Identification Procedure:
* MIFARE Classic 1K
* MIFARE Plus (7 Byte UID) 2K, Security level 1 and when trying to authenticate it finds that all sectors are encrypted with the default keys.

This should to my understanding make it possible to write copies of the card, but I can't seem to find out how to do it... I have earlier used the

nfc-mfsetuid

But that currently only supports 4 byte UID's so that is not an option. I believe the authentication where it is used is only on the UID, that is why I 7 byte write UID solution would probably work.

I have also tried to use

nfc-mfclassic W a original.dmp new.dmp

As shown in tutorials like this one https://gist.github.com/alphazo/3303282

But without luck due to an incorrect BCC in MFD file

NFC reader: ACS / ACR122U PICC Interface opened
Found MIFARE Classic card:
ISO/IEC 14443A (106 kbps) target:
    ATQA (SENS_RES): 00  04
       UID (NFCID1): 01  23  45  67
      SAK (SEL_RES): 08
Guessing size: seems to be a 1024-byte card
Sent bits:     50  00  57  cd
Sent bits:     40 (7 bits)
Received bits: a (4 bits)
Sent bits:     43
Received bits: 0a
Writing 64 blocks |!
Error: incorrect BCC in MFD file!
Expecting BCC=12

The card I am trying to dump the data onto is
https://www.amazon.com/10pcs-13-56MHz-Changeable-block-writable/dp/B00N4VCJEM

and I believe that the problem might have something to do with the card being the wrong type 4byte instead of 7byte.

According to https://mattionline.de/mifare-classic-1k-clone-block-0-uid/, your problem may be that you do not have a "7 byte UID completely writable mifare classic 1k card". I encountered the same issue, so for me it's off to shopping on the interwebs as well!


Is CORS and CSRF-tokens only for POST and GET requests? I have the following questions regarding CSRF, SOP and CORS.

Does CSRF tokens only protect form submission with either POST or GET methods? Is this just a "common practice" (regarding the fact that only form submissions are vulnerable like for example POSTing a request to transfer funds in a web banking site)
Is CORS only available (bypasses SOP) when requesting content with a GET method and not with POST? If a form is protected with CSRF token then there is no point in reffering to CORS to make such a request (meaning to submit the form from a different domain) due to the fact that even with CORS enabled there is a CSRF token protecting that content (even if this is not a typical use case of CSRF token).
Is CORS based on checking the origin header due to the fact that the browser of the victim cannot be tricked into spoofing the Origin header? While cURL enables us to spoof headers, in this particular attack the browser of the victim cannot be fooled?

I have read various posts regarding the above but I would love a clearer explanation. For instance I have read that:

  However, resource loading from other hosts like images, scripts, stylesheets, iframes, form submissions etc. are not subject to this limitation

What confuses me I think is that most threads regarding CSRF token only elaborate only on examples with forms and posting data with POST method to a server and don't elaborate on the greater picture.

Based on what you ask I think you are confusing concepts a bit:

CSRF is a method to execute an authenticated action cross-site, i.e. triggered by an attacker but executed with the authentication of an already logged in user due to the automatic sending of existing session cookies or basic authentication credentials. CSRF is only about executing the action and does not care about reading the result.
In the context of CSRF CORS is about controlling which requests can be submitted by the browser to the server in the first place using the XMLHTTPRequest or fetch API. It does not restrict the sending of simple requests, which are requests which could be created without XMLHTTPRequest or fetch by  embedding a resource, submitting a form etc. It only restricts which non-simple requests (i.e. requests with custom method, custom header...) could be sent cross-site by having a pre-flight requests before these non-simple requests to check the CORS policy of the site to see if the real request is allowed.
CORS is not the single policy which covers all things related to any kind of cross-site requests but only covers a specific subset.

With this in mind:

  Does CSRF tokens only protect form submission with either POST or GET methods?

A CSRF token is essentially a secret which the attacker cannot guess. It can be used for any kind of requests. But given that with non-simple requests the CORS policy would be checked anyway it does not really add value for such requests. Thus when using XMLHTTPRequest or fetch often a non-simple request is enforced by adding some custom header so that no (more complex) CSRF token is needed.

  Is CORS only available (bypasses SOP) when requesting content with a GET method and not with POST?

CORS has nothing to do with GET or POST but is about non-simple vs. simple requests. Both kind of requests can use GET or POST, although non-simple requests could also use custom methods.

  Is CORS based on checking the origin header due to the fact that the browser of the victim cannot be tricked into spoofing the Origin header?

CORS is not based on checking the Origin header at all. The CORS policy is enforced by the browser and not the server. There are cases where checking the Origin or Referer header is relevant though: like when protecting against CSRF without a CSRF token or when restricting WebSockets access. But these cases are not covered by CORS, i.e. CORS is not the only thing which cares about cross-site requests.


Is AES-256 not the best decision for mantaining performance in a Datalake? I'm worried about performance in a Data Lake used for Data Science purposes. I need to encrypt confidential data and, because of definitions I won't dive into here, the algorithm to fulfill this requirement has to be AES-256.

However, I'm well aware that, under the assumption that everything else has been done just fine, AES-128 is more than enough to secure my data.

There's also a benchmark made by Crypto++ that shows how practically slower AES-256 can be when compared to AES-128, but I don't believe I can use this benchmark to all kinds of implementations.

The question is: Am I exaggerating my concerns in the reduction of performance when using either AES-128 or AES-256?

So in the benchmarks you've linked, the difference is about 40%. If that is too much for your purposes because it would cost too much server capacity, then it's too much. If not, then it's not too much. If you want to know if it's too much for a user, you could do a quick blind test and see if they even notice the difference in practice (if you can't use the real code, just make a dummy site where the operation is 40% slower).

You say you don't think those benchmarks apply to each language, and you're right, but they are ballpark accurate. Save for bugs, another language is not suddenly going to be 140% slower. Because of that, other benchmarks won't make a difference in your decision. And if 35% is acceptable but 40% is not, then you should really benchmark on your own hardware with the software that you will actually be using.


/hnap1/ scans router compromised or worm? Recently, I saw some strange entries on my local-only webserver. The thing is I don't know if the attack came from outside the network or from an infected machine. I have read up a little on the hnap attack, but I'm still unsure what to do about it. Essentially, Cisco routers have vulnerabilities because of the "home network administration protocol." And from what I've read there is no solution.

If it is an infected system I'd like to pinpoint it by listening to network traffic, but I'm not sure how to do that. I tried using snort and wireshark, but these programs seem pretty advanced. Alternatively, I am thinking that if someone was able to compromise my network by cracking the network key, they could join the network and run whatever scans they want. Otherwise, maybe someone is accessing from outside the local network.

Here are the entries (updated to show multiple requests from my PC):

[03/Sep/2017 11:35:13] "GET / HTTP/1.1" 400 67505
Invalid HTTP_HOST header: '192.168.yyy.yyy'.

[03/Sep/2017 11:35:33] "GET /HNAP1/ HTTP/1.1" 400 67699
Invalid HTTP_HOST header: '192.168.1.1' (Router IP).

[03/Sep/2017 11:35:33] "GET /HNAP1/ HTTP/1.1" 400 67699
Invalid HTTP_HOST header: '192.168.1.2' (PC IP).

[03/Sep/2017 11:35:33] "GET /HNAP1/ HTTP/1.1" 400 67699
Invalid HTTP_HOST header: '10.1.0.1' (Virtualbox IP on PC).

What can I do to track down the problem? Is there an easy way to listen for more of these requests and pinpoint the source? Are there better malware/spyware scanners that might pick up on a worm?

(I use up-to-date antivirus and it is not detecting anything, so there's that.)

What you found was that a device connected to your web server and requested /HNAP1/

HNAP is a protocol for managing devices, so with just this information about potential attacks, my guess is that this has been done by a device on your network that supports this protocol (eg. it may be trying to obtain from your router the public IP address).

Your log line should contain the IP address of the client that performed such request,¹ eg:

192.168.123.123 - - [03/Sep/2017 11:35:13] "GET / HTTP/1.1" 400 67505

in this case, the request would have been performed by 192.168.123.123.

¹ I am assuming you are using Common Log Format, if you are using a custom format, you should add the remote address somewhere)

Regarding your update, the «Invalid HTTP_HOST header» message is mostly irrelevant here. The client connected specifying that it wanted to speak with (192.168.yyy.yyy / 192.168.1.1 / 192.168.1.2 / 10.1.0.1) but your server is not configured with virtual hosts for those. The important piece is the lefthand IP (although if it enumerated both the external and VirtualBox interface, it probably means it came from your PC).


Are these snort alerts false positives or attacks? Can anyone describe this alert please?

I am confused if an attack is run against my network or not.

I run snort IDS/IPS through a pfsense firewall.

It is most probably a false positive like mentioned here
https://community.spiceworks.com/topic/1514894-snort-attempted-command-buffer-overflow-smtp

you should provide more details such as is the traffic originating interally or any other logs you have.


How can I protect myself from "ransomware" attacks like the one that affected Transmission users? The downloader for version 2.90 of the Transmission BitTorrent client was infected by a piece of malware called KeRanger, which encrypts files on your computer and demands a one-Bitcoin ransom to unencrypt them.

Putting aside the question of how this made it into the downloader in the first place, how can a typical Mac user protect against this kind of attack? The file came from a trusted source, so the recommendation to not visit malicious sites doesn't apply here.

Is it time to get an anti-virus program for my Mac? Or do I just have to be diligent with Time Machine backups, and be prepared to restore from a backup at any time?

There is no longer such a thing as a "Trusted Source". Probably never was. You are only one exploit away from infection. If the software producers get compromised or the automated scanning for the app stores get bypassed, you will be infected.

Security is often an illusion created by forward motion in patching and upgrading. We've had several fantastic near misses in the last six months in infrastructure maintenance, server maintenance and endpoint maintenance.

The only real protection is multiple versioned backups. And hope you can step back to a preexploit version.


Open exploits database, with structured data (CMS name, version, etc.) For a web security app I'm working on, I want to list all the exploits that a certain Wordpress version have. (and hopefully the same for other CMSs)

I found some (open) exploits databases that list those kind of exploits:

National Vulnerability Database
CVEDetails

Unfortunately, their exploits database is not really structured (EDIT: actually the National Vulnerability Database is the perfect fit for what we wanted, check my answer below). CVEDetails gives exploits per application, but it's hard to get the version number from that ; Also they don't give an access to some structured database (XML, JSON, ...) or API to easily fetch the exploits. The 'National Vulnerability Database' doesn't give details about which app and version is vulnerable.

Where could I find some open (and free for commercial use) exploit databases?

Use the CVE database itself. They have a structured XML where you can extract all vulnerabilities you want.


Testing clean urls with sqlmap Is it possible to test for SQL injection vulnerabilities with using sqlmap with a url that is using mod rewrite (or something like it) to make the urls clean?

I know how to test my sites that have urls like:
http://mysite.com/?id=1

But what about my sites that have clean urls, like: http://mysite.com/1

You should use * in your URI, creating URI injection point(s). So instead of using:

sqlmap.py -u "website.com/script/paramrewrited1/paramrewrited2"

use:

sqlmap.py -u "website.com/script/paramrewrited1*/paramrewrited2*"

See sqlmap wiki for more usage options. From that page:

  URI injection point

  There are special cases when injection point is within the URI itself.
  sqlmap does not perform any automatic test against URI paths, unless
  manually pointed to. You have to specify these injection points in the
  command line by appending an asterisk (*) after each URI point that
  you want sqlmap to test for and exploit a SQL injection.

  This is particularly useful when, for instance, Apache web server's
  mod_rewrite module is in use or other similar technologies.

  An example of valid command line would be:

$ python sqlmap.py -u "http://targeturl/param1/value1*/param2/value2/"


How much of the FUD around jailbreaking has any merit? So many security vendors and app providers warn us users against jailbreaking iOS devices. The fear mongering is often very dramatic. However I can't find real world examples of actual problems caused by jailbreaking. Have they all been covered up or is it all nonsense?

Specifically I'm interested in knowing whether all those media apps that refuse to run on jailbroken devices are actually really at risk. Can, for example, media downloaded for offline use from something like Spotify, BBC iPlayer, or Amazon Video be extracted and shared? I'm not looking for a how-to; just some proof that there's really something to be worried about for the third-party app providers that justifies the near hysteria presented in things like Europol's “MOBILE MALWARE - TIPS & ADVICE TO PROTECT YOURSELF” (dated 24th October 2016).

There's actually no real harm caused to the end user by jailbreaking their device. The fear mongering that you speak about comes from software vendors who're worried that it might be possible for someone (I say 'possible'. Only read one report of someone reversing Spotify's content protection) to bypass the safety mechanisms that they have in place. For game developers this might mean preventing people from mining unlimited amounts of in-game cash, for small creators it might mean someone faking in app purchases to disable ads etc.

  Can, for example, media downloaded for offline use from something like Spotify, BBC iPlayer, or Amazon Video be extracted and shared?

Short answer: Yes. Given enough resources and time. it'd be possible to reverse the protection for the content.


SSL Strip on Fedora24 I want to perform a MITM attack on my own network, and followed several tutorials on how to use sslstrip, iptables and arpspoof.

But every time I perform the attack, I lose the connection on the target device for almost every website, except google, facebook and some others. Could it be that i lose connection to websites, which are just HTTP protected and not HTTPS like the bigger websites?

The sslstrip.log file is always empty, even though sslstrip is running.  Here is the command order i use:

echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-ports 8080
arpspoof -i wlp3s0 -t 192.168.178.125 -r 192.168.178.1
sslstrip -l 8080

To look whats going on, i use tail -f sslstrip.log

I hope you can tell me what I'm doing wrong.

I think you are doing good the commands... but the sslstrip technique doesn't depend only on your side. It depends of a lot of factors... if the "victim" is using bookmarks using always https://whateverpage there is nothing to do. He/she is going to ask directly always for an encrypted page.

If the "victim" is asking for pages using whateverpage.com without putting before https, he is going to ask for the http page. Even if the site has HSTS activated (which is going to receive the http request and will redirect it to https page version), you can do sslstrip because there is a request for an http page... only one, but enough for sslstrip. It is going to show the page in plain to the "victim" and it will do the ssl connection to the real site.

So many people say "HSTS is the solution to sslstrip". And this is NOT TRUE. I did sslstrip a lot of times testing access to pages with HSTS and it works... they key as I said is the victim must do the http (without "s") initial request.

Another decisive factor is that not everypage can be sslstripped if you use common browsers... I mean, if you use Chrome, Firefox or Internet Explorer for example... these browsers have an internal list of known ssl sites. That sites (like twitter or facebook for example) will never be sslstripped because the browser knows that ALWAYS must look for them using https even if the user did the "bad way request" putting facebook.com without specifying the https:// before. I guess these sites pay to the browser's companies to be in that list.

I suggest to you try against not very known ssl pages because in that way there are less possibilities to crash in your tests against a site which is in that browser internal lists.

There are more advanced techniques to do sslstrip even to pages in that lists... like Delorean attack, etc... but are more complicated.


Can Logout Failure Compromise Email Account? Risk assessment I get constant reports of failure to sign-out from my Outlook account. I am wondering if this problem can compromise the account or generate a vulnerability (backdoor-path)?

Inability to log out means that user leaves an open-session to the account, and if attacker grabs a cookie (by syncing browser history) he can easily re-enter the account and hijack the associated session.

Closing the browser may partially help to prevent this type of attack. But, closing browser invalidates cookie only on user-end, not on server-end (email provider), which may still be Active. Also, 2FA is completely useless at this point, because the "entry" to the account already been authenticated by the user upon successful login (with, or without 2FA).

So, how do I know if a session to the account has expired if I can't logout from it?
Could a failure to logout be a sign that someone else accessing my account?

So, how do I know if a session to the account has expired if I can't logout from it?

If you can still access resources which require your authorization then you are not logged out. Thus simply try to access new mails or similar in case of Outlook web interface.

  Could a failure to logout be a sign that someone else accessing my account?

Probably not. But details depend on the specific application and its current state of implementation which can vary from day to day.


Why would someone trust DuckDuckGo or other providers with a similar privacy policy? DuckDuckGo is a search engine that claims it will not share your results with others.  Many of my skeptical coworkers think it may be a scam.

Is there any proof that any web search engine will protect your privacy as it advertises?

I'm the founder of DuckDuckGo. D.W. is right, if we were to violate our privacy policy we could get in a lot of trouble. Additionally, I've tried to be as transparent as possible on how we operate, both in our privacy policy and on my blog.

I've thought and explored external verification, from someone like the EFF for instance, but I don't think that really would do much to assuage the core of the comment.


SSL decryption without installing a certificate on each client Given a proxy performing MITM SSL decryption and inspection, is it possible to install a wildcard certificate (*.domain.com) on the proxy signed by a root CA (such as VeriSign or GoDaddy) such that clients will not have to have a self-signed cert installed (since they will already trust the root CAs in their trusted store)?

I'm thinking about this in terms of allowing BYOD devices on a network and avoiding the necessity of installing a cert on different device types such as iOS, Android, Windows Phone, etc.

This should be possible with certain configurations of proxy servers. Usually SSL proxies are put in place to proxy all outbound traffic, not just traffic to a server that you own, which is why you typically need to install the SSL proxy cert on all devices. If you want to only proxy traffic to one domain for which you have a cert signed by a root authority, then you should be able to install that wildcard cert on the proxy and not need anything from the clients.


How file-level security works? How a file-level security system works internally? For example https://en.fasoo.com claims that if someone in your organization trys to leak information you will be noticed ( They didn't say this exactly but according to their white papers this is my impression ).
Let's assume they serve a complete secure ECM which store all documents in the most secure encrypted format and their authorization system works perfectly and there is no hole in this layer. At the end people needs to get documents they needed in a non encrypted format to work with them. What stop them from copying the non encrypted documents and leak them?

This looks like a Data Loss Prevention (DLP) system in which DRM is applied to documents. While I haven't assessed Fasoo itself, I have assessed five or six different enterprise DLP solutions over the years so I can make some inferences about how it works and how secure it is.

In my experience the answer to your question is "pretty much nothing stops you from leaking documents". All DLP suffers from the analog hole (e.g. someone taking a photo of the document on their screen using their phone), and most DLP solutions offer little security against a determined attacker. They're better at detecting accidental leakage, such as a sensitive document being dropped onto an open file share, or emailed without proper encryption. DLP and DRM are inherently broken objectives on a general-purpose computing platform.

Document tracking tends to utilise similar tricks to canary tokens. The document has some element embedded in it that causes network traffic to be sent whenever the document is opened. This can be something as simple as a hidden 1x1 pixel image inside the document, loaded from a web server. These don't stop you from exfiltrating a document, but the idea is that it catches an unwitting attacker opening the document from an unauthorised location.

The DLP part generally works by storing fuzzy hashes of document contents in the DLP server's database, then giving it access to all shared directories and outbound network traffic so that it can try to find documents that have been put in the wrong place or that are being exfiltrated from the network. This usually involves TLS inspection at the gateway. In addition, for an enterprise DLP solution like this, there are sometimes hidden byte sequences injected into the document file that can be caught by detection agents on the network during file transfers.

In most cases DLP is a bit of a misnomer, since it's much more adept at data loss detection than data loss prevention. Even then, it isn't great. I've exfiltrated gigabytes of faux customer data to file sharing websites and even pastebin on DLP-enabled networks without a single alert going out. It usually suffers from the same problem as IPS solutions - either you turn the reporting levels down and never catch anyone, or you turn them up and get flooded with false positives until your security team just ignores everything. Configuring and training DLP solutions is a very long and arduous job that rarely gets done properly.

The remainder of the software implementation is likely little more than a document storage webapp with audit functions and some enterprise integration features like tying user accounts to AD accounts or an SSO platform.


Reflected XSS which only displays in the input I am trying to execute an XSS in an HTTP GET request,but it just displays the input without running the script.

I checked in BurpSuite and I see it added my input to referer: url and then my input.

How can i make the XSS run?

So you encountered a website that takes a GET or POST request and reflects the input as content somewhere on the website. A good example for this would be Stack Exchange. As you can see, I can type the following and nothing happens:

<script>alert('This is not an XSS')</script>

But why?

Output Encoding

Simply put, the output is properly encoded for the context it is written into. What does that mean? HTML has certain characters with special meanings, such as < and >. In order to prevent a browser from interpreting them as "special", the output automatically replaces special characters with a sequence that is visually identical, but has no special meaning to the browser.

You can verify this by inspecting the above code block and seeing that it turned into the following:

&lt;script&gt;alert('This is not an XSS')&lt;/script&gt;

As you can see, this renders fine for you visually, but does not cause the <script>-tags to be interpreted as HTML tags.

How to make the XSS work

You can't. It's that simple. If the encoding is done properly, such as by a popular framework, then you can't exploit it. That is good! This is what you want for a customer.

I assume you are doing this pentest for a customer, with a written permission to attack, right?


SQLMAP : Unable to dump any data I am working on a black box web application pentesting project for a client and while testing found an error-based SQL injection. I went on to exploit it using SQLMAP, I retrieved the Database names, Tables names, and Column names but when I try to dump any of the columns it says

"unable to retrieve 'column_name' in table 'table_name' from the database 'database_name'"

I tried it for other columns and it gives same error and shuts down. Am I doing something wrong? Or the IPS on the client end is blocking the dump?

It is hard to conclude without knowing the requests and the responses. However, it is less likely that an IPS blocks your access. Most IPSes block SQLMap immediately by simply looking at the request User-Agent.

From debugging, try to run SQLMap through an intercepting proxy and observe the responses from the server:

sqlmap --proxy=http://localhost:8080 [THE REST OF YOUR PARAMETERS]

Then manually modify the request and send to server using your intercepting proxy. This way it is easier to find out where the problem is.


Why do browsers permit redirects from HTTPS pages to insecure URLs that trigger a download? We know browsers disallow active mixed content in pages served using HTTPS. This is because the JavaScript could be modified by an active MitM which would compromise the security of the page. Many browsers will also block images/other passive content from being loaded from an insecure source for a number of reasons.

Why then, is it possible for a site served over HTTPS to redirect to a HTTP URL with a Content-Disposition: attachment or Content-Type: binary/octet-stream header that forces a download?

For example this download page is served initially over HTTPS but redirects the user to an insecure download URL. Chrome just blindly automatically downloads the file and presents no information as to its origin. Firefox does show the origin in its download dialog but still allows the download to proceed and doesn't warn the user at all:

Given that a user downloading and running arbitrary code like this (that they believe to be from a secure site) can do much more damage than some injected JavaScript, why do browsers permit this behaviour? Why aren't these downloads forced to be served in a secure manner like included scripts?

It's about respecting user's choice. Generally, you want to give the user choice to decide what they want to do.

Downloaded applications are inert. Just because you downloaded a virus doesn't immediately harm the system until you run it.

In any case, with applications downloaded from the internet, the user will be asked by the OS whether they want to allow running the application. In Windows, a prompt window appears, in Linux, you'd have to set the execute permission. Also, antivirus applications would scan downloaded applications they're being written/read. There's little need for the browser to prompt the user for this.

Windows also support cryptographic signature that can be used by security conscious users to prove the integrity of the downloaded application. In Linux, this is done by the package manager.

Why does this not apply for JavaScript? Well, generally users don't choose to run individual JavaScript files, but rather they are a side effect of visiting a site. And with JavaScript from unencrypted source, it's trivial for a MITM attacker to modify the script without the user knowing it.


What RHSA, RHEA and RHBA stands for in the RedHat Erratas? Do you know what does RHSA, RHEA and RHBA stands for in RedHat Errata ?

Red Hat categorise advisory notices as relating to Security, Enhancement, and Bug-Fix.


Chrome Process shelljacket noticed today this process running on google chrome task manager referencing http://shelljacket.us

If I closed it will restart automatically in a few seconds.
Can anyone confirm if this is safe? How can I get rid of it?

Your Task Manager is showing "Subestrutura: http://shelljacket.us. This is Portuguese for "Subframe: http://shelljacket.us", and means that Site isolation is enabled in your Chrome browser. Google's help page on this feature suggests that you can toggle Site isolation via chrome://flags/#enable-site-per-process

Even when you did not enable site isolation, then site isolation will still be used for websites loaded inside a Chrome extension. In your process list, I see that the item immediately above your unwanted process is an extension. To get rid of the frame, you can try to disable the extension.

Seeing an unknown site in a separate process in itself is not something to worry about. But this site in question seems to only contain a tracker from QuantCast, which I consider suspicious from the privacy perspective.

I looked up the extension in the Chrome Web Store ("Hotspot Shield Elite VPN Proxy") and used my Extension Source Viewer to read the source code of the extension. I found a code snippet in the extension's background script that confirms that the extension is embedding an frame with a QuantCast URL.

        }, {
            key: 'quantcast',
            value: function quantcast() {
                if (!sdk.config.reporting.quantcast) return;
                var iFrame = document.createElement("IFRAME");
                iFrame.setAttribute("src", sdk.config.reporting.quantcast.url + '?rand=' + Date.now());
                iFrame.style.width = 0 + "px";
                iFrame.style.height = 0 + "px";
                iFrame.style.display = "none";
                document.body.appendChild(iFrame);
            }
        }, {

If you are using that VPN extension for privacy purposes, I would recommend you to immediately uninstall it, because this is clearly a sign that your privacy is violated.


Changing file extensions in PHP file upload to prevent code execution? I think in a PHP file upload it is a best practice to store files outside of the document root with a randomly generated file name and telling the server to make them non-executable, so the file will not be executed by an attempt to access the file via HTTP.

If storing them outside the root and preventing them from beeing executed at all is not possible in one particular environment, would it help to alter the files extension to one that certainly will not be treated as a script or something similar?

After the upload the actual extension could be saved in a database and the file will be saved in the file system as sd7dsf9gd7s8sd9876asd.secureExtension instead of dangerousScript.php.

Would this be sufficient protection? What extension would be the best one, then?

If your webserver is configured properly (ie it will not execute files with arbitrary extensions as PHP files) this approach will work against PHP code execution*.

Checking/changing extensions is also the correct approach (next to storing the files outside the web root). Checking mime types is unreliable, complex, and may be bypassed by an attacker.

You should use a non-existing extension or one that has no meaning in the given context (ie not .js, .html, .php, etc). Often, no extension is used.

* At least by directly visiting the file; the code can still be executed if the file is for example included and executed somewhere else


Is this a web attack I should be concerned about - trying to enter code for form vars I have a created a simple CGI script running on a web server where a user can login using a username and password.  The username and password are entered via a html form and the form POST's the data to the web server.

I log the logins and this is what I have found happened repeatedly - about 10 attempts

For username they are entering:

  ') declare @q varchar(8000) select @q =
  0x57414954464F522044454C4159202730303A30303A313527 exec(@q) --

and for password:

  1

Lots of slight variations.  Here is another attempt:

  username: John   password: 1 declare @q varchar(8000) select @q =
  0x57414954464F522044454C4159202730303A30303A313527 exec(@q) --

Is this some sort of SQL command?  A stored procedure?  What do you think they are trying to achieve?

Are there any tips on measures I should introduce to prevent this sort of thing happening?

There seems to be a good answer here and here.

1 declare @q varchar(8000) select @q = 0x57414954464F522044454C4159202730303A30303A313527 exec(@q) --

If we simplyfy the above we can get an idea of what's going on:

declare @q varchar(8000)
select @q = 0x57414954464F522044454C4159202730303A30303A313527
exec(@q)
--

Line 1: Declares the q variable as a varchar with 8000 chars.
Line 2: Assignes the encoded string to the q variable.
Line 3: Executes the q variable.
Line 4: Comments out the rest of the injected query.

According to 2 the 0x57414954464F522044454C4159202730303A30303A313527 string is WAITFOR DELAY '00:00:15' hex-encoded. A timed Blind SQL injection attack technique which tells the server to wait 15 seconds before responding. Once the payload is injected, if the server takes 15 seconds to respond, there is a good chance it is vulnerable to SQL Injection. This can be further checked by increasing the DELAY time.


How can AES-CBC be used for LUKS encryption, when the ciphertext is not static? In CBC mode of operation, ciphertext from previous block is used as IV in next block. How then can AES-CBC be used for disk encryption (LUKS), when the data on the disk (ie the ciphertext) keeps changing?

Whenever data is written to disk, the ciphertext is changed. Obviously, it cannot be that all subsequent blocks need to be recalculated with the changed IV. There must be some other mechanism.

How does it work ?

This is actually a quite tricky problem with no perfect solution.

If the file system was one were data is written only once and written entirely sequential, a single CBC encryption all the way from the start of the media to the end would be suitable. You can do random access decryption of CBC, you just need to read one additional cipher block. This could work for encrypting something like ISO9660.

But when random access writes are required, doing a single CBC encryption of the entire media won't work.

Ways of choosing an IV

Instead one has to encrypt each sector with a new IV. This does lead to a new problem, which is that the encrypted data is larger than the plaintext. If the underlying media was designed to be used with a secure encryption, it could very well have been designed to use slightly larger physical sectors in order to solve that problem. I haven't come across any media where this is the case. CDs do have an unusual physical block size, but the historical reasons for this are not related to encryption.

Faced with the problem of where to store the IV, various ways of cutting corners have been seen. The first and very poor approach was to simply use the sector number as IV.

The sector number is predictable. And an adversary can easily construct data patterns which will cause IV on neighboring sectors to cancel out with patterns in the data and result in two neighboring sectors on the encrypted media having exactly identical ciphertext. Multiple storage encryption products have had this vulnerability.

A slightly better approach is to encrypt the sector number and use that as IV. If you only have a single snapshot of the encrypted media, I don't know of any way to exploit this. However backups, remapped sectors on hard drives, wear leveling on SSD, use of SAN, etc. can lead to scenarios where an adversary can see more than one ciphertext encrypted using the exact same IV. At that point it will be visible to the adversary how many cipher-blocks from the start of the data is identical between the two versions.

An even better approach is to compute a cryptographic hash of sector number and all of the plaintext - except from the first block of the sector. Then encrypt the hash and use as IV. So if you are using AES which has a block size of 16 bytes, and you encrypt sectors of 512 bytes, you would hash the sector number and 496 bytes of the sector. This means IV reuse only happens if you write the exact same data to the exact same sector number. This is still a leak, though a very minor one compared to simply using sector number as IV. Unfortunately the hashing step increase the CPU usage for this approach.

Using a random IV

You can use a random IV if you can somehow store the additional data. But if physical and logical sectors have identical sizes, this means every time a plain-text sector is written, you have to write two physical sectors. This is a major problem because if a write operation is interrupted, you lose data. Write behind caching can address the slowdown associated with multiple writes being needed, but it makes the risk of data loss even worse.

Journaling could solve the data loss problem. But at that point you would be moving lots of functionality into the encryption layer, which you'd usually want at a different layer.

GBDE is the only example I know of using a disk layout in which each logical sector is stored as the full 512+16 bytes on disk. This means each 32 logical sectors are stored as 33 physical sectors. It was however designed without the journaling layer, which means there is a risk of data loss. Moreover the author of GBDE invented his own PRNG which turned out to be weak, so it isn't a great example of how to design a storage encryption.

Alternatives to CBC

The many cases of poorly chosen IVs for CBC have lead to a fairly common perception that CBC is weak. For those reasons alternatives to CBC have been considered for storage encryption. However some of the alternatives which have been proposed are even worse, for instance it has been proposed to use CTR mode which generates a pseudorandom one-time-pad. Simply using this to encrypt a media will lead to parts of the one-time-pad being reused each time you write to a sector which has previously been written.

Most usage of CBC in storage encryption as well as all the alternatives I have seen all have one thing in common. They encrypt a logical plaintext sector to a single physical ciphertext sector of the same size. This means none of them can achieve semantic security.


How do I obtain user info from SET? I am trying to create a phishing email for a project I am on. In the email I want to link to a site that will collect IP, browser, date/time of when visited. nothing malicious but to just prove that users clicked the link.
Can I do this in social engineering toolkit or is it not possible?

The simplest method is to put a user-custom token in each copy of the phishing email.  For example, a Groupon mailing in my inbox has the following link - I've inserted a bunch of newlines between the individual fields of the URL-encoded string.  You can see that there is a "user" field with a 64-byte hexadecimal string - that's the unique identifier that tells Groupon that it's me when I click on their email to look at the deal on their website.

http://www.groupon.com/deals/jimmy-s-famous-pizza-and-golfland-usa?
p=1
&utm_source=newsletter
&utm_medium=email
&sid=3cc714b9-fd5b-4d66-bead-e7c2e20d21bd
&division=boston
&user=03c1384e250d6c131d9b8948b6c5d536d26d9b0beb33f1fa5b6191e323b87c63
&date=20130522

So when I click to go to their site, they know I'm there because they sent a newsletter to (someone) via email on May 22nd.  They assume (someone) is me, because of that user string; of course, if I forward the email to my friends, and they click, then the web site will get that user string from them... so this is only a loose connection.  If you're phishing, however, it's really the closest you'll get without getting them to do more than just click on a link.


System Information on which the SD card was used last time I have an image of an SD card and I am doing analysis on it. Is there any way to find that on which system this SD card was used last time.

The image I am having is of a SDHC and has FAT32 as file system.

does SD card saves the System information of the system in which they were connected or mounted.

AFAIK, there isn't a reliable, universal way to detect the last device a usb drive was plugged into. The best you can do is infer it from the modification times of system-specific file metadata (e.g. thumbs.db on Windows, .DS_Store on Mac) or recycle bin folders ($Recycle.Bin on Windows, .Trash-xxxx on some Linuxes).


Secure system generated symmetric keys I'm developing a system that manages and shares user passwords (which are encrypted using user generated symmetric keys).  But of course a big concern is the user losing their symmetric key and the data becoming unrecoverable.

Which has led me to thinking about a system generated symmetric key.  So that the user merely authenticates him/herself and it is the system that possesses the key (or knows how to generate the same key) and decrypts and sends the data.

I guess my question is: If this were open source, and everyone can see the code, (so it won't work that I have some seed hardcoded) is there any conceivable paradigm in which a system can generate a key, not store it (for security reasons), but be able to reproduce that same key, without anyone who has open access to the code learning what the key could be?

Even reading it now it sounds too good to be true, but I figured I'd ask anyway.

Thanking you in advance,
Jeffrey

Nope. Symetric keys must be random. If you want to make the key recoverable, store it somewhere, or use some other recovery option. But don't generate it using some predictable algorithm or the whole system falls apart.

Storing the key is far safer than generating it using a predictable system. Because when someone knows your system, then they have all the keys you'll ever generate.


How does my ISP see information about my PC? Recently I called my ISP and talked to them about a problem I experienced with a PC. They asked me "Are you talking about the PC that is connected in port 2 with X hostname?"

It got me wondering how they know that, how can my ISP know the port which my device is connected to and how would that allow them to see the hostname?

I have FTTP (Fibre to the Premises) and a GPON ONU given to me by my ISP.

TL;DR - They will have remote access to the router they provided and thus they will be able to obtain such information.

Yes, this is plausible. As I am sure you're aware, your ISP will give you a router when you get an Internet Service from them, it's no secret that they have access to this router.

The ports that are on the back of the router are access ports meaning, you plug a device in and you access the network, there will be ways in which they can see the status of these ports, what's connected, etc.

I cannot tell you exactly what they're doing to see this information because I don't know the inner-workings of these types of "routers" and I don't work for your ISP. But in essence yes they will have access to that information and there isn't a whole lot you can do about it.


Where can I find a solid BURP tutorial? I'm looking for a good resource for learning/configuring BURP.  I understand the concepts behind using the framework, and have read the docs on the site, but if anyone has a solid tutorial link I would love to see it.  I would've made this a wiki but I'm not looking to compile a large resource, I just want a couple solid links and I will close the question.

Links to preconfigured BURP setups are also appreciated.

To specify a bit further, I'm particularly interested in the ideal setup for manual spidering, as I prefer the stealthiness and the ability to control vs. flooding tons of pages.

Along with advice on how to use Burp, you should also not forget to customise the following:

Form Submission:

To set suitable names and values for forms submitted by Burp, as I presume you don't want to send 'Weiner' :-)

Within the Burp window - navigate to the 'Spider' tab and then the 'options' menu. From here you should update the standard values within the forms section:

Click on each value and select 'edit', change the value and then click on the 'update' field before selecting the next value:

Payload:

You can also edit the default payloads that are used within Burp. This can be done by unpacking the .jar file. This example uses 7Zip to unpack the latest Burp file.

Firstly right click on the .jar file and select open with 7Zip. This will show:

Then open up burp\PayloadStrings\:

From this folder, select fuzzing - full.pay. Within this file you will see options that can be configured to your specific needs (highlighted in the following image):

Spider:

For manual spidering then Burps own help page has the following advice:

  passively spider as you browse - If checked, Burp Spider will process
  all HTTP requests made through Burp
  Proxy, to identify links and forms on
  web pages visited. Using this option
  can enable Burp Spider to build up a
  detailed picture of an application's
  contents even when you have only
  browsed a subset of that content with
  your browser, because all content that
  is linked from visited content is
  automatically added to the Suite site
  map.

This is done by visiting the 'Spider' tab and then selecting the 'options' tab:

This way, you control the generation of the site map without flooding the host with traffic.

Hope this helps.


Internal network address contains my name - problematic? In my university, I needed to register the MAC address of my personal laptop with the admin in order to use the university network. Now, it seems like I am assigned a unique network address "lastname.university.com", as my login prompt shows:

Last login: Wed Aug 16 07:45:38 2017 from lastname.university.com

Is it a problem (e.g. security or privacy) that this address contains my last name? Is it exposed to the outside world, e.g. when I am browsing the web?

What's your IP address?  If it's an RFC 1918 address like 10.*, then you're being NATted to the Internet, and as a comorbid condition* your reverse DNS won't be visible to external sites.  It will still allow the University to track you better internally, which is perhaps why they do it.

If it's not an RFC 1918 address, your DNS name likely does show up externally; you can check with a site like WhatIsMyIP (Reverse DNS Lookup).

*Having an RFC 1918 address implies that your reverse DNS won't be publicized on the Internet, because an RFC 1918 address must be translated (NAT, or Network Address Translation) before going out to the Internet.  In almost all cases, NAT is one-to-many (one public address, many private addresses) or pool-to-many (some public addresses, many private addresses) so there is no one-to-one mapping between the internal RFC 1918 address and the external address the Internet sees traffic from.  If you have hundreds or thousands of students being NATted to one or more public IP addresses, having that smaller number of public IP addresses be mapped to hundreds or thousands of names becomes meaningless.  All of which I glibly summarized as "NAT means no external reverse DNS" above.