Does Google flag all subdomains for malware/phishing if one is infected? After I tried logging to my host's cpanel today, I got the safe browsing warning, about the site "redirecting users to harmful websites".

The cpanel uses an address like this:
https://subdomainXX.host.com:8443/

Each subdomainXX is a different VPS providing by the host company.

The address subdomainXX.host.com isn't used for anything else other than the cpanel access (afaik). Indeed, searching for it in Google using the site: operator returns 0 results.

However, searching for site:host.com, returns several infected sites. The other sites are located at different IPs (and I presume different VPS)

This answer seems to suggest that it has happened before, but it's just a guess, with no authoritative documentation.

My question:

Does Google flag all subdomains for malware/phishing if one is infected? (source/documentation if possible) If yes, how can a host be protected from such (mis)use?

Does Google flag all subdomains for malware/phishing if one is infected?

Short answer: No

Longer answer: It seems Safe browsing is using some threshold, which is not told.
Usually, such flag happens against minor domain owner to force them to fix their website. For bigger web services provider, normally the sub-domain will get away from complete flagging and only specific confirmed bad subdomain(s) will get flagged.

How can a host be protected from such (mis)use

You can't. What you can do is submit a false positive request(make sure you clean them up or use a patched CRM, etc) to safe browsing and wait for them to change the rules to flag bad subdomain explicitly.  If you get the domain from others, it is important to inspect the infection track record from virustotal, don't be careless like those character that moved into haunted-house in horror movie.  The good news is, unlike horror movie haunted house,  safe browsing will remove the flag after it find out bad content has been removed.

Safe Browsing FAQs will give you some idea how GSB flag the web contents. If you want to learn how it is responses to the various scenario, you need to create your own honeypot to gather bad URL and measured it against google safe browsing. Or you can use data from phishing or malicious URL report site like phishtank to "gauge" the google safe browsing response.


How does a hash which contains algorithm to choose can be secure? I was thinking about creating my own hash+salt function, something like sha1(password + md5(login)), then I read here (part 4) that creating it's own hash+salt function is a bad idea, because if the hacker retrieve database content and code he can understand the mecanism behind it.

So I've read the PHP manual for password_hash() and password_verify() functions (appeared with PHP 5.5), first I didn't understand why password_verify() only accept 2 parameters (the real password and its hash), then I saw this in the documentation : the hash contains the algorithm to choose.

So consider I decide to store this generated hash in my database, and a hacker who knows how password_hash() works find my database content, wouldn't be as less secure as creating my own hash+salt function ? Why should I use password_hash()/password_verify()?

See this for an introduction on password hashing.

That your method ("sha1(password + md5(login))") may be guessed by the attacker is not a problem. Well, it is an indirect problem. Ideally, a "secret algorithm" would protect you even if the said secret algorithm was abysmally weak, because the attacker would still do not know the ends or tails of what you do. Unfortunately, algorithms cannot really be kept secret; and, even more unfortunately, your specific suggestion is abysmally weak.

There are two main problems in your suggestion:

The login name is a bad salt, because it does not change when the user changes his password; and also, the same login names may appear in several systems, making it worthwhile to precompute hashes for the login 'admin'.
The whole things is way too fast. A basic off-the-shelf GPU will be able to try billions (literally) of passwords per second. Not a lot of user passwords resist for long at that rate.

Then there is the more conceptual issue which is that you are "rolling your own crypto", which is known to be a bad idea. The problem with crypto is that you cannot test for security: there is no way to ascertain that what you produced is secure or not. Functional tests can tell you whether your system works, not whether it resists attacks. To assess the security of a cryptographic algorithm or protocol, the best way (which is not necessarily good, but we have no better) is to publish it and let dozens of cryptographers try to break it for some time (counted in years, because ye cannot rush art). If the algorithm survives 5 years of active attempts, then it is probably good, or at least not trivially weak.


No put/delete in API, parametrized query, sanitized user input - enough for API security If my Restful Flask API doesn't need user login, then are the following features enough for the API security:

There is only a get method in my API, no put/delete methods.
Queries are parametrized for MySQL.
User inputs are santized.

Have I missed out something, If yes, please suggest.

No one will be able to tell if this is secure.  All I can offer is some advice on other things to consider:

path traversal - If you have any support for loading files or templates you need to consider this.  For example: verify that things like .. cannot be used to move up the file directory towards root
templates - if you are using templates, anything that comes from the client or is derived from client input that is passed to a template is a risk
string concatenation - parameterized queries are a good thing but if you are building the queries dynamically it defeats the purpose.

And of course you need to make sure your server is set up to run in production.  Specifically, Werkzeug is not considered production-ready and you need to find a more robust WSGI server.  You will probably want to run a reverse proxy such as NGINX or httpd as well.


What can be recovered? Securely deleted files I’ve recently got into a little trouble and need advice. It seems I may have inadvertently downloaded a illegal file from a p2p network (along with 100’s of other legal files). I was certainly not aware of this nor have I viewed anything like this (!).
As a matter of course I always use Cyberscrub to delete files (7+ overwrite) and also I have run the wipe free space option (again 7+ overwrite). So the file (if it existed) will have been deleted this way.
I am concerned the one file might have been stored somewhere else, or it can somehow be pieced back together.
Also I am concerned where the file name may be stored and if the measures I took would delete it are enough.
It was through p2p so I’m pretty sure I don’t have to worry about internet cache. But what about other caches?
I also regularly use cccleaner for my internet activity, mostly secure banking etc Does this clean cache and what about thumbnails (??).
I am most concerned about the recovery of the file via forensics, even though I don’t recall ever downloading and viewing such a file.
Any information / advice would really be appreciated as I am worried sick !

Edit also I have been told by police that “they went to the date of the offence from information given and found a file name matching they one they were looking for”. It doesn’t look good ! Cyberscrub deletes the file and also changes the date of creation, changes the file size etc So if it’s true what they say how could this happen? Where did that information come from on my computer? I asked for the full name of the file and they said a long line terms that the file name supposedly contained. Where did they get this information? Am I being set up?

There's a lot of questions rolled in there. I'll try to answer a few of them.

This became a bit of a ramble.

TL;DR Secure erase programs like the one you describe worked well on old magnetic disks, but SSD and hybrid HDD/SSD drives work today are more complex and while some drive manufacturers provide secure erase functionality, there are really only two reliable ways to securely delete a file:

1) Select "Full Disk Encryption" in your OS (ie before downloading any suspicious files), and then if you reformat your disk using a different encryption password, the original files will be unrecoverable encrypted blobs.

2) This:

Unfortunately, I think you have a old notion of secure deletion. We need to take a detour into how hard drives work. For an even longer read, see wikipedia.

History of secure erasure

We're going back to the late '80's / early 90's: magnetic tapes and hard drives write data in bands (think vinyl record). As technology increased over time, these bands got closer together, but in the early 90's there was enough unused space between bands that high-precision magnetic equipment could read residual magnetic fields of data even after it had been written over. You'll see in that wikipedia article that in the 90's, NIST / DoD recommended 3, 7 or even 35 passes of zeros or random data to fully wash out all magnetic residue leaking out the sides of the band.

You'll also see that in the mid 2000's that dropped to 1 round. Why? Because hard drive manufacturers were packing bands so tightly that there was no unused space between the bands anymore and one pass of zeros was sufficient. Good news.

Then came SSDs Solid-state drives have a limited number of times each transistor can we written, so to increase drive lifetime, they do a thing called wear leveling which essentially means that each time you write to a file, it writes a new copy of it somewhere else on the disk and flags the old one as "unused space" so that each sector gets an even amount of use. This has the unfortunate side-effect of leaving many copies of each file scattered around the disk. Wear leveling is done at the hard drive firmware level, so even the OS can't do anything about it. As @James009 said in comments: "So basically if I wipe an SSD then it will start wiping the drive, but it will place the wiping data (the 1’s and 0’s) in places where there is less “wear” and not wipe through the drive."

This paper from 2011, titled "Reliably Erasing Data From Flash-Based Solid State Drives" says:

  Our results lead to three conclusions: First, built-in commands are effective, but manufacturers sometimes implement them incorrectly. Second, overwriting the entire visible address space of an SSD twice is usually, but not always, sufficient to sanitize the drive. Third, none of the existing hard drive-oriented techniques for individual file sanitization are effective on SSDs.

Whether that's still true 7 years later, I don't know.

Bottom line: I Don't think of SSDs the way you think of RAM or traditional hard disks -- concepts like "used space", "unused space", "overwriting a file in-place" etc. Instead think of an SSD drive like a database server with their own CPU that stores and returns (address, data) pairs and does all sorts of black magic optimizations about how that's physically stored on disk.

There are some techniques that are effective for sanitizing SSDs, but they usually rely on the drive having a secure erase command, or on other physical characteristics of the drive. The only method that's guaranteed across all manufacturers is to only ever put encrypted data on the drive.

Modern recommendation: cryptographic erasure.

Since 2014, NIST (in SP-800-88 Rev. 1) have deemed that zeroing out data is only applicable to magnetic media and recommends instead "cryptographic erasure", which is fancy speak for "use full-disk encryption, then you can safely destroy or format the disk simply by forgetting the encryption key!"

Unfortunately this means you needed to have disk encryption turned on before the file was written. Basically, make sure that every piece of data handed to the SSD is encrypted, because once it's there's a chance that it'll be there forever :(

Related questions

