SSH keys - passwords policy - can passphrase be the same as password? I have some doubts regarding keys passphrases

I have many machines (around 5) where I use ssh from
Every machine has different password for user
I log in from every machine to any other machine

So it gives 25 keypairs I guess and the thing is - what should be passphrase to keys? I see following solutions:

use local machine password
use remote machine password
use combined pass like "localpassremotepass"
use different passphrase for every keypair (pretty unusable. Number of passwords grows exponentially)

Local machines are much more likely to get compromised than remote.

Which of those strategies is correct as in widely used and accepted as fine? Are there any other solutions like some hybrids etc?

First, you should look into the ssh-agent and the ssh option -A (ForwardAgent).

This might simplify your life a bit because it allows you to have the keys unlocked at the terminal where you are working, but use them at remote locations.

Secondly, I would recommend that your key-password not be the same as your login password. Having the key-password the same as your login password means that an attacker (or bad actor) who gets your login password gets access to all your machines.

Having different login passwords for each machine is probably a good idea.

Having a different key for each machine is probably not that useful for you. Having a single key that authorizes all your machines is probably your best bet for an initial configuration.

Open-SSH now has support certificates if you want finer-grained control, however, that is more complicated to set up, so I would recommend you start with the simple configuration initially.


Path traversal using hash extension attack I'm trying to write a PoC for path traversal using hash extension attack on a PHP site.
My obstacle is in specifying an acceptable string. The vulnerability is in in the URL:

http://127.0.0.1/download.php?file=file.txt&hash=[the valid md5 hash]

I'm trying to print out /etc/passwd using this:

http://127.0.0.1/download.php?file=file.txt��/../../../etc/passwd&hash=[extended valid hash]

The backend first checks whether the provided MD5 is valid and then prints out the requested file. I'm using the PHP functions fopen and fread for that.

I'm able to create valid hashes for arbitrary strings but PHP fails with the following error:

  Warning: fopen() expects parameter 1 to be a valid path, string given in /var/www/html/download.php

Note: The characters �� in the URL are due to the MD5 padding of the hash extension.

Since PHP 5.3.4, an error is thrown if a path contains a null byte.


Local file inclusion when URL is appended with .php? During pentesting, I came across a target vulnerable to local file inclusiong:

include("$rootpath/includes/dir/".$_GET["section"].".php");

When I visit the URL
http://target.com/img?section=images it works perfectly as images.php is present in the $rootpath/includes/dir/ directory. When I visit http://target.com/img?section=images.php I get nothing, indicating that the server could not find any images.php.php file.

Is there any way to bypass the .php append restriction? I tried http://target.com/img?section=images.php%00 but the webserver is now trying to find http://target.com/img?section=images.php%00.php file. I want to read the /etc/passwd file.

Unfortunately (for the attacker) this specific technique only applies to PHP 5.3 and below. It is likely that you are encountering a newer version considering the last release of PHP 5.3 was in August 2014.

Here's a bug listing for PHP and there are multiple articles and resources specifically mentioning the null byte bypass in LFI being restricted to before PHP 5.4:

Offensive Security's File Inclusion Vuln -- In versions of PHP below 5.3, ending the URL with a null byte (%00) would cause the interpreter to stop reading, which would allow the attacker to include their intended page.
PayloadAllTheThings File Inclusion reference
Rawsec LFI

Note: some references say 5.3.4 and below specifically, and I was looking deeper into this but I stopped pursuing the rabbit down the hole as "5.3 and below" likely answers why the bypass is not working :).


Exploitation of Reflected XSS on Android App I am trying to do a security evaluation of an android application. I came across a situation where one of the activities of the app displays certain form fields in a webview.

This form is very straight forward vulnerable to a reflected XSS. An attack vector as simple as "><script>alert(1);</script><div is a sufficient PoC.

Now in traditional web applications I understand the impact that a potential reflected XSS (like the above) may have and that there are a dozen exploit techniques there, including BeeF etc.

However, I am unable to evaluate the impact of such a bug in the former case (Android WebView). Specifically, since the form is rendered within the web view of the app and given that the app has no open ends where other apps could interact with it through intents etc., what could be a possible way an attacker might use to exploit this reflected XSS.

Just passing on a hyperlink through some social engineering, won't really work I guess. Because, even if the potential victim opens up the link in his mobile browser, the browser would be a completely different app altogether, having no gateway to interact with our vulnerable app in question, isn't it ?

Now just for the sake of this being a security vuln, I do not want to ride on top of the dev to get it fixed(I have been a dev, so I can empathize :)). But from a security perspective, I certainly want to get it fixed :P and so I am looking out for an exploit scenario.

Any answers/pointers appreciated.

A lot of the comments above are irrelevant. None of that stuff really matters. In the app, did the developer create a feature where external links are automatically redirected to the app? If not, the threat is very low.

Somebody would have to decompile the app and add that feature in and redistribute it order to successfully exploit that vulnerability. I would fix it regardless but the threat is low.

Stored XSS would be a different story.


Is it possible for a domain to be faked? I was talking to PayPal customer service and they were trying to tell me PayPal does not have any third parties, so when I shown them https://www.paypal.com/uk/webapps/mpp/ua/third-parties-list they responded to me that this is not a real paypal site, despite https://www.paypal.com/uk/home being the website for PayPal.
I cannot understand how it cannot belong to PayPal, so I checked and the IP 151.101.129.21 belongs to https://www.paypal.com/uk/home belongs and the IP 23.223.252.174 belongs to https://www.paypal.com/uk/webapps/mpp/ua/third-parties-list, personally I never came accross a way for a domain to be faked but I have seen companies use different IP for different parts of a webiste.
Is it even possible for such a domain to be faked?

Domains are "faked" all the time. All you need to do is to change the DNS entry. You can do this by setting up a malicious DNS server or to edit the computer's local hosts file that acts like your device's internal DNS server.
It is also possible to control a legitimate website to host pages deep in the file structure. So that www.example.com/flowers/d/g/login/totallyreal/malicious.html can be any type of page you want or look like any legitimate page.
But I think that's not the issue here. I think there is a simple miscommunication between you. Because of course Paypal "has 3rd parties".


Identifying USB Device Anomalies..? I have a laptop with 4 USB ports, and I have an external 4 port splitter that I purchased off amazon. Plugged into that is an external USB audio card. The audio card has a line-in port and an audio output. But, when I run lsusb, an HID (human interace device) is also detected:

/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/6p, 480M
|__ Port 2: Dev 15, If 0, Class=Hub, Driver=hub/4p, 480M
    |__ Port 3: Dev 16, If 0, Class=Audio, Driver=snd-usb-audio, 12M
    |__ Port 3: Dev 16, If 1, Class=Audio, Driver=snd-usb-audio, 12M
    |__ Port 3: Dev 16, If 2, Class=Audio, Driver=snd-usb-audio, 12M
    |__ Port 3: Dev 16, If 3, Class=Human Interface Device, Driver=usbhid, 12M

So I have three questions.. Why are their 3 different audio interfaces showing up, and what legitamate use would an HID server on an audio card? I thought that HID controllers were for devices like keyboards, mice, or perhaps cameras. I also know that they are an attractive attack vector (like the rubber ducky). Is this normal?

Secondly, listed on port 1, and also when all usb devices are removed from my computer, I see this in output of the lsusb -t

/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/6p, 480M
|__ Port 5: Dev 2, If 0, Class=Video, Driver=uvcvideo, 480M
|__ Port 5: Dev 2, If 1, Class=Video, Driver=uvcvideo, 480M

I do have a webcam and microphone inside the laptop, but not inserted in anything USB. However, lspci does not report any other video controllers, so I assume that's just the internal camera.

Finally, why would a wireless mouse show up as a keyboard? I assume it's because this mouse has a couple other buttons on them (although none actually work in linux):

          *-usb
               description: Keyboard
               product: 2.4G Wireless Mouse
               vendor: MOSART Semi.
               physical id: 1
               bus info: usb@8:1
               version: 1.11
               capabilities: usb-1.10
               configuration: driver=usbhid maxpower=100mA speed=12Mbit/s

Is any of this abnormal? What legitamate uses do USB HID controllers serve?

Assuming your mystery USB audio device is based on the CMedia CM108 chipset (or even if it isn't, since there's not much variation in cheap USB audio devices), the HID device is for optional volume-control buttons; the manufacturer of your device decided not to hook the relevant chip pins up to actual buttons.  The other three interfaces are audio in, audio out, and device control.

Your webcam is probably USB.  It may not have any external wires or use a conventional plug, but USB is a convenient way to hook things up inside a computer.

I don't know why your mouse is describing itself as a keyboard, but it's not unusual for manufacturers to not get things exactly right when configuring USB.


Is Starbucks spoofing me? When I connected to Starbucks's Wi-Fi, I got a security alert from MS Outlook that looks like this:

I looked up secure.datavalet.io, but there's no mention of this thing anywhere. This does not appear when I use my mobile, home, or work Internet. Is there anything I can do to trace/verify this thing?

As @Adonalsium mentions in the comments, Data Valet manages the Starbucks public WiFi. They're trying to redirect you to the "agree to terms" page to login to the WiFi. Go to a page in a web browser that is not protected by ssl (neverssl.com is great for this), and it will redirect you to the portal page so you can agree, and then this will go away.

The error is the security on your system working as intended, by blocking the connection to a server that isn't the one you were trying to connect to. When it asks something like "Do you want to proceed?", answer "No" or whichever answer will cancel the connection, to avoid sending secrets like authorization tokens to an untrusted server. Login to the portal as mentioned above, and then try again.

