Hydra hangs after attempts or returns all passwords valid I'm using the Hydra tool on Kali Linux 2020.1 and I'm trying to brute force a login at hack.me http://s123056-104737-qer.sipontum.hack.me/login.php.
My problem is that whenever I run Hydra it gets stuck.

I used Burp Suite to get the cookies and the failure string "invalid"
I also got the IP via Burp (and also tried using the resolved host name)
Also tried to use both http-get-form and http-post-form

This is my command

hydra -l user -P passws.txt 74.50.111.245 http-post-form"/login.php:username=^USER^&password=^PASS^&Login=Login:invalid&Login=Login:H=Cookie: __utma=233483271.55664693.1581785552.1581785552.1581841829.2; __utmz=233483271.1581841829.2.2.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided); __unam=657356c-17049c563d0-1c1145bc-18; __utmc=233483271; PHPSESSID=v9njnd2g7e2gbalulmbgof9vt4" -I -V

and this is what I get

    hydra -l user -P passws.txt 74.50.111.245 http-post-form "/login.php:username=^USER^&password=^PASS^&Login=Login:invalid&Login=Login:H=Cookie: __utma=233483271.55664693.1581785552.1581785552.1581841829.2; __utmz=233483271.1581841829.2.2.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided); __unam=657356c-17049c563d0-1c1145bc-18; __utmc=233483271; PHPSESSID=v9njnd2g7e2gbalulmbgof9vt4" -I -V
Hydra v9.1-dev (c) 2020 by van Hauser/THC & David Maciejak - Please do not use in military or secret service organizations, or for illegal purposes.