There are actually a pile of good answers to this question already. I should have searched before sinking my afternoon into writing an answer :(

Can a full SSD or HDD recover deleted data?
Safely remove original file after encryption
Overwriting hard drive to securely delete a file?
Can wiped SSD data be recovered?

P.S. I have never used any of the tools you mention (cccleaner, cyberscrub, so maybe somebody else can speak to those)


Base64 or HEX encoded? I have this string encoded and compressed (link to full string)

78DAED5DCD72A34610BEA72AEFD0A553725804C3AFB6EC5410425EAA242058767C65256A57556BE1E09FBDE4AD9C532EBB76E287F0BEC6BE40D00F96BDB69761A4C1407AAA5C1620ABFB63FAFB663C9A
(...)

And I know that (unencoded and uncompressed) is like this (link to full string):

<XML>
  <PAGINA NUMERO="0">
    <COPIA NUMERO="1">
      <LINEA NUMERO="1">
        <CAMPO NOMBRE="" POS="3" COMP="EXP" NEGR="NO" SUBR="NO" CBAR="NO" ALTOBAR="0">ORDEN DE PAGO:
(...)

I'm guessig it's compressed and then B64 encoded? I just can't seem to go from one file to the other...

Base64 or HEX encoded?

Hex.  Base64 would show upper and lower characters as well as +, /, and =.  This simply shows numbers and a single case of characters (implying case doesn't matter).

Assuming it's hex, you can decode it down to a binary data file using xxd:

$ xxd -r -p < encoded.txt > encoded.raw

And once you've done that you can use 'file' to guess at what it is:

$ file encoded.raw
encoded.raw: zlib compressed data

So, yes, compressed with zlib.  You can try to unzip it, only to fail:

$ gzip -d < encoded.raw

gzip: stdin: not in gzip format

Fortunately, U&L Stack Exchange provides this answer:

$ printf "\x1f\x8b\x08\x00\x00\x00\x00\x00" |cat - encoded.raw |gzip -dc
<XML>

  <PAGINA NUMERO="0">
    <COPIA NUMERO="1">
      <LINEA NUMERO="1">
....


Browsers root CA accepted, countries and checking fingerprints This is a question derived from several others, and I can not comment on those, so it is not duplicated, please read:

In some related questions some users comment that:

  "They wouldn't necessarily have to present untrusted certificates. Suborning an existing Root CA is trivial; as they are businesses like
  any other. Some countries like Spain, France, China, Japan, Taiwan and
  Turkey already have their government root ca installed on your
  computer. A regime could easy require all computers sold or maintained
  in their country to install their government's root ca."

Besides that, there is an issue with:

  "With another valid TLS leaf certificate the CA flag can be bypassed and that certificate used to sign a certificate for any
  site.

Chrome and Firefox are certainly vulnerable to this on unpatched systems (which is likely a lot of systems today)."

So, 3 questions:

From point 1), if you live in those countries, with "spain...etc", if there anyway to check that the CA you are using (in firefox for example or other) is the proper company , for example google/gmail? and not the goverment one?
From point 2) how do you we know that we have our browser/system not patched for that kind of bug?
In summary, from previous points WHERE and how should check my CA fingerprint from Gmail.

I have this:

I checked here.

Is this correct?

From point 1), if you live in those countries, with "spain...etc", if
  there anyway to check that the CA you are using (in firefox for
  example or other) is the proper company , for example google/gmail?
  and not the government one?

You can check the certification path to find out which intermediary and root CAs signed the certificate that you are presented with from your browser.

  From point 2) how do you we know that we have our browser/system not
  patched for that kind of bug?

Generally only by checking online vulnerability databases such as this one or vendor bug lists to check whether a particular security issue has been identified and patched.

  Is this correct?

You can check online SSL fingerprints such as this one on GRC. The page notes that Google and Apple cannot be checked in this way:

  But companies with a massive and widely distributed web presence, such
  as Amazon or Google, may deploy many different security certificates
  across their many globally distributed servers and web sites. Multiple
  certificates may be easier for them to obtain and manage, and their
  security is not reduced. But it does mean that not every user of their
  servers (like you and this GRC page) would necessarily obtain the same
  security certificate.

  This means that a simple comparison of certificate fingerprints could
  erroneously lead people wishing to test these huge websites to
  conclude that their connections were being intercepted, when they have
  simply received a different valid certificate than the one received
  and shown by this web page.

  The best solution is to test smaller sites that are known to be using
  single certificates, or sites using the completely unspoofable
  extended validation (EV) certificates with an EV-honoring web browser
  such as Firefox or Chrome (but not Internet Explorer, which doesn't
  properly verify EV certificates).

Mandatory attrition link.

Note that if you were the subject of a targeted attack, a Man In The Middle could alter the GRC page to show you the certificate fingerprints that she was spoofing. Unlikely, but important to include this information here because it is easily technically possible. You could check the GRC page via TOR or via another connection (e.g. via 3/4G) in order to verify your main connection has not been MITM'd. This can also be applied in order to verify the certificate chain in most cases - but as noted, Google and Apple may have different CAs depending on which server your connection hits.


Is 7-Zip's AES encryption just as secure as TrueCrypt's version? The main difference being TrueCrypt creates containers and 7-Zip encrypts the file itself, so file sizes can be guessed. Now let's just talk about the strength and breakability of the encryption.

Update: http://forums.truecrypt.org/viewtopic.php?p=107396

If implemented correctly, AES is AES; the output between two different implementations is identical, and therefore no distinction is possible in after-the-fact comparison -- if done correctly, the one is exactly the same as the other.

But there are a few points where differences can crop in:

Operation Mode
Truecrypt implements a modified counter mode called XTS. It's pretty well vetted and has withstood some serious abuse from some powerful attackers (such as the US Government).

From examining the p7zip source code, it appears that AES encoding for the 7-zip format operates in CBC mode. This is certainly not necessarily insecure; it's the mode most popularly used in protocols such as TLS, but it is potentially vulnerable to padding oracle attacks. See this discussion on operation modes for more information.

Key Derivation
Truecrypt uses PBKDF2 to turn your password into an encryption key. It's difficult to come up with a better alternative than that. p7zip uses a salted SHA256 hash repeated over a configurable number of iterations. PBKDF2 is a bit more configurable, but 7-zip's alternative is functionally similar and arguably reaches the same goals.

Vetted Implementation
Here's probably the biggest difference: TrueCrypt's code has been poured over by cryptographers and carefully examined for implementation mistakes. 7-zip's has not (at least not to the same degree). This means that there is a higher probability that 7-zip's code contains some sort of mistake that could allow for some sort of as-yet-unknown attack. That's not to say that such a mistake exists, and that's not to say that such a mistake couldn't be found in TrueCrypt instead. But the this is a matter of probability, not certainty.

All in all, the differences are minor, and for most use cases you shouldn't expect any difference at all from a security perspective. If it's a matter of life-and-death, I'd probably pick TrueCrypt. But for matters of mere secrecy, I'd recommend going with whichever solution fits your problem the best.


Difference between key encipherment and data encipherment? In the context of SSL/TLS certificates, what is the difference between key encipherment and data encipherment? What are some examples that highlights the difference?

Key encipherment means that the key in the certificate is used to encrypt another cryptographic key (which is not part of the application data). This is used within TLS in the RSA key exchange, where the pre-master secret (from which the symmetric encryption key is derived) is generated by the client, then encrypted with the servers public key and send to the server and decrypted there with the servers private key.

Data encipherment means that the key in the certificate is used to encrypt application data. This is not used in TLS. But certificates are not only used for TLS (for example also in S/MIME, VPN, signing of documents ...) so there might be use cases where this is needed.


Looking for information about CVE-2006-6876 vulnerability In order to study vulnerabilities of a SIP server and the impacts of DOS attacks on the QoS of VoIP service, I have found this vulnerability which can be exploited to cause DoS on SIP server.

But I need clarification in a few areas:

How it can be possible for an attacker to cause an overflow ?
What is the relationship between an overflow and denial of service attacks that can occur at the OpenSER?

I did not understand the description and the action performed by the attacker.

The vulnerability is actually unproven, (No POC) and it's been six (6) years since it has been listed to the CVE database. I bet it has been fixed since then up to the recent version of OpenSER. The overview description will get you going:

  "Buffer overflow in the fetchsms function in the SMS handling module
  (libsms_getsms.c) in OpenSER 1.2.0 and earlier allows remote attackers
  to cause a denial of service (crash) via a crafted SMS message,
  triggering memory corruption when the "beginning" buffer is copied to
  the third (pdu) argument."

Since there is no proof of concept or even a sample snippet of an actual exploit code, I can't assume the validity of this claim.

http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2006-6876

http://xforce.iss.net/xforce/xfdb/31137

http://www.securityfocus.com/bid/21800/exploit

For a POC, you might want to check exploit-db for that.

There are many types of buffer overflow, it can be heap-based or stack-based etc. The very concept of an overflow is that the attacker may send more data in a buffer (the temporary storage in memory) than it can hold. This is usually the account of programming error and not setting bound checking which can lead to the running application to crash.


Is there a password based challenge response authentication scheme with public key cryptography? I was thinking about an authentication where

the user only has to know a password
but no salt, everything else the client retrieves from the server
yet a user's password can't be retrieved from the data on the server
nor from the communication, meaning not even the server ever gets the
password

I thought something like this could be close to the solution:

Set up:

the client calculates e=hash(password), p, q primes and n=p*q
uses this hash to calculate an RSA decryption key d=(e^(-1) mod
phi(n))
passes on d and n to the server a way avoiding any man in the middle

Authentication:

the server sends a c=random() challenge and the stored n to the client
the client encrypts it and sends r=(c^(hash(password)) mod n) as response
the server decrypts a=(r^d mod n) answer and if a==c then the user has been authenticated

Is there a proven authentication scheme similar to this one? If not, would the above be safe with a proper RSA implementation, like OAEP, even though the encryption exponent is not the traditional 65537 but it is actually an intermediate key of the protocol?

What you're talking about is a zero-knowledge proof (or more specifically a ZKPP) similar to RSA-PAKE.

If we ignore the general problems of implementing RSA safely, there are a few problems with the scheme you suggested:

Since an attacker viewing the key-exchange knows c, if the value of ch is ever less than n then r = ch mod n = ch. From this the attacker would recover ch, and could compute logc(ch) to recover h and crack it offline.
The server is never authenticated, so an attacker could presumably select a value of c that is advantageous for the above attack, or other attacks.
You can't just use the raw result of a hash function to select e, because e must be relatively prime to φ(n). So you'd need to do some manipulation to ensure that e is a safe value. You'd need to ensure that this manipulation doesn't weaken the safety of the hash excessively.
The server must validate the initial setup values sent by the client, otherwise the whole scheme may be broken due to incorrect key generation or manipulation. This is difficult to do while maintaining zero-knowledge.
There are some potential attacks around schemes where an attacker can select the value of e interactively, such as e-residue attacks.
You'd need to be careful about error side-channels and timing side-channels on some of these operations.

What you probably want to look at is a protocol like SRP, which handles ZKPP authentication while avoiding most of these problems.


Do browsers and tools send `SNI` field by default connecting to https endpoints? I am setting up HaProxy for https in passthrough (tcp) mode without SSL/TLS termination. I want to be able to route traffic to different backends based on hostname requested by a client.

From HaProxy documentation I learned that there is unencrypted SNI field that I can use to setup ACL rule.

My question is: Do most of the browser supporting SNI feature, send this field by default? Do other tools like curl or wget send it too?

All modern browser support SNI and use it by default (there is probably not even a away to switch it off). Current versions of most tools like curl use SNI too by default, but not all. For example with openssl s_client* you explicitly need to specify -servername ...if you want to use SNI and in some programming languages SNI is only used by default if you use higher level HTTP libraries but not if you just use the lower level TLS bindings.

For more information see also SSLLabs: User Agent Capabilities.

* The behavior changed with openssl 1.1.0. From then on SNI is on by default but can be explicitly disabled with -noservername.


Symmetric encryption involving load balancers - can't randomize key? I'm working on encrypting a web application's cookie. Using symmetric AES/CBC, I encrypt the cookie data before writing it out, and then decrypt it when reading it back in - the standard stuff.

The problem is that people may use load balancers to host this web app. For that reason, the secret key used to encrypt cookie data cannot be randomized - it must always be the same so that one load-balance server can decrypt a cookie that was written out by another load-balance server.

This means my secret key is much easier to crack than if the secret key was randomized. Right now I use "PBKDF2WithHmacSHA1" to derive the secret key using a non-random salt. Do you think that's acceptable? Is there any way to make it definitively more secure in this case? Thanks for your insights.

The standard mechanisms on making CBC more secure is to create a random IV (use in a cookie) and a message authentication code. You should use two static, randomly generated keys for this. Using a PBKDF is not a good idea: if an attacker can access the secret then the game is over, no matter what you do. PBKDF has been designed to eat CPU cycles, the opposite of what you are trying to when clustering for performance.

Unless you can differentiate between cluster machines (maybe make one more secure than the other) then adding more security will be tricky.


Keychain vs KeyStore vs TrustStore I'm quite confused between the three, and a Google search didn't come up with much. Can someone please explain?

Look to:

Truststore vs. Keystore - Trust store contains the public parts from others and the keystore contains the personal certificate (and key).
Keychain - the Apple password manager.

[edit]

Now that it has been clarified that the KeyChain in question is the Android API, that would best be described as:
see

  [...] regulates application access to the system key store and allows users to grant application access to the credentials stored there. Additionally, this API enables applications to initiate installation of credentials from X.509 certificates and PKCS#12 key stores.

So it is a way to access the truststores and keystores.


Ansible Vault - how does the encryption work? I was looking at Ansible Vault which is used for encryption in Ansible playbooks.  The Ansible documentation seems to be thin on details of how it works, apart from mentioning that the default cipher is AES.  I can't confidently figure it out myself from the source code.

I can see the result of using ansible-vault to encrypt a test file:

$ANSIBLE_VAULT;1.1;
AES256
DIGITS
DIGITS
etc.

I found this post which explains how to decrypt an Ansible-Vault-encrypted file using a patched version of openssl. Can anyone explain whether it's possible to decrypt an Ansible Vault file using vanilla tools not packaged with Ansible? (Assuming you know the password, of course).

Ansible is open source, written in Python, and uses PyCrypto, a standard python cryptography library, not packaged with Ansible.

https://www.dlitz.net/software/pycrypto/

The module that handles encryption and decryption is VaultLib, here:

https://github.com/ansible/ansible/blob/adea1f2b80d806d94ca1bdb2d06f2df077feb948/lib/ansible/parsing/vault/init.py

That module looks to have only minimal dependencies on other Ansible modules- some python 3 compatibility stuff, some unicode stuff, a module called Display.

To make a "standalone" tool with a high likelihood of compatibility with Ansible, the best approach would be to take that code, remove the python 3 stuff, remove the Display module, and copy-paste in the unicode functions.

As long as PyCrypto and other python dependencies are installed, the encrypt and decrypt functions in that module should just work.


Android's Encryption mechanism Well, according to my Android smartphone, it says the phone has been encrypted. Should I be worried if it has a malware or if I get hacked because I once clicked a link on a certain website then I started getting url redirections to other websites on that browser and some other funny activities.

Encryption offers no protection against malware or compromise.  Encryption is useful to ensure that if you lose your phone or it is stolen, the person now in possession of the phone will have a much harder time getting your personal data (contacts, emails, calendar, etc.) out of the phone.  Once the phone is booted, the data has been decrypted, and malware can then read the decrypted data.


How can I ensure higher levels of privacy when hosting others' emails? I can set up my own email server, and quite happy with it, using standard open source components - postfix, roundcube, etc on top of HardenedBSD or OpenBSD.

I'd like to offer the use of my email server to friends and family, as some of them have said in as many words that they'd like it and would benefit. But I have a real ethical issue over hosting something so personal to them without more privacy safeguards. Even if I wouldn't read anything, I feel very uneasy that in principle, I easily could.

I know that as the server admin, anything the software can do, I can do. As always, it's about raising the barrier, not about absolute data protection.

The family/friends who would like to use it, aren't sophisticated users Think parents/grandparents generation. I doubt they're doing anything very unusual. They wouldn't know how to use custom certs or PGP or similar, and most of their email contacts wouldn't either (online purchases, friends, etc). They'll use standard POP/IMAP/SMTP/webmail, with standard apps. So anything that's to be done, would have to be unilateral - not relying on them to understand complex setups, or things that won't work in common clients.

I cant avoid the need for at least one server admin with rights to configure things, and I know that any other users would have to rely completely on trust and it couldn't easily be "proven" what I'd done or not done. While they trust me (I help them routinely with email and host their backups as it is), it's just that, on principle, I don't feel that an email host should be able to look at third party users emails (other than where there's a clear expectation such as within an enterprise), and I want to get as close as I can to that, myself.

In other words, although trust is needed in any setup, there is a difference between trusting someone won't click and read (although it's trivial to do so), and trusting they have set it up and made it very hard to click and read.

Things I've thought of trying:

I've pondered setting it up in an encrypted VM, in such a a way that once booted with the correct passphrase (needed to boot but doesn't let it log in), the system actually locks out its root and admin accounts and only allows a limited account that can manage mail but not view other users' data. Or maybe give the root passphrase in written form to a trusted relative who lacks access, and locking down the admin IP to their IP, so it's accessible in an emergency but not otherwise. I don't know if that helps, or is naive, though.
I've also looked for prebuilt end to end encryption for users, as that would be ideal, but I don't think this can work unless the user, and their contacts, both use appropriate client software, or avoid "ordinary" clients and stick to very specific ones ... and that just isn't likely/achievable for their expected "ordinary" use.

Is there an easy way to build/set up an email server for family/friends who request it, which at least helps to raise the bar in these areas, and lets me feel safer that their privacy is real, and not easily intruded upon, even if not ideal or absolute?

What steps can I take that would help?

If you are the administrator and have full access, there is no practical way you can protect your users from you going rogue. You can encourage them to use PGP encryption or S/MIME, but you simply cannot protect them from yourself while still supporting standard, plaintext emails to arbitrary email providers. However in the end, it is unlikely that you will be much of a threat to them. One moderately popular email service provided a quote explaining the situation perfectly:

Administering a mail host is sort of like being a nurse; there's a brief period at the start when the thought of seeing people's privates might be vaguely titillating in a theoretical sense, but that sort of thing doesn't last long when it's up against the daily reality of shit, piss, blood, and vomit.
Now that I think about it, administering a mail host is exactly like being a nurse, only people die slightly less often.

You may want to put yourself into a privacy mindset. You can do this by communicating to your users that you take their privacy seriously using more than a privacy policy with the tired old staged claims of taking your privacy "very seriously". For example, you may want to consider publishing all subpoenas you receive. You may want to encrypt the database and advertise that fact to show that you are trying to protect from HDD theft. You may even want to have an FAQ on the privacy problems inherent to email, in which you can and should explain that they need to trust you. Doing all of this will not only improve other people's trust in you, but will put you in a mindset where violating someone's privacy transitions from a mildly rude offense to an unthinkable violation.


Authenticated user moving for a different service This is one of those "I dont even know what I dont know" situations. Sorry if I sound confused or make rookie mistakes. Any help, including reading material, would be appreciated.

I am trying to build for work a service that relies on confidential data from another service.

Say, a user is logged in in service1. The user clicks a link to service2.

service2 need to be aware of sensitive data stored in service1 servers. Also, service2 allows users to consume credits that they payed for with money and that might be useful to attackers, so it needs to be sure of the users identity, as provided by service1.

It is a requirement that service1 and service2 live on different servers and use different domains. Is also is a requirement that the user goes from service1 to service2 clicking a link. Afaik, this means that the only data service2 can obtain is on the URL itself.