The name for the mechanism that redirects you to the terms page and doesn't let you go anywhere else until you agree is Captive Portal. Captive Portals are a common and annoying pattern for "protecting" public WiFi access points, but they have the annoying fault that they essentially need to conduct an attack against your connection to work.


Apple Developer Account Hacked? I just did a fresh install of Snow Leopard on a newly-formatted hard drive.

Logged into the iPhone Developer Page with Google Chrome (latest build) here:
http://developer.apple.com/iphone/index.action

I login as usual, but instead of seeing my developer account info, I see someone else's.

Even if I click logout, it won't.

Anytime I click a link, I get a new page with usually a different name.

I stopped clicking links and quit the browser.

Then I logged in with my mobile, and there was no problem whatsoever.

I then cleared all my cookies, restarted the browser and I was back at seeing people's names once again.

A keychain issue?  Is my account being hacked?

If you see the information about somebody else, then it is not your account which is being hacked; rather, you are (involuntarily) hacking the accounts of other people.

If the server accepts to send you pages with private information about other users, then the server has a problem (most probably a mere, mundane bug; no need to invoke actual malice here) and there is nothing you can do client-side (i.e. on your machines) to really solve that. If you are positive that you are obtaining information that you should not be able to get, your best bet is to report the problem to Apple.


How does Single Sign On limit phishing risk I was reading this article about SSO benefits and this sentence intrigues me :

  Can reduce phishing – Phishing, a fraudulent process where victims are tricked into giving away sensitive user information, increasing security for you and your users.

How is this possible ? I mean if the victim is using SSO then the attacker will gain access to all authorized services instead of the only "phished account" what would increase the impact of phishing.

Newer forms of SSO, such as OAuth2, do not do anything more than provide a secure token for the client to use to verify if a user is actually authorized successfully. It does not leak their username, password, or anything else. It's simply an assertion that, according to the identity provider, it is a real user by whatever means they've proved themselves, and that they have some unique idenifier specific to that provider.

They could have used a smart card, fingerprints or other biometrics, etc, and that they have proved that who they say they are, but nothing more. Phishing attacks using these forms of SSO are pointless, because they get neither the credentials the user used, nor information about any other accounts they have. The tokens generated are only valid for a specific app, too, so they can't even use that token to access other services the user might have access to.


Difference between IDS and IPS and Firewall The differences between an IDS and a firewall are that the latter prevents malicious traffic, whereas the IDS:

Passive IDS: the IDS only reports that there was an intrusion.
Active IDS: the IDS also takes actions against the issue to fix it or at least lessen its impact.

However, what's the difference between an IPS and a Firewall? Both are a preventative technical control whose purpose is to guarantee that incoming network traffic is legitimate.

The line is definitely blurring somewhat as technological capacity increases, platforms are integrated, and the threat landscape shifts. At their core we have

Firewall - A device or application that analyzes packet headers and enforces policy based on protocol type, source address, destination address, source port, and/or destination port. Packets that do not match policy are rejected.
Intrusion Detection System - A device or application that analyzes whole packets, both header and payload, looking for known events. When a known event is detected a log message is generated detailing the event.
Intrusion Prevention System - A device or application that analyzes whole packets, both header and payload, looking for known events. When a known event is detected the packet is rejected.

The functional difference between an IDS and an IPS is a fairly subtle one and is often nothing more than a configuration setting change. For example, in a Juniper IDP module, changing from Detection to Prevention is as easy as changing a drop-down selection from LOG to LOG/DROP. At a technical level it can sometimes require redesign of your monitoring architecture.

Given the similarity between all three systems there has been some convergence over time. The Juniper IDP module mentioned above, for example, is effectively an add-on component to a firewall. From a network flow and administrative perspective the firewall and IDP are functionally indistinguishable even if they are technically two separate devices.

There is also much market discussion of something called a Next Generation Firewall (NGFW). The concept is still new enough that each vendor has their own definition as to what constitutes a NGFW but for the most part all agree that it is a device that enforces policy unilaterally across more than just network packet header information. This can make a single device act as both a traditional Firewall and IPS. Occasionally additional information is gathered, such as from which user the traffic originated, allowing even more comprehensive policy enforcement.


Decrypting AES-128-CBC leads to first block being correct, the rest corrupt I'm currently investigating a piece of software which encrypts it's files with AES-128-CBC.

From disassembly it is truly known that the algorithm used is correct (log messages plus calls to the BCrypt library).

The key and IV are static and stored within the executable as a blob of 96 bytes, which is split using a set of XOR loops into 2 blobs of 16 bytes — one for the key, and one for the IV.

I have been able to reproduce the same algorithm and acquire both the key and the IV.

However, when I try to use the acquired data to decrypt the file, either using tiny-aes or the OpenSSL command line tool, I get a piece of the correct decrypted header for the file, containing human-readable text at that, but further just a bunch of zero bytes, and then seemingly the original encrypted data again.

Reading up about CBC on Wikipedia leads to the fact that:

  Decrypting with the incorrect IV causes the first block of plaintext to be corrupt but subsequent plaintext blocks will be correct.

However, this seems to be the exactly inverse in my case. Moreover, even if I set the IV to all zeros during decryption, I still get the header, but not the further data.

Am I missing a critical point in how to apply the algorithm properly? Or may it be that the implementation in Windows BCrypt differs from tinyAES and OpenSSL on Linux?

If you are seeing a partially correct result it is likely an IV problem:

In CBC the IV is XOR'ed to the plaintext after encrypt/decrypt. This means that if you've got the IV completely wrong then your decrypted message will have incorrect data of the first block (in CBC 16 bytes) as that is the length of the IV. This is in line with the quoted wiki.

However there is also the case where your IV is partially right (say the first n < 16 bytes are correct) then you will see the correct first n bytes in the decrypted file and the remaining (16-n) bytes incorrectly. This means that even if you try an IV of all zeroes you might still get the first n characters correct.

I can't say why your IV is incorrect but I would check the value there first.


Setting up a ram based VPN Are there any ram based VPN solutions that have options to keep no logs?

I've been looking to set up a portable linux distro, probably Debian, that I'd run from CD without any form of persistence. It would only be used as an throughput vpn by a small team of users. what are my options?

If you boot up a Linux system from a Live CD, the OS will see a local filesystem, but it will be RAM-based. Logs will go to that filesystem, and disappear for good when you switch the power off.

Many existing Linux distributions offer Live CD, e.g. Debian.

(We say "live CD" but most Live CD can physically reside on USB flash drives, for the same final effect: the medium is used only for reading, not for writing, so any writing which happens at all goes to the RAM and is not kept beyond a power-down or a simple reboot.)


How can I detect the remote operating system? Is it possible to detect the operating system type remotely from another system using any tools like nmap without admin privileges? What are the other alternatives for achieving this?

Using nmap:

sudo nmap -O <target>

Or if they block your ping probes you can do:

sudo nmap -O <target> -Pn

Sometimes you still get fake results and you should try doing an aggressive scan (can be detected and blocked by the firewall).

sudo nmap -A <target>


Is there any information I shouldn't include in questions about GnuPG aside from my private key? There are many questions I have about GnuPG, but what stops me asking is knowing that I may add output to a question that I shouldn't release publicly.

Is it a risk to paste in the result of gpg -K?
What about gpg --edit my@email.address?
Are all fingerprint outputs ok to see?
Is there any other data I should exclude from questions?

I'm running gpg (GnuPG/MacGPG2) 2.0.27 with libgcrypt 1.6.3.

Publising Information on Your Key

Hiding your private key is obvious, and you already noted that.

The only further thing not to publish (without intent to do so) is the revocation certificate you might have pregenerated (and GnuPG 2.1 is doing so by default for a good reason). With such a revocation certificate, others could revoke your key by uploading it to the key servers. Sharing with a trusted friend or family member on the other hand might be a good thing to do: they could still revoke your key in case anything happens to you (consider it a kind of digital last will).

Other things are hardly a problem. If you publish your public key (or fingerprint, mail address, user ID: all of those could be used to retrieve your key from a key server, given it is uploaded; and if you use your key, expect it to get uploaded by anybody by mistake or intent). This might allow to connect your Stack Exchange account with your real identity (which on the other hand does not seem to be a problem to you, looking at your profile).

From all further information like key IDs, fingerprints, user IDs, ... neither your private key nor revocation certificate can be calculated. Key IDs are the lower parts of the fingerprint, which again is calculated from the creation time of your key and public key.

Publishing Information Created Using Your Key

If you do not want to reveal your identity, be aware when publishing encrypted and/or signed data for/from your key, even if your strip parts of the ASCII-armored or binary output; or publish parts from your public key. It includes the whole key fingerprint, and does so in the very first parts. If you have something like

-----BEGIN PGP MESSAGE-----
Version: GnuPG v1

owEBOgLF/ZANAwACAY545E37G1XpAcsKYgBV6J49Zm9vCokCHAQAAQIABgUCVeie
PQAKCRCOeORN+xtV6fZxD/oCEDFuXBwdF07UDZOh0v2x7CX7UmruCRs2MwcmZoHV
Uiiag9ibc3951pxCdNfDdB6rKKYc4fqqkMOTFqdi9DXBs6u7r8oiuuDTpqSJxyaM
lgUTiE/8oiF2/JtLgrFTVr5Kq7tgSs5WJ++zW0bPBNQHZoQ58fQsuAc0cn408m1j
[snipped some lines for assumed privacy]
iJiQoufmmGZdXFhFKW3hVxabEvfCxHqfvdMDhYh257r69AXTwsLsvXTJ6XXms9xy
LQ==
=pNoP
-----END PGP MESSAGE-----

an attacker will still be able to parse the packets manually (although neither gpg --list-packets nor pgpdump will help at analyzing such broken information without modifying their code), and you need some understanding of RFC 4880 (and a hex editor).