Hydra (https://github.com/vanhauser-thc/thc-hydra) starting at 2020-02-16 12:35:20
[WARNING] Restorefile (ignored ...) from a previous session found, to prevent overwriting, ./hydra.restore
[DATA] max 7 tasks per 1 server, overall 7 tasks, 7 login tries (l:1/p:7), ~1 try per task
[DATA] attacking http-post-form://74.50.111.245:80/login.php:username=^USER^&password=^PASS^&Login=Login:invalid&Login=Login:H=Cookie: __utma=233483271.55664693.1581785552.1581785552.1581841829.2; __utmz=233483271.1581841829.2.2.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided); __unam=657356c-17049c563d0-1c1145bc-18; __utmc=233483271; PHPSESSID=v9njnd2g7e2gbalulmbgof9vt4
[ATTEMPT] target 74.50.111.245 - login "user" - pass "uba" - 1 of 7 [child 0] (0/0)
[ATTEMPT] target 74.50.111.245 - login "user" - pass "milan" - 2 of 7 [child 1] (0/0)
[ATTEMPT] target 74.50.111.245 - login "user" - pass "admin" - 3 of 7 [child 2] (0/0)
[ATTEMPT] target 74.50.111.245 - login "user" - pass "foca" - 4 of 7 [child 3] (0/0)
[ATTEMPT] target 74.50.111.245 - login "user" - pass "password" - 5 of 7 [child 4] (0/0)
[ATTEMPT] target 74.50.111.245 - login "user" - pass "trota" - 6 of 7 [child 5] (0/0)
[ATTEMPT] target 74.50.111.245 - login "user" - pass "Ciaociao.90" - 7 of 7 [child 6] (0/0)

after this it just hangs forever. Every minute I get outputs like this

[STATUS] 7.00 tries/min, 7 tries in 00:01h, 1 to do in 00:01h, 7 active

but every time with a decreasing tries/min

When I run the command without including the cookie and the failure string it works, but of course is not able to tell successful logins apart from failed ones.
I tried to run this command from a different computer and also from a virtual machine, but without success.

I have no clue on what to do.

Hydra gives a lot of false positive, at least this is my experience with it. You can try to use wfuzz instead with this syntax for post request  wfuzz -z file,wordlist/others/common_pass.txt -d "uname=FUZZ&pass=FUZZ"
 http://testphp.vulnweb.com/userinfo.php

You will know the right password when you see the 3xx code as a response from the server.

Here is the link to the official documentation
https://wfuzz.readthedocs.io/en/latest/user/basicusage.html


How does duplicated RFID work? I was surprised to find out today that condominium, garage etc. access cards can be duplicated and used without being registered with the reader system. Are these RFID cards? Does it mean that store-value cards for transportation can also be duplicated?!

My understanding was that each RFID card has a GUID that is "burned" into the card. When the card reader reads the card, it will match the unique GUID with the system records to make sure it is registered with the system before granting access. Is this not the case?

Primitive RFID keys can generally be copied easily. (CloneMyKey.com says it can clone 90% of RFID tags.)
In most cases it's just a chip that emits an ID, which can't be changed. But sometimes it can be reprogrammed - and sometimes you can order tags programmed with specific requested IDs. (See YouTube videos for RFID Cloning.)

The card itself doesn't have to be a card, it can be a device, which obviously won't have a burned-in ID, which can be used to replay RF transmissions to mimic the signals normally emitted by a legitimate card. They are just radio waves after all.

Some systems will use a simple ID check from the card to determine if the card has the right ID to allow access.
Some systems (like NFC) do have protection from these replay attacks, with varying degrees of fallibility. The same technology is used in Oyster cards, on the London transport network for example, and there are numerous cases of this technology being hacked, with card skimming and replay attacks taking place and uploaded to YouTube - How to Clone an Oyster Card.

Credit/Debit card NFC payments involves two parts of information being sent from the card to the reader, one request from the reader is to identify the type of card, next the reader makes a request to the card that is specific to the type of card, this effectively unlocks the card, which then transmits the next piece of data, used to confirm the card is legitimate.
The second request the card makes involves using a secret key that is proprietary information, known only those associated with the card industry. The card itself has built in defences to prevent brute force attacks to discover this key.

So yes, it is possible to clone some RFID cards (or tags), and it is possible to impersonate them with devices, but it depends how a specific system is using these devices as to how vulnerable each system is to this style if attack.

Is NFC still a vulnerable technology


Encryption method and other security concerns for a simple password manager I thought I would learn a little bit of cryptography programming by making myself a simple password manager program that I can potentially even use to keep track of my passwords. The idea is that my program would keep a list of passwords in encrypted form and names of the services the passwords are used for. Then I could give as an input the name of the service I would like to access and a master password and the program would give me the password for that service.

What encryption method should I use? What other security issues I should think about? Is it a viable goal (with no experience) to make myself a password manager that is safe enough for me to actually use it?

Good on you for trying to learn this. Keep in mind that whatever you produce shouldn't be put into an actual production environment even on the personal level. Consider this as a learning opportunity and not a recipe to cook your own password manager. Usually, you'd do something along these lines:

Generate a random 256-bit key. This is your master encryption key.
Take the master password and run it through PBKDF2 along with a 64-bit salt and get a 128-bit key. This is your secondary encryption key.
Use the secondary encryption key to encrypt the master encryption key using AES in the EAX mode and store it somewhere.
For the database, use any format you want. As I'm not sure which one to choose, I'll say XML. Encrypt the database using the master encryption key.
When the user wants to access database you load the encrypted file in the memory, take the master password and run it through PBKDF2 with salt and get the secondary key, use the secondary key to decrypt the master key, and finally use the master key to decrypt the database.
After the user finishes accessing; adding; modifying; or deleting entries from the database, you simply encrypt it again and discard everything from the memory.
When the user wants to change the password, you decrypt derive the secondary key from the old password, decrypt the master key, derive a new secondary key from the new password, use that key to encrypt the master key. By doing this, you don't have to decrypt and re-encrypt the database when the password is changed as the master key is kept the same.

Finally, I recommend that you take a look at KeePassX's source code. A lot of information can be harvested from there.

I'll say this again, do not use the actual application you produce. You might (and very likely will) do something wrong at some point. Heck, my instructions themselves could be (and probably are) wrong.

Happy learning!


What is the Purpose of placeholders (e.g. %k, %f) in some GnuPG options? In some GnuPG options (--cert-notation, --sig-notation, --photo-viewer and others) there can be used certain placeholders (for instance %k, %f etc.).

What is the purpose of using that placeholders? In which programs are they expanded?

Using those placeholders is especially helpful if you define such notations in your GnuPG configuration (~/.gnupg/gpg.conf). These placeholders get replaced by GnuPG just before the notation is applied (or the photo viewer called, ...) to be able to insert some information on the current operation. From man gpg:

  There are special codes that may be used in notation names. "%k" will be expanded into the key ID of the key being signed, "%K" into the long  key  ID  of  the  key  being
                signed, "%f" into the fingerprint of the key being signed, "%s" into the key ID of the key making the signature, "%S" into the long key ID of the key making the signature,
                "%g" into the fingerprint of the key making the signature (which might be a subkey), "%p" into the fingerprint of the primary key of the key  making  the  signature,  "%c"
                into  the signature count from the OpenPGP smartcard, and "%%" results in a single "%". %k, %K, and %f are only meaningful when making a key signature (certification), and
                %c is only meaningful when using the OpenPGP smartcard.

For example, consider you're running some certification service and host a website with further details on the certification of each key. If you want to append a notation containing a URL to further information on the signed key (without any discussion on how to achieve that), you could add following to your gpg.conf:

cert-notation details@cert.example.com=https://cert.example.com/lookup/%K

If you now sign a key 4E1F799AA4FF2279, following notation will be appended:

details@cert.example.com=https://cert.example.com/lookup/4E1F799AA4FF2279


Another domain is using our web app's IP address. How to prevent it? Our web application is being mimicked by another domain, https://www.djjpl.com.sg. On ping, it gives the same IP address as ours. Every git push to our server reflects on that domain.

We want to stop that domain from mimicking our app. How can we prevent it?

Our web application is being mimicked by another domain ...

The domain in question is configured to resolve to the same IP address as yours. That's why it looks like they mimic you when in fact it is simply the same physical server, only accessed by another name.

But when using the URL from your question one gets a security warning in the browser: the certificate is for nrnsewa.com which does not match the name in the URL www.djjpl.com.sg. Since this  warning will scare away most visitors I doubt that this is an attack but believe that it is simply a misconfiguration for www.djjpl.com.sg.

  How can we prevent it?

You have no control what others configure for their domain. This includes misconfigurations where they accidentally configure the wrong IP address for their site in DNS. This includes also that they don't update their records if they no longer use a domain which means it might point to IP addresses which are used by others in the mean time. Anybody could configure their domain to point to an arbitrary IP address (including yours), both deliberately and by accident.

But what you can do is refuse access to your site or show an error when the domain name in the TLS handshake (i.e. HTTPS-URL's) or the HTTP Host header do not match your site. How this is done depends on the specific server implementation you have. See for example How can I block requests with the wrong Host header set?. And even if you don't care about such misconfigurations, enforcing the correct Host header is still recommended since it prevents some attacks like DNS rebinding.


What does it mean to have a retired CA root certificate? I was looking at various CAs and they always have a paged dedicated to list "retired roots".

For example: https://www.thawte.com/roots/retired.html

Does it mean these certificates should not be trusted now? Or does it mean CA will not renew the root once the certificate expire?

All of the certificates described on the retired roots page today have 1024-bit RSA keys (except for the one which says 1025) and were self-signed with either md5WithRSAEncryption or sha1WithRSAEncryption.

The most likely interpretation is "we are not self-revoking these roots, certificates which chain to them are not inherently untrustworthy, but you need to make an application decision to trust them; however, we will not issue any further certificates which chain to these roots".


How to detect whether a CA used EV for a certificate using openssl I want to download the certificate of a particular hostname and detect whether the CA used EV (extended validation) when issuing it. So far I was not able to find anything that identifies certificates as being EV. Is there any way to achieve this? Ideally using OpenSSL?

Note that EV certs are not structurally different -- they are just a cert issued under a different policy.  So you have to check the policy.  See http://en.wikipedia.org/wiki/Extended_Validation_Certificate#Extended_Validation_certificate_identification

You will need to do a fairly extensive table lookup, won't be native to openssl I'm afraid.

This is probably a dup of https://stackoverflow.com/questions/14705157/how-to-check-if-a-x509-certificate-has-extended-validation-switched-on

In response to some comments below:

This attribute is in the "X509v3 extensions" field. x509v3_config(5) notes

  Certificate Policies.

  This is a raw extension. All the fields of this extension can be set by using the appropriate syntax.

  If you follow the PKIX recommendations and just using one OID then you just include the value of that OID. Multiple OIDs can be set separated by commas, for example:

certificatePolicies= 1.2.4.5, 1.1.3.4

That's how they get into the cert.  Here is what it looks like in the cert: for example, if you examine the GlobalSign certificate protecting https://www.globalsign.com/en/ :

echo | openssl s_client -connect www.globalsign.com:443 2>&1 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > globalsign.pem

This captures the certificate in a file.  You can view it,

openssl x509 -text -noout -in globalsign.pem

and about midway through the output,
[...]

       X509v3 extensions:
            X509v3 Key Usage: critical
                Digital Signature, Key Encipherment
            X509v3 Certificate Policies:
                Policy: 1.3.6.1.4.1.4146.1.1
                  CPS: https://www.globalsign.com/repository/

[...]
That policy OID corresponds to the EV OID for globalsign (and is on the table at wikipedia.).  And as Mike points out, http://oid-info.com/get/1.3.6.1.4.1.4146.1.1 describes this as {iso(1) identified-organization(3) dod(6) internet(1) private(4) enterprise(1) 4146 certificate-policies(1) extended-Validation-SSL(1)} and that 4146 is GlobalSign NV/SA.


Is it safe to send verification code in the subject of the email? I am wondering if it's safe to send the signup, reset password, 6 digit verification code in the subject of the email.
Example: "Welcome to the Application, Your verification code is XXXXXX"
The purpose of sending the verification code in the subject is to make it easily accessible on mobile devices. Instead of opening the email, a user can simply see the code from the notification.
But with that, the verification code can be shown in the list of the emails. What are some other security risks here?
Real-life attack scenario:
I am on a screen share call with my Boss, I know he intentionally enabled email push notifications on Desktop. I know the service he is using exposes the password reset verification code in the subject of the email. I try to reset there password via email. They receive a notification showing the 6 digit code. I quickly do what's currently going on your mind and

Yes, this is a risk. You shouldn't send it in the subject of the email.
Think of a locked phone but you receive an email with the subject "Your code is 123456-789". That would appear on your phone's lock screen so an attacker can easily see the code (just an example here).


What protects HDCP keys in software? I (somewhat) recently stumbled across HDCP (high-bandwidth digital content protection), a protocol that encrypts movies and other media "on the wire".

Now there are of course tools to play blu-rays and related media on PCs (e.g. something like Cyberlink's PowerDVD) so they need to have some means to get authorized access to the protected media and thus the keys must be hard-coded into the program and if they are not hard-coded, at least an oracle access to the GPU's hardware-protected keys must be hard-coded.

So my question is simple:
What prevents an attacker from reverse engineering the player software and using the (valid) keys or the oracle access to make illegal (high-quality) media copies?

As usual,  I don't want to hear about "it's against the software license" as answer, because this may prove ineffective in (quite) some situations. In other words: I'd like to hear the technical defenses used in DRM.

Please note further: This is a theoretical question and I do not plan on actually applying any knowledge learned by this question for unlawful purposes, the answers may be restricted (at the discretion of the author) to not be directly usable as attacks without major efforts. Furthermore I would prefer to only have public documents as sources here.

What prevents an attacker from reverse engineering the player software and using the (valid) keys or the oracle access to make illegal (high-quality) media copies?

There is nothing which fully prevents the hacker and therefore such keys have already leaked, see Wikipedia; AACS Encryption Key Controversy. But there are lots of things to make it harder: code obfuscation to hide the keys, detection of debugging tools to hinder reverse engineering etc. And encryption keys can also be revoked if they get compromised.

A better protection could probably be done with the help of hardware (i.e. TPM, dongle, smartcard...) and such techniques are used in other scenarios to protect the content (Pay TV, game console). But at the moment the loss of profit due to illegal copies is probably not high enough to justify the additional costs and usability restrictions associated with such hardware.


A few files on a domain controller were encrypted - how could that have happened? I've just realized that the policies on one of our Windows domain have been failing.

I've traced the problem and it turned out the INI files were encrypted by Globe ransomware (or one of its variants).

The files affected were all the policy INI files (internal location: C:\Windows\SYSVOL\domain\Policies, external link used by GPUpdate: \\<domain.name>\sysvol\<domain.name>\Policies) and a single ASP file from C:\Windows\System32\CertSrv\CertEnroll.

I've checked for other traces of the ransomware, and found none - no suspicious files, no registry entries. It seems the DC itself is clean.

The ransom note was created about a month ago.

I also know that some time ago (albeit I think it was over a month ago, tho I'm not 100% sure) one user of our domain was indeed struck with ransomware. Unfortunately I don't remember what kind of ransowmare it was, nor the exact date that it happened. His computer has been cleaned up (Nuked From Orbit).

I'm scratching my head thinking how could those DC files get encrypted. It seems to me that they were encrypted from an external source - i.e. some computer on the domain gained access and encrypted those few files. Possibly the users infected computer? But still, the policy INI files are (or should be) read-only when viewed from an external source.

Now I'm getting really paranoid, and I'm not sure how to proceed. Nuking the DC is an option, of course, but it really does seem only a few files were changed, and those files seem to expose some kind of outside access as well. BUT at the same time, that shouldn't have happened anyway.

Could those locations be affected by ransomware running on a different domain computer? How else could those files be changed?

It seems ransomware itself, or the person who planted it, removed traces.

How this could happen? I think he gained himself access to it using stolen credentials, and if there's ransom note on the server, I don't think it would be clean, I think it may have some sort of backdoor, which means, it would have to be rebuilt and all passwords re-set.


What implementations are possible for dual control? An organization requires employees to use 2 person authentication in some scenarios. That is, when accessing, say, a server, secret knowledge from 2 people should be used for authentication. No one person should ever have access to the server alone.

Question: What implementations of this requirement are possible?

This is a Windows setup.

The only implementation I can think of is the following: 2 people both connect to the machine (say, remotely), first person enters first part of the password he knows, and the second person enters the second half.

Note: Not to be confused with two factor authentication.

One approach is to use temporary passwords, and a password management application. The process could work like:

An admin submits a request for access to a server for a particular time window
A separate admin approves this request
With the request approved, from the start of the time window the first admin can now access a temporary password for the server
The admin logs in as normal, using the temporary password
At the end of the time window, the temporary password is automatically reset to a new value

I have seen systems like this, but they all used some bespoke scripting, based on an existing request management system. I don't know anywhere you can just download such an application.

Of course, once the admin has the temporary password, they have single-handed access to the server. If you need the two-man rule the whole way - that there have to be two admins sat at one computer to perform the work - this approach won't work.

A variant on this I have seen is that a secure ID token is held by ops staff. When the admin needs to login to the server, they provide a password (that only they know) and also phone the ops desk to get the code from the secure ID token. I'm not convinced this arrangement is a good idea, but it does get used.


Emailing PAN securely? Has anyone successfully implemented a PCI approved method of emailing PAN data? I know there are concerns managing all the PCI requirements in an email solution but is there anyone that has actually satisfied all PCI 3.2 requirements and had this approved by their QSA?

If you solicit PAN data via email, it's likely easier to provide the corresponding person a HTTPS interface through which they can communicate their PAN via text boxes. You can then control how submission works such that you can securely encrypt and store the data on receipt.

If you solicit files containing PAN, it's probably easier to use an SFTP server.

You could request that the person add the PAN to a file attachment. The person could encrypt the file using a random password (which would use a Password Based Key Derivation Function) and encrypt the file using an AES 256-bit key. The password used could then be communicated via a separate communications channel.

You could use PGP/GPG email encryption if you and the correspondent have this available.


Why are some Bluetooth devices susceptible to ping floods and some are not? Just for fun, I've ping flooded my bluetooth speaker at home using l2ping on Linux and I was unable to connect to it as the pinging continued. I've tried flooding my phone and it seems to have received the packets as I got a response (just like the responses i got from my speaker), but I was still able to connect it to my laptop and send files in between. So my question is, why are some devices susceptible to such attack and some not? Is there a mechanism used by my phone that my speaker doesn't use?

This is a type of Denial Of Service attack. You need to exhaust the resources of the victim in order to make a successful attack. The memory on a smartphone is way more than that of a Bluetooth speaker and so that attack has to be of a much larger scale even without any additional countermeasures deployed in the smartphone.


ufw and nmap show different result in terms of open ports I have set my firewall ufw / firewall rules as follows:

Default: deny (incoming), allow (outgoing), disabled (routed)

To                                      Action      From
--                                      ------      ----
OpenSSH (22/tcp)                        ALLOW       Anywhere
Nginx Full (80,443/tcp)                 ALLOW       Anywhere

But if I make a Zenmap/nmap scan it shows me the following ports are open (or also closed):

Why is ufw showing me a different result if by defauls all ports are closed except ssh(22) and nginx (80, 443) and why are two closed ports shown? shouldn't all other closed ports be also shown then?

To list current open ports, use netstat -atnp

for you Zenmap / nmap result. it depends on where did you run the command. same machine / local network/ external network


Microsoft Windows CVEs? I know sites like cvedetails and exploit-db feature Windows 10 specific CVEs. But doesnt microsoft.com have a list (or feed) of vulnerability advisories and recently disclosed CVEs? I checked their website (which is a bit confusing to navigate) and ultimately lead to this page, which isnt very helpful. Also tried a few google dorks, but didn't turn up anything. Or an archive of "patch tuesday" advisories? Surely something like this exists...

This is available in Microsoft's Security Advisories and Bulletins from MSRC:

  In this library you will find the following security documents that have been released by the Microsoft Security Response Center (MSRC). The MSRC investigates all reports of security vulnerabilities affecting Microsoft products and services, and releases these documents as part of the ongoing effort to help you manage security risks and help keep your systems protected.


NMAP - Port 4111 XGRID? Starting Nmap 7.12 ( https://nmap.org ) at 2016-04-24 10:19 BST
Stats: 0:00:27 elapsed; 0 hosts completed (1 up), 1 undergoing Service Scan
Service scan Timing: About 0.00% done
Nmap scan report for local.domain.com (127.0.0.1)
Host is up (0.10s latency).
PORT     STATE SERVICE VERSION
4111/tcp open  xgrid?

Hi,

I've been given an IP address and a port number (changed in example above) and a note about playing a game. I scan the port in question and get the above but I can neither NC or Telnet into it

Any advice?

I would suggest a much more robust NMAP scan, look at the other ports as well, and try fingerprinting the services as well as the OS.

I'm guessing you did something like nmap -p 4111 IPaddress

First try adding the -sV flag

nmap -sV -p 4111 IPaddress

This will give you the version of the software running on that port using fingerprinting.


Closing an HTML tag without using the actual character I'm currently learning how to perform XSS on websites, but there is a constant problem that keeps recurring that I'm sure must be easy to bypass.
Quite often, the website will filter out quotation marks and/or "< >". This is not a huge problem when it comes to the actual script, as that can be bypassed by using a different method or by obfuscating the script, the real problem is when I need to escape from an HTML tag.
For example:

<input class="user-control-search-textbox" type="text" name="tx_indexedsearch[sword]" value="onmouseover='javascript:alert(0)'" id="tx-indexedsearch-searchbox-sword" />

As you can see, the javascript won't execute because it is inside the quotations for value, and therefore is not treated as executable code but as an actual search. The problem is that I cannot get it to escape from this as when I put in ">  it turns into

value="&quot;&gt;onmouseover='javascript:alert(0)'"

and so the tag is not closed as the actual character isn't used.

What I would like to know is if it is possible to close the tag without using the actual character (in this case " and >) as they are filtered out, or whether I can obfuscate the character in some way but still have it read as closing the tag.

If anyone can help me then I thank you very much, it is probably a stupid question.

Not in general, no.

Attacks at the encoding level like UTF-7 work by specifying ASCII characters to produce byte content that is interpreted very differently by tricking a browser's encoding guessing heuristics, but most modern browsers are savvy to that sort of thing.

If the page ends up being processed by a buggy mobile gateway, language translation service, or other system that tries to be helpful by converting non-ASCII characters to ASCII "equivalents", then full-width versions like ＞ might be converted to &gt;.


How to change font so simillar characters can be distinguished in Keepass 2? I've had problems at work and at home where password managers display similar letters virtually identically. For example it's impossible to distinguish between an 1, l and I. Is there a recommended font to use? I've found Times New Roman in Word is generally distinguishable. How can the font be changed in Keepass 2?

You can choose one of the available fonts by following this path:

Tools/Options

Once there, choose the tab called Interface.


What are the risks associated with SSL interception in an Organization? If an SSL interceptor is installed for security reasons in an Organization, and a certificate from intermediate CA is installed on all domain machines, what kind of risks this setup presents?

Compromising your root or intermediate CA is going to be easier than compromising a commercial CA, so it decreases the cost of mounting an undetectable to the user man-in-the-middle attack on HTTPS connections when your employees are directly connected to the internet (e.g. coffee shop wifi). I don't see this as being a very large threat.

There is the obvious increased risk to users from a malicious employer / sysadmin / compromised proxy server - the attacker can now intercept and steal all of their personal social networking/email/bank credentials.


Comparison Between AppArmor and Selinux I was reviewing several different comparisons of AppArmor and SELinux which include:

Why I Like AppArmor More Than SELinux
SELinux and AppArmor: An Introductory Comparison

From these articles I conclude that AppArmor is better than SELinux based on AppArmor is far less complex and far shorter learning curve. Thus the majority of comparisons are in favour of AppArmor but how can I say that AppArmor is more secure than SELinux?

These security systems provide tools to isolate applications from each other...  and in turn isolate an attacker from the rest of the system when an application is compromised.

SELinux rule sets are incredibly complex but with this complexity you have more control over how processes are isolated.  Generating these policies can be automated.  A strike against this security system is that its very difficult to independently verify.

AppArmor (and SMACK) is very straight forward. The profiles can be hand written by humans, or generated using aa-logprof. AppArmor uses path based control, making the system more transparent so it can be independently verified.


How to supply OpenSSL generated Private & Public Keys to iOS & Android apps? The problem statement is:
To supply clients on a network with individual Private & Public keys generated on a Server over the wire(over a HTTPS connection after they are registered). The clients are iOS & Android apps, and the server is generating keys using the OpenSSL library on PHP. The clients will then proceed to store the keys to sign further communication.
Additional Note:
[1] The apps must also have Server's public key to verify signatures.
[2] No encryption will be effected with the keys. Just signing.

What is the best way to supply the keys to the apps so that they can have it with them in formats they support natively?
So far I have read about plenty of formats and file structures to supply keys, but anybody experienced with this situation and could guide as to which format is the most hassle-free to use?

Not entirely sure what you're asking; if your apps natively support a specific format, use that. Is there a specific app you'd like to ask about?

If you just want a simple format for apps you're writing, the OpenSSH format is nice and simple (and widely used / supported). Also X.509 certificates are a little more complicated, but also widely supported, though that might be a bit beyond the scope of what you're trying to do (X.509 is a full spec for PKI [Public Key Infrastructure] and PMI [Privilege Management Infrastructure]).

OpenPGP also has free implementations (gnupg), and has good library support / a nice key format (when using ascii armoring).

[OT]:
On a semi-offtopic note, generating the private key server-side and then giving it to the client is almost always a bad idea that defeats the purpose of public/private key crypto. Instead you should pre-seed the clients with the servers public key, generate a private key on the client, use the servers public key to verify the connection (if you're already using TLS you've done this part) and then send the server the client's public key. Also, if you're already using TLS I'm not sure why you'd need another layer, then again, I don't know what use case you had in mind.

Examples

To get an example of each key on a Unix/Linux system:

OpenSSH: ssh-keygen -t rsa -b 2048 -f filename

GnuPg: gpg --keyserver pgp.mit.edu --recv-key 0xEC2C9934 && gpg --armor --export 0xEC2C9934 (will download and display my public key)

X.509: openssl genrsa -sha512 -out keyfile.key 2048 will spit out a private key.
You can then generate a certificate signing request using openssl req -new -key keyfile.key -out keyfile.csr and finally a certificate: openssl x509 -req -days 1 -in keyfile.csr -signkey keyfile.key -out keyfile.crt

Final Thoughts

After reading the comments, it seems you're looking for more of a full solution. If I understand what you want, I think the ideal solution would be to use X.509 certificates. You could either create your own CA (Certificate Authority) or purchase a certificate from a trusted third party online (I like RapidSSL). You can then have your apps verify communications from the server, and use ECDH (Eliptic Curve Diffie–Hellman) to negotiate a shared key and facilitate secure communications (You said you wanted small footprint, so I figure ECDH will be faster than normal DH). AES256 for encryption and SHA2 for message digest verification should give you a secure, well supported, and reasonably low overhead connection. Basically just use TLS and make sure you choose good options for the encryption type, key exchange mechanism, and message digest function.


TLS_RSA_WITH_AES_128_CBC_SHA on Windows XP Let me first say, I know XP is bad and dead.

That said, I was wandering if a software written using .NET could make TLS 1.0 connections that use the TLS_RSA_WITH_AES_128_CBC_SHA when running on Windows XP?

Or alternatively, Is there any secure protocol+cipher that can be used by a .NET app running on Windows XP to contact a web server over https and if so what need to be done to allow that?

Where do the ciphers come from when using a .NET app? Is it part of the .NET Framework? Or does the framework itself use the ciphers provided by the OS?

For TLS, the .NET framework utilises the underlying TLS API exposed by the operating system. It does not re-implement the TLS protocol in managed code.

The operating system's TLS stack pulls cipher support from the local cryptographic provider. In XP, this is CAPI (Cryptographic API) which does not support AES. In later versions of Windows the CAPI was replaced with CNG (Cryptography Next Generation) which does support AES.

Unfortunately there's nothing you can do about this if you want to use the native TLS provider or the native HTTP classes in the .NET Framework. You'll have to change over to a managed implementation which includes such features, though I'm not aware of any off-the-shelf product that would help you here.


Phishing attacks with two factor authentication Making our own phishing page isn't a big deal. Copying source code from website and modifying link just does our job. But what if we want to add phishing page for 2FA in the same code?

Consider the scenario
Attacker and Victim are both on same network (router) without any firewall.

Attacker burps victim with a phishing page and forces to login.

When victim login attacker gets the information. He enters that information through his own device.

Now the website asks for 2FA.So attacker makes a 2FA phishing page and sends it to victim.

Victim unaware that 2FA was he received was for another device inputs the code.

Attacker gets 2FA credentials and inputs it in his device.
Maybe it can work.

My question is that is it possible to combine code for login page and 2FA page into single code and how.
In short when attacker inputs his login details and clicks login he should directly get 2FA page.

I want  method

Yes this is doable. And there are existing platforms that do the heavy lifting for you concerning the typical applications:
 - https://github.com/ustayready/CredSniper
 - https://github.com/kgretzky/evilginx2

Conceptually they front the real application and pass on all authentication factors. You can even have the victim use the real application transparently, whilst you harvest credentials, 2fa codes and session identifiers.


Do digital camera perform steganography / watermarking? It is well documented that one should consider that all modern printers perform steganography / watermarking in the back of their users

https://en.m.wikipedia.org/wiki/Printer_steganography

Is such a feature also documented / are there rumors of similar features with the raw pixel matrix coming out of modern digital cameras? (I am not talking about exif of other metadata, only raw pixel data).

Edit: I am not talking about naive steganography as done by adding dots, but also advanced methods, see comments.

Yes - well, sort of, albeit (as far as I know) unwittingly. I attended a conference where one of the relators was prof. Jessica Fridrich reporting on the identification of digital image sources. You can probably start your search on her page, here.

To be clear, this is nothing like intentional yellow-dotting performed by some printers, and cannot be used to trace a picture to a camera unless you also possess that camera and can take other pictures to compare.

What happens is that every CCD chip has subtle variations that can be recovered through frequency analysis from the original picture data, and these variations are manufacturer and chip specific. This allows, with a certain error margin, to:

given two pictures, determine whether certain areas of one picture are original or whether they come from a different source (the patterning in those areas is not consistent with the CCD)
given two pictures, or a picture and a camera, determine whether the picture came from that camera or not.

It would be extremely easy to make this system more reliable, by e.g. laser etching the CCD chips with a unique pattern. This would not be visible to the naked eye when inspecting the pictures, but the information could be recovered.


What uniquely identifies my device to my ISP? Something like the Hong Kong protests for example. If a protestor wanted to use his personal computer on a network that is monitored, how can he change its properties enough so that it is not traced back?
For example, I would assume the MAC can be used to try to identify the user of the device. If the same MAC address was used on the person's home network, and the network that was being monitored, the user can easily be identified. So using a throw-away external wireless adapter to change the MAC might be a good idea.
The main concern is not about hiding the activity done on the network, but rather hiding the fact that the same device was previously used on another network, to avoid the person using it from being identified. Basically, how can the device be made to look like a completely new or random device with no way to trace it back whatsoever?

Like the previous answer mentioned, MAC addressees are strictly limited to the layer 2, which means that they will never get routed on Internet out of your personal network. However, if you feel unsafe about the security of your own local network and want to modify the hard-coded properties of your network interface card, it is possible to use MAC spoofing techniques on your operating system. There is also some software tools to do the same thing with a graphical interface.


How bad an idea is intentionally using short RSA keys for signing CloudFront private-content URLs? While pondering a question on SO about efficiently generating signed private-content URLs for CloudFront I decided to check what sorts of savings could be found by using a shorter RSA key. With the 2048-bit key AWS generates, our signing method runs in around ~1550µs on my laptop; using a 512-bit key cuts this down to ~113µs.

We sign the links to grant paid users access to media files for a given number of minutes, and have already been using the equivalent SHA-1 HMAC signing process for gating access to the same files on S3. The vast majority of the requests our server fills are for these signed URLs.

How acceptable/unacceptable is it to use a short length for a key dedicated to this purpose? What qualifies as acceptably long/short?

Right now (July 2015), the current record for RSA key breaking is for a 768-bit modulus, and it took two years of computations with a lot of machines, and, importantly, with some very fine brains too. A notable point is that the best known RSA-breaking method (that was used for RSA-768) is integer factorization with the General Number Field Sieve; GNFS does not benefit from any kind of "precomputation". This means that the people who factored the 768-bit RSA key, if faced with another 768-bit RSA key to break, would again have to spend two years on the job.

As for 1024-bit RSA keys:

they are currently unbroken;
they could be broken with existing technology, but it would require throwing at the problem a non-negligible number of millions of dollars to build a dedicated machine that would be good only at breaking 1024-bit RSA;
... and even that machine, if it is ever built, would still need a lot of time (months, possibly years) to break a RSA key.

In your case, if signatures only need to resist for a few minutes, then you could generate a new RSA key every day, and this will defeat GNFS-based attackers as long as breaking a 1024-bit RSA key takes more than a day, a property which is quite likely to hold for the next few decades. A good point (for you) is that since your signatures become obsolete quickly, you "just" have to keep track of scientific and technological advances: the day some people succeed at breaking a 1024-bit RSA key, you can switch to 2048-bit keys; you do not have to do it in advance.


"Just add a word or two" advice When using a passphrase, and someone shows concern about it being cracked in a short number of years due to significant advances in technology or whatnot, often you'll hear the advice "Just add a word or two".

They mean to your existing passphrase, right? Or do they mean create a new passphrase with N+1 or N+2 words this time?

They mean create a new passphrase with more words in it.

The main reason for this is that reuse, even if it is just to add something on the end, dramatically improves the chances an attacker will be able to find your passphrase, or in the situation that they may already have it, they could configure a brute force tool to start with your old passphrase and try combinations of that passphrase with a dictionary word added - which makes the attack simple and quick.

re-use is bad. Whether it is using the same passphrase across different sites or applications, or reusing a large portion of your passphrase and just changing the end (or start, etc.)


domain certification, webservers, load-balancer and licensing I have just a single domain.
I have 1 reverse proxy (l7 load balancers) and 3 webservers serving www.example.com

I am getting an ssl pro certificate for the domain and I want to understand the number of licenses I will need.

Let's assume that self-sign cert is out of the equation for the entire path between client <-> lb <-> webservers

choice 1) cert on loadbalancer only,  communication between loadbalancer <--> backend webserver is pure http.

choice 2) cert on loadbalancer, cert on webservers

client <-> lb <- webserver>  all https

=============================

For choice2, can I just use 1 cert and install the same cert+ptvkey+intermediacert on the loadbalancer and all the webservers?

Is the number of licenses required for a domain a pure commercial restriction or are there really some technical parameters in the cert itself that restrict the no of servers that can use it?

can I just use 1 cert and install the same cert+ptvkey+intermediacert on the loadbalancer and all the webservers ?

Yes, you can use single purchased certificate on all affected components (load balancers, proxy, web servers) as long as they serve the same domain name. You don't need to purchase separate certificate (with the same name) for each component.


Kerberos realm understanding Could someone summarise why realms are necessary in Kerberos and the advantages of the concept.

I'm struggling to isolate everything I know / beginning to understand into some well defined points for revision. My research just uncovers articles with so much depth can barely make sense of it. I understand what they are. I am aware that using them means that data is distributed thus advantageous in the event of a system failure and that it is easier to manage many small realms instead of one huge one.

Thanks in advance

Since your question is rather broad, I will attempt an equally broad answer.

Authentication is often put in terms of a security boundary or scope. For example, a State-issued Driver's license is a credential used to validate your identity and is scoped to have meaning ultimately to the issuing State (though others may chose to trust that credential).

A Kerberos Realm is, in broad terms, a modeling of administrative scope.

You might also liken realms to similar technical administrative boundaries: a DNS namespace and it's subdomains ... or an IP namespace and it's subnets.  Each of these have various technical implications whether to use a large, top-level space or carve out a group of smaller spaces - but one of their chief functions is to model administrative scope.

In the case of Kerberos, the key goal of realms are to make a larger administration space (say 10,000s or 100,000s of usernames) smaller by dividing them into sub-realms along organizational or functional boundaries.

Other important implications:

ability to delegate administration of a realm to a group other than a core admin group
ability to distinguish one user of a realm from another
ability to dictate the trust policy for users of one realm by another (cross-domain trust)
ability to set configuration parameters on one realm that might differ for another

(Aside: it so happens that a Kerberos Realm may coincide with a DNS domain. This isn't required, but can make discovery of Kerberos realms easier by client software and users; as well as suggest natural "edges" in which to carve your authentication space. This will depend entirely on your authentication/authorization needs)


Can being hacked/cyberattacked once make you more vulnerable to being hacked again? I recently had a security breach on my PC, I ran a software called thaiphoon burner and DRAM calculator despite my windows warning. Long story short while I do not know if they are directly responsible, all my anti virus programs, including avira, windows defender were all uninstalled without a trace right after I ran the two programs mentioned above.

I have formatted and reinstalled my windows 10 (with a usb drive that was once connected to it so I don't even know if it's safe), backed up my files on a HDD that I still don't know how to recover, but what concerns me more is, even if my current system is safe, can hackers / malware obtain other information about me/my network that makes future hacking/cyberattack easier?

Namely, could it be possible that the malwares I had executed had collected information about my network, so that now my entire network is in some sense "compromised" to a point where no computers connected to my network is safe? And any information trafficked on network is compromised?

To some extent, yes, I'd worry that any devices that were connected to your network at the time your PC was running malware, might also be infected by something. Take backups and monitor for suspicious behavior going forward on all your devices attached to your network. Make sure they are all up-to-date and have malware protection enabled. But, if you are not on a corporate network or high-security network, I would not worry about network infrastructure mapping or anything that may have taken place.

What I would worry about, indeed my primary concern, would be compromise of any passwords or accounts that may have been stored on or accessed from your computer. Do you have any saved passwords in your browser? Use a password manager? Log into any websites while the malware was active? Assume all such passwords are compromised. Go change all your passwords on all websites you may have accessed immediately. If you reuse a password anywhere, change your password anywhere it is used, regardless of whether you accessed that specific site on that computer.

My other worry would be a persistent ransomware infection or something that is waiting in the background, biding time, in order to wipe out your backups before striking. Reformatting is probably enough for that but be sure to take a backup of all your devices, and save to disconnected storage that would be inaccessible to any ransomware. But I think your online account security should be your first concern an this point.


Receiving random numbers in GET request query string. Exploit? I recently spun up a web server and have been receiving hits where the client appends a random number, for example "12345" as a query string to the root (/) endpoint.

Here's an example log entry:

12345/678910.111, [response], http://0.0.0.0:80: get / {"89671":""} 200 (10ms)

This seems like a purposeful exploit but I have no idea what to make of it. Does this match up against a known exploit, and if so, what?

I would guess this is a spider doing cache busting. The get parameter is ignored by the server and client, but since the get parameters are part of the url (as far as the caches are concerned) the url has never been seen before, so it forces a fresh load from the web server.


How to store ECDSA public key securely in Android I am writing an Android application that needs to verify that a request is sent from a trusted party (me).

This is my current solution:

Storing keys:

Generate ECDSA public key / private key from a server.
Store private key in server. Store public key in Android app, hard-coding it as a static final String.
Deploy Android application.

Request some action from server to Android app:

Server requests a challenge message to the Android app.
Android app creates a random String and sends it to server.
Server signs random String with private key and sends it to Android app.
Android app verifies signature from server, if signature is verified, perform some action.

The question:

From what I understand, it is easy to reveal the server's public key by decompiling the APK. Then it seems pretty easy for the attacker to recompile the APK with the attacker's own public key, rather than the server's key.

If my understanding is correct, how can I securely store the server's public key so that an attacker cannot modify it?

You really do not need to worry about that, that is the reason its called public key. You should instead seek to secure your private key, because its the key you actually use to sign the data and it is only required to use the public key pair to verify the signature on the data. If an attacker uses another public key that is different from the one that was generated with your private key, it will fail verification. What you should worry about is if the attacker could de-compile your application and by-pass the logic for verifying the data/document.
And to handle your tampered (re-compiled) android application concerns, you can ensure any application that is making a request to your server comes with a token in the request header that was generated using the application signature as a salt. This signature can be generated from calling some android API's that retrieves and computes the key you used to sign the app during release/debug build (release build should be ensured). So if an attacker de-compiles your app and re-compiles it again, definitely your previous signature has been invalidated as the attacker would be forced to use a new key to sign the app. This time if this modified app calls an endpoint from your reverse engineered app, it would generate and send a token different from the original one. So from here you simply block the IP or just respond with code 401 from your server since the token in the header does not match what you are expecting.
This time, you need to secure the keystore file that you used to sign the app when you were building a release version. Don't track your keystore file with a versioning system like GIT in your code base, because once this file is in someone else's possession not in your organization, then the previous security implementation is screwed once an attacker gets hold on it. I hope i have been able to clarify some concerns of yours. Good luck


Why self-signed https is less trustworthy than unencrypted http? It wouldn't be far-fetched to guesstimate that at least 50% of the web traffic can be intercepted in 2014.

However, a guesstimate of active interception attacks is likely an order of magnitude lower — probably well below 0,5%, and, apparently, a lot of it is done by the governments, which could potentially have control of certificate authorities anyways, so the value of having a trusted CA chain is questionable.

Since most traffic is intercepted merely passively, meaning that encryption without authentication will let you get away from survaillance and preserve your right to privacy in 99,9% of these cases, why the browser vendors and the https industry effectively still promotes no http encryption over the self-signed https certificates for web enthusiasts like myself?

My emails on a dozen of self-hosted domains is encrypted for free (SMTP STARTTLS), without needing to install any new certs every X months, and without people who email me ever getting any warnings.

(Effectively using ssh likewise doesn't require me to remit any payments to anyone.)

Why my non-commercial web-sites and web-properties cannot do the same?

Since most traffic is intercepted merely passively, meaning that encryption without authentication will let you get away from surveillance ....

It is usually easy to intercept traffic actively if you are inside the same (W)LAN, e.g. by doing ARP spoofing or similar techniques. And, for the parties who are able to intercept the traffic passively on the wider internet it is usually also possible to change or redirect it in some way (like with DNS spoofing) and there are even ISP which modify traffic to inject ads etc.

It is already hard for people to understand the difference between plain HTTP (no encryption),  "simple" HTTPS and "better" HTTPS (e.g. extended validation certificates). What you propose here is another level of security, which is slightly better than no encryption and far worse than simple HTTPS, because blindly trusting whatever peer certificate you get makes you just open to easy man-in-the-middle attacks.

Of course, if only few people use a given service you can use self-signed certificates or similar techniques. But in this case you must verify the certificate or public key off-band, like with getting the fingerprint of the certificate or public key some other way and checking it against the fingerprint presented by the connection. This works if you have your own mail server or if you do ssh with hosts you control. But, because you usually don't have an established and secure infrastructure for off-band verification, this will not work for a larger audience.


"Scanner" tab disabled in Burp Suite I am new to using Burp Suite. I am trying to learn how to use it with Mutillidae and DVWA. Whenever I right-click on any particular application the "Actively scan this branch/host" and "Passively scan this branch/host" appears disabled. Also, when the "Scanner" tab appears to be disabled. Can anyone tell me the reason why this happens? Does the preset payload being empty have to do anything with this?

Thanks!

First question I'd ask is do you have the Pro (paid for) version of Burp Suite?  Scanner functionality isn't available in the free version so that would explain the problem you're seeing.


Proper hash_hmac key creation I'm looking for, but unable to find, some definitive information on how long to make the secret and what characters are useable in creating a HMAC signature in PHP using SHA256.

I found some information on stackoverflow but I'm still not sure how long the key should be. In this context is 1 character 1 bit? Should my key be a-f0-9 and 256 characters?

Just trying to get message signing done right. Thanks.

HMAC uses as key a sequence of arbitrary bytes and of arbitrary length. Some implementations of HMAC/SHA-256 may (unduly) reject keys longer than 32 bytes.

Your key should be such that it is too hard to find it by exhaustive search with non-negligible success probability. If your key comes from a strong source of random bytes (e.g. /dev/urandom), then 16 bytes are enough. If the key comes from a biological computing device (i.e. the brain of a human), then you are back to the whole problematic of passwords (which is best avoided if possible).


How do random attackers discover websites to target? I'm working on a site that doesn't need to be known to the Internet at large (but for a few reasons, is hosted on shared hosting instead of on an intranet). It's a WordPress installation and so I've set it up to discourage search engines and be fully password-protected.

I'm now looking at how I can harden it a bit more. But if it's not listed on major search engines and nothing is linking to it, then what are the chances of a botnet or some kind of random malicious site finding it anyways?

Which leads me to my question. How do random malicious attackers find websites to prey on? I figured search engines and links from other sites, but are there any other ways? While I doubt that there's a one-size-fits-all answer, I'm sure there are general areas to watch out for...

Assume every malicious person already has the URL of your website. Actually, to be thorough, assume they have every URL on your website. Having a "hidden" "private" website is no more an actual security measure than having "hidden" directories. To assume otherwise is folly.


Can a Radius server mitigate an ARP spoofing attack? I'm helping my school network administrator to try to find a way to mitigate a current ARP spoofing attack on our wifi network. We detected an unknown host (MAC address seem to change, he is probably using mac-changer or something similar) sending forged ARP into the network.

After some discussion, we agree to use a freeradius authentication server to make it easy to discover who is at the origin of the attack.

But as I'm not a security specialist (only an enthusiast) and don't know a lot about the Radius protocol, I wondered if the freeradius server could mitigate an another ARP spoofing attack (if someday another student decided to try this kind of attack again), and how to configure it to do so.

No.

Let me give you a real life scenario example. Let's say you are going to use JumpCloud to manage your RADIUS. You have to create users and then those users are going to login with their JumpCloud's username/password. If among your users there is a disgruntle employee/student once he/she is logged in he/she can still perform an ARP spoofing attack and you need to investigate anyway.

While you investigate you can see that the ARP spoofing is coming from IP address 10.58.0.240 using the MAC address 98:01:a7:b3:7e:ef but you cannot tell if that machine was put on the network by Alice, Bob, Mike, etc...

So you cannot tell who is the disgruntle employee/student.

EDIT: The countermeasure you can take is this: setup an IDS (Intrusion Detection System) that can be hardware (Barracuda)  or software (Snort, Suricarta) that will push out of the network the machine that is performing the ARP Spoofing.


How can I safely use potentially infected USB sticks from a previous OS installation? So I recently upgraded an old MB Pro to Mojave because I was concerned I could've infected it.

Now I'm probably overreacting to all of this but since I was using all of my USB sticks in the previous version, lets say the malware  had created backdoors to each and every USB stick I've ever plugged in there.

Is there any way I can retrieve the files from my USB sticks safely/make the sticks safely usable again? I suppose that if my files were infected too, they'd have to exploit some vuln in the viewer I'm using (Preview) but as far as I'm aware, there aren't any exploits for it. (Edit : Apparently there is one in CVEdetails CVE-2007-0729 but it's for a very old version of Preview)

And stretching it even further, could the infected files attack the USB firmware? Or would physical access to the stick be needed to do so?

Thanks and sorry if this is not in the correct section.

Depending on how paranoid you want to be, and how important the information on your computer is, you have several choices.

The most paranoid choice is to solder the USB contacts together and dip the whole thing in resin. Congratulations, your flash drive is now a perfectly usable paperweight and conversation piece.

The next option is to take the stick to a security professional. Hopefully your company's IT staff has a few who might be willing to help you out as a personal project.

If you have a disposable computer, you can boot it up using a live CD Linux installation. There are several available, and many exist specifically to scan potentially malicious files.  I would download updated malware definitions, disconnect the computer from the network, then insert the flash drive and scan its contents.  Then, once I'm certain the files are safe, reconnect to the network and copy the files over from the disposable computer, rather than inserting the flash drive into your Mac.

Since it's somewhat more likely that malware would attack generic USB flash drives themselves, rather than attempt to exploit a very specific bit of software that most people don't use, such as Preview on your Mac, I'd still be wary that the flash drive's firmware could be infected, and either discard it or turn it into a paperweight, after retrieving the files.  As for physical access to your flash drive? Just plugging it into an infected computer is enough to give the malware the physical access that it needs.


Confirming an email address with a link During an onboarding process, I want to confirm a user's email address by sending him a link in the form of a URL followed by a GUID as the parameter: www.somedomain.com?p=GUID

What sort of security risk is there in doing so? Note that I'm also validating the user's cellphone number with SMS.

This says it better than I can:

  the purpose of a GUID is to be globally unique, not to be unguessable.

and

  GUIDs are designed for uniqueness, not for security.

So if you're concerned that an attacker could validate an email address that is not theirs, then do not use a GUID.

Since it is a simple thing to solve, instead generate a 128 bit token using a CSPRNG.

Also use HTTPS to ensure the parameter is encrypted during transit. You should check whether the session matches the original, or ask them to login again after following the link just in case any security products decide to follow the link for scanning before it gets to the user (otherwise they could confirm email addresses for users that never registered).

You should also redirect via HTTP and store the value within their session while you wait for them to confirm, to guard against referer leakage - otherwise any resources on your page from another domain would get your token sent to them within the referer HTTP request header.


How does google(websites) determine my location? I know similar questions have been asked many times, but I can't find a clear explanation relevant to my case. I use my http proxy installed on my server to access google and it can figure out where I really am, not impressive. Then I set my proxy forwarding to Tor. After signing out google account and clear cookies, google can no longer know where I'm. But if I use Foxyproxy to proxy only google* (this including googleusercontent, google-analytic etc), gstatic, and some youtube related google domains, google can magically find out my real location, not exactly the place but very close to. I inspected requests sent to google in firefox console network tab, nothing unusual. There are only www.google.com, apis.google.com, www.gstatic.com and ipv4.google.com. There should all go through my proxy too. Besides most google services are blocked here and I couldn't possibly visit google without proxy. This difference indicates it could not directly be an issue of geolocation, or wifi hotspot(in this case). There must be something else that hides within the web browser to servers, what is it then?

[EDIT] Additional information:
[ifoolb@server ~]$ nc 0.0.0.0 1080 -l
GET / HTTP/1.1
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:48.0) Gecko/20100101 Firefox/48.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Upgrade-Insecure-Requests: 1
Host: modifiedhosts.com:1080
Via: 1.1 fool (squid/3.3.8)
Cache-Control: max-age=259200
Connection: keep-alive

[ifoolb@server ~]$
I just knew that, I have disabled it already. The only thing google knows should just be that someone is using squid. I actually use squid->privoxy->Tor.
[EDIT2]
I've figured out a bit. It's not relevant to foxyproxy, it probably is because of some youtube cookies that make google know my location, as I only deleted all google and gmail cookies. Also the firefox browser must be sending something to google. After clearing all cookies and cache google still displays the .com English site, and the location information at the bottom of the page is 'unknown'. If I switch to private browsing mode, google finally jumps to local site related to the current ip address. Other than cookies and cache, I don't know any additional entities that can be used for identification. I don't set any site specific preference either so the language preference should be identical in both normal mode and private mode. So there is still something strange.

I think your proxy itself is revealing your actual IP address via X-Forwarded-For in request headers. This X-Forwarded-For header is used by proxies to keep track of requests and  responses.

This header reveals the full path of the request flow. So,if the request goes like client1(Browser)->proxy1->proxy2 then google.com will receive a header like  X-Forwarded-For: client1, proxy1, proxy2

To confirm that this is case you can do as below.

Listen on your server port with netcat (nc -l -p 1080)
Go to http://serverpublicip:1080 via your proxy. Make sure you allow access to this port from the internet.
The request forwarded from proxy will be printed on stdout in the terminal running netcat. Look for X-Forwarded-For Headers which is probably revealing your original IP.

Example :

root@ip-172-31-53-xx:/home/ubuntu# nc -l -p 1080
GET / HTTP/1.1
Host: serverpublicip
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
X-Forwarded-For: MYORIGINALIP
DNT: 1
Connection: keep-alive

EDIT (After Question is Updated)

It Turns out that Google uses some persistent cookies to keep track of user (NID and PREF cookies).

So, I suggest to install Self-Destructing Cookies addon for Firefox, which clears cookies and local storage at regular intervals after tabs are closed.

Also, to get rid of Google persistent cookies follow the below instructions below after installing the addon(copied from here). I didn't copy all the steps mentioned there  as I cannot use Gmail, Youtube if i completely block cookies from Google in Firefox.

  The problem: Every time you open FF/Preferences/Privacy/Show
  Cookies/Cookies and remove the PREF or NID cookies, they reappear
  within seconds or minutes.

  To remove and prevent the persistence of the NID and PREF cookies:

  (1) In FF/Preferences/Privacy/Show Cookies/Cookies, remove all
  google.com cookies.

  (2) Go to FF/Preferences/Security,

  (3) uncheck "Block reported attack sites", and

  (4) uncheck "Block reported web forgeries".

This may slightly reduce the security a bit.But this is how to get rid of those cookies.

To make up for that,
I suggest you install NoScript (which prevent untrusted Javascript run in Browser) and Ghostery (Block and get rid of Trackers) and Adblock Plus (Block the Ads via Ad networks).

As long as you are confident of what sites you are visiting, and what programs you are downloading you are good to go.


Is it good practice to send passwords in separate emails, and why? I have heard from different people and in different places that if I send an encrypted file to someone else, I should send them the password in a separate email; but why? If someone is sniffing, they will capture both and if the inbox is compromised, they will capture both. But apparently, it's "best practice" to send it separately.

Now personally, I would send a password via other means, such as a phone call. What would you guys recommend?

There is added noise to the channel if you send them separately, assuming there is a delay in sending the second email the attacker would have to listen for a longer period of time and filter more content. It is simply a little bit safer than sending everything in the same package, think of ordering a safe box and shipping the keys along with it, its basically the same idea.

You are right in thinking that sending the password via a different channel (sms, phone, etc) is more secure, however it also requires more management and collection of more information, the logistics of doing it come with an added cost.


Regular Expressions for common exploits I patched for shellshock and was barraged a few days later. However, I would not have known any attempts were made at all if not for a regular expression I found on the internet. This has inspired me to look further into my logs. Is there any centralized list of regexes I can use in a script to parse my logs for common exploits attempts such as SQL Injection or XSS?

The best solution would be to implicitly deny, i.e. allow exactly the data you want, but no other.

You could write regexps matching all input that's not according to your filter to find any odd input, that might be an exploit. It is also a good way to find valid input you omitted in your regex.

A username might be fine with [a-zA-Z0-9]+, rather than removing single quotes or similar to sanitize input.

EDIT:
This is the approach I would take:

Add regexps to implicitly deny all inputs, to fix this problem in the future.
Check the data in the log files against the regexps that were written in step 1
Remove all input data in the log files that matches the regexps.
Reduce the logs by counting identical rows and deduplicating them, so we don't have to look at 1000 identical rows, but still know that we had 1000 rows like that in the log files.
Check if any of the logged input should be valid. If so, update the relevant regex and goto step 2.
Check if any of the remaining log inputs look suspicious.


Why hash on server instead of client? Please hear me out. I used to scoff at people who asked this question because client-side hashing is "so obviously wrong." I have read similar questions on this site but haven't found a satisfactory answer.

Why hash on the server instead of the client?

If the goal is to prevent someone with access to the password database from logging in, then server-side hashing is an absolute must (otherwise someone could just send to the server whatever they stole from the passwords database).

However, my understanding is that the purpose of hashing is to help people who share the same password across many sites. When a password is properly hashed & salted, an attacker cannot as easily brute force the plaintext password then try it on a bunch of other websites.

If mitigating password-reuse attacks is the goal, apart from clients having less hashing power, hashing & salting [0] on the client side makes sense because it means that even a fully compromised server would never see a client's plaintext password.

What am I missing?

[0] salting is important so that a compromised server cannot re-use hashes to log into other services hashing passwords on the client

Your technical analysis makes sense, but one basic assumption is flawed. The purpose of hashing is not to help people who share the same password across many sites. This is a absolute no go and should neither be encouraged nor supported.

The main goal of hashing is protecting passwords against offline attacks. If an attacker is able to access the password hashes on the server, he should not be able to crack them offline and use them on the same site. Sure, if a user doesn't follow best practice and re-uses the password on different sites, this is even worse, but ultimately the user's fault.

Your approach, hashing on client side, opens the system up to a pass-the-hash attack, where you don't need to real password but can authenticate by sending the hash value only.

By stating, that the server never sees the real password, if the client hashes it, you are technically correct. But, when using this scheme, the hash actually is the password.


Passphrase vs starting characters Passphrases are (if created correctly) a pretty secure option for a password. They are easy to remember and have a high entropy. They have one big disadvantage: It's really easy to have a typo because they are so long.

Another option is to take a slightly longer passphrase but only use the first letter of every word. Therefore you get a shorter password (which is slightly harder to remember because you need a slightly longer passphrase).

Example:
"This is a random sentence, I came up with in 5 minutes or so."

=> "Tiars,Icuwi5mos."

Can this be considered to be similar secure to a (slightly shorter) passphrase?

To give some perspective: Let's say we compare a 15-1-characters password with a 7-words/35-characters passphrase.

Taking your question at face value:

  Compare a 15-1-characters password with a 7-words/35-characters passphrase.

Before we can make a meaningful comparison, we need to start with some assumptions.

Can either password be broken with an intelligent algorithm outside of brute force? (More details on this can be found here.) If the answer is no, then obviously a 35 character password is much stronger than a 15 character password. Let's assume the attacker has considered the scenario that your password could contain a passphrase.
Although there are hundreds of thousands of words in the English language, we (probably) only need to try brute-forcing passphrases using the set of the most common words. We'll assume there are 3000 words in that set.
The passphrase will use words that do not necessarily form a grammatically correct sentence. (e.g. correct horse battery staple)
The non passphrase password has the same entropy as a random password and therefore cannot be cracked outside of brute force. (For now, we're ignoring the possible algorithm presented for generating it.)
The password character space is 80 characters. (Obviously this can vary but we need to start somewhere.)

So, some quick math here and we have:

15 char password: 80^15 = 3.5 * 10^28
7 word passphrase: 3000^7 = 2.2 * 10^24

By this calculation a 15 char random password is slightly stronger than a 7 common word passphrase. (A 13 char random password would be about the same strength.)

Notice that assumption #4 is pretty weak, as the first letter algorithm is likely not even close to having the same entropy as a random password, (because you will use less special characters, words have a different distribution of starting letters, etc). Therefore, I think it is easy to conclude a 7 word passphrase is significantly stronger than a 15 character password derived using the method you described, and even more so if at least one of the words in your passphrase is uncommon.


How to block some websites and torrent usage in a small office? In my office there are approaximately 25 systems are connected through network and all having internet accessibility.but some people are missusing this facilities like downloading films from torrent websites and accessing facebook during the work time. so iwant to block the websites like facebook,twitter and torrent websites in client systems....in our server also we are usin windows 7 ultimate 64 bit

would you please tell me a solution for this and tell me how block websites

Don't waste time with complex technical measures: make clear to the employees what your policy is, then simply fire the next person who torrents a film.


Session fixation in Java In the process of developing a vulnerable jsp/servlet based application I made an attempt to introduce the session fixation vulnerability.

Referring to the documentation I came up with the following code which when used in the servlet to create a new session, should return the existing HTTP session if it exists and otherwise it should return null. In any case a new session should not be created.

if(obj.checkLogin(username, password))//if credentials are valid
    {
    HttpSession session = request.getSession(false);//return the existing session

    if(session != null)
            response.sendRedirect("LoginSuccess.jsp");
        else
            response.sendRedirect("error.jsp");
    }

In order to test the code I deployed it using tomcat 7 and tested for session fixation:

Observe the cookie (c1) when login page loads (using an intercepting proxy)
Enter the correct credentials in the login form.  The authentication was successful and I was redirected to LoginSuccess.jsp
Observe the cookie (c2) after the authentication.

I found the cookies c1 and c2 to be different. Which implies that the code is not vulnerable to session fixation.  I am having trouble understanding this behavior. Why is it that the original cookie c1 does not persist after the authentication?

The servlet engine you are using securely handles session cookies when you call request.getSession(), and is not vulnerable to fixation.

(as discussed in the comments) This behavior is both intentional and correct. Whether getSession(), getSession(true) or getSession(false) is called, the server relies on its own memory to determine if there is a valid session matching the value received from the client. If there is no such session in server memory, then the servlet engine ignores the session id from the client. This prevents session fixation, since the server never allows the client to define the sessionid of a new session (new from the perspective of the server that doesn't have that sessionid in memory.)

You either need to find an older, broken servlet engine that is vulnerable to session fixation or you need to replace the session management code. If you go with the latter, you will need to determine if you can replace the session generation in place or if you will write your own session management code.

The approach you take should mirror what you are trying to teach. If you want people to teach...

keep your stuff patched, then go with the broken old engine
not to write your own session management mechanism, the write your own
not to modify an existing session management mechanism, then modify the existing one


Detect possible router attack attempt I have huge problem with my router: Sagem F@st 3202.
Here are some Security log events:

Inbound Traffic   |   Blocked - Default policy   |   TCP
XX.XX.XX.XXX:80->XX.X.XX.XX:51707 on ppp0 [repeated 3 times, last time on Apr 23 02:32:08 2014]
Inbound Traffic   |   Blocked - Spoofing protection   |   IGMP
192.168.4.1->224.0.0.1 on eth2
Inbound Traffic   |   Blocked   |   Packet invalid in connection, tcp
reset attack is suspected: TCP [repeated 2 times, last time on Apr 23
02:35:02 2014]

The events repeat all the time during last 24 hours.
Could you help me to identify the attack?
It would be very helpful to define the attacker. Is it possible that it's some kind of wardriving? Is it a random or planned attempt?

You could go and do a GeoIP lookup on the IP address, given that it's not spoofed (which 9/10 times it is).  If the IP isn't hopping too much, you could create a drop rule to block traffic from that IP.  You may even be able to drop the subnet given all the source IP's are in that subnet.  It seems like they are throwing random attacks at you.  There isn't a lot of information to go on with this post.  Perhaps you have more log entries with different information?  Are there any IP addresses that you can provide that are not your own?


Restricting Issuing CA's choice of keyUsage and extendedKeyusage I am currently designing a private PKI for my family and some close friends for use in E-Mail, VPN, file sharing etc. The PKI will be 3-tiered:

Root CA -> Policy Authority -> Issuing Authority -> Enduser

I want to restrict the usage of certificates to certain use cases by using the keyUsage and extendedKeyUsage fields. I.e. our web servers' certificates should have the following extensions set:

keyUsage=digitalSignature,keyEncipherment,keyAgreement,nonRepudation
extendedKeyUsage=TLS Web Server Authentication

These certificates will be issued by the "Web Server Issuing CA". It is not under my direct supervision, but I'd like to enforce that exactly those keyUsage and extendedKeyUsage fields must be present and more importantly, I do not want the Webserver Issuing CA to issue certificates for E-Mail etc.

To my knowledge, you cannot enforce this - key usage doesn't cascade down.
If you want control, you should audit the issuing log of the Webserver Issuing CA.


zip file downloaded: is it enough to remove it to be secured? I downloaded a zip file, with vb files inside. If by any chance, it contains a virus, or a source code to have access to my computer, what should I do? I removed the zip file and the folder extracted, empty the trash, and reboot my computer. I have seen once that one can enter a computer just by downloading a file, is that still true if the file has been removed? I have got Little Snitch on Mac to check if a communication is made with the outside.

Whenever you download files you must be sure that you've turned autorun off, because some batch files or vb files or the java prompts asks your permission to allow the programme to run and they are always with fake prompt like some security issue for your computer. And one more thing you should be aware of is, you can check the directly connected network to your system and if any IP of different network is there it means someone else you don't want connected to your system and hence can send payloads to your system.
After getting known to the malicious activity in network you just can restart your system or delete the files which you've downloaded or end the services which may turned on due to that files.
Or better you can take help of a strong firewall security.


open source IKE for Windows 7/8 Is there an open source implementation of Internet Key Exchange protocol for windows?
I found only openiked for linux platforms. (http://www.openiked.org/)

strongSwan has been ported to Windows 7 / Server 2008 R2 and newer with its 5.2.0 release. It may be built using the MinGW toolchain (either on Windows or Linux) with a specialized set of plugins providing access to e.g. the Windows IPsec and networking stack. It also relies on the new swanctl configuration and control interface (instead of the more commonly known ipsec.conf based configuration).

The wiki page has more on this (including known limitations).


Limit web-browsing to list of known well-known websites (whitelist) I'd like to limit web-browsing to number of websites owned by known internet companies, for example:

Google Websites
Microsoft Websites
Amazon
Yahoo
Ebay
News
Etc

I understand I can't do it myself because each of the websites is using external URLs and that's changing. So I am not sure what kind of mechanism would fit.

I think, if that would be firewall, it would have to be dynamic list of IP addresses (whitelist), which I can check via real-time mechanism like DNS, such list I should be able to use with existing infrastructure like web-proxy.

If I could download the whitelist I could implement it using firewall which can accept large number of entries, or using operating system functionality for URL / IP address filtering.

Alternatively, a blacklist of known offenders would be also good fit. I am aware of the number of lists but I am not sure which can be applied to the web-browsing experience, like mentioned web-proxy, firewall or anti-virus.

There are some solutions which can block websites "by category", such list would be also useful.

Anyway, what I am really looking for is to whitelist Google Servers, Microsoft Servers, not the specific category. I want to open access to the known networks. For example, this way, I could disable shared hosting networks but not in the machine is in Microsoft Network.

Assuming you are using windows machines (I think there is a way to it in Linux too), the old school way to do it is to point blacklisted sites to a dead IP address in your lmhosts file.

This article explains it better than I can and includes some links to sites that publish blacklists.

blacklist LMHOSTS site


Change the function such that there are no more side-channels Given is the function compareKey which is a part of a crackme (a binary file). Which side-channel attack can be used to find the right password (password is made up by ASCII coded big and small letters from a-z, and decimals) and how can you design this function such that there isn't any side-channel?

int compareKey() {
    unsigned int leng = strleng(keyInput);
    unsigned int correctLeng = strleng(correctKey);
    int i, randomTime, falseKey = 0;

    unsigned int seed = getpid() + keyInput[0];
    srand(seed);  // initialize the random seed

    if (leng != correctLeng)
        return 1;

    for (i = correctLeng-1; i >= 0; i--) {
        if (keyInput[i] != correctKey[i]) {
            usleep(500000);  // that delay will stop bruteforce attack

            falseKey = 1;
        }
    }
    randomTime = 500000 * (rand() % 3);
    usleep(randomTime); // take that
    // and this will prevent the attacker to perform a timed attack

    return falseKey;
}

So I have already executed the crackme binary and entered some passwords of different length. I realized that if the password has length 7, it needs waaay more time to print Wrong (wrong password..). If the password has any other length than 7, it immediately prints Wrong. Thus the password is most likely of length 7 (it indeed is!) and we probably have a timing attack here because we see from the above code that the two strings keyInput and correctKey) are compared character by character and alert mismatch when they see a difference between the two characters that are currently being compared.

Is this correct obersvation so far?

We can fix this side-channel like this:

def secureCompare(stringA, stringB) :
    if (sha256(A) == sha256(B))
        return True
    else
        return False
OR

def secureCompare(stringA, stringB) :
    if leng(A) != leng(B):
        return False

    result = 0
    for x, y in zip(A, B) :
        result |= x ^ y
    return result == 0

Is it alright like that I'm really not sure? : /

Both of your suggested implementations have issues.

The first one fails because you still have to worry about timing when comparing hashes, and the == operator is almost certainly not constant time.

The second one fails for two reasons, both of which allow an attacker to easily determine the length of the secret:

You have an early out.
Python's zip truncates to the length of the shortest iterator, so an attacker can keep increasing the length of their input until the time stays the same.


Password hashing on a load balancing setup I've been doing some research into password hashing implementations and would like to know if it's feasible to have two servers hash passwords to the same database?

I've come across the Bcrypt.net library, which provides 2 methods to hash and verify. What I'm intrigued is what it does in the hashing stage. I was under the impression that the salt had to be random, and with this library the salt is stored in the same string as the hashed password. However, I've tried hashing on my desktop, then verifying on another machine, and it appears to check out. So what is happening?

Should I think about using another hashing implementation for this load balancing setup?

This should be fine.

I'm going to split your question into two parts:

1. How does bcrypt work in terms of salt usage & storage?
Salts are used for a number of reasons - mainly to prevent rainbow table attacks and make unique hashes for non-unique passwords.

Rainbow tables are huge dictionaries of hashes and their plaintext. The idea is to look up the hash, and find the associated plaintext. In order to make this difficult, each password is salted with a unique value, ensuring that each password must be cracked separately.

If two users have the same password, with no salt, the hashes will be the same. This opens us up to coincidental attacks. If two users have the same password, but different salts, the hashes will be different.

The thing about salts is that you can store them in plaintext, because they don't need to be any more secret than your strong password hashes. As such, bcrypt simply stores the salt in plaintext within the hash:

$2a$05$TwentyTwoCharsForASalt$e2uDLvp1Ii2e./U9C8sBjqp8I90dH6hi

This is split out into the following tokens:

The 2a prefix to identify the hash as a blowfish crypt (i.e. bcrypt)
A two-digit work factor (usually limited at 04 to 31)
A 22-character salt value, from the values a-z A-Z 0-9 . /
The hash value.

As such, the parameters required for verifying the hash (including the salt) are stored within the hash string itself. When the verify function is called, it validates the prefix, extracts the work factor and salt, computes the hash of the given password (using the work factor and salt) and compares the result to the hash stored in the given hash string.

2. Can I do this in a load balancing scenario?
Yes. There are no issues here whatsoever. Just compute the hash on a machine, and insert it into the database. There is no point trying to distribute a single hash operation across multiple machines using cloud voodoo. Just tweak your work factor to fit with your performance and security requirements, and be done with it. If your server(s) can't take it, drop the work factor in your hash creation code. Since it's stored in the hash, new hashes will automatically use the lower value, and old hashes will be unaffected.

If you really really need to do it over multiple servers, set up a work distribution system so that each hash is computed on an available box. However, at that point I'd argue that you've got bigger problems than just hashing passwords.

Concurrency issues in your database system are unrelated to the hash function you're using, so if you're having problems with that I suggest you post a question on Database Administrators.


Limiting account access based upon NIC used to connect on Linux I have a server which has multiple NICs (ignoring redundant pairs):

'inward' facing production (connects to other servers);
'outward' external facing production (connects out to the internet via a DMZ),
'outward' internal facing production (connects to internal users including application admins); and
management NIC that connects to the management network.

My question then is, can I limit account access based on the NIC through which the user connected: for example:

you can only access the root account or some sudoer accounts if you connected through the management NIC;
you can only access application admin accounts if you connected through the internal-facing NIC?

There's no good way to restrict accounts based on network interface in Linux (by the time a packet reaches a layer that understands the concept of "account", it's forgotten which interface it came in on).  However, there are two easy ways to restrict access to an application based on which interface is used:

At the OS level, the iptables firewall has options you can use.  The -i option to iptables lets you filter packets based on which interface they came in on.  Combine that with the --dport option, and you can selectively drop or accept packets bound for a given program, based on which interface the packet came in on.
At the application level, most server programs let you restrict which IP addresses they'll listen on.  For example, you might have an SSH server listening on the address belonging to the "management" interface, and a webserver listening on the external address.

You can sometimes combine the above with application-level options to get the per-account filtering you want.  For example, you could have one sshd instance listening on the "management" interface and permitting administrator logins, and a second instance listening on the "external" interface and only permitting logins from ordinary users.


Metasploitable: Change/Location of login page file? I have been messing around with Metasploitable 2 and changed the default login credentials.

The login page looks like this:

I want to change where it says "Login with msfadmin/msfadmin to get started" to my credentials.
Is it possible to edit this file? If so, where is the file located?

Thank you!

It's been awhile since I've played with this and it can be distro specific but try looking in /etc/issue as mentioned here.


How does syskey in Windows increase the security in a domain? I use syskey in windows XP and Windows 7. I've read Microsoft's article but I have questions.

How does this solution increase security?
What are differences between using Syskey in a client that joins an Active Directory with a certification server vs. a workstation? Does syskey achieve more security if used in a client that joins a domain controller?
In windows XP and 7, this command makes a floppy. Are there any way to make a USB removable device? or a wireless device that will allow me to log in with a Bluetooth wave device?

Addressing each part in turn:

1) This control protects against the following threat scenario: An attacker gets physical control of the machine's hard disk. They extract the local SAM database, which contains password hashes for the accounts on the machine and brute force them to get the passwords which they use to log onto another machine they do not have physical control of. SYSKEY works by encrypting the local copy of the password hashes and writing the encryption key to a floppy. You provide the floppy with the key on at system boot.

2) Any machine that isn't a domain controller only stores hashes for local accounts in it's SAM database, so it doesn't really change the attack if the client is participating in a domain or not.

3) Apparently SysKey just writes to whatever's been assigned the drive letter A:, so if you force a USB key to use A: in Disk Management, it'll work. The drive must be present and mounted at boot, so you have to use a floppy or USB disk, not a network share or device. You should also store the floppy/USB (and any backups you make of it) separately from the machine, since the threat is that physical control of the machine is lost.

Lastly, in more general terms, you're doing it wrong! You've implemented a control without knowing what it does. Do a proper risk assessment, understand the threat, then select the control.

It's quite likely, for example, that implementing full disk encryption and using strong passwords and tightening physical security on the device will be more than enough to manage the risk of someone carrying out the attack described above.