My proposed solution:

1) User clicks to go from service1 to service2

2) service1 generates a unique, one use key and appends to the URL. Javascript opens this URL.

3) service2 receives this key and sends it to service1. Service1 sends the data directly to service2

As far as I can tell, the data is (by definition) secure. But there is still the problem that an attacker might obtain the one time key and use it instead.

But there is much I don't understand, and I don't even know what to search.

Any help/comment/reading material appreciated.

This is very like a single-sign-on service, except usually there you don't control all of the services yourself (instead, one of them is controlled by the SSO provider, such as Facebook or Google). You can look at OAuth2 for some ideas of how SSO is most commonly implemented, but it's honestly overkill for a scenario where you control both services.

Assuming for the moment that you control both services and calls between them are sufficiently cheap, one simple solution is to have one of them be the source of truth on identity, so service2 simply checks service1 for confirmation of who the user is and what they can do (what their secret data is, how many credits they have, etc.), without storing any of that information itself. The problem then is linking the user's session across both services.

You can use the URL approach:

service1 generates a single-use secure random token and passes it to service2 in the URL
service2 sends that token to service1 through a direct channel
service1 replies with a session identifier for the user's session and also any additional data service2 will definitely want
service2 sets the session identifier from service1 as its own session identifier on the client (probably in a secure cookie) and optionally stores the required data in its own session state for that session

Alternatively, you can use CORS (Cross-Origin Resource Sharing), which is a way for a web browser to break the same-origin policy in a controlled way between sites that trust each other (and are possibly controlled by the same entity). CORS lets you make XMLHttpRequest or Fetch calls across origins and see the responses. An example might look like this:

service2 gets a request from a new user who doesn't have a session, or a user whose session had expired
service2 replies with a page containing script that makes a CORS request, with authentication, to service1
Assuming the user is signed into service1, service1 accepts the CORS request and responds with a single-use securely random token
The client-side script sends this token down to service2
service2 sends this token to service1 via a direct back-channel
service1 verifies the token and sends a session identifier to service2, etc.

This scheme is the same as passing the token in the URL, with two exceptions:

The token is never sent in the URL, and therefore much less likely to wind up somewhere it shouldn't like a server log or browser history.
The user can go directly to a service2 URL without clicking through a special link from service1, so long as they have an active session on service1.

Note that the session token itself is never sent in a response body (that the client sees). You could simplify this scheme if you did - then the client script would set the session ID in a cookie for service2, eliminating a client-service2 roundtrip and a service2-service1 roundtrip - but then an attacker with an XSS could steal the session token (as opposed to "merely" having complete remote control over the compromised session for as long as the user has the page loaded).


Are these encrypted URL values safe or could they be guessed? One of our suppliers had a weakness on the secure section of his webpage. By changing ID's in the URL, we could see data that did not belong to us.

For example:

https://supplier.org/showItem.do?contract.id=102210199&car.id=102334247

Showed a contract and a car, but so did

https://supplier.org/showItem.do?contract.id=102210200&car.id=102334248
https://supplier.org/showItem.do?contract.id=102210201&car.id=102334249
https://supplier.org/showItem.do?contract.id=102210202&car.id=102334250

and putting other numbers gave other cars. Problem was, with most numbers, not our cars...

We signaled the problem and they fixed it. The URLs are now like this:

 CAR
 OLD URL
 NEW URL

 1HTR701
 https://supplier.org/showItem.do?contract.id=102210199&car.id=102334247
 https://supplier.org/showItem.do?values=Vod4UnO5hFROmmVBaiQWd9w8pkqti5OvrxjomCo9yNNSinKqUxYcUA%0D%0A

 1HTR801
 https://supplier.org/showItem.do?contract.id=102210200&car.id=102334248
 https://supplier.org/showItem.do?values=Vod4UnO5hFROmmVBaiQWd7GlAD4zU43Z_yemm03qs7_vROna1Fd3GA%0D%0A

 1HTR802
 https://supplier.org/showItem.do?contract.id=102210201&car.id=102334249
 https://supplier.org/showItem.do?values=Vod4UnO5hFROmmVBaiQWd38BWIjnkFKm8qQL3Ha-ibFo_kbZuctRLg%0D%0A

 1HTR803
 https://supplier.org/showItem.do?contract.id=102210202&car.id=102334250
 https://supplier.org/showItem.do?values=Vod4UnO5hFROmmVBaiQWd0MJCJ7x4spAWvmXjtYiCibBrPzpvP3MnQ%0D%0A

But I'm confused as to how they fixed this. Especially the returning part   Vod4UnO5hFROmmVBaiQWd makes me think this is some kind of MD5 or other hashing. I'm just hoping the other parts are not "guessable" by someone else.

Any ideas how the new URLs are constructed? Does it appear safe?

Unless the site now has access controls on the URLs (requiring that you first authenticate - prove your identity - and then that the server checks whether your identity is authorized to view that URL), no, it is not safe. Obvious problems include people sharing links through a site like this (without redacting the domain), browsers remembering the URL in their histories (on a shared computer), or somebody (insider or outsider) dumping and sharing a list of valid URLs.

The term used for this type of security vulnerability is a "direct object reference", when inputting an object's ID lets you access the object even if you wouldn't normally have access. The only true solution to the problem is proper access controls. Merely making it hard to guess the object ID doesn't solve the problem, although in the short term it may make exploitation harder. Putting secrets in the URL doesn't really solve anything; you need a system that relies on actual credentials.

Now, as for the enumeration: as the comments point out, that's a very suspect encoding. The repeated prefix indicates that, whatever else they're doing, they aren't using a secure hash (or not using it correctly). Given that they're presumably trying to map from a URL back to an object identifier, it's probably a reversible encoding anyhow.