What does the EC_POINT_FORMAT TLS extension protect against and what is the risk of not using it? The SSL test of htbridge pointed out that the server supports the elliptic curves but not the EC_POINT_FORMAT TLS extension.

What does that TLS extension protect against? What is the (potential) risk of not using it?

TLDR: not much

Sending the extension is basically to inform the peer whether you support compressed points, since support for uncompressed points is mandatory (if you support EC ciphersuites and certs at all).

If you don't support compression and don't send the extension, there's conceivably a risk the peer may send you a cert/chain and/or ephemeral key that uses compression, which you cannot process so the handshake fails, even if the peer might have been able to use an uncompressed-point cert/chain and/or key or some other negotiable ciphersuite that would have worked. But RFC 4492 5.2 explicitly prohibits the client from doing this, and general Postelianism should discourage the server although 4 is at best ambiguous. Not to mention I've not seen any implementation of EC that doesn't support compression in the first place.

If you do support compression but don't send the extension, there's a risk the peer may fail to use a cert/chain with compressed point(s) even though you would have accepted it. If it does not have another cert/chain (and related parameters if applicable such as DHE) for a ciphersuite supported by both parties, this may mean the TLS connection fails entirely, and depending on the systems and users involved, might provoke them to use alternative communications that are insecure or less secure. If it does have another cert/chain without compression and is able to complete the handshake, it wastes a very small amount of bandwidth which almost certainly doesn't matter and the resulting connection might possibly not be as strong as it could have been, but if both parties are configued and implemented correctly it should still be sufficiently secure. There should not be any issue with the ephemeral key because the server can decompress that if necessary.


Install spyware through wifi or vpn Suppose I connect time to my company's WiFi with my Android phone, or through a VPN with my laptop.

Is it possible for someone install spyware (keylogger, etc.) on my device to spy my browsing history? I am not talking about monitoring traffic network when I am connected, but rather some tool to get information about what I'm doing at home.

Thanks a lot

Unless the network stack of your operating system has a serious security bug, just being connected to a malicious network should not allow the administrator of that network to install malware.

However, when you download software over the untrusted network and install it, and that download is not using https, the network administrator could perform a man-in-the-middle attack to infect the software with malware while it is being downloaded. When you then run the infected installer, it would install that malware.


Given properly implemented end-to-end encryption with no backdoors, can whatsapp comply to hand over customer messages? According to The Telegraph, a member of the British government is calling on WhatsApp to release the messages sent by the terrorist that committed the attack on London on March 22, 2017.

It's lead me to wonder, does WhatsApp, barring any intentional backdoors, have a way to break its own end-to-end encryption assuming no access to the physical device?

Meaning, if the government were to obtain a court order, would it even be possible for WhatsApp to comply?

I think the answer is maybe. They may save the keys at the start, or have functionality to copy the keys from the device, but still sell their messaging service as end to end encrypted. The idea then is that if one of the users reports bad behavior from another user they can step in and decrypt the messages to verify the claim. Also this means whatsapp might get a secret request from some TLA and do it without telling anybody, possibly without access to the users devices since those guys could already have a copy of the encrypted messages.

Also if it is like this then everyone would like to pretend it's not, people would still have to act outraged when something happens in the news that involves the program.


Am I in this particular case allowed, to store password in java program? I have a Java-Server program running on Ubuntu-Server which gets every 5 minutes current location data of my android-smartphone (which I carry with me).
My architecture is the following:
My smartphone connects to the server using tlsv1.2 and transmits the gps location.
After receiving the data, the server-program establishes a connection to a local mysql-database inserting the location,time and so on.

I read this answer from William Brandl and i thought, yeah, but this does not increase my security level.

I am the only one who have physical access to my machine. So my java-program can only be reverse engineerd if my server got compromised. Storing the username and password into a seperate file makes absolutely no sense to me in this particular situation.
The program is running under a low privileged user. So if my user or my server got compromised, someone can as easily reverse engineer my program getting to the honey(username and password) as just open the file containing the username and passwords which is readable by the same user.

Is in this particular case storing username and password in a separate file just more workload?
Is there a more secure way regarding this case of storing the sensitive data?

Bear with me if this is the wrong place to ask.

I would store the password only in memory at runtime, but this has one drawback. You need to type in the password every time you start/restart the server. This is the most secure way to managed plaintext passwords.

Plus I would followed the advice to r00t, create two users on the MySQL server, one with read permission and one with write permission. Just in case someone was able to gain access to your server and dump the memory.


Are input fields that don’t have name=“” sent via the browser Are input fields that don’t have name attributes susceptible to MITM attacks (w/o SSL) or any other attack?

For example:

<form action="" method="post">
    <label for="credit_card_number"><input id="credit_card_number" type="text" value="4111111111111111"></label>
    <button type="submit">Submit</button>
</form>

What I'm doing is using javascript to get the values, then posting to stripe.js, receiving a token and then clearing all the values of the CC fields before submitting the form to the server.

I understand that SSL would be a good idea but would it be necessary? And why if so.

Yes. Any HTTP request that isn't protected by SSL/TLS/HTTPS is vulnerable to MitM attacks.  Without the integrity that is provided by HTTPS, any component of the HTML served over HTTP is vulnerable to attack or modification by a man-in-the-middle.   For instance, the form's action could be changed, so instead of the form being POSTed to your intended page, it could be POSTed to a page on a malicious site (as designated by the MitM) instead.

The bottom line is that anything you send to the client over HTTP could be changed before it actually gets to the client.  If you need security (and you certainly do for payment transactions) you need HTTPS to ensure that the client is receiving what you intended them to receive.


When is it appropriate to SSL Encrypt Database connections? Let's say I have a web server I setup, and then a database server.

However, they are communicating locally and are behind firewall. In my opinion, no SSL is needed here right?

The only time to use SSL to encrypt the database connection would be between a web server that exists in a server that remotely communicates with a database server that is located somewhere else right?

I've seen guidelines for security before that advocate securing with SSL the database connection but it was vague on when to use it.

It looks like the two previous answers to this question more or less strongly recommend to turn on SSL anyway, but I'd like to suggest a different reasoning angle (although I'm not recommending not to turn on SSL).

The two key points in assessing whether you need SSL or not are (a) what SSL protects you against and (b) what the thread model is: enumerate the potential threats.

SSL/TLS protects the transport of information between a client (in this case, your web server) and a server (in this case, your database server) from tampering and eavesdropping by anyone on the network in between (including able to get on those two machines).

To assess whether SSL is useful, you need to assume that the attacker is in a position to perform the attack SSL is designed to protect you against. That is, the attacker would need to be in a position to sniff packets on the network or on either machines.

If someone in a position to sniff packets from the database server, they're likely to have root/admin access to that server. Using SSL/TLS at that stage will make no difference.
If someone is in a position to sniff packets on the network between the web server and the database server (excluding those machines), using SSL/TLS will prevent them from seeing/altering the application content. If you think there might be a chance this is possible, do turn on SSL. A way to mitigate this would be to use two network cards on the web server: one to the outside world and one to the inside LAN where the DB server is (with no other machines, or in a way that you could treat them all as a single bigger machine). This network forming the overall web-farm or cluster (however you want to call it) would be physically separated and only have one entry point from the outside: the web server itself (same principle for a reverse proxy head node).
If someone is in a position to sniff packets on the head node (the web server) itself, they're likely to have root access there (processes run by non-root users on the machine, shouldn't be able to read packets that are not for them). In this case, you would have a big problem anyway.

What I doubt here is whether enabling SSL actually protects you much in this scenario.

Someone with root access on the web server will be able to read your application configuration, including DB passwords, and should be able to connect to the DB server legitimately, even using SSL.

In counterpart, if you did assume that this warrants the use of SSL (because it might be harder to look into what the processes actually do rather than just looking at the network, even if you have root control on the machine), this would mean you would also want to turn for localhost communications (e.g. if you have other services on your web server, or in the situation where both DB server and web server were on the same machine).

It's not necessarily a bad thing to be over-cautious, but you have to put your question in the context of what attackers could also do should they be in a position to perform an attack against what the security measure (SSL) protects you against, and whether this security measure would prevent them from achieving their goal anyway, once in this position.

I think the window is actually quite narrow there (assuming your back-end network really is secured, physically, not just by some firewall amongst a number of machines).


How secure is shared folder feature of virtualbox If we have a folder shared between the host and guest OS in virtual box so that the guest can write in this folder, then it can drop any file (including malware) into such folder. But is there a way for the guest OS to run the file in the context of the host machine? In fact can a malware both copy itself into this folder and make the host system run it?
If not, solely having write permission for only the shared folder is not a big issue. As long as there is not a path traversal flaw which could allow the guest OS to access folders beyond what is explicitly shared with it.

A 0-day attack could take advantage of this. No one knows how safe you would be. Consider instead using an encrypted cloud storage to move files. Unfortunately you can never be completely sure with virtualization. Necessary security precautions on the host and guest go a long way. You are probably fine, but keep in mind you are trusting the guest to share more with the host.


Is it impossible to know if the de-authentication packet has been sent to the victim using Wireshark and mdk3? I want to know if the clients get disconnected or not without checking there devices while I am outside the network. Is it impossible with WireShark?

No, it's not impossible. Wireless NIC in monitor mode capture also MGMT frames. If authentication request / association request follow de-auth frames then client got disconnected, but you can never be sure if you heard all frames.


How do I know if a font is malicious? There are cases of fonts being used for exploiting vulnerabilities (for ex: ThreatPost, SecureList and F-Secure). My question is if you ever get hands on such a font, how do you know that it is malicious?

You can know if a font is dangerous by the following method:

Install a system in a virtual machine.
Shutdown it.
From the "outside" (i.e. another OS), access the virtual disk for the VM, and compute a hash value for every single file.
Restart the VM. In the VM, open the font. Then shutdown the VM again.
From the outside, recompute the hash values for every single file.
Compare the two lists of hashes to see what has changed.

If some non-font-related files have been altered, then the font is definitely fishy.

A malicious font is something else. Malice means intent. A file has no mind, thus no intent. A "malicious font" is a font file which has been crafted so that it triggers a bug in the software which will read the font file, such that the consequences of the bug have an effect which is, ultimately, beneficial to whoever crafted the font file that way, and detrimental to the machine owner. This is "malicious" if the font file maker was aware of the bug and did it deliberately; otherwise, it is "just a bug".

In any case, detecting whether a font file is "malicious" is no easier than detecting whether an executable file is "malicious". This means that it cannot be done generically. Instead, we rely on the file source: we are wary of files which come from a source which is not known to be trustworthy.

Since a font is "just data", it can have an adverse effect only when opened with some software which has an exploitable bug in its code. It would be very hard to craft a "malicious font" which can, say, install a virus on a Windows system, but otherwise works "correctly" (as a font) on a Linux system (and vice versa). Since there are much fewer Linux desktop systems than Windows desktop systems out there, opening font files with Linux first, switching to Windows only if the font file looks good on Linux, ought to be "safe" (at least safer than the opposite).


Difficulty understanding SOP and CSRF As said here, a CSRF attack has little to do with SOP. However, on the OWASP CSRF page it is said that

  Fortunately, this request will not be executed by modern web browsers thanks to same-origin policy restrictions. This restriction is enabled by default unless the target web site explicitly opens up cross-origin requests from the attacker's (or everyone's) origin by using CORS with the following header:

And also when I tried to do Fetch / XMLHttpRequest, when it's blocked by SOP, the request didn't even get to my server, so is the answer in the first link above still valid? Thanks

The same origin policy allows:

  Cross-origin writes are typically allowed. Examples are links, redirects, and form submissions. Some HTTP requests require preflight.
  Cross-origin embedding is typically allowed. (Examples are listed below.)
  Cross-origin reads are typically disallowed, but read access is often leaked by embedding. For example, you can read the dimensions of an embedded image, the actions of an embedded script, or the availability of an embedded resource.

The important part here is "typically" and "Some HTTP requests require preflight".

This means that you cannot perform eg PUT requests even though they are "write" actions, because they require preflight.

Which is also what the OWASP article says: You can't use CSRF with other HTTP methods than GET and POST.

Incidentally, you can use xmlhttprequest to send out POST requests:

// hosted on evil.com:
<script>
var xhr = new XMLHttpRequest();
xhr.open('POST', 'http://example.com/test.php', true);
xhr.send("test");
</script>

This will show an error in your browser console about a SOP violation. But the violation is not the POST request (which will be issued), but the potential of reading out the response (which is not allowed).

As the SOP doesn't forbid write actions, it doesn't really relate to CSRF (which is all about write actions). It does however interfere with some CSRF attacks (eg PUT requests or requests with custom headers), so the SOP can be used in CSRF-prevention (eg by checking a custom header or only using PUT requests).


Will two smartphones (identical hardware and software) generate the same canvas fingerprint? When using Canvas Fingerprint (like on this website) to distinguish users, does two smartphones (same model, same OS version, and no browser/plugin customization) will share the same fingerprint?

This site describes the techniques used in canvas fingerprinting:

The technique is based on the fact that the same canvas image may be rendered differently in different computers. This happens for several reasons. At the image format level – web browsers uses different image processing engines, image export options, compression level, the final images may got different checksum even if they are pixel-identical. At the system level – operating systems have different fonts, they use different algorithms and settings for anti-aliasing and sub-pixel rendering.

So this sounds like it is fingerprinting the algorithms and config settings that your device uses to render a canvas.

It looks like wikipedia/Canvas_fingerprinting answers this question fairly directly, so I'll quote the relevant section in full (emphasis mine):

Uniqueness
Since the fingerprint is primarily based on the browser, operating system, and installed graphics hardware it does not uniquely identify users. In a small-scale study with 294 participants from Amazon's Mechanical Turk, an experimental entropy of 5.7 bits was observed, but the authors of the study suggest more entropy could likely be observed in the wild and with more patterns used in the fingerprint. While not sufficient to uniquely identify users by itself, this fingerprint could be combined with other sources of entropy to provide a unique identifier. It is claimed that because the technique is effectively fingerprinting the GPU, the entropy is "orthogonal" to the entropy of previous browser fingerprint techniques such as screen resolution and browser JavaScript capabilities.

Summary
It sounds like if two devices are running the identical hardware and software, then they will produce the identical canvas fingerprint. So it seems like canvas fingerprinting is not a unique identifier by itself, but rather is part of a healthy diet of data that websites collect about you.


Is it possible to use custom DH parameters for IKEv1 / IKEv2 /IPSEC? While researching how to deploy TLS for web servers most securely, I have learned that using custom DH parameters is one of the key aspects.

Now I am in the process of deploying IKE / IPSEC. As far as I have understood, IKEv1 as well as IKEv2 only support standard DH parameters which are denoted by standardized group names.

Does that mean that I cannot use my own custom DH parameters for IKEv1/2 (as generated by openssl dhparam)?

Does that mean that I cannot use my own custom DH parameters for IKEv1/2 (as generated by openssl dhparam)?

Yes, only predefined MODP and ECP DH groups may be used with IKE, the lists for IKEv2 and IKEv1 can be found at IANA.

If you don't care for interoperability you could, of course, define your own group and use an identifier from the private use range.


DDoS Attack After Switching Hosts and Updating WordPress I recently moved an old WordPress site from one hosting to Amazon Lightsail. Once the transfer was done, I noticed that WordPress, its plugins, and themes were all out of date. So, I updated them all. All good after that.
Then, within a day, a user "wordcamp" was registered on WordPress using the email wordcamp@wordpress.com. Did a bit of googling and found this: https://wordpress.org/support/topic/my-wordpress-site-got-hacked-by-someone/. So, I deleted that user, updated the passwords of the legitimate users of the site.
I also installed WordFence, which detected suspicious files on the server. I do not know if those files were already on the old WordPress site and copied over to Amazon Lightsail - or if they appeared around the time that mysterious user registered on the site. Deleting those files somehow broke the site, so I undeleted them hoping that WordFence would be enough to keep the site going until such time we replace it with a completely fresh WordPress install and configuration.
Unfortunately, sometime shortly after, no one could connect to the site. WordFence reported about 80,000 connection/login attempts over the previous 24 hours.
HOW I TRIED TO RECOVER

I was able to SSH into the server and put it under maintenance mode in an attempt to reduce the number of pages the site was serving; reduce the load
I deleted all the suspicious files reported by WordFence
I moved the site to an Amazon Lightsail instance with more memory resources
Since I was using CloudFlare, I put it in DDoS mode for the site
I installed Google reCaptcha v3
I changed the login URL
I disabled xmlrpc.php

The site is currently running with CloudFlares "under attack" mode. CloudFlare reports about 5-10 connection attempts blocked per minute (all from different IPs from around the world). They're all trying to connect to:

wp-login.php (which now redirects to the homepage)
xmlrpc.php (which now returns a 403)
wp-cron.php (with query string like  ?doing_wp_cron=1593059462.9016170501708984375000; I haven't done anything to address this)
the rest are random pages on the site

Any ideas what might have happened? The timing is so suspicious. I move the site to Amazon Lightsail, upgrade everything, put it on CloudFlare -- and then I get a DDoS attack? When it was on the old hosting with outdated software, everything was good. It's baffling.
Any suggestions what I can do?

I suspect your site was already hacked due to outdated plugins/themes/WordPress core, etc. The hacker may already had access. Now someone is trying to find the login details of your WordPress admin. Cloudflare does fantastic job to prevent such kind of attacks. Since the attack is coming from different IPs, blocking them is impossible. What I would like to suggest is check all the files once again, even the legit files. Check if there are any cronjobs running, check if there is any temp suspicious files, check if any python or perl script running.
Further, I would also suggest you to change the admin url to something else and rename xmlrpc.php or entirely disable it.
If this does not help, then remove everything, fresh install the WordPress, copy your theme, download all the plugins from the known source, copy uploads folder and check if there are any suspicious PHP files or any other files than images, pdfs, etc. Install malware scanner plugin and scan your theme and uploads folder.
Hope that helps.


Servers: Why a separate device for a firewall, aside from reduction in IP spoofing or increase in performance Why should the firewall be outside the server, excepting these two items

Take the performance impact of noise off of the server.
Add a physical layer between devices so they can be on separate subnets, then use ACL to prevent IP spoofing. This way, the IP address can be dependably used to verify which internal network the packets are from. (data from an internal network would be dropped if the IP address did not match, data from the web would be blocked if the IP address matched one of the internal networks).. This could probably be accomplished by using the alternate ethernet ports on the servers, but the separate device seems easier to manage.

Actually, I tend to think that source IP checks could be replaced with private keys and encryption handshakes, but I understand that this can be impractical.

Aside from that, it seems to me that the software firewall should be handling everything, including blocking off protocols, suppressing "connection refused", etc.

That leaves these

The lack of a good software firewall solution (for example my windows PC should probably never be connected directly to the internet.
Adding a second layer, in case the software firewall is mis-configured.
"making up" for shortcomings in the software on board, for example a firewall might get automatically updated with the latest inspection rules,, but if the software is secure to begin with,, this should not be an issue.

Please enlighten me if I am missing something on the correct purpose of a separate device. I find that I think that the first two items are the only legitimate purpose. The rest is just making up for shortcomings of the server.

One reason for a separate device is so that you can remove everything that is not strictly required for the safe operation of the firewall. This reduces the number of possible attacks on the device which increases security.


What does an NPS server actually do with client certificates? Say an NPS server is authenticating users of an AD through EAP-TLS.

When the client sends his certificate does the NPS server actually check to see if this certificate belongs to the user in the certificate's Subject Name or does it only check to see if the certificate is valid?

I.E.: Can the NPS server differentiate between the certificate of an Admin and the certificate of a less privileged user or do they all look the same to it?

NPS does authentication. So it checks:

Whether the certificate is generally valid (trusted chain, revocation, policies, etc.)
Whether the issuer of the certificate is eligible to issue client authentication certificates
Whether subject (UPN value in the SAN extension to be more precise) matches to any entity in AD.

If all checks are passed, the certificate is mapped to an actual user account.


How hard should I try to prevent a user from XSSing themselves? Let's say a user can store some data in a web app. I'm now only talking about that sort of data the user can THEMSELVES view, not that is intended to be viewed by other users of the webapp. (Or if other users may view this data then it is handled to them in a more secure way.)

How horrible would it be to allow some XSS vulnerability in this data?

Of course, a purist's answer would clearly be: "No vulnerabilities are allowed". But honestly - why?

Everything that is allowed is the user XSSing THEMSELVES. What's the harm here? Other users are protected. And I can't see a reason why would someone mount an attack against themselves (except if it is a harmless one, in which case - again - no harm is done).

My gut feelings are that the above reasoning will raise some eyebrows... OK, then what am I failing to see?

This is actually a real concept, "Self XSS" which is sufficiently common that if you open https://facebook.com and then open the developer tools, they warn you about it

Obviously Facebook is a specific type of target and whether this issue matters to you or not, would depend on the exact nature of your site, but you may not be able to discount the idea of one user using social engineering techniques to get another user to attack themselves.


Is a honeypot an IDS or an IPS or something else? Is it an offensive or a defensive technique? Is it still effective? I'd like to know where a Honeypot falls into the scheme of security, and if it is still an effective tool?

Typically a honeynet is used as a defensive tool and is used to (sort of) trap attackers. It is designed to fool them into thinking they are on a real system (though most good attackers can quickly detect it's a honeypot). By fooling the attacker, the "honeypot owner" is hoping to learn more about the attacker's motives and techniques. The honeypot is designed to be compromised but should not be placed anywhere in the infrastructure such that it can be used a staging or pivot point for further compromising of the "real" environment.

A lot of folk talk about "Defence in Depth" quite a bit and the honeypot is another facet of that and is designed to complement the other layers. Like attackers evolving, honeypots have evolved and changed also (the usual "arms race").

Technically speaking, a honeypot can be used as an offensive tool (for educational purposes) whereby a person wants to learn how to attack and exploit box, however, as I previously said it's more commonly used as defensive mechanism.

Regarding its viability or relevance today, there has been much discussion and there've definitely been issues with honeypot techniques and deployments but I still believe that honeypots are relevant, a great source of information and if used correctly, can enhance the security of your environment.

I don't like giving Wikipedia links but this one does define honeypots pretty well.

I also recommend reading about the Honeynet Project, it's absolutely awesome - they do fantastic challenges, give back amazingly to the community, participate in the Google Summer of Code and have some awesome technical papers.


Which parts of an HTTPS connection can be revealed? Say, I use a public WiFi connection to load https://google.com in the browser, and then continue browsing on that site for a few more pages (performing searches in Google).

Can anyone else (like someone using the same WiFi connection or even an ISP) view that I have visited Google? I don’t mean which Google searches I’ve performed, but the mere fact that I’ve visited Google.

If not, how is my browser able to establish an HTTPS connection with Google Search without anyone being able to register that.

The hostname is transmitted in the clear.  This is because HTTPS is a tunnel established after a connection to the server.  The hostname is available for an eavesdropper to snoop in a number of ways:

You will perform a DNS lookup and that is always in the clear;
There is a TCP connection to the IP address returned by the DNS for google.com;
In the case of SNI, the HTTPS request will include the hostname;
As part of the TLS handshake, the server will supply the certificate in plaintext which contains the hostname.

The rest of the url, which includes any parameters, is not transmitted in the clear, so it is not subject to eavesdropping. All headers, including the cookies, are also transmitted encrypted.  The attacker can however see the size of any communications and potentially draw conclusions from that.


Does having a VPN service mean accessing my email etc. over public free open WiFi mean I have security/privacy? Is my information secure over public WiFi if I use a VPN service? i.e. protection of emails and login details.

Barring unforeseen weaknesses in protocols or implementations of your VPN service, this should give you a reasonable expectation of privacy. All of your traffic that traverses the VPN will be encrypted from your system to the VPN provider. At that point it will travel normally.

To your specific question of emails and login details, those should also be protected by this. Additionally, if you are viewing your email or logging in over HTTPS then your login details or emails should be protected through this encryption mechanism as well. Using HTTPS without a VPN will reveal more details though as not all of the connection data is encrypted (such as the website you are visiting).


Is a password box with pseudo-random number of stars more secure? I use a program that confused me while typing the password. It acts like this when I type the password ABC:

I type: A Display: ***

I type: B Display: *****

I type: C Display: **

I can think of the idea behind that: anyone looking over my shoulders may not be able to get my actual password length.

On the other hand, I was confused because I thought something's wrong with my keyboard. Now I'm used to it.

The stars don't seem to be completely random. It depends on the character typed, so that typing ABC always results in the same amount of stars. Using different characters also changes the number of stars. After a few days you'll be confident entering the password, because you can see how the stars change in a consistent way.

I would agree that real randomness contributes to security. But how about this pseudo-randomness? Wouldn't someone with access to the application (e.g. just buy a license) be able to figure out the length anyway?

Someone watching you can often hear how many keys you've typed already (or can count the number of times the typing indicator changes), so the standard model of showing a star for each character doesn't really leak anything new. By changing the text field from that to making it based on some other quality related to the password, you're just leaking that new quality in addition to the length. If an attacker knows the password is 10 characters long, shows 8 stars, and knows your software's algorithm, that tells them even more about the password. What if your algorithm is found out to only show 8 stars for a single 10 character password?

Maybe the above is an extreme example, but consider that this system also leaks info about all of the partially typed forms of the password. If the password is "abcd", then when the user types "a" first, then some number of stars will be shown, and this will tell the attacker about the first character. Maybe "a" causes 3 stars to be shown right off the bat, and the attacker knows that only "a", "g", and "x" do that. Next, "ab" is typed, and that shows 1 star. The attacker can then figure out of all of the possible two-letter sequences that start with "a", "g", and "x" that result in 1 star. The attacker can then cut these down further by throwing away a lot of the sequences that they think are unlikely to be at the start of a password. The attacker might see that "ab", "am", "gq", "ge", "xc" are the possible two-letter sequences, and then throw out or de-prioritize "gq" and "xc" as possibilities for the start. Next, "abc" is typed, and that shows 4 stars, and the attacker only has to consider the possible three-letter sequences that start with "ab", "am", or "ge" that result in 4 stars. Repeat this a few times, and the attacker might not be down to one possibility for the password, but the search space is massively cut down.

If you want a system that is sure to leak less information than the standard show-characters-as-asterisks prompt, then you could copy a convention often used in terminal password prompts: don't move the cursor or change the screen at all while the user types their password. This does confuse some users though.


Sharing oauth2 token with AJAX request to be sent to resource server I am a little confused on how the token is shared from the client to an AJAX script to the resource server in the oauth2 flow.
To explain the scenario I am trying to set up, I have

a client (http://localhost:3000)
a resource server (http://localhost:3001)
an authentication server (http://localhost:3002)

The client is a server that is communicating with a user in the browser. The client obtains the token from the authentication server through the use of the authorization flow, it then sets the token as a cookie which is shared with the user. This means that the user has the token, but now the client wants the page delivered to the user to make an AJAX request to the resource server for information.
Since the token is locked between the client and the user, and CORS forbids the sharing of cookies when 'Access-Control-Allow-Origin', '*' is set. How can the AJAX request obtain the token and send it to the resource server to be validated?
Or am I confusing the workflow/trying something impossible? Thanks in advance!

There are different solutions possible.
1. Allow CORS requests on authentication server
The purpose of the authentication server is namely to provide tokens for other servers. That's why it is normal to allow CORS requests on the authentication server. Thus you can implement any additional logic in your application, including requests to the authentication server. Browser will not block them as CORS violation. If you want to make sure that the application code does not see the password in the plain form, you may want to use PKCE. See details in RFC 7636.
2. Redirect, or implicit flow
CORS requests on authentication server are not allowed. You send request to the resource server. It sees that authentication toke is missing or is expired. Then it redirects your request to the authentication server. The authentication server requests credentials and, if they are valid, redirects request to the resources server, and adds a valid token to the URL. The resource server validates token and returns you the requested resource.
3. Cross-domain messaging
In such case you don't need to allow CORS requests on authentication server. One should be careful: The code that sends the token from the authentication server to the resource server part should not use broadcast (because the token can be stolen by the script from malicious domain). Instead, one should send the token to the resource script window/frame only.


Should I obscure database primary keys (IDs) in application front end? I'm working on an application which allows a moderator to edit information of user.
So, at the moment, I have URL's like

http://www.example.com/user/1/edit
http://www.example.com/user/2/edit

I'm a bit worried here, as I'm directly exposing the users table primary key (ID) from the database. I simply take the ID from the URLs (for ex: 1 and 2 from above URLs), query the database with the ID and get user information (of course I am sanitizing the input - ID from URL).

Please note that I'm validating every request to check if moderator has access to edit that user.

Is what I'm doing safe? If not, how should I be doing it?

I can think of one alternative i.e. have a separate column for users table with 25 character key and use the keys in URLs and query database with those keys.

However,

What difference does it make? (Since key is exposed now)
Querying by
primary key yields result faster than other columns

The only piece of information that you could hope to "hide" is the sequence: since a database will allocate primary key values with a counter, people who see they key can make a guess as to when the corresponding user account was created. Apart from that, there is no other information that any obscuring scheme may actually hide. The attacker already knows that distinct users are referenced through distinct keys, and that's the extent of the semantics of the database "primary key".

Therefore, unless you consider that the account creation order is private information that needs to be hidden, I'd say that your obscuring scheme is pointless.


MySQL AES_ENCRYPT Logs Output Need: I need to be able to store AES encrypted user data (journal entries) in my database and those entries need to be plain-text searchable.

Issue: MySQL outputs queries to its logs in plain text.

History: I've already accomplished the desired behavior by letting MySQL handle encryption and searching with AES_DYCRYPT and LIKE, but it means that MySQL is outputting my users' entries along with my AES key in plain text to its logs.

Possible Solution: I've attempted moving my encryption step to the server before sending data to MySQL, but not being able to have the DB handle decryption and therefore plain-text search really complicates things. I don't want to have to pull in all of a specific user's entries and then filter them based on the text query from the server.

Question: How big of a security hole is the fact that MySQL outputs all queries to its logs in plain text when deciding to use MySQL's AES_ENCRYPT function? Should I just use MySQL's encryption functions so I can also use its LIKE feature, or should I encrypt on the server and look into other solutions such as storing a hashed word index as a new column so I can still provide some sort of text search?

I should note that I'm using a hosted MySQL solution which, at the price point I'm currently paying, does not allow me to manage admin settings myself. The hosting company has access to the logs.

Using MySQL's built-in functions for encrypting and decrypting information is generally not recommended for exactly the reason that you described - MySQL is often configured to log queries.  If that's the case, the plain text data (and the encryption/decryption keys!) are written in plain text to the logs!

Having said that - If you must use aes_encrypt and aes_decrypt to encrypt the information that you are storing in your database, then you should disable the logging.  See http://dev.mysql.com/doc/refman/5.7/en/query-log.html for information on how to do that.

If your MySQL instance is running on a host that does not allow you to disable the logging, then it may be time to host MySQL yourself (which is not hard to do on a VPS).

Last but not least - statements such as ... where aes_decrypt(fieldname, key) like '%xyz%' are going to be sloooowwww when your tables start getting bigger, because MySQL will have to decrypt the data in each row and apply the like comparison.  Both of these operations (the decryption and the like) are fairly resource intensive, and indexes won't help.


Which URL schemes are dangerous (XSS exploitable)? I know that a blacklist approach to URL filtering isn't the most secure, but let's say that in addition to this filtering we're also rewriting all untrusted links to go through a redirect page that warns the user about the risks, and that we're implementing the blacklisting carefully to avoid XSS Filter Evasion.

Which URL schemes would we then put in the blacklist? The two obvious ones are javascript: and data:, what others am I missing?

A blacklist of URI schemes is not reliable.

There is no common list of bad URI schemes because it's just not possible to build a complete one. There are lots of non-standard schemes for different browsers and more could be added in the future. (One example of a dangerous non-standard scheme would be livescript: for old Netscape versions.)

This is another good point:

  I do not allow bitcoin: on my servers, nor anything except for http,
  https, or ftp.

  The reason is because I have no way of knowing what third party
  applications might have vulnerabilities (including social engineering)
  that could be exploited by a specially crafted URI string being fed to them.

(Source)

Similarly, there is no blacklist of dangerous HTML tags because - although standardized - browsers still go their own ways with custom tags. Building a comprehensive list would be hopeless.

Another problem is that you could run into problems with nested schemes. What about view-source:data:..., rss:jar:..., etc.?

So it's safer to agree on a whitelist of acceptable schemes and add more on demand. E.g., this is the default on Wordpress:

  $protocols
     (array) (optional) An array of acceptable protocols. Defaults to 'http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', 'mms', 'rtsp', 'svn', 'tel', 'fax', 'xmpp' if not set.

(Source)


Does red-teaming encompass the entire skillset of a blue-teamer? Currently I am potentially facing impostor syndrome in regards to the role and skillset of blue team members (defence) and red team members (attack).

I personally specialise in defence capabilities, such as secure system design, secure programming, secure website architecture, etc.

For example, I have a thorough understanding of how to design a website that is resistant to cross-site scripting, using techniques such as Content-Security-Policy, sandboxing, etc.

However, I have limited experience with actually performing cross-site scripting attacks. I am aware of, but not familiar with the various techniques, WAF bypasses, etc, and I would definitely find it challenging to construct an advanced XSS attack right this second without some prior research.

It seems within the security community that red team members (pen testers, etc) have all the knowledge of the defence people, and they have 'ranked-up' and proven themselves to be good enough for attacking.

My question is whether there really is a distinct difference between blue and red teamers in regards to skillset and experience, or are all red teamers just defence people who have got through initiation and are now doing the trendy hacking stuff?

The idea that redteamers or pentesters are 'skilled up' from blueteamers is a misconception, plain and simple.

In the same way that you can defend against XSS without necessarily knowing how to construct a complex XSS attack (which encompasses more than just the XSS code itself, i.e. the payload), you don't need to know how to write code to prevent XSS before you can construct one.

There are a TON of people who work as redteamers or pentesters without ever having worked in a SOC, or on a blueteam, or certainly done any professional software dev (and thus, no secure coding experience).

Don't let anyone tell you otherwise.

Now, whether blueteamers and readteamers should know how to do both jobs is an entirely separate debate.


Can there be a secret ballot software in a membership-based community? There is an online membership community. Every member has the ssh key that they use to perform various functions.

There is the need to vote on sensitive issues. Members don't want to disclose their votes, only want them to be securely counted. Members don't want to trust a human to do this.

Can there be a computer program that can accept votes from members without the possibility of easy tampering and disclosure?

I imagine it the way that every member can connect with the ssh key, perform some operation like answer a voting question, the system will change its state and record the vote, but will be only able to tell the final count after the minimum number of votes is counted and the voting is closed, and won't theoretically be able to tell individual answers.

I imagine that there should be some cryptographic algorithm that can do this.

Yes, it's quite simple.

Each member forms their vote and blinds it. They submit it using their SSH key to a system that performs one blind signature for each member. They then unblind their signed vote and return it to the site anonymously for tallying.

This ensures that each member gets one vote but provides no way to tell which member supplied which vote because the votes were only associated with a member while blinded.


cross-site scripting vulnerability is handled and fixed in the code, will it mitigate cross-site forgery attack also? I have mitigated cross-site scripting in my code by input validation, whitelisting characters (HTML tags too), and using X-XSS protection headers. Will the fixes I have implemented for mitigating XSS mitigate CSRF attack in my application?

In a CSRF attack the attacker from site A can use the browser of user U as a trampoline to trigger an authenticated request against site against site B, provided that user U is already authenticated against site B and B has no CSRF protection.

One example would be to include an image on site A like this:

 <img src=http://site-B/unwanted_action?some_parameters>

When including the image a request will be sent against site B which includes existing cookies and basic authentication information the user U has inside the browser for site B. Thus the request looks authenticated and site B will execute if no CSRF protection is in place. Thus all what is needed for the attack is that user U visits site A, either knowingly because the attacker might embed such a link into a public forum site, or unknowingly because such link is embedded into an advertisement. And since this is an image no action need to be done by the user and he will probably not even realize that something bad happened, like in How millions of DSL modems were hacked in Brazil, to pay for Rio prostitutes.

Given the above example it should be clear that no XSS is needed to execute a CSRF and that neither TLS nor protection of the session cookie against tampering will help against CSRF.


SSL Cert Validation - Does my site need to be accessible? I am attempting to purchase a standard (non-EV) SSL Certificate for an internal application (Oracle Hyperion) that we have made available over our organization's WAN. The application is not accessible from the internet.

The company from whom we are attempting to purchase this cert has told us they cannot issue the cert without being able to access the application (website) and "review it".

I am curious to know if this is standard practice with SSL certs? I've not encountered this kind of issue in the past and I know I've ordered certs for non internet-facing websites before.

Adding to what @JulianKnight said, unfortunately the cheap bulk automated SSL vendors are only really designed to handle public-facing web servers. As part of their issuance procedure they often require you to prove you control the site by placing a file at a specified URL, or something else that they can validate in an automated way. This is largely for the convenience of the CA.

It's a perfectly valid use-case to have a publicly-trusted CA issue certs for private internal-only servers (including TLS uses other than HTTP). Nothing wrong with that, but you may need to pay a little more for the cert because the $0 - $5 certs aren't really designed to handle this. In particular, you'll need to find a CA that lets you prove ownership of the domain by some other mechanism.


How does verifying the chain of trust for certificate based authentication work on the server side? Right now I need to import the Root-CA's cert, the Intermediate-CA's cert and the Client cert on the client for it to be able to connect to the server. The server has access to the Root-CA's cert via the SSLCACertificateFile directive.

I suppose that right now the server cannot verify the Intermediate-CA because it does not have access to it's cert. So it queries the client. Is that right?

If that is so: How can I give the server the ability to verify the trust chain on it's own? Maybe an URL in the signers certificate? Adding more than one SSLCACertificateFile directive didn't work.

Providing the full chain (that is all intermediate certificates but not the root certificate) is actually the normal way to exchange certificates since the other party is only expected to have the trusted root certificate. This is true for both client and server certificates.

Still, it should be possible to provide chain certificates which the client does not send within the same CA file where the server has the trusted root CA(s) used for client authentication. Note that with SSLCACertificateFile you specify a file which can contain several certificates (simply concatenated) and not only a single one.


What are HTTP GET/POST flood attacks? I want to know what the main differences are between HTTP GET and POST flood attacks and mitigation strategies for both.

I searched a lot but I really can't find some good articles nor examples about these attacks.

When an HTTP client (say, a Web browser) talks to an HTTP server (a Web server), it sends requests which can be of several types, the two main being GET and POST. A GET request is what is used for "normal links", including images; such requests are meant to retrieve a static piece of data, the URL pointing to that piece of data. When you enter a URL in the URL bar, a GET is also done.

POST requests are used with forms. A POST request includes parameters, which are usually taken from the input fields on the same page.

When flooding, the attacker wants to submerge the target server under many requests, so as to saturate its computing resources. Flooding works best when the server allocates a lot of resources in response to a single request. Since POST requests include parameters, they usually trigger relatively complex processing on the server (e.g. database accesses), which are more expensive for the server than serving a much simpler GET. Thus, POST-based flooding tends to be more effective than GET-based flooding (it takes fewer requests to drown the server if the requests are POST). On the other hand, GET requests being much more common, it is often way easier for the attacker to enlist (involuntary) help in his flooding effort when GET-flooding (as @Rory says, it only takes a link for an inline image on a popular site, and everybody who browses that site automatically sends a GET request to the target server).

(Of course, any particular Web site could do a lot of complex processing on some specific GET requests; I am only discussing average behaviour here.)


Running browser as different user (in Linux) On the ArchWiki, it is suggested, as a security measure, to run skype as a different user. My question is: would this make sense for the browser? I use firefox with NoScript and AdBlock, but also need to have Java and Acrobat Reader plugins, so... would the suggested approach be of some use?

So in theory running an application as a separate user may provide some security benefit in that in the event of the application having a security issue, the application may not be able to access data belonging to the primary user.

That said against that you need to weigh the usability problems of your browser not necessarily having access to data for your primary user.  Also this approach only provides a benefit if you have relatively restrictive file permissions (e.g. it doesn't help protect files that are world readable/writable)


Why don't mobile devices let you change the IMEI number for better anonymity? The vast majority of modern day mobile devices have a fixed IMEI number that's impossible to change, which makes it easy to track people if they use the same device constantly. It's quite easy to swap SIM cards frequently if you wish to stay anonymous, however throwing out whole devices can quickly get too expensive.

What's the reason behind this? Why not let users randomize their IMEI number if they wish?

The IMEI is a global fix identifier for a phone. In some countries, if your phone is stolen and if you have noted its IMEI, you can communicate it to a central organization that ask all local operators to blacklist it, making the phone unusable on the entire country.

Allowing a user to simply change it would immediately break that feature.


Interception of competing businesses phone calls A business competitor has shared that he is using some sort of app that is allowing him to intercept phone calls to other like businesses. This app has allowed him to enter those business numbers and to have incoming calls to those businesses forward to his personal cell. It's as though he has created a rogue tower which has allowed him to intercept all calls coming into these businesses without their knowledge. Mine is one of those numbers. He mentions using a jail broken phone but does not disclose the name of the app, etc. What is this he is doing?

I'm very sure that's not (just) an app.

There are two practical ways to intercept calls:

Malware
Rogue celltower (IMSI catcher)

Both are highly illegal. The first one requires targeting those people's phones with viruses, the second one's very expensive and only local.

You hint he's able to select multiple business numbers.
Now it's unlikely he's placed boxes at each of these locations, and a little more likely he's paid some hackers a bitcoin to target the businesses.

You remember any office documents in your mail asking you to enable macros?


Are there tools to isolate protocols on major operating systems? Isolation is a pretty effective method against malware. There are tools to isolate running code in various ways(qubes-os, bromium, fireglass), i.e. using a micro-vm for each task, either locally or remotely.

The other major entry point for malware is protocol vulnerability, like the recent wannacry. Are there any tools that isolate protocols , either on Linux or windows ? Is it a viable option ?

An application protocol is just a description of how applications interact with each other. This protocol description might be too vague or inaccurate or have a bad design and thus might lead to security relevant implementation problems. But the description itself is not vulnerable and can not be isolated. Vulnerable instead are the applications and services implementing the protocol, i.e. web browser, file sharing service etc which means that at most these can be isolated in the way you already described: "... isolate running code in various ways(qubes-os, bromium, fireglass), i.e. using a micro-vm for each task, either locally or remotely."


Are Truecrypt volumes safe from the government agencies? I have some Truecrypt volumes stored on my USB drive and I would like to know if they are safe from being cracked by the FBI or any government agencies? Some people say Full Disk Encryption will prevent the FBI from snooping through your files but I would like to know if Truecrypt volumes are just as safe and can provide enough protection from your files being accessed. I know about dictionary attacks, bruteforce attacks, and cold boot attacks. But with a strong password be enough for the FBI not to get into my files? Also, how do I prevent a cold boot attack on a Truecrypt flash drive volume? Some say making a volume itself is not safe and government agencies will still access your files and you should use full disk encryption instead, but I wanna know if that is the case or not. Thanks.

Also, how do I prevent a cold boot attack on a Truecrypt flash drive volume?

You don't. The sensitive areas are sanitized if the system is shut down properly, while any cleartext data will still be available and decay exponentially with time. So either make sure that no one will access your system for a few minutes after a shutdown, or re-boot again from a CD using MemTest to perform a R/W test of the whole DRAM. That will completely erase any traces from dynamic memory.

Regarding MemTest and similar tools, you want to perform the fastest test that will overwrite the whole memory. Thoroughly testing 1000 times each kilobyte might result in a 30-seconds test, which, if interrupted at once, will only have overwritten maybe the first 200M of RAM, leaving the rest intact. Testing once the whole RAM will overwrite everything in 30 milliseconds, and with RAM, a single overwrite is enough.

A good UPS can prevent unexpected shutdowns and reinstate the possibility of booting a cleanup CD.

There are also kits to extend the boot sequence. A write-and-check routine could pass for a reasonable precaution against hardware faults, and be a very good countermeasure against coldboot attacks (provided it's not known beforehand). You can make it so, unless you boot with both SHIFT keys pressed, the boot is slightly slowed down - we're talking a couple of seconds here - by a complete DRAM overwrite. Or you can always have an overwrite performed, just in case, without displaying anything.

This will still not protect against an attacker dumping the computer in liquid nitrogen, removing the RAM and mounting them in a different harness.

As for data security, volumes or whole disks are really similar for all practical purposes in your scenario, unless you go to great lengths to ensure "plausible deniability" (i.e. maintain an outer disk with a credible history, which is actually a lot of work). A can of strong acid and an external disk that will fit inside without sploshing might be a better solution.

However, lacking other information, this looks like a webcomic situation.

Try first determining your actual threat model. If men in black may really seize your disks, then chances are that they are able and willing to seize you. In that case, what you really should want is a password that's easy to remember (so you don't accidentally tell a wrong one to the nice guy with the helpful smile), or start thinking along the lines of "cyanide pill".

("Plausible deniability" using two passwords is only okay if you invest an inordinate amount of time in maintaining the deniable maskirovka, and actually the deniable partition is your main drive).

Strong encryption in your scenario looks like either too much, too soon, or too little, too late.


Are encrypted Cookies vulnerable to Padding Oracle Attacks I'm currently helping write a fast compiled web framework in the crystal language and am trying to find a way to speed up sessions using encrypted cookies. We're currently taking a json string and encrypting it with AES. We're then base64 encoding and signing it.

My question is: Is it necessary to sign or will a modified encrypted string fail to decrypt? If it doesn't result in valid json which can be parsed into a session it will be empty in the same way that it would with an invalid signature. My understanding is that padding oracle attacks work by getting feedback from the server. Would an encrypted empty json string be enough?

Is it necessary to sign or will a modified encrypted string fail to
  decrypt?

In the cryptography world a modified message is called a tampered message. Encryption by itself does not provide protection against tampering, but block ciphers are not used alone. Block ciphers are used in different modes, f.e. ECB, CBC, CTR, GCM, etc. Different modes have different properties, some of them provide protection against tampering (a.k.a. Authenticated Encryption, f.e. GCM) and others not.

If you're using an Authenticated Encryption mode a tampered message will fail to decrypt. But, if you're using others modes like CBC or CTR (These are the most widespread in my experience) a tampered message will happily decrypt unless there is a padding error

  If it doesn't result in valid json which can be parsed into a session
  it will be empty in the same way that it would with an invalid
  signature.

This will depend on how your application handles an invalid json, and here is where a padding oracle may appear.

  My understanding is that padding oracle attacks work by getting
  feedback from the server. Would an encrypted empty json string be
  enough?

A padding oracle attack occurs when the attacker sends a tampered message and is able to distinguish if the padding is correct or is not. And this is why I said previously that how your application handles an invalid JSON may derive into a padding oracle

Imagine that an attacker sends a tampered message with a wrong padding, your application will try to decrypt the message but a wrong padding exception will throw. After that the attacker tampers the message again but this time he's able to forge a correct padding, your application will decrypt correctly the message but the content will be and invalid JSON, the application will attempt to parse the invalid JSON and throw an error as it can't be parsed

If the attacker is able to distinguish both scenarios cause the HTTP status returned is different, or a stacktrace shows the different error messages, or just by timing the response time. Then the attacker has a padding oracle and can recover the plaintext from the cookie

To prevent this you should always provide same error message when the message can't be decrypted and when the message decrypts but the content is invalid. Furthermore you should ensure that both scenarios require the same time to respond.

IMO the best approach would be to use an authenticated encryption mode that gives you encryption and signing together and let the encryption framework/library handle it

BTW, I mentioned an encryption mode that should never be used. It's ECB, if you're using this mode (Some libraries default to it) please change it as it's a weak mode


NMAP port scan on home router looks strange to me Today I was playing around with Nmap on Ubuntu Linux. I performed a port scan on our home router with nmap -sV   192.168.1.1
The results were as follows:

**Starting Nmap 7.01 ( https://nmap.org ) at 2016-09-18 12:08 SAST
Nmap scan report for homerouter.cpe (192.168.1.1)
Host is up (0.0029s latency).
Not shown: 992 closed ports
PORT     STATE    SERVICE         VERSION
22/tcp   open     tcpwrapped
23/tcp   filtered telnet
53/tcp   open     domain
80/tcp   open     http            Huawei E5172 router http admin
443/tcp  open     ssl/http        Huawei E5172 router http admin
631/tcp  filtered ipp
3000/tcp open     ppp?
8081/tcp filtered blackice-icecap
Service Info: Device: broadband router; CPE: cpe:/h:huawei:e5172

There were more ports open than I expected. For example, I can understand why port 80 and 22 were open by default. But why were ports 23, 53, 631, and 3000 open?

Should these be open? Are these ports a security risk to be left open, or are these ports needed for essential services? And if so, what are these essential services?

23 - for TELNET connections (remote shell, insecure)
22 - for SSH connections (remote shell, secure)
53 - DNS lookups
3000 - PPP is a method for connecting to the WAN
631 - IP printing
80, 443 - are the standard admin web interface. 443 is for HTTPS, 80 for HTTP
8081 - This one is slightly harder. It would generally be used for a web service of some kind. It is also possible that another device on your network has opened this via UPnP.

So yes, all of those are valid for the internal port of a router.

Every open port does, of course, carry some risk and it is better to close any you don't actually need but that is dependent on the router actually allowing you to. The moral here is that most consumer routers are terrible for security! Not only do they leave ports open that aren't needed (purely to make things simple to configure) but they rarely get firmware updates to keep them secure.

Ideally, you would want to close ports 23, 80, 631 (if you aren't doing printing via the router). 3000 may not be needed but you would have to test that. However, it is unlikely that the router provides a method to do this.

If you want better security, go for a router that allows replacement firmware in the form of OpenWRT or for a make that understands security such as the EdgeRouter Lite from Ubiquity. They may not be quite as convenient to configure (though even that is certainly up for debate) but the get far more updates and generally get any issues dealt with quickly.


When encrypting password hashes, how to handle nonces? I know that encrypting password hashes is a contentious issue. However, I have seen it recommended in some quarters. I know for instance that DropBox did this at one time with AES256. In these cases, all password hashes would be encrypted with one shared key, allowing for easy storage in a key management system (such as AWS KMS, HashiCorps Vault, or a HSM) and straightforward rotation.

However, most modern symmetric ciphers that would be appropriate for this task require random nonces. Wouldn't this mean that the nonces need to be tracked and stored somewhere?

Encryption is not the right tool for this job, since there's never a need to decrypt a hash. Use HMAC(k, PH(pass)) for some password hash PH in the set of argon2, scrypt, or bcrypt. This works as a verifier as well. You can alterntaively opt to do PH(HMAC(k, pass)) instead, but this doesn't ever allow for relief protocols where the client performs the slow hashing work The former also has the nice property where clients don't ever actually have to send you a cleartext password if you so wish.
If you do decide to encrypt password hashes, what's even the problem? You already have to store a salt, cost parameters, and the hash itself. What's one more thing?


Can I bypass basic auth to fingerprint a web server with Httprint or netcat? There is a web server I'd like to recon using httprint.

But that web server has a basic auth protection on 443. Port 80 is not responding.
When I launch httprint, it says Unspecified Error

The same thing happens with netcat. It fails because of Basic Auth (ie "Connection Refused")
When basic auth is disabled, both netcat and httprint work well.

How can I bypass basic auth for fingerprinting a web server?

I believe netcat works below for 2 reasons
 1. There is no basic auth on the port 80 (it's a different web app showing on port 80)
 2. There some sort of load balancing or reverse proxy because the app on port 80
is different of the app on port 443 although both have the same IP address

It fails because of Basic Auth (ie "Connection Refused") ...

I think you are missing concepts: "Connection refused" means that establishing a TCP connection to the server has failed. This has nothing to do with Basic Authentication which happens only after a successful TCP connection could be established. With Basic Authentication required the server actually provides a HTTP response suitable for fingerprinting.

In your case it might be more a problem of the source IP address blocked or no server at the location you try in the first place. What exactly of these is the problem is not clear from your question and thus it is unclear if and how it can be bypassed. But giving that the site is not responding on port 80 it might actually be the same for port 443. And if there is no server at this location in the first place then there is nothing to bypass.

EDIT after the OP provided screenshots:

The OP first tries to use netcat against port 443 and gets Connection Reset: This is because the OP tries to send a plain HTTP request to a HTTPS port and the server is closing the connection since plain HTTP is obviously not a valid start of a TLS handshake.
The OP then tries to use netcat against port 80. The OP actually gets a valid HTTP response which also clearly states Server: nginx - i.e. fingerprinting is actually successful. The status code of the response is 404, i.e. file not found. If basic auth would be involved the status code instead would be 401.


FOSS Enterprise Password Management Solution Can anyone recommend a F/OSS enterprise password management solution on/around the same level as something like Cyber-Ark?

Specifically, something along the lines of a standard password manager, (like KeePass), but with the ability to login with ldap credentials and get access to passwords for your environment, specific to your duties--Synced between multiple locations and departments. It could be a Web Application with a backend database, or it could be multiple databases somehow synced between multiple locations, though a Web App would be preferable.

I have seen the post by Tok (accepted answer) on using Git to do it, but I wanted to see if there was anything specifically written for this type of need.

The enterprise environment is Windows & Linux.

A large enterprise can't use a password manager like KeepPass,  that would be a total nightmare.  A more scalable password management solution is LDAP and Kerberos.   Kerberos' highlights are that its very scalable and no matter how large you can disable access to a user across the entire system immediately,  because authentication is centralized.


Nessus web client: Error 401 invalid credentials Previously I used to scan sites using Nessus web client, but when I tried to login with the same credentials I am able to see a401 (Invalid Credentials) error. I have restarted the service nessusd, still facing the same issue.

It would be helpful if anyone suggests me a solution.

First check you are entering the username which exists(presuming you're using linux)

ls /opt/nessus/var/nessus/users/

if user exists, reset the password and try again with new password.

In the command-line, type:

On Windows :
C:\Program Files\Tenable\Nessus\nessus-chpasswd.exe <username>
On Linux:
sudo /opt/nessus/sbin/nessus-chpasswd <username>
On Mac:
sudo /Library/Nessus/run/sbin/nessus-chpasswd

Note: Root/Admin Privileges required.

EDITED JUNE 7, 2020

This is no longer accurate. Per tenable.com...

On Windows:
c:\Program Files\Tenable\Nessus\nessuscli.exe chpasswd <username>
On Linux:
/opt/nessus/sbin/nessuscli chpasswd <username>
No instructions are given for Mac, but assuming the same approach:
/Library/Nessus/run/sbin/nessuscli chpasswd <username>


Does "Not Secure" mean HTTP? I work for a corporation and we are all given a kind of employee login system whose URL goes like this in the image below. (Sorry, I cannot disclose the full URL.)

I thought "Not Secure" had something to do with SSL certificates or something like that, but after clicking "view site information", I got this:

I manually blocked Flash, but don't know what possibly can be done with cookies and also if possible I couldn't take a risk for doing that on a corporate website.

I have a few questions in mind:

What exactly does "Not Secure" mean? Does it mean it's a "HTTP only" website?
What are all the possible reasons for a site to be "Not Secure"?
Is it OK to have an account login site that is "Not Secure"?
Do cookies have something to do with a site being not secure?
What are possible ways to make this site secure and how can I inform those responsible to make it secure?

What exactly Not Secure means ? Does it means HTTP only website ?

"Not secure" in Chrome means that the site isn't using HTTPS.

  What are all possible reasons for site being Not Secure ?

To get the exact error above, it's just when a site doesn't use HTTPS. However, you can get a similar not secure error if the site's certificate is invalid or if there isn't HTTPS over the whole page.

  Is it OK to have an Account Login Site asNot Secure ?

No, this is not ok - if somebody can intercept a login request, they can see the user's login credentials. IBBoard made a good point in the comments - having a login site without HTTPS which is on the internal corporate network isn't as dangerous as it being a public site where it can be accessed from your home PC. It's still not secure but the only people who can really MiTM the connection are the company system administrators (assuming the network is setup correctly).

  Do Cookies have something to do regarding site as being not secure ?

If the site isn't using HTTPS, this means cookies are sent in the clear. This could cause issues when the cookies contain sensitive data such as tokens, which can lead to session hijacking.

  What are possible ways to make this site as Secure and How can I inform the responsible ones to make it Secure ?

By using HTTPS with a valid certificate, Chrome will mark the site as "Secure". However, as stated by Edu, even a website with a valid certificate can be non-secure if is also serving non-secure content such as HTTP images. Mixed content (Having HTTP items in HTTPS pages) is considered non secure. If you're concerned about the security of this login site, I'd express your concerns to the IT department and see what they can do about it.


Sending a skype message by ip or mac addresses If I know someone's ip, mac addresses and a computer name in a local wifi network, and also that there is skype running on their computer (and port), can send them a message through skype? Can I find out their skype user name?

Skype traffic travels through the Skype central servers. You cannot directly connect.