Encrypting the URL query string with a secret key known only to the server will produce hard-to-guess links, although depending on the type of encryption used it may still be possible to flip bits and produce new valid URLs without knowing the encryption key (they'd need to add an integrity check, like an HMAC or an authenticated encryption scheme, to prevent this). Encryption, by itself, does not prevent an attacker from tampering with the ciphertext (and with some encryption schemes that tampering is easy). In any case, such a system is dependent on the key remaining a secret, making a single point of failure.

Encrypting the query string using a known key - for example, if the key is in that unchanging prefix - is completely broken. Figuring out the crypto scheme used would take a little bit of (educated) guessing and checking, but the space of possible systems would take very little time to search. Once it's known, crafting valid URLs is trivial.

The least-bad way to do this (there's no good way; for anything sensitive you simply must use authentication and access controls) would be to store reasonably-long (64+ bits; GUIDs are often used here), cryptographically-secure random identifiers for every row in the database. Then encrypt them, with a server-side secret key, before turning them into URLs. This avoids single points of failure (the random IDs are useless without the key, and vice-versa) for compromising the whole list of valid URLs, and also means you could do things like periodically changing the ID tokens to invalidate old URLs for those objects, or changing the encryption key to invalidate all old URLs. It'd be secure against bit-flipping the ciphertext because there's no way to say "assume this part is a number, then try flipping bits to produce another valid number"; the valid combinations of bits are an un-guessably-small part of the search space of possible identifiers, because the identifiers aren't sequential and are long enough that only an infinitesimal fraction of them will ever be used.

But, I must emphasize again: this is a much worse idea than just putting proper authentication and authorization in place. If you've done that, you can safely stick to simple incrementing numeric identifiers because guessing the next value doesn't gain an attacker anything.


Is it possible for someone to see under the "blacked out" part of this image (see below)? Ok, so I sent some pictures to a journalist to report something I thought was noteworthy.
However, one of the images contained my date of birth and other personal information so I blacked it out using markup tools in the Photos app of my iPhone 6 (running iOS 10.3.2). Then, I took a screenshot, then sent the screenshot from my phone to my email account, then downloaded the image to my laptop. Then, I sent that image from my desktop to the journalist.

So, let's say this was the edited original picture (it's in JPEG format because when I sent it from my iPhone via iCloud mail to my other email address then downloaded it on to my laptop from that other email address, it downloaded in JPEG, but the screenshot downloaded as a PNG):

https://drive.google.com/file/d/0BylJxh-1HrrkQUFqWXprbHhNVUU/view?usp=sharing

This is the screenshot (PNG format):

https://drive.google.com/file/d/0BylJxh-1HrrkREZWRFdHOUxnTTA/view?usp=sharing

Using whatever technique you want, is there any way possible way to see what is under the blacked out parts in the screenshot, because that was what I actually then sent to the journalist.

Thank you for your help!

PS - The images above are examples and not the actual thing I sent! It just says "LALALALALA BATMAN!"

PNG is a bitmap format, thus "blackening out" is a destructive method: what was in the original picture before it was replaced by black pixels is no more in the blackened picture. You can use any fully opaque color (a color without a transparent value) for this process, not just black.

This is not the same for other formats that are layered, like PDF, SVG (vector image), PSD (photoshop image), etc. In those formats, "blackening out" will most likely add a black layer that can easily be removed later.

PNG doesn't have EXIF metadata like JPEG, but still can embed some king of metadata in the ancillary chunks. You would be wise to check what's contained in those chunks of your picture.


Is this algorithm for a random string cryptographically secure? I've pieced together this algorithm (if it can be called that) from various bits of code I've seen online, and I'm wondering how cryptographically secure it is. It's used to generate passwords:

function seed_random() {
    $seed = crc32(uniqid(sha1(microtime(true) . getmypid()), true));
    mt_srand($seed);
    $n = mt_rand(1, 200);
    for ($i = 0; $i < $n; $i++) {
        mt_rand();
    }
}

function mt_rand_custom($min, $max) {
    seed_random();
    return mt_rand($min, $max);
}

function random_password($length) {
    $legal_characters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'_!@#$^*?<>[]{}~(),";
    seed_random();
    $command = 'head -c 500 /dev/urandom | tr -dc %s | head -c %s; echo';
    return shell_exec(sprintf($command, $legal_characters, $length));
}

function generate_password() {
    return random_password(10);
}

I know security, especially in a web environment, depends on numerous other things (e.g. is the password being sent over SSL) but I'm curious about this specific set of functions. Thank you for the feedback.

EDIT: Even though the sample is no longer using the mt_random_custom function, any feedback on that would be greatly appreciated as well, so I left it in.

In your code, you have to fill $legal_characters with the list of characters that you accept as part of a password. E.g.:

$legal_characters = "abcdefghijklmnopqrstuvwxyz";

if you want passwords consisting of lowercase letters (all lowercase latin letters, but no other characters and no accents).

This code is a bit weird; it uses mt_rand() (an internal PRNG) seeded with the current time and the process ID to get the length of the password, between 15 and 60 characters. Then it uses /dev/urandom for the password itself, which is smart since mt_rand() is not cryptographically secure (especially since the process ID is not something which is very secret, and neither is the current time).

The actual password generation work thus: it produces 500 random bytes (from /dev/urandom), then removes all those which are not in the set of accepted characters (that's the "tr"), and finally truncates again the remaining sequence of characters to the desired length. This process generates uniformly random sequences, so that's good, and /dev/urandom is the appropriate PRNG for that. Note, though, a few caveats:

If the set of "legal characters" is small, you could end with a shorter password. E.g. if you want passwords with only digits from 1 to 6, there will be, on average, only 12 or so matching bytes in the 500 random bytes. The code has no failsafe for "too short". If you set $legal_characters to all 26 lowercase letters, then about 1 byte in 10 will be legal (byte values range from 0 to 255, and 26/256 is close to 1/10) and, on average, the "tr" part will yield about 50 characters, and it is extremely improbable that it will yield less than 20. Still, this is worth noting and there should be a failsafe.
It makes little sense to have a variable length for the password. If a password of minimal length is acceptable security-wise, then all passwords could have that length. And if it is not acceptable, then why do you use that minimal length ? You'd better use a single, fixed length, rather than a range. This would allow you to remove seed_random() and mt_rand_custom(), substantially simplifying the code.
A "password" is something that a human being will be able to type an memorize -- hence "word". Will he memorize a 60-character sequence ? I am sure there is a medical name for such a condition.
You should set the length of the passwords to an "appropriate" value such that the entropy will be high enough. If there are x legal characters and the password length is n, then the entropy will be xn. What entropy is needed depends on the intended usage. For authenticating users on a Web site, through an appropriate SSL tunnel, 240 ("40 bits" of entropy) is more than enough, which translates to 9 lowercase letters (269 is greater than 240).
The code uses unixisms (/dev/urandom, head, tr...) and will have a hard time running on, say, a Windows server (and PHP runs on Windows, too).

Summary: the passwords will be strong, but the code is weird. You should drop the variable length, and if your users can swallow 60-character passwords, then please congratulate them for me. Or sell them to a zoo. Here is a simplified code which should be OK (warning: I do not use PHP so I am improvising here):

function generate_password() {
    return shell_exec('head -c 500 /dev/urandom | tr -dc abcdefghijklmnopqrstuvwxyz | head -c 9; echo');
}


Security Engineers - What Do They Do? I'm starting my MS in Computer Science (I hold a BS currently) soon and I'm considering specializing in cyber security.  I'll be taking courses such as cryptography, biometrics, network security, computer architecture, and information and security among other things.  I've been looking around at what jobs would be available to me and security engineer seems like something I would be interested in.  What kind of tasks does this job entail?  Is this more of a networking field or can I get my hands on some programming and software engineering in here?

Security engineer in a broad spectrum defines several responsibilities and roles. To have a bird's eye view there are several categories that exist. It can be broadly classified as developers - one who develops security tools, and analysts - who use these security tools to measure security.
Cryptography: It is involved with writing algorithms that have to do with encryption, authentication and stuff like that. Generally, these are the developers of the security field, who actually develop software for security and analyzing security. Not many do things like this because it is very advanced and sophisticated and requires great knowledge in Math.
Biometrics: This is another broad field. It covers security of physical applicances in conjunction with actual human intervention, such as fingerprint security, retina scan etc. Generally, hardware engineers and embedded software developers design these kinds of devices.
Information Security: This is the category where computer science and IT engineers come in. It includes fields such as network security, cryptography, etc.
To have a better idea take a look at this site which may give you a good idea.


Lattice vs Level with regard to access control With regard to access control, is "lattice" the same as "level"? Is "Multi-level access control" just another name of "lattice-based access control"?

Are Biba and Bell-LaPadula Security Models examples of Lattice-based Access Control?

Biba and Bell-LaPadula are generic models. One parameter of those generic models is a multi-level security policy.

A multi-level security policy is a pair (DOMS,≤) where (DOMS,≤) is a partially ordered set and DOMS is a set of security domains (this is what you refer to as level).

A lattice is a quadruple (L,≤,⊓,⊔) where (L,≤) is a partially ordered set, ⊓ is a least-upper-bound operator on (L,≤), and ⊔ is a greatest-lower-bound operator on (L,≤).

Not every multi-level security policy is a lattice, but there exist multi-level security policies that are lattices.

One could instantiate the Biba and Bell-LaPadula models with a multi-level security policy that is a lattice, but one does not need to.


Is my authentication strategy secured? I want to implement an authentication system by following good practices, i want it as simple as possible and secured (im not going to implement some magic hashing function or something to feel a hero..) just wanting to use already known hash but not sure the right way of using it.
I read some articles on how Lastpass (a password management company) mange to handle their authentication and i loved their idea.So i wanted to implement my own authentication based on it.

Basically im creating an authentication key from the password on the client side (so the password is never sent as a plan text to the server).
that authentication key im sending to the server than do some hashing operations also in the server side and compare the result to the one inside the database.

On my client side:

auth_key = PBKDF2(SHA256, password+username, last_login_fe_salt, fe_rounds)

explanation - hashing password+username+last_login_fe_salt text fe_rounds times

last_login_fe_salt -> a random salt sent to the user once he/she input their username in text field -
To be honest, not sure how this last_login_fe_salt is efficent for the cryptography against Dictionary attacks but atleast two people having the same password will send different hashes on their network.
any hacker can get this data by asking from the server, i can add server side limitations (req/s if it makes some difference etc.. let me know what you think) also adding captcha might be a good idea. When a user logged in successfuly the server generates a new random string and saves in into the database.

*I didnt see any explanation which salt Lastpass uses on their client side hashing, they are using PBKDF2 algorithm that needs a salt parameter.

fe_rounds -> number of rounds given by the server when typing username -
 its fixed for everybody and configurable by the server, also in articles i read about Lastpass they dont explain from where they receive the client side number of rounds...

so now we send auth_key as is to the server...

On my server side

now we are creating a new hash to compare the one inside the db.
Why another hash? if i understand correctly we bind the hash for server side data, like a combination of a password (that only the user knows) and server data.

db_auth=PBKDF2(SHA256, auth_key, user_be_salt, 100,000+user_configurable_rounds)

user_be_salt -> a random number that saved in db known only to the server and the ones who obtain the database, this changes on every successful login.

user_configurable_rounds -> number of iterations, every user can choose the amount of iterations (like in Lastpass) so attacker need also to guess the number or iterations?

I would be happy to hear what do you think about this authentication system, if its wrong than explain to me why and tell me what Lastpass do because i did not understand their entire authentication flow.

Overall not bad, with a few flaws in the details.

If last_login_fe_salt is random and changes each login, then the PBKDF2 result sent to the server fails.  This needs to be stored in the server's record for that username and kept the same.

Rounds also needs to be kept the same, and stored per username, so you can change the defaults.
If you want the ability to change them, then you need to be able to send to the client TWO salt and TWO iteration counts; old and new; then you get back both results; run both through the server-side algorith, then validate the old result, and if valid, store the new result.

Why aren't you using SHA-512?  The 64-bit operations required decrease the margin of advantage GPU based attackers have over your CPU based systems.
Don't hardcode the server side rounds of 100,000; if you really want this, then

store the system required server rounds and user required server rounds in separate fields
consider moving the user round count security addition to the client side; otherwise you're going to hit denial of service attacks by insane round counts using all your CPU!

Congratulations on choosing a well known iterated key password hashing function with reasonable round counts!


Automate certificate signing in Linux In a private network I wish to automate signing for new clients/servers.

Something like this:

New client is created (dockers & etc)
The client create a new private key and a CSR
The client send the CSR to a different server which sign it using the CA (???)

Is there a solid solution for providing automated signing services?

The solution is: Certificate System manager

Some of the candidates are:

DogTag
Red Hat Certificate System (based on DogTag)
EJBCA
OpenCA


How files of ransom attacks were decypted? In this site is was announced that everybody can decrypt the files victim of a ransom attack.

They just don't tell you how it was possible.

It's supposed the files were encrypted with an encryption algorithm that wouldn't be possible to break.

Were they able to decrypt the public key using super computers?
Has the encryption algorithm used a secret backdoor and it's actually unsafe (as it happened previously with a NIST standard)?
Governments already has developed in secret quantum computers and they can decrypt anything?
If they were able to decrypt the ransom, does it means that our passwords and credit card number are not longer safe?

The attacker may send you the secret key by payment in bitcoins using the deep web which is an anonymous transaction.

Did they caught the attacker and got the secret key?
Does it means that the deep web or bitcoins are not as anonymous as we think?
Did they make a deal with the attacker?

Crypto is hard to do correctly and this is no different for adversaries. Sometimes they mess up. Here are a few things that could lead to such an event. They are mostly the same that apply for good intentioned developers as well.

Weak algorithm used to encrypt, for instance DES. This can be brute forced to find the right key.

Weak key generated for encryption. Again, brute force helps here.

Incorrect implementation. Reusing nonces, using predictable IVs, etc. This also includes not wiping the memory where the key was stored. This results in key compromise by simply looking through memory.

There is a great article describing the most common crypto mistakes here: https://littlemaninmyhead.wordpress.com/2017/04/22/top-10-developer-crypto-mistakes/

Some mistakes require more resources to exploit so a supercomputer involvement is not impossible, but unlikely I think.

I do not think anyone made a deal with the attackers, however that is certainly possible. What could have happened is that a few transactions may have been performed with the attacker to get more information about the scheme used, and possibly reveal mistakes that can be exploited. The secret government quantum computer is very unlikely. A lot of times the key is computed by your system.

A backdoor may be relevant. But it is highly unlikely that it was placed there by the government. If t was the case it was probably left there by the attacker, like the killswitch of WannaCry.

Passwords and CC data is not in any more danger than it already was. Ransomware does no harm there. If passwords and CC data are correctly handled, they are safe. Just like, there are no decryptors available for "correctly" written ransomwares.

Bitcoins and other cryptocurrencies are not in danger either. They may have been incorrectly used, revealing the attacker but that is not the protocol's fault.


my info was compromised My ssn,dob,mother's maiden,phone number, and address were compromised and I am worried that some bad people now have all the afore mentioned information. My question is what could criminals do with this information?

Criminals could potentially use the information that was compromised to steal your identity.  They could then use this information to take out loans or open lines of credit in your name.
To mitigate this, you may want to lock your credit report.  Congress passed a law in 2018 making it free to do so.  By locking your credit report, banks and lenders will be unable to view your credit report without your authorization.  Without being able to view your credit report, they'll be unlikely to give a loan or line of credit to someone impersonating you.
For more info, see the page below on the FTC site about freezing your credit report:
http://www.consumer.ftc.gov/articles/0497-credit-freeze-faqs
Links to pages at the web sites of the three major credit bureaus for freezing your credit report:
http://www.experian.com/consumer/security_freeze.html
http://www.transunion.com/securityfreeze
http://www.equifax.com/help/credit-freeze/en_cp


How can I secure the state of a compromised iPhone for evidence of evil before resetting it? I'm a web developer and generalist programmer with a bit of mobile experience.

A friend of my wife is being stalked by a guy she was dating briefly and dumped over a month ago. He has somehow (not to say this is hard as I'm now learning) managed to compromise her iPhone. He recently let her know he knew who she was talking to over dating sites and other social media she accessed via the phone and claims he has a number of passwords etc...

I think I've got the damage-control side of things covered in terms of getting her to stop using her own personal devices and reset all her accounts on a friends computer and switch to a new email account for resets/verification, as well as redoing any security questions to not be facebook/asking-friends-answerable, etc.

But before I get her files backed up and do the phone factory reset after looking into all the places things might be able hide that resets don't touch (topic of another question), I'm wondering if there's a way to preserve the state of the phone in some sort of tamper-proof encrypted image that would suffice for evidence or at least good solid lead-building for purposes of law enforcement solutions to the problem in case he turns out to be a complete psycho and won't leave  her alone once we've established that she has friends that are more technical than he is, one of them is often in the same sector that he's in, and has shared mutual acquaintances on LinkedIn (oopsie).

Is this possible/practical/admissible? If not, is there anything from this phone I should try to preserve before nuking it? Getting her safe in the short term is higher priority than him sorry but I'd hate to blow any opportunities to get his heirlooms in a vice later should that become necessary. I do not yet know how he communicated these things to her. I'm very hopeful it's email but he's probably smarter than that.

First: This phone hacking sounds like a bluff. It's absolutely not trivial to break into an Iphone. There are some preconditions to accomplish this like a jailbroken phone and a side-loaded app or at least a malicious app which is registered as device administrator. This will require some social engineering. For sure it could be possible that he had physical access to the phone to infect it manually... But if this is the case she got a much bigger problem than a compromised device.

But lets assume that he would have managed to break into her phone. Number one rule in such cases is: Call the forensic guys as soon as possible. Everything you do could destroy evidence or raise the attention of the attacker. After that, you can try to lock him out of the accounts and make things secure.

Anyway. If you are sure enough that an attack on the phone or some accounts happened: get the police involved and make sure nobody else is touching the phone until things are clear.


Mixing Off-The-Record and classic SSL I am developing some pubsub system on top of Node.js and Socket.io. I decided to implement Off-The-Record (OTR) encryption by default for all of data transfers between clients and server(s). Question is do I need to additionally connect classic certificates to be sure even OTR ask queries will be encrypted?

If it will be good idea to connect both of OTR and SSL, what one must cover other? I mean do I need to encrypt traffic firstly with cert and then send it between clients by using OTR for securing it twice or I need to use OTR first and then just encrypt the whole traffic with and possibly without OTR (like handshake requests and else like that)?

Question is do I need to additionally connect classic certificates to be sure even OTR ask queries will be encrypted?

As long as you implement OTR correctly using libotr or the specifications, you do not have to deal with classic certificates from PKI. OTR operates using the TOFU model, with the optinal ability to verify another's fingerprint through an external channel.

  If it will be good idea to connect both of OTR and SSL, what one must cover other?

TLS operates on top of the TCP layer. Any arbitrary TCP traffic can be encrypted using TLS, as it is completely format-agnostic. OTR on the other hand is designed to encrypt printable characters and convert it to plain ASCII. It is not even possible to put OTR over TLS, since OTR takes text as an input and spits out base64 ASCII as an output. Have TLS encrypt the OTR stream if you do this.


OCSP from branch office to central office Our firm wants to validate certificates using OCSP in its branch offices.
However, when the OCSP responder as defined in the certificate is down, they want to fallback on CRLs, which is the right thing to do imo.

So, because we want to centralize our CRLs, can we override the OCSP URL to use an internal OCSP responder which then locally checks against CRLs?

Is this technically feasible?

Kind regards,
Ti.

Take a look at OCSP Stapling which was created to mitigate the problem of OCSP responder being down or unavailable.

  the certificate holder (the web server) queries the OCSP server themselves at regular intervals, obtaining a signed time-stamped OCSP response. When the site's visitors attempt to connect to the site, this response is included ("stapled") with the TLS/SSL handshake via the Certificate Status Request extension response

All major browsers and web servers support OCSP stapling.

As far having the OCSP responder check the CRL list, this is technically possible but might lead to performance issues if your CRL list gets very large. Ideally you would want your CRL list to be stored in an indexed database of some sort which can be queried efficiently by your OCSP responder.

Instead of rolling your own OCSP responder, it would be better to use a proven existing responder which can check against a an indexed database that contains your CRL list entries.


How and why does case insensitive XSS work, given that JavaScript is case sensitive? I found a lot of instances where XSS scripts like the following work:

<iMg SrC=x OnErRoR=window.location=123>

Given that JavaScript is a case sensitive language, how is the browser able to identify it as JavaScript code and execute it?

<iMg SrC=x OnErRoR=window.location=123>

The mixed case parts in your example are not the Javascript but the HTML. And HTML is case insensitive

<iMg     HTML img tag (i.e. image), case insensitive
SrC      src attribute for HTML img tag, case insensitive
OnErRoR  onerror attribute for HTML img tag, case insensitive

window.location=123  - Javascript, case sensitive


ensuring integrity of a sequence of jpeg files How do I ensure that a sequence of files is very hard to alter, either altering the content or removing whole files?  I'm thinking some kind of rolling checksum that also relies on the sum total of checksums already calculated that day.

But that would allow a recalculation of all checksums having removed or altered a file.  So what I'm looking for is a method of making that hard to do. The problem is the code is Python so the method used will be observable.

Perhaps multiple copies of the checksum log on remote machines?

An answer to your question depends on the context of your problem and attack you're worried about.

What is the same for every solution is that you can use a chain of hashes to link a new jpeg file to a chain of previous files.

If you have 3 files (a, b and c) and a hash function H, basically you calculate

head = H(a).

When the next file b comes along, you do

head = H(b | head)

and then for c

head = H(c | head)

You can then verify that nobody modified the jpg files by recalculating the whole chain of hashes and comparing it to the chain you already have.

The problem with this is that an attacker can manipulate or delete files a, b or c and recalculate the chain of hashes from the point of the first manipulation onwards.

The solution to this depends on your circumstances.

You trust the host which builds the hash chain

If the host is secure from tampering by an attacker, you can do as schroeder suggests and use public key cryptography to sign each new hash with your private key. This doesn't become computationally more intensive the longer the chain grows. You only ever calculate a hash over one jpg file and the last hash. You'll need to include the signature in the hash calculation of the chain.

Note that an attacker who can manipulate both the jpg files and the hash chain on another machine which wants to verify the chain can still throw away the last n files and their signed hashes, so if your jpg files aren't created regularly, it will be very difficult to detect an attacker which simply removes the last n files even if you add timestamps.

You don't trust the host which builds the hash chain

If you don't think the host is safe from attack, you have two options:

Either use an trusted external service to create and sign the next hash given a new jpg file hash. This host will keep track of the last hash in the chain and provide it to anyone who wants to verify the chain, so that the shortening attack described in the last section can be foiled.

or

Add a proof of work so that the host needs to spend a serious amount of time computing the next valid hash. Bitcoin does this by requiring each new block's hash to start with a certain number of 0's (its a bit more complicated, but you get the picture), so in order to find a valid block, you need to play around with a few adjustable fields in the block header until you end up with a valid hash. You can adapt this to your problem, too.

The idea here is that if an attacker wanted to change the chain of hashes, he would need to duplicate the amount of work that went into creating it. This becomes harder the farther back in the chain a manipulation is attempted. Since you seem to be running on a Pi zero, duplicating the work on a much faster processor seems easy, so the proof-of-work probably won't work for you.

Even if it was feasible, it still breaks when faced with the shortening attack. You really can't get around this problem without storing the length of the chain (or the last hash, or whatever) in a trusted location the attacker can't modify.

Using a blockchain

You could also use a preexisting blockchain, such as the bitcoin or ethereum blockchain. You could get your file hashes into the bitcoin blockchain, for example, by creating a new transaction for each new jpg file and storing the file hash as transaction metadata.

This would solve all the problems, but depending on how fast you needed the transactions to get incorporated into the blockchain, it would cost you money.


Might have been infected I recently got redirected to a site which just made a loud beeping sound, when trying to just access a link in a YouTube video discription. My Anti Virus Program (Kaspersky Internet Security) instantly closed the browser tab and alarmed me. So I thought that I was alright.

One day later more and more sites wanted me to complete a captcha when trying to access them (every time), which after some research seems to belong to a service called CloudFlare. Also a web page keeps opening with a really poorly made fake of the ReCaptcha, which doesn't do anything anyway. I tried running a full scan through Kaspersky and Malware Bytes, with no success, neither with the Chrome Cleaning Tool.

I looked up my IP one some of those blacklist check websites and I found out that I seem to be on various blacklists (around 7-8). Also according to "Spam Rats" I am identified as a "worst offender".

In addition to that, some games and programs deny access, when I try to log in.

Is there anything I could do?
Is it possible that I really am infected by some form of virus and should i be worried?

This post shows how to delete a virus in case of an infection. But in this case I am trying to find out whether I am even infected or what else could be causing this behavior.

The challenge is that if the machine is compromised, and it sounds like it is, your ability to diagnose and revert the compromise can be extremely hard if not impossible. This is because the compromise might replace system tools so you can't see its processes, etc.

If the compromise occurred by visiting that page and your web browser was not running with admin privileges and you did not allow it to elevate via UAC prompt, then the compromise would be contained to the login profile in use. But if the session was running with admin, the compromise could extend system wide and if so the ability to revert the damage is a lot hard -- if not impossible.

Assuming the compromise happened within a non-admin context, you can login in with another admin account and see files & processes. Look for processes you don't recognize. Look for files created/modified around the time frame of the compromise. What you find will determine the path to revert the damage. Could be as simple as a malicious chrome plugin was installed. If you cannot determine the compromise and revert, you can create another user and profile and start fresh and copy only the things you know were not compromised -- like documents, etc.

If the compromise happened with elevated rights, while it may be possible to revert the compromise, the best recommendation that can be made without knowing the specific compromise is to restore the OS from factory or fresh from the OS media.


Is it a good idea to use two antivirus? I read a "no two anti-virus" rule and I also read about how you can use two anti-virus programs, but you need to do some configuration. Is it worth it to run two anti-virus programs on one system and do some configuration, or is an anti-virus and an anti-malware better than using an antivirus with an antivirus?

Trying to install 2 products which hack deeply into the operating system while doing the same job is unlikely to be a good idea. It's likely that the second will simply displace the first. It's possible that that they may recognize the other's fingerprint database as containing the original malware.

OTOH, for a high security corporate gateway, where the 2 products are running on separate hosts, then yes, it should give better coverage.


How do exploits and payloads work together? I knew about the Metasploit Framework for a few years, but I never really got into it. I have some knowledge when it comes to networks, but I am not a Pro. I've tested some things with Metasploit and I was curious about one thing.
 (please correct me if I'm wrong)

Let's say that Microsoft is releasing a new version of Internet Explorer. Somebody finds a vulnerability (buffer overflow), and with Metasploit (not only Metasploit, but yeah), I set the exploit, set the payload, set the parameters, type exploit, and I got a meterpreter shell.

Ok, Internet Explorer has a vulnerability, but how is the connection between the exploit and the payload made? From what I know a buffer overflow is just something that is crashing the application, but how does it go from crashing an application to a connection back to the hacker's computer?

The vulnerability is just the weakness in the software that allows an attacker to gain control.  For example (since you mentioned buffer overflows), an unchecked buffer copy via strcpy, or using memcpy with an attacker-controlled length.

An exploit is the actual process of leveraging a vulnerability.  For buffer overflows, this is the process of overwriting the saved EIP on the stack, or overwriting a function pointer, or any other process that actually gives you control of the application.

The payload is what you want to do with the exploit: it can run a command (such as a shell), open a network port and listen (a bindshell), connect back to you (a reverse shell), or generally anything else you might want to do.  Often, if you're using Metasploit, you want to start Meterpreter, as Meterpreter is design to let you leverage it to do a variety of different tasks (screenshots, execute commands, exfiltrate data, etc.)


Is 2FA really necessary with long, high entropy passwords? I was wondering if two factor authentication is really necessary if you are using high entropy, long, unique passwords for each site. From my experience 2fa just beefs up security a little more, by adding another key necessary to get into a lock. But if the first key is sufficient(20 plus characters), does it really matter?

I only log into sites on machines I trust so I am not super worried about keyloggers or malware that was previously installed on the machine.

It seems to me the main purpose of 2fa is to either pad bad passwords, or protect users against replay attacks.

A better comparison is like having a guard inside a locked door.  If you lose your key, the guard can still keep someone that isn't you from walking in.  It isn't possible to guarantee that even the most secure password won't be compromised due to some attack.

Having multiple factors, particularly one that is never directly shared, adds an entire additional tier of security.  You still gain a lot from two factor authentication and you still need it for the same reason you don't use a weak password when using two factor authentication.

The best security is using a strong version of both.  We just don't bother with three factors because while one would be easy to compromise, two would be much more difficult to compromise at the same time and if they can get two at the same time, three isn't much harder.


Knowing a web application is HTTPS only, do HTTP cookie need the secure flag? My understanding of secure flag on HTTP cookies is: it will prevent the client from sending cookie in an HTTP connection, preventing a MITM attacker from grabbing the cookie details.

What if a Web application is running only on HTTPS? Do I still need the secure flag on each HTTP cookie? If so, how would that increase security?

As you already said, a man in the middle could grab the cookie while in http transit when the secure flag is not set.

Note that the secure flag tells the browser to not transmit the cookie when not on a secure connection. So the other way round than what you expected.

Now, even if your website is only running on https, a man in the middle might offer http only, proxying your web application, connecting to it via https.

This way, the cookie will be sent over http whenever a user without https everywhere manually enters the URL, unless you also have the HSTS set.

But even if you have, a man in the middle could remove the header for new visitors on their http service, stealing their cookie. This however is unfortunately true for the secure flag, as well.

So, in a scenario with a man in the middle, setting the secure flag will make it harder for the attacker to gain access to cookies of users, even if your service is only offering https.


How is the digital certificate sent alongside digital signatures? Most tutorials on the net only mention sending the digital signature attached to the document, but without the digital signature certificate, it'll be impossible for receivers to verify the signature. I'm assuming that the digital certificate is somehow sent alongside the signature but I can't seem to find any source mentioning that.

Most externally signed files (such as authenticode, PDF, etc.) use embedded signed PKCS#7 container that contains signature and related data, such as signing certificate, chain, counter signatures (signed timestamps). Here is a top-level ASN.1 definition of signed PKCS#7 (RFC 2315):
SignedData ::= SEQUENCE {
    version Version,
    digestAlgorithms DigestAlgorithmIdentifiers,
    contentInfo ContentInfo,
    certificates
       [0] IMPLICIT ExtendedCertificatesAndCertificates
         OPTIONAL,
    crls
      [1] IMPLICIT CertificateRevocationLists OPTIONAL,
    signerInfos SignerInfos }

Signature itself and (optional) counter signatures sit in signerInfos field and related certificates sit in certificates field.
Digital signature without public signing certificate is useless, because in this case you don't have any means to validate the signature. Thus, as a rule, public signing certificates are ALWAYS attached to signature.


How to store user credentials like Mint.com If you have a website that need to store user's credentials for other sites, how do you store those credentials securely? An example is Mint.com where you give them your username/password for your bank accounts. Based on this quora answer, Mint.com uses a combination of software and specialized hardware which doesn't sound cheap or easy to build. What are some simpler pure-software solutions for storing credentials? Are there any open source software that's designed for this?

Short answer: Carefully structured reversible encryption.
Long answer: The question doesn't contain enough information for anyone to provide a long answer. State the web app environment at least.


How is an ODBC connection encrypted? Most conversations about ODBC are Microsoft centric, but the protocol is often used in heterogeneous environements, such as a Windows client connecting to a database on an *nix server.  While my question is open ended, I'm most interested in the heterogeneous scenario.

In researching a specific use case, I was surprised to find almost no encryption specific controls in the drivers.  There was a check-box to turn on encryption, but I could find no documentation about controlling the algorithms used or to specify/provide certificates.  Red lights started flashing.  "Does it use TLS 1.2, or an older version?"  "Is there mutual authentication?"  "Are the certificates validated or are self-signed certs trusted?"  "What certs are used?"  Yea, like that...

I found some information about how this operates in a Microsoft environment.  Even this information was not entirely satisfying, but the documentation for the protocol itself or for specific drivers from the *nix world seems to be almost completely lacking.

It depends upon the ODBC driver. If the driver has internal crypto, you can activate it. However, it also depends upon the backend database. ODBC may be used to connect to databases other than SQL server. For example, a native Oracle ODBC driver written on top of Oracle's DB client can use oracle network security when connecting. Other ODBC drivers may not use or have native security.

EDIT for Clarification

ODBC - Open Database Connectivity - is an API (library) within a program, it is not a network protocol. There's the Driver Manager, which is what is linked into the program and then there are Drivers which connect to various databases that are dynamically loaded (often) or statically linked (infrequently) into the program.

The program can exist on the same machine as the database (and use interprocess communication) or remotely on another machine (and use network communication). As there is no universal network protocol for accessing every type of database, each driver has its own network protocol, if it's network capable.  For example, in the case of ODBC/Oracle, there would be a specific ODBC Oracle Driver that slots under the ODBC call stack and converts ODBC calls into SQL*Net calls. Those calls may be secured (the point of your question) using Oracle's Advanced Security Option (its native network security).

Likely, you're using a different database. In that case, you'll need a different ODBC Driver that, hopefully, has a secure networking layer built into it.

Years ago, I worked for a startup that specialized in building secure ODBC drivers for Oracle, Sybase and Generic ODBC networking. For the generic ODBC driver, we wrote our own client/server network protocol that used Kerberos and DCE RPC for securing network communications and the server side would call into the database via another ODBC Driver Manager.


Traffic capture on a public server I have a VPS where I'm hosting a web app built by PHP. Yesterday I Looked to the apache log and I found that someone running a scanner to guess some urls like:

/wp-admin
/joomla
/mysql
and so on

That wasn't a problem for me but today I found some urls that only me know about them and they aren't so easy to guess.

I'm wondering could anyone capture the traffic between me and the server? For more info I live by myself so no one has access to my network to plant a sniffer. Also the IP address of the bad guy is from China and I'm in the US and I'm using HTTPS.

Depends. If the server responded to the PHP Easter eggs they found out you're on PHP. Now they're probably running through a list of common PHP frameworks looking for those URLs. You need to make sure those URLs aren't able to be accessed by anyone other than yourself and your predefined IP address in the .htaccess file. Otherwise they'll eventually find the URLs, and start attacking them to get access.

Best practices for securing a web app

Make sure the administrative or any damaging pages can only be accessed from pre-defined static IP addresses that need access
Make sure that anyone who shouldn't have access to your website doesn't have access to your website(if it's only for a specific country, limit access using a GEO-IP service)
Utilize your services and control devices to lock down as many features of your application/server as you can until it's at a bare minimum use state(block incoming ports you don't need, limit access, limit access rates by IP, so forth and onward)
Make sure you aren't leaking data
Make sure your SSL is up to date and you don't use out of date vulnerable ciphers

There are a lot of things I've forgotten, but this is a good first few steps.


2-factor authentication everywhere: is this possible? I'm wondering if there is a way to require 2-factor authentication on webpages and Android apps that don't have it by default. I am already using a password manager but I feel that this may not be enough and would like to also have 2-factor authentication for everything I'm using, if possible. Or is this overkill?

For apps, you would need a custom ROM on the device to prompt for this. But the risk/reward balance is a little off for devices.
There are services that can be used to add MFA to online services for a single-sign-on account, but that adds it for that 3rd party account, not the individual services account.
You cannot add MFA to something that isn't expecting it. It's like trying to add another password. If the service isn't expecting it, then who checks it to verify it passed? Who blocks access if it fails?


Performing multiline xss I am playing one pentesting game theres a task where i need to perform multi line xss to print cookies.

I was able to make xss that print "x" because one line is too short for entire command so this works "><script>alert("x")</script>( this is max length of field and we have three fields available)

But i need to use this "><script>alert(document.cookie)</script> and dont know how to modify it for three fields that i have for this task.

Thanks for any help

The common way to do this is to span the payload across multiple parameters.For example imagine there are three parameter's param1,param2,param3.

param1=<script><then begin comment block>

param2=<end comment block>alert(document.cookie)<start comment block>

param3=<end comment block><script>

So the general idea is to comment out the middle that way you can stretch the payload, whenever there is a (number of character restriction).

Adjust the payload according to the number of allowed characters in the parameter's.


What could this set of IDS alerts be (DDNS deaftone.com darktech.org chatnook.com, ...)? Below is a screeny of my Squert GUI showing the Snort events. Notice they all happen at the same exact time. I cannot figure out what the source of it could be. Any ideas?

Edit: It looks like the domains are owned by DtDNS.

Edit 2: Here's another screeny with more details. It looks like its UDP protocol and port 53.

One idea (though it may or may not be correct) is that malware on your system could be trying to reach out to its creator (e.g. to send out information or to allow for your system to be used in a botnet).  The * is typically used as a "wild card".  For example, the domain www.abc.3d-game.com should be found by the *.3d-game.com query. The domains shown here definitely look suspicious.  I would update your antivirus and run a scan of your system to check for any malware.  Even a clean virus scan does not entirely rule that idea out.

Edit: For a Mac, you may be able to use Apple's file quarantine system, see the question:
Should I get an antivirus for my Mac?


How can I execute a XSS with these conditions? I am trying to learn penetration testing and I have downloaded a vulnerable application called "Bodgeit Store". I have finished almost all the challenges except one which is to execute a Cross-Site Scripting attack. I looked through the source code of the app and found the following Java code:

if (request.getMethod().equals("POST") && comments != null)
{
    anticsrf = request.getParameter("anticsrf");
        if (anticsrf != null && anticsrf.equals(request.getSession().getAttribute("anticsrf")))
            {
                // Strip script tags, because that will make everything alright...
                comments = comments.replace("<script>", "");
                comments = comments.replace("</script>", "");
                // And double quotes, just to make sure
                comments = comments.replace("\"", "");
            .................
            }
}

The challenge says:

  "Display a popup using: <script>alert("XSS")</script>"

but looking at the source, we find that the <script> and </script> tags are replaced by null characters. Also I cannot make a GET request because the code also verifies whether the request is a POST request or not.

I have tried and succeeded in executing an alert box using other methods like using an external .js file and so, but I really want to find how one could complete this challenge.
Please give me some suggestions on how to go about solving this one.

Besides Gumbo's nice and simple answer, another possibility would be to use the last replace() call to bypass the earlier ones, for example like this:

<scr"ipt>alert('XSS')</scr"ipt>

In fact, I suspect this might be the solution that the author of the challenge was expecting: there's not much point in stripping double quotes except to deliberately allow this particular attack, and the "just to make sure" comment even calls attention to it.

Of course, even if the code didn't strip double quotes, you could still do this:

<scr</script>ipt>alert('XSS')</scr</script>ipt>


Does Ettercap exploit the Hole196 vulnerability? If not, how is an ARP attack possible on a WPA2 secured network?

ARP poisoning is basically when you declare your MAC address is responsible for an IP address, I think usually the router. So you receive all the victims packets in a "man in the middle" type attack. I read that WPA2 encryption happens at a layer below that of packet routing.

Google is your friend, there was already  a post regarding this on here: Is WPA2 WiFi protected against ARP poisoning and sniffing?

Also read this: http://community.arubanetworks.com/t5/Community-Tribal-Knowledge-Base/Analysis-of-quot-Hole-196-quot-WPA2-Attack/ta-p/25382 it explains why exploiting the Hole 196 vulnerability is not required to ARP spoof on a WPA/WPA2 protected network.


Why does Outlook not block spam sent by employees? Our organization uses Outlook as email service and hence have our organization email domain. If someone from the organization sends a spam or phishing email to someone else in our organization, its received by the recipient.

I tried sending a simple spam email (copied from personal Gmail account Spam folder) from my organization domain to someone in the organization, and it was received by the recipient.

In the Junk Folder in Outlook, there were few spam emails, which means that Outlook does filter spam emails. But still, it does not capture simple spam emails.

Why? Are there any policies of Outlook, that let someone in organization send anything to others in the organisation?

Intra-domain emails (emails from your domain to someone else in your domain) have a much higher trust score, so they tend not to get blocked. This is done because legitimate employee-to-employee emails can look a lot like spam ("check out these pictures of my cat! [link]") . This is an ease of use issue.

The sensitivity level of this can be changed on the server admin panel. But test it out to see if it impacts your normal flow of business.

Exchange Online Spam filter policies


Testing XSS - how to validate manually? I have Burp and Appscan telling me that Reflected XSS is possible due to a particular variable on a particular page.

The following example is given of what Appscan injected

'%252fmypage.aspx%253fHomeURL%253d%252fmyotherpage.aspx"/><script>alert(152695)</script>'

and what Burp injected

x.com/mypage.aspx?HomeURL=%2fmyotherpage.aspxae6fd'onmouseover%3d'alert(1)'30ec6

I have tried variations on both, with and without quotes, different encoding, and I can never get any javascript to work in any browser. Currently trying chrome with --disable-web-security, which makes no differences.

I can get the code displayed in the source of the page, so I know the vuln is there, but I am having trouble actually validating it.

What is in common, if anything, with what burp and appscan used to validate the vulnerability?

I'd like to understand this better so I can validate easier in the future.

Appscan has the "show in browser" feature that opens Appscan's special "worst of all worlds" browser for the given vulnerability.  If it isn't a false positive, this browser should execute the Javascript.  I have found it a pretty reliable way to check for false positives.

For all other testing, I've found that Firefox is the least protected from XSS, so I always use Firefox for hand testing.

It happens a lot that the actual page that executes the XSS is an error page that has been redirected to and maybe you are not allowing your hand-testing to proceed all the way to that error page.

Note that with the Burp example you show, the Javascript will not execute until you actually move the mouse over the control in question.


Any known vulnerabilities for thttpd 2.25b 29dec2003 Quick question, having trouble finding any information online relating to that specific year for the given version thttpd 2.25b 29dec2003. Need to explain what vulnerabilities this may have had, if it had any at all. Any help would be appreciated.

Yes the following are the three public vulnerabilities listed for  thttpd -  tiny/turbo/throttling HTTP server  version 2.25b of 29dec2003

CVE-2006-4248
CVE-2006-1079
CVE-2006-1078

Further details can be looked up against these CVE numbers from any vulnerability database.