Why use random value when overwriting files? Often when I see people talking about safe deletion, I see lots of advice's that you should use random values to overwrite. My question is why is it better or more efficient than filling all bytes with 0xFF that put all bits on?

Multiple overwrite passes with random values were recommended in the 1980s and 1990s, as described in the history recounted by @FlorianBidabe.  Back when data was encoded on disk platters that had physically wide read/write heads and space between the tracks to ensure data isolation, a write head might erase 80% of the magnetic media holding the bit, ensuring the drive's crude electronics couldn't read it.  But these loose tolerances left 20% of the magnetic domain behind, which were exploitable by someone looking to recover data from a disk.  Writing random data instead of all zeroes helped mask the original value of the bit.  It was discovered that multiple passes of writes increased the chances that more of that remaining 20% would be overwritten, giving people more confidence their data was truly unrecoverable.

This recommendation is no longer applicable to modern disk hardware.  The reason is that hard drive manufacturers have been improving manufacturing tolerances to increase the data density on disk drives.  That 80% sloppy write head of yesterday was replaced with more accurate motors, smaller read/write heads, and completely new technology such as vertical recording of magnetic fields.  Today, an encoded field occupies a tiny space of only a few atoms on the platter, which is how manufacturers can get data densities in the range of 2.5 TB/square inch or more.

But no matter how tiny the magnetic fields on the platters have become, drive manufacturers have been incorporating sophisticated computing techniques to improve drive performance and reliability.   These techniques are meant to preserve data, and actually can prevent the secure deletion of data using overwriting techniques.  For example, a drive will reserve an unused fraction of blocks just in case a part of the platter becomes unreliable, and in case of failure it will automatically migrate the data from the bad part of the platter to the good part.  That means it no longer matters if you overwrite the disk with zeros, 0xFFs, or random numbers.  If the sector that went bad used to hold a secret, that secret would never be overwritten by any pattern of wiping.

These continual improvements of hard drive technologies have created the need for more reliable techniques to sanitize disk drives.  Today, cryptographic wiping is recommended.  The data on the drive can be encrypted with a random key stored only in a flash chip on the drive.  To destroy the data, the flash memory is erased and the only copy of the key is wiped out of existence.  With no decryption key available, the encrypted data is securely and instantly destroyed.

For more information on acceptable disk sanitization techniques, I recommend reading the NIST standard 800-88, rev 1.


When can I commit a Private Key to source control? That is to say, in what cases does it make sense to commit an unencrypted keypair to internal source control like SVN or Git?

Related question that discusses an encrypted private key: Is it bad practice to add an encrypted private key to source control?

When the private key is nothing more than a test fixture used to test some process requiring a private key and where the private key is not actually used to secure any system.

In some cases it can be appropriate to commit an encrypted key. For example if the repository is public/open source but a Continuous Integration system requires access to that file - Travis CI supports this.

Otherwise you shouldn't commit private keys.


Including and storing the order of character entry in a password as an enhanced security measure I'm sure I will be quickly corrected if this is a stupid idea, or if it has already been tried. My question is: has this idea been tried before? If not, are there good reasons it would not work, or would not improve security?

It is easier for me to remember my current password algorithm by entering it in four different pieces. In order to enter those pieces correctly, I have to move the cursor around, so for example, first I might enter (this isn't it, just similar):

ihate

Then I might do:

Dirtyihate

and:

DirtyihateCommies

then finally:

Dirtyi9?7hateCommies

It just occurred to me: why couldn't you, as a part of the password confirmation, use not just the text of the password itself, but also the ORDER it was entered..?

I don't see any reason this would not be technically possible. It's true that getting people to take advantage of it would require a change in user mentality, and there might be a very large learning curve. However, at the same time, I assume that 99% of people who enter their password do it the same exact way every time, and so for those- the vast majority- they would not be effected by the change unless they wanted to be.

I also assume most folks directly enter their PW in sequential order every time (unless they make a mistake and go back to correct it), so they'd be unlikely to notice it. Only people who want to take advantage of the additional security would be impacted.

Including the order of when each character was entered would add a large amount of additional randomness to the password (and the magnitude of randomness would increase with every additional character added - e.g., for an 8 character password, if my math is right it would add 8! more possible iterations, 10! for a 10 character pw, etc etc).

An additional benefit, and I think this is probably the biggest potential for this idea, would be that you could store the password (encrypted) string itself separately from the (also encrypted) order on a server. In this way, if an attacker wanted to steal passwords and use them, the attacker would have to have BOTH sets of data in order to make use of them! A 20 character password - obtained from, say, a carelessly stored piece of paper - would still have >10^18 possible iterations.

So you (ie, someone smarter than me) could figure out a way to store - completely separately - these two interleaved forms of identity confirmation so that each is equally difficult to steal, but they are both checked at the time the pw is entered.

It would be really easy to store the password order, too. Just do it as a list integers. So for my example password above, the 20 character order might be stored like this:

6 7 8 9 10 1 18 19 20 2 3 4 5 11 12 13 14 15 16 17

Perhaps the idea could also be extended to things like private keys, though I don't know enough about the subject to say so definitively.

EDIT:

Perhaps the requirement of moving the cursor around is too arduous. What about rich-text passwords? Why not allow italics, bold, underline, etc etc, as part of password entry? How about color? As with the previous idea, nobody would HAVE to be affected. Only those who choose to be affected would be impacted, and similar to the previous idea, you could store the style information separately on a server for the enhanced protection from theft of a password database.

There are several reasons why this would be a sub-optimal security scheme.  Here are a few:

The biggest issue with secure passwords is our memory, or our limited capacity for remembering passwords.  We're pushing our memory limits as it is, and always working to devise new tricks to help better remember more secure passwords.  This scheme introduces new components that must be memorized, without any advancement in memorization technique.  That means that if we already at our memory limits, but now must remember entry order as well, something else needs to give, and given that entry order is not in and of itself particularly memorable, the sacrifices that we must make in the other aspects of the password are likely inordinately large.
Reduces or eliminates the ability to mask passwords.  For a non-trivial scheme (I.E., not just appending and prepending password segments) it would be nearly impossible to mask passwords during entry as we do today.  If we're going to be inserting character strings into the middle of the password somewhere, to do that with any reasonable speed and assurance of accuracy, we would need to be able to see what was already entered.  This means that you can't mask the password with a string of asterisks or discs, which allows for shoulder-surfing and photographic plain-text password capture.
Would require a new generation of password managers.  Currently, password managers have the ability to auto-enter passwords.  If order is important, you have to have the ability for them to auto-type in a specific order, or continue to live with sequentially ordered passwords if you use a password manager.  In the second case, which is the preferred mechanism today, and would likely continue to be preferred, you gain nothing from the entry-order scheme except for additional complexity.
This all has to be captured client-side.  In your specified scenario, (a web application) by the time the request is sent to the server, the password is simply a field value, and HTML forms don't support any way to associate the manner in which the value was entered with the request.   So, you need a way to both capture the entry order, and then submit it along with the request.  And it needs to work with every input mechanism, for every client user agent.
As a user, the added entry complexity can be a significant barrier.  Touch devices are one example of where this is going to be an issue.  It's hard enough as it is to do data entry on a phone, and that's becoming the most prevalent form factor for consuming the web.   Add having to move back and forth in the field as you enter a password, and it'll make you want to stab your eyeballs out with a stick.  And if you think this is hard, it would be essentially impossible for some clients, such as voice-to-text tools that assist disabled users by allowing them to speak the values they want to enter.

I'm sure there are others, these are just a few obstacles I thought of off the top of my head.   This scheme does add an element of complexity to passwords that doesn't exist today...That is true.  It is not however, an ideal scheme for improving passwords.   We're much better off promoting password managers and long, unique, random passwords that trying to find new gimmicks.


Router Code Injection I read some articles about hacks that have hacked routers which inject ads on websites a visitor visits that replace adsense ads

Is it really possible? How can a router hack inject javascript code into browser
I dont understand

I'm not sure exactly what type of attack you are referencing but consider this...if an attacker controls your router what is to stop them from making any arbitrary change to unencrypted data?  The packets pass through the router and the router could (if desired) make any change to the packet that the attacker desires (assuming he has taught the router how to make the changes properly).  If the data is encrypted end to end this becomes much more difficult to pull off (still possible through a more complex attack path).


Access-Control-Allow-Origin and security behind it I have some troubles to understand how the header "Access-Control-Allow-Origin" can really be secure. Let me explain what I have in mind:

Let's say I have an API on api.contoso.com setting this header: Access-Control-Allow-Origin: https://contoso.com
The goal is to allow only calls to this API from https://contoso.com.
It means that if I try to call this API from http://foo.bar, it'll fail.  (I hope I'm right on this part :p)

But an attacker can create a proxy on its own server, let's take this simple nodejs call:

https.request({
    hostname: 'api.contoso.com',
    path: '/my-path',
    method: 'GET',
}).end();

And that's it. If I am not wrong, the header Access-Control-Allow-Origin won't be taken into account in that case. And even so, the attacker can simply set the referer in its request options, right?

https.request({
    hostname: 'api.contoso.com',
    path: '/my-path',
    method: 'GET',
    headers: { Referer: 'https://contoso.com' },
}).end()

My point is: if we can get around the header "Access-Control-Allow-Origin" by making the request on server-side instead of client-side, what's the point of this header? What I miss? ^^'

Thanks in advance for your answers :)

The goal of CORS is not to prevent any kind of cross-origin access. Some cross-origin access is possible anyway, like with cross-origin loading of images, submitting of forms etc. What CORS instead tries to prevent is (among some other things) cross-origin access which hijacks an established authenticated session.

While the attacker can create a proxy like you propose it will not have access to the credentials and (session) cookies for api.contoso.com which are stored in the browser. These are bound to the target domain. In your case on using a proxy at the attackers site the target domain is the attackers site and not the original site. This means that the proxy might access the target URL but not access it as the authenticated user.


SSD Hardware Encryption versus Software Encryption I was looking to purchase a new SSD and want to use it to store sensitive data, that I would not want people to steal or access.

Have been trying to research it and only read bad things about hardware encryption.

Here is an example: https://www.tomshardware.com/news/crucial-samsung-ssd-encryption-bypassed,38025.html

And I don't necessarily trust hardware companies to not have backdoors / vulnerabilities within the software/firmware its using.

So I am beginning to think maybe I should just buy a regular external SSD, without hardware encryption and encrypt it with software?

Have been looking at a few methods and seems most people say that VeraCrypt with AES 256 for the encryption algorithm and SHA-512 for the hash algorithm is the best option.

I plan to use this external SSD for my main operating system as well storing sensitive data. I read that using VeraCrypt will cause lower speeds. I am using USB3.0 so the speeds are already effected by that from what I've read. And then adding encryption software like VeraCrypt on to it will cause it to be slower.

I do not mind giving up the speed for extra security. Although I would love to hear what others suggest. If it causes it to be slower, but has the best security, I would prefer that. I guess I just am not sure which to get or how I should be encrypting the data.

If anyone could give some suggestions along with reasons, why I would greatly appreciate it.

...  I would love to hear what others suggest.

Looks like at least Microsoft does not trust the internal encryption in SSD anymore. It switched to software based encryption for BitLocker by default:

  BitLocker, Windows' built-in encryption tool, no longer trusts your SSD's hardware protection
  After reports of widespread flaws in hardware-based SSD encryption, Microsoft has pushed out an update that defaults BitLocker protection to software-based AES encryption.


Could a router protect our network or need we use an hardware firewall? I am at a small firm (12 PC on the internal network). We use this network architecture now:

Internet(Modem) --> Router --> Firewall --> Switch -- > Internal Network (clients PCs)
                |                       |
                |- Wifi Router          |- DHCP & AD Server
                |- HTTP file server

The Main server and the clients PCs are (relatively) new (to other components), they were bought in 2005. But the other hardwares are creepy old ones, lot of them is older than 15 year. They became the bottlenecks of the network.

Here I describe all of the components in a short shoot:

The Router is an old ASUS (Rx3041)
Firewall is a MS Server 2003 R2 with ISA 2006 installed (now formerly Forefront Threat Management Gateway) Definitely this is the main bottleneck of our network, we need to restart this server more than one per week, because it randomly start to drop allowed connections.
DHC & AD Server is a MS SVR 2008 R2 and it also operates as an internal file server and internal HTTP server (We run a Redmine issue tracker on it. But not on IIS.)
Wifi Router is just simply an access point to the internet outside of our firewall for our wireless devices such phones and tablets (but no laptops or computers, which we use for work.)
HTTP File server is an old laptop, which is out of the firewall too (However we have a rule for it to reach it from internal network, so we use it as a network drive to publish some stuff.

While our programmers work out of office, so we don't have any sensitive information on most of the client PCs except one. Our server store sensitive information too. (source code, our clients information, etc..)

We want to fresh up our network a bit. We plan to use only one router instead of 2 routers and a firewall. It looks like this:

Internet(Modem) --> Router with wifi --> Switch -- > Internal Network (clients PCs)
                           |
                           |- HTTP file server (DMZ maybe?)

We want to use the Asus RT-AC66U router.

I read this great answer from Bill Frank, but that question is three year old and things change fast. Maybe routers evolved enough to be able to secure a network. So my question: is this a viable option? Could a router protect us? Or must we use (still) a hardware firewall to protect our network? (We should, but must we?)

We choose this option because of the matter of money. If I could I setup a new router and place the whole network behind a firewall (on new machine) but management say there is no easy money can be spent for that. Should I fight for a new firewall server? Or the router will be enough?

Many routers - even in the consumer-segment - have basic network filtering capabilities based on protocol, port and IP, which means that they can also be used as a basic firewall. Dedicated firewall appliances often offer additional features, like deep-packet inspection to detect certain known threats on the protocol-level or automatic attack detection based on heuristics (they can warn you when someone seems to be probing your network for vulnerabilities). Whether you need this or not depends on how secure your network needs to be and how much this security is worth to you.

The manual of that router shows some screenshots of the web interface where a button "Firewall" is visible, even though it is missing any written documentation about that feature. But I own an even cheaper Asus router, and it can do port- and IP-based filtering, so I would assume that this one can too (contact ASUS support when you need to know details).

But keep in mind that consumer-grade routers are rarely sufficiently hardened. The news about critical vulnerabilities in home-routers are numerous. There is a hard price-war on that market, and the support in form of fast security-patches for existing products seems to be one of the first cost-factors to cut down on.

When you use a consumer-grade router, you have to be aware that a skilled hacker which targets you specifically will likely find a vulnerability and use it to compromise it. Doing a risk analysis of this scenario is up to you. You need to estimate how likely it is that a skilled hacker gets interested in your data and how large the damage would be when your data would get stolen.


Bring your own phone to a (new) job: Consequences? I am starting a new job, and I have the choice to receive a phone from the company, or to bring my own. I am considering using my own phone, to avoid having an extra device, but I want to better understand the consequences of that decision.

I have an iPhone. A more recent one with iOS 8. I will stay with my current wireless carrier.

I understand they can remotely wipe my phone after I leave the company (or if it's lost or stolen), and I'm okay with that, because I already back up every important app.

I found this Apple article regarding enterprise iPhones, which states these specific things can and cannot be observed by the company:

  Examples of what a third-party management server can and cannot see on a personal iOS device.

  MDM can see:

  Device name
  Phone number
  Serial number
  Model name and number
  Capacity and space available
  iOS version number
  Installed apps

  MDM cannot see:

  Personal mail, calendars, and contacts
  SMS or iMessages
  Safari browser history
  FaceTime or phone call logs
  Personal reminders and notes
  Frequency of all use
  Device location

(MDM is Mobile device management)

But I'm not certain if this applies to all iPhones in all enterprises.

Concerns/questions

How exactly is this done? They just configure something in settings, and I supply my lock screen passcode to give them permission?
Can any of my behavior or data, outside of company-supplied apps, be observed?
What apps or "root level" utilities can I expect to have installed?
Will any restrictions be placed on how I can use my phone, or on the apps I can install?
Is there anything else I need to be aware of?

I found this related question, which discusses BYOD consequences from the company's point of view: What are the problems with bring-your-own-device related to smartphones?

Just wanted to chime in and say that the list you have there isn't entirely 100% accurate, but it is close.

Keep in mind that this will vary per MDM vendor and mobile OS, but MobileIron can see your location if your employer enables the functionality and you choose to accept sharing your location data.

  How exactly is this done? They just configure something in settings,
  and I supply my lock screen passcode to give them permission?

Your employer should direct you to a portal where you register your device and install the MDM application. The employer cannot see/extract nor does it know your personal PIN.

  Can any of my behavior or data, outside of company-supplied apps, be
  observed?

Behavior - yes, if you take into account location data.

Data outside of company supplied apps - no.

However, your employer can see a list of all apps installed on your phone, so you may think twice before installing any "questionable" apps.

  What apps or "root level" utilities can I expect to have installed?

Not sure how to answer this one exactly. It sounds like you are asking if they can install the equivalent of a rootkit on your phone? Realistically I'm inclined to answer no.

  Will any restrictions be placed on how I can use my phone, or on the
  apps I can install?

Yes, your employer can black list apps.

  Is there anything else I need to be aware of?

Yes, please refer to the infographic below. (location)


Are users meant to hash their passwords? When a user logs into their account on my server, should they send their raw data to me, and then I bcrypt compare them, or are they supposed to hash and and I directly compare?

I ask this because someone posted about hashing on mobiles being slow.
It would make send to take load off of the server, and make sense about the slowing down brute forcing, and also protect the user from snooping.

If I were to do this, wouldn't I run into the exact same problem - slow experience for mobile users, if so is it something that is just expected as part of logging in. Also, wouldn't the user generate a random hash which wouldn't match the one stored in my database?

Users should not hash their passwords before sending it to a website. If the user hashes and sends the hashes credentials, the hash is acting exactly like a password and actually defeating the purpose of hashing. If an attacker steals your password hashes, they can just send those to your server to login.
You might want to read about Pass the hash attacks.
You must hash server side.


How can you be sure that there is a virus on your computer? Am I being paranoid? I'm seeing signs of a virus everywhere on my computers but I have no way of being sure. I've tried scanning with Windows Defender multiple times but haven't found anything. My internet connection slows to a crawl often, my games keep crashing (official support forums say a virus is probably causing the crash), and my Ubuntu server is sending things to a domain called "rubay.canonical.com" (I can see it using iftop)

I've only visited sketchy sites accidentally (misspelled site names), and all my router ports are forwarded to trusted applications. How can I be sure that Nigerian scammers aren't emptying my bank account and selling my SIN as we speak? Should I nuke my computers just to be safe?

None of the symptoms you posted is a sign of having malware on your computer.

  My internet connection slows to a crawl often

Complain to your internet service provider or find a better one.

  my games keep crashing

Viruses don't tend to do that. When you have problems running games, it's far more likely to be a problem with your graphic driver... or just that you happen to play buggy games. But that's not a topic for this website. Gaming stackexchange might be able to help you with a specific problem.

  my Ubuntu server is sending things to a domain called "rubay.canonical.com"

Canonical is the company which makes Ubuntu, so there is nothing suspicious about that. Opening that domain in a web browser shows a directory listing with filenames which hint that it might have something to do with checking for updates. Ubuntu Stackexchange might give you a more profound answer when you are curious.


Security Practices by Employees in a Corporate Environment Consider the following situation :
1. Somehow my boss's system got infected with a malware ( He visited one of the Java exploits website).
2. He sends a PDF document containing the requirement document of a new project coming up ( the malware infected this PDF).

My OS and antivirus are all patched. So the PDF will look OK to be opened by me, and I will go ahead and open that PDF.

How do one protect from such type of attacks ? ( AFAIK, operation aurora against google used this technique only).

And considering the PDF sent to me is a confidential business document, I cannot even upload those to sites like virustotal.com so even if it had a 0 day infection, antivirus companies won't be able to create signature of it.

Thanks !

Interesting question.  There's a couple of areas that are possible controls for this.

The obvious first place is patching things like Java.  It's commonly overlooked in patching processes but with the level of attacks need to get patched as soon as possible.

The next one is hardening.  Java applet functionality (which it likely what was exploited here) should be disabled for all general browsing.  If it's required for line-of-business applications I'd recommend using a separate browser with it enabled which is only allowed to access those sites.

In terms of detecting the infection in PDFs that's trickier.  As you say it probably won't flag to signature based A-V.  Potentially some heuristic style detection programs would catch it (as it does things that a standard PDF won't)..

Another possible control is white-list based program execution (e.g. Bit9).  If you can get to the point where only trusted programs can run, then it might block malware when it executes (or at least make it much harder for it to do so).

Lastly detective controls are a good option here.  The malware will likely make connections out-bound to C&C servers so it might be possible to detect those connections..

None of these options are 100% but things perhaps worth considering.


Securing a VPS network with a VPN and a DMZ I've got several VPS boxes (Digital Ocean boxes w/Ubuntu) that I would like to lock down from the outside world.

I want to have several private boxes (web servers, db servers, puppet/master boxes etc.) along with a public facing load balancer box that will forward requests to the private web boxes. I am trying to figure out how to set this all up without too many security holes.

I am thinking of setting up a VPN (I am thinking of using Tinc since it looks straight forward) and putting all of my boxes on it.

My private boxes will only accept requests over the VPN network, my load balancer box will additionally accept public requests over port 80 and port 443 and will forward requests over the VPN network to the private web boxes.

Does this sound like a good setup? What's the best way to restrict access in this fashion, via iptables?

If this doesn't sound like a good setup then what would be a better way to about this?

I had a similar setup for my production servers. The HTTP server load balancing was done by HAPROXY. I can recommend NGINX especially for the front facing server that will also handle SSL. Also I am not sure, what policy you are taking to transfer files to the host machines or getting terminal access. You probably need to think about opening up an SSH port via virtual tunnel through the gateway server that has the public facing interface. For transferring files you can use SFTP or rsync.


How insecure is it to publish my direct EC2 URL? I have a domain resembling the following from EC2:

http://ec2-55-55-55-555.us-east-2.compute.amazonaws.com/

How problematic is it to publish this to the public with regards to security?

I'd be fairly certain that AWS is being scanned constantly by attackers, so running a webserver on port 80 shouldn't be considered a secret.  This is true in general for any publicly available service.

25 years ago people hooked up services on dialup modems with little or no security (default passwords).  They believed that the obscurity of the phone number was enough to protect them if they didn't publish the phone number, unaware of wardialers that had existed since the early 80s, the name stemming from the 1983 movie Wargames.

This sort of practice is called security through obscurity, and has been highly frowned upon for decades.  Essentially if you think you're safe because nobody will visit an IP address unless they're explicitly told about it, think again.


What's wrong with storing a username and password as a cookie? I'm working on a legacy application that issues JWTs with a short expiry time.
They do not have refresh token functionality implemented.
So obviously while using refresh tokens would be the right solution, for the sake of argument assume that's not going to happen.
It occurs to me that 'Hey I could just store the username and password locally and just re authenticate when the user gets kicked out'.
This question:
How dangerous is storing the hashed password in local storage?
Suggests that localstorage would be a bad idea, and that access tokens should be stored in cookies instead. So sure, I could put the username and password into a cookie.
What's the security issue with doing this?

The main problems are:

The username and the password are sent again on every request, making it easier to steal the actual credentials instead of hijacking the session. A compromised session can easily be revoked by removing the access token, but a compromised login requires locking the account and changing the password. Cookies could be stolen...

in man-in-the-middle (MITM) attacks
in Cross-Site Scripting (XSS) attacks
from a local, unencrypted store.

It's impossible to efficiently expire a session server side: this relies on trust that a client forgets about the cookie when it is set to expire. This makes e.g. using shared computers a lot more riskier than using session tokens.

Unless the password is weakly hashed (or stored in plain text), checking it over and over again on every request is total waste of resources.

Similar authentication schemes exists and are even widely used, as for example HTTP Basic authentication (RFC 7617, 2) works like that. If it's absolutely necessary to use such authentication, these problems must be at least mitigated with proper encryption – likely HTTPS enforced with HTTP Strict Transport Security HSTS (RFC 6797).


why am i unable to gain access to remote pc through smb while having correct credentials? I have set up my ethical hacking and penetration lab. My host OS is Windows 10 and target 0S is Windows 7. I want to penetrate into Windows 7 from Windows 10 through SMB.

When I try to penetrate, it says access denied. Considering this problem, how should I penetrate?

I think your credentials does not have permissions to this PC.
1. If you are using a Domain base network (not a workgroup) you need to check the permission for this user in the Active Directory user list.
2. If you are using a local credentials , check in the local (win 7) user list This PC->manage->System Tools->Loacl Users...->Users that you have the current user in the list, if not create it and give it the specific creds that you want.


How to look for steganography in a picture I need to scan this picture for steganography as the meta-data suggest there is some concealment. I'm new to this process and don't know which free tool is the most comprehensive.

EDIT:
1. as I suspected stackexchange image upload does a exif clean, the metadata comment read: Getting warmer! Use concealment to uncover even more as you hunt for the solution string to this puzzle...like hide and seek...
2. A hex editor shows nothing conspicious with a starting point of "FF D8" and end point of "FF D9"
3. The image is only 48 KB
4. StegDetect is not working with this image.
5. With Polynomial and Steve's comments I realize that I should learn (Kali) Linux before asking questions that that are way over Windows' head. If you have a (free) Windows solution, please answer.

A quick googling revealed this site with solutions to your puzzle.

Opening the picture with a hex editor reveals a password, concealment. Using JPSEEK to extract the hidden data from the image, using this password, gives the solution, exponential.

Oddly enough, the URL for this solution (http://www.rtncyberjobs.com/pz2/exponential) doesn't work.


Is the most recent version of ojdbc7 still vulnerable to CVE-2016-3506? Looking at the Oracle security advisory page here: https://www.oracle.com/technetwork/security-advisory/cpujul2016-2881720.html Oracle in 2016 disclosed vulnerabilites in their OJDBC7 versions 12.1.0.1 and 12.1.0.2.

However looking for the most recent versions of OJDBC they are still offering both 12.1.0.1 and 12.1.0.2 as their most up to date versions.

https://www.oracle.com/database/technologies/jdbc-drivers-12c-downloads.html

https://www.oracle.com/database/technologies/jdbc-upc-downloads.html

Am I missing something about the way that Oracle does their "patching" and they fix the vulnerable version and then release it as the same version, or have they actually not fixed this vulnerability?

I don't know the answer, but my guess is that they've updated the driver in the code that they ship with their products, but not in the downloads.  If you have Oracle support I suggest you contact them about getting an up-to-date driver.


OCSP stapling details and doubts I am trying to figure out the details of OCSP stapling and how it works. As often the best way is, I started Wireshark and made a simple request to a server that has OCSP stapling enabled.

Can anyone please clarify the below doubts I have?

Request
Client Hello extension data:

In Wireshark I see the client hello extension as below

Extension: status_request
  Type: status_request (0x0005)
  Length: 5
  Certificate Status Type: OCSP (1)
  Responder ID list Length: 0
  Request Extensions Length: 0

I understand the presence of the first two fields. But why do we need the next 3 (Certificate Status Type, Responder ID list Length, Request Extensions Length) as they are 0 anyways. What kind of data can they contain and how is the server supposed to process data in these fields?
Response
Part of the response is:

Certificate Status Type: OCSP (1)
ResponseType Id: 1.3.6.1.5.5.7.48.1.1 (id-pkix-ocsp-basic)
BasicOCSPResponse
tbsResponseData
responderID: byKey (2)
  byKey: f2026c2ad426a4a59cb2505b3962446034151e5b

What are the fields byKey and ResponseType ID? And how is the client supposed to process the same? Does the client need to match the Certificate status type with what was sent in the client hello?
Chain?
I understand that revocation checks need to be done for all certificates in the chain. How does this fit in with stapling? We are doing a handshake only once. Is the server responsible to maintain revocation status of all certs in the chain?

1. Request

  [...] why do we need the next 3 (Certificate Status Type, Responder ID list Length, Request Extensions Length)[...]?

The status_request is defined in RFC 6066, section 8. Certificate Status Request.

Certificate Status Type: OCSP (1)

Boring. It's the only defined value right now. Field is for future extensibility, I guess.

Responder ID list Length: 0

From the RFC:

  In the OCSPStatusRequest, the "ResponderIDs" provides a list of OCSP
     responders that the client trusts.  A zero-length "responder_id_list"
     sequence has the special meaning that the responders are implicitly
     known to the server, e.g., by prior arrangement.

And this is meant especially for "constrained clients", like embedded systems, that only know a handful of CAs.

From the RFC:

  "Extensions" is imported from [RFC5280].  A
     zero-length "request_extensions" value means that there are no
     extensions (as opposed to a zero-length ASN.1 SEQUENCE, which is not
     valid for the "Extensions" type).

Dunno. I don't really understand the imported from RFC5280. But I guess it might refer specifically to section 5.2.1 of that RFC5280. But I don't really understand that section either.

2. Response

  [...] What are the fields byKey and ResponseType ID? [...]

The byKey field is just an identifier for the OCSP responder. So that the client can decide if he trusts that responder/signer or not. And it can be either byName or byKey

  Does the client need to match the Certificate status type with what was sent in the client hello?

Absolutely. But there only is one type defined at the moment, no anything other than OCSP (1) is going to be undefined/wrong/useless anyway.

3. Chain?

  I understand that revocation checks need to be done for all certificates in the chain. How does this fit in with stapling?

AFAIK: not too well. But there is an effort to introduce "Multi-Stapling" (from 2013):

  With the necessary support in TLS clients and servers it would be possible to use OCSP stapling for the intermediate CA certificates, too. Checking this information in connection with a stapled OCSP response is referred to as “multi-stapling.”

  Multi-stapling should have been as simple as defining a new method for the Certificate Status extension and including that method in the list of methods supported by the client. Unfortunately, that was not the case.


Inject JavaScript code into websites requested by an Android app? How can I add custom scripts to pages I'm opening on Android via Chrome, Firefox or any other internet browsing app?

My best bet would be to just browse the web through a proxy that injects the script for you. On a desktop you can just use the developer console or a browser extention, but that's not an option on mobile.

Note that this is not really a way to "hack" someone, since the only person it affects is yourself.


Is finding vulnerabilities in the major browsers easy or not? If young hackers can detect them, why can't security analysts get and patch them?

Also, I dream of finding a vulnerability in a major software, like IE or Chrome. Is it easy? Is it systematic or is it random?
What books do I need to read to detect them in due time?

I now know how to program in C/C++/Java. I can easily learn Assembly.

It's a race between the people who want to fix the vulnerabilities and the people who want to exploit them. Finding vulnerabilities is difficult — writing correct code is a lot more difficult than writing almost correct code.

Suppose (numbers pulled out of thin air) that 99% of security defects in released products are found and fixed by the authors themselves, or reported privately to the authors. That means 1% of security defects are made public through an exploit (a zero-day). You only hear about the publicized exploits, not about the ones that are quietly fixed — so that 1% is all you hear about. The authors and analysts have to fix every single vulnerability in order to make a completely secure product; the “hackers” only need to find one unfixed vulnerability.

But it's actually worse than that: even in the 99% case, when the authors release a new version, not everyone will upgrade immediately. There's another race: the race between exploitation and patching. Once the upgrade is available, crackers can study the differences with the previous version and build exploits for older versions that people are still running. This leaves a lot of exposed machines.

There are a number of techniques to look for vulnerabilities, used by both sides alike. Fuzzing is one of them: try feeding random data to a program, and see if it reacts in an interesting way. For example, if the program crashes (which in itself is often a denial of service), study the way in which it crashes carefully; often crafting the input data then lets you escalate to executing arbitrary code. Another approach is static analysis: run automatic analyses on source code or compiled code, to look for suspicious patterns (e.g. look for unchecked array accesses) or verify the absence of certain kinds of bad behavior (e.g. prove that all array accesses are unchecked). Static analysis can be complemented by manual reviews, to look for aspects that automated tools aren't good enough to catch (e.g. review that all temporary files are created securely). Experience helps, of course — sometimes someone will think “hey, this is a difficult problem, I wonder if the developers got that case right”.

I recommend reading the presentation of OpenBSD's audit process and looking further at the OpenBSD project. This is an open source project, with open discussions, and they make security a priority. I don't know of a more comprehensive presentation of their security auditing process; you can find out more about it by scouring their mailing lists.

More generally, look at security announcements for open source software (e.g. a Linux distribution). When a security patch is announced, look at the description of the vulnerability, at the original source, and at the patch. Try to get a feeling for what patterns can be problematic, how they were found (the vulnerability announcement often has a link to a more detailed write-up) and how they were fixed.


How to report "cryptographic bad practice" to vendor? An appliance is suffering from "cryptographic bad practice"-class of problem, more details here. It would take quite some person-months to prove just for one firmware version if it can be exploited.

My questions are:
How can "bad practice"-class problems be reported without someone developing the exploit?
If you think it can be pushed through 1st level customer support, what arguments should be used?
"I think what you do is bad practice, please spend money fixing it, even though it may be harmless"

I would start looking for a company email address that is provided so third parties can report vulnerabilities, e.g. security@, secure@, psirt@.  Maybe Google the vendor's site and look for "responsible disclosure" or "vulnerabilities".  If you find that address email them there.  While it's not necessarily a vulnerability, if the vendor has something like that in place they're the best people to work with as they're likely understand the issue and have the proper contacts to get it fixed.

Failing that, you can always try front line Support.  They probably won't understand the issue, but if they escalate to back line (or development, depending on how big the support org is) then hopefully it'll be recognized as an issue and fixed at some point.


Is there any reason to include the remote ip when using reCaptcha? I am implementing Google's reCaptcha in my app. According to the documentation, my API request must include my secret key and the response, and optionally the user's remote ip.

For what reasons would I include the remote ip?

Because there could be a DNS/hosts reroute in place to allow the captcha to be parsed differently by a malicious user

One possible scenario is farming cheap labour to manually solve captchas and then submit them back with the form. Since the recaptcha only will serve the image once this is the lazy way to farm this out. ( redirect the requested image to elsewhere ).

If the IP address which requests the image is different to the IP address that requests the page then this would indicate this style of attack.


Is the MIT implementation of Kerberos protocol as vulnerable as the one used by Microsoft? I am doing some research for school about the Kerberos protocol and its vulnerabilities, especially the Pass the Ticket attack.
Related articles are always talking about Active Directory so I was wondering if the MIT version of Kerberos was as vulnerable as Microsoft's one ? If not, why ?
Some of these articles were a little dated so maybe some attacks are no longer possible on recent versions of Windows ? Maybe there are newer vulnerabilities (I saw DCShadow attack that seemed quite new) ?
I guess some experts can pass by there and provide a good explanation.

What exactly is vulnerable in Active Directory? Without a clear baseline its impossible to compare x and y. This is an incredibly broad question and it's difficult to answer fully.
The pass-the-ticket/golden-ticket attacks are not themselves a vulnerability per se. The potential vulnerability is in the protection of the keys used to encrypt the tickets. Once you have the keys anything you do against the different parties is valid. At that point you're not attacking the protocol itself.
Active Directory protects these secrets in the directory database by encrypting them to a key protected by the machine. If you can get access to these secrets then you have full access to the database, which means you have access to the keys and can perform this attack. This is an infrastructure issue. If you don't do your own due-diligence protecting your critical infrastructure it's not reeeeeeally AD's fault. I say this because...
MIT supports multiple ways of storing directory data, and each one is equally at risk if you don't protect the infrastructure properly either. It supports LDAP and SQL and what not. Each of those has a database and protects their secrets fundamentally the same way. If you can attack that infrastructure you can get the keys and perform the attacks.
Now compare the protocol implementations. They're both RFC 4120 and they're both interoperable. They both support the same key types and extensions. This means any weaknesses of the protocol are applicable to both. Any pass-the-ticket/golden-ticket/etc. attack against AD is identical to MIT or Heimdal or whatever implementation is out there.
Where things differ is the support infrastructure. DC Sync for instance. Windows supports syncing directory databases between DCs using the MS-DRSR protocol, which when granted enough privileges allows you to request any secret you wish. This requires a critical privilege that isn't handed out freely and goes back to that protecting your infrastructure thing. MIT doesn't have a directory sync because it's not a directory. It's just an implementation of Kerberos. The LDAP directory you use to back MIT will however have a sync engine of some sort and will therefore have similar APIs and be equally attackable, if you get yourself into a privileged position.
that's the crux of this: if you can get into a privileged position you can attack the services. You could call it a vulnerability, but the meat of it is missing because you've magically crossed the security boundary without saying how. How you cross the security boundary is more appropriately the vulnerability.
All of that said, the reason Active Directory is the problem child here is because it's the most common and its makes it incredibly easy to automate equally good and bad behavior. It's the one everyone knows and it's had its share of bad press for good reasons at the time. There are some pretty obnoxious vulnerabilities like the print spooler bug or the netlogon vulnerability that pop up from time to time that take a long time to patch in the field too.


What are the different security concerns associated with open ports on mobile vs open ports on servers? I found out that, because of the non-static IP address of mobile phones, their open ports are supposed to be more susceptible to attacks. However, I haven't found out why exactly that is the case.
Do you know why a volatile IP address makes open ports on mobile less secure? Are there any other reasons why open ports on mobile are less secure than the ones on servers or desktop computers?

Edit: I found out about this issue from this research paper:
https://eecs.umich.edu/eecs/about/articles/2017/open_euro17.pdf

I found out that, because of the non-static IP address of mobile phones, their open ports are supposed to be more susceptible to attacks.

I think you misunderstood the paper, most likely this segment:

  In the recent evolution to the mobile era, smartphone operating systems inherit the support for open port. But for smartphone applications (apps), traditional open port use cases such as hosting network services no longer apply. One major reason is that compared to stationary server machines with wired network connectivity, the mobility nature of smartphones makes it difficult to maintain a stable IP address. Moreover, the IPs assigned to mobile devices are often behind a NAT (network address translation) pre-venting incoming network connections. Also, continuously receiving network traffic can easily drain the battery of a mobile device, leading to a form of denial-of-service (DoS)attack [49]. Due to these inherent differences, our current understanding about smartphone usage of open ports are rather limited.

What this section is saying is that our assumptions about open ports only generally appearing on servers, as they have a fixed IP address (or at least domain name) that we can talk to rather than a dynamically assigned address, mean that people haven't really considered looking into open ports on mobile devices from a security perspective. The fact that the IP is dynamic doesn't factor into the security considerations all that much, but the assumption that mobile apps wouldn't bother opening ports because there's no real way to know what external IP address that mobile device will be using (and that it may be behind NAT) is wrong, and that incorrect assumption means that many users and vendors don't consider open ports as part of their security model. As it turns out, many apps do indeed open ports, and the paper describes a few ways that certain apps can be abused because of it.

An open port on a mobile device is no more or less secure than an open port on a traditional computing device such as a laptop or server. The difference is that mobile operating systems don't typically run a firewall, and running one by default would probably make for a poor user experience in general since most users wouldn't know how to configure it properly. The end of the paper instead focuses on ways that apps can mitigate problems with open ports, since a general-case firewall is not ideal.


What network protocol is Crashplan using? I have been using CrashPlan for a while internally (i.e. local backup server). I would also like to setup off-site backup but my experience is that I have to forward a port from the router sitting at the perimeter of the network where my offsite server is to be located. Otherwise, the client and server cannot see each other.

However, I am reluctant to forward a port to the CrashPlan server without knowing what I am exposing but I have not been able to find any information about the network protocol(s) used by CrashPlan (non-Business edition).

Does anybody know what network protocols and/or encryption CrashPlan is using when communicating and can it be considered safe to forward a port from the network perimeter down to a CrashPlan server?

Edit: If anybody from Code42 is reading here, you are welcome to write an answer as I believe this is of general interest for everyone wanting to use CrashPlan. Maybe a document already exists which you can link to in the reply.

The connections CrashPlan uses are encrypted using TLS.  (I've casually seen the traffic when looking at other things.)  As for whether or not it's safe: the protocol doesn't really matter, only whether CrashPlan has exploitable bugs in their software, and that's pretty hard to discern without either extensive reverse engineering or access to their source code.


Does the subject HAVE to dominate the object in order to access the object? Lets say Paul, is cleared for (TOP SECRET, {A,C}) where top secret is his clearance and A & C privledges. He wants to access a Document classified (Secret,{B,C})..

Top secret trumps Secret but in order for paul to "dominate" the documents permissions must be a subset of pauls. Which B,C is not a subset of A,C.

So my question is does paul HAVE to dominate the document in order to access it period? Ive read that dominate only provides a heirarchy of sorts. The BLP model sys read downs is allowed so im a little confused about this situation.

I think you may be confused about the terminology, if I'm understanding your question correctly.

Security levels can dominate each other.

Security level X dominates Y if and only if X is a higher classification than Y, and X is granted at least the full set of privileges Y has.  In your example X = {TOP SECRET, {A,C}} does NOT dominate Y = {SECRET, {B,C}} because while X > Y in classification, X does not contain the full set of privileges in Y.

Pauls security level doesn't have to dominate the security level of the document.  He only has to match the security level of the document and have the privileges of the document.


Asking for Password After Email Validation? I do not want to discuss the pros and cons of email validation, but want to know if there are any potential downsides (security and otherwise) to a user entering his password only after he has already validated his email address (clicked the activation link)?

The flow would be:

User enters email address.
User validates email address through the activation link he received to his inbox.
User enters password.
User accesses the web app for the first time.

From a security standpoint, I can't see any problem with this flow. It actually may be more secure than requesting user details and then verifying the email address. A user could enter an incorrect email address end end up giving access to their account to a random third party. In your scenario, there is no account to access.

You will have the possibility of someone enumerating existing users email addresses by repeatedly entering email address on the registration page and looking for error messages, but that would also be possible in a traditional 'email and password together' flow. Provided you put some sort of rate limit or captcha on that page, you should be fine.

You may loose a few user signups from this flow, there will always be users who never bother to complete the extra signup step. Depending on what service you are offering, this could be more or less likely.


Is there a way to block all TOR traffic incident on my public servers? I don't want any connections coming from a tor network to be accepted by my servers.

See I want to ban the Tor network from my service from the official Tor documentation.

The Tor project provides a list with IPs of all the exit nodes that can access your service, use query string parameters to tell it the IP and port of your service, example : https://check.torproject.org/cgi-bin/TorBulkExitList.py?ip=8.8.8.8&port=443.

You can then loop through the results, split them each newline, ignore lines starting with "#" and finally adding a -J DROP IPtables action to each one of them or using an IPset which would give you better performance with such a large number of hosts, something like this should do the trick :

ipset -N tor iphash # create a new set named "tor"

# get the list, don't forget to put your service's IP in the query string
curl -s https://check.torproject.org/cgi-bin/TorBulkExitList.py?ip=8.8.8.8 | sed '/^#/d' | while read IP
do
  # add each IP address to the set, silencing the warnings for IPs that have already been added
  ipset -q -A tor $IP
done

iptables -A INPUT -m set --match-set tor src -j DROP # block any IP in this set in IPtables

(source)

They also provide a DNS based list but it's still in experimental stage so I suggest you stick with the first option, it's also easier to work with.


Can hackers fake an IP address? For example, if I sign on to a bank website, and the bank gave me a cookie as an auth token.

Now instead of logging off, I simply close the web browser tab.

So now, if a hacker can somehow get my auth token, can he or she then fake that it is me by also faking the IP?

(I suppose the bank will restrict access to the IP I used with that auth token... but then isn't it true that even if the hacker cannot fake an IP address, he or she might be able to emit requests from my Mac or PC and therefore really emit the requests from my IP?)

An attack from a remote location to fake your IP address, as opposed to just using your IP address, is very difficult to pull off as it requires changing the Internet network routing tables. Otherwise, the network packets would go back to your machine, rather than to the attacker's.

An attack from the same area might work if your Internet IP address is a dynamic one, as most home broadband ones are. They may be able to bump you off your IP address if they're using the same ISP in the same area by timing a renewal of their IP address just as your DHCP lease expires, before your router manages to re-acquire it, but it isn't easy to do. It would probably be easier to hack into your network to do it, or indeed, to take over your machine.


Information Security learning I'm new in information security. I need some advices about how to start learning about this area. What are the courses I should take? From where can I start? Give me please an outline to pursue to learn about information security.

The Defensive Security Podcast put together an article on that topic - Entering The Infosec Biz.


Can a firewall appliance block http requests? Is it possible to use a firewall appliance as WAF? To make it more clear, lets think of a model like this:
Internet > router > Firewall > webserver
Can the firewall act as a WAF and block some special http requests according to some rule sets?
My question is about the possibility of this matter, maybe there are a few firewalls which can and many others that can't.

Yes. Conceptually, a firewall appliance (or a firewall application) will be able to distinguish between HTTP and HTTPS requests and, in the case of HTTP requests, will be able to view all the data being transmitted (not just the domain and IP). It can then block or modify any data going through. Not all firewalls have this capability, however. You will need to find one that meets your requirements.
You can also do this with HTTPS requests if you have a firewall that supports TLS interception, but then you'll need to install the firewall appliance's root certificate into your browser for it to trust it.


Upload malware to F-Droid repo? What's the auditing/vetting process like to get an Android app into the F-Droid repository? To ask it another way, what's to stop an evil developer from uploading a backdoored Android app to the F-Droid repos?

The "Security Module" as per the link below clearly states the following:

Their security precautions:

  additional security precautions are taken to make it as hard as
  possible to exploit this vector.

  included on the HSTS preload list, so major browsers will only ever use HTTPS for all connections to f-droid.org
  a strong TLS/HTTPS configuration
  a strong HTTP Content Security Policy
  PGP-signature on the initial install download link
  automated regular and random auditing that F-Droid.apk has not been tampered with
  F-Droid Limited controls many potential phishing domains like fdroid.org, f-droid.com, and f-dro1d.org.
  website is statically generated to greatly reduce the attack surface
  website is fully functional when Javascript is disabled in the browser, eliminating all possibility of XSS attacks

And as for the in-app application:

  Protecting against malicious contributor-generated data

  The app descriptions are submitted by all sorts of people, and they
  can also be taken from the app’s source repository. This data is
  ultimately delivered to the Android client or the user’s browser via
  f-droid.org.
  the Android client never runs CSS, Javascript, or dangerous HTML tags since it displays HTML via android.text.Html.fromHtml() with
  image loading disabled
  the f-droid.org website protects against malicious and CSS/HTML/Javascript injection with a strict HTTP Content Security
  Policy.
  Repomaker filters the texts through Mozilla’s bleach and has a good HTTP Content Security Policy.

Answering your question: (Reddit Source)

  As others have said, we don't audit every single app that makes it
  into the store. But we do make sure that everything is free software,
  and do test/investigate to a certain degree.

  There was recently a study made of the amount of malware apps in each
  app store for Android. I can't find it now, but IIRC it was a pdf and
  should have been published in the past year. Basically, what it said
  is that many alternative stores smaller than Google Play were close to
  having no malware, but only one had absolutely none: F-Droid.

  I guess what I'm trying to say is that we're not bulletproof, and we
  never said we were. Our only promise to the users is that the apks we
  distribute come from the source that is publicly available, and have
  been built and distributed by the F-Droid server tools which are also
  free software. So far, this policy seems to have worked well :)

Links:

https://www.reddit.com/r/privacy/comments/3cjj2e/how_secure_is_fdroid/ Reddit, Answering the OP's Question

https://f-droid.org/en/docs/Security_Model/ Source

https://f-droid.org/en/2018/09/04/second-security-audit-results.html Recommended


Is all data sent over SSH encrypted? When you are connected to another computer over SSH, is all data transferred between the two computers encrypted? Or is any data sent in plaintext or any other "easy to intercept" format?

For any protocol, you could come up with a definition of "all data" that would necessarily imply that something isn't sent encrypted.

For example, during the initialization and key exchange, the algorithm selection is public. Your average cryptographer will give you little more than a raised eyebrow if you complain about that fact though, since obviously it can't be encrypted as you haven't selected an algorithm yet.

Obviously something has to be sent unencrypted if for no other purpose than to set up encryption. But once the connection is secure, everything is secure. Once you have an encrypted channel, nothing from that point on is sent outside that channel. Furthermore, the protocol is extremely cautious to avoid sending any sensitive data before encryption is available. No username, no password, no identification of any sort, no indication of purpose, or any of that.

What little there is to decode is readily decode-able using common free tools such as wireshark. Fire up a packet capture, start an SSH session, and examine the exchange yourself. You'll see immediately what can be seen and what can't. Wireshark does a great job at decoding the protocol to allow you to view the internals of how it works.... to the extent that it's visible to someone watching the network traffic.

The typical flow looks like this:

SSH version/software identification
Key exchange init (algorithm selection)
Diffie-Helman key exchange (uses SSH host key to prevent MITM)
Everything after this is encrypted
User authentication (including user key-based authentication)
SSH Session now activate


Which encryption schemes have been designed without involvement from the NSA What are the main stream crypto algorithms that have been designed without known involvement from the NSA?

I know that twofish has been designed by Bruce Scheier, but which are the other independently developed algorithms?

Note that this is not a subjective question

How do you know that ole' Bruce Schneier was not covertly paid by the NSA to inject weaknesses in his designs ?

If you take the paranoid stance that NSA is powerful, aims at making encryption systems weak, and may resort to tinkering and bribery to that effect, then claiming that any specific system author is immune and obviously clean from such interference, is pure wishful thinking. For that matter, it would make more sense to believe that the AES itself, i.e. Rijndael, is "unmodified by NSA", for the basic reason that the Rijndael authors are not American, and thus less susceptible to NSA leverage than Bruce Schneier.

Note that I do not claim that Bruce was bought off; Heavens forbid that I accuse without any proof someone whose appearance is so uncannily similar to that of Chuck Norris. But I mean that you are not thinking your own question through. If your enemy can manipulate algorithms to include weaknesses "in plain sight", that hundreds of trained cryptographers miss, then you cannot trust any algorithm, regardless of its purported authors.

Now if you really want raucous gossip, rumour was, at the time of the AES competition, that the NSA candidate was MARS. Cryptographers did not like it, not because of its purported ascendancy (Don Coppersmith is a highly respected cryptographer) but because it was internally too complex, somewhat "inelegant", compared to nice regular structures like Rijndael or Serpent, where proper Science could be made much more easily.


Please help clarify password hashing - salted, multiple iterations of MD5 vs bcrypt/sha2, etc I was reading an article about the Ars Technica hack here and had a couple of questions. The commenter said:

  "PHPass uses salted and iterated MD5 to hash passwords"

My question is that if I were to design a new system, would using salted, multiple iterations of MD5 be considered acceptable, vs just using SHA256, bcrypt, etc? why would I use MD5, even this implementation of it, vs something considered more secure by the industry?

What is wanted first and foremost is a hashing algorithm that is slow.  Crackers crack password hashes by running password dictionaries and other combinations of characters through the hash algorithm to see whether the computed hash matches the one stolen from a database.  The slower you can make that process, the harder it will be to "reverse" your hashes if they're stolen.

Next, every password needs a different random "salt" concatenated with it before computing the hash.  The cracker who gets the password hashes will be able to get the salts, too, but the presence of the salt foils precomputation attacks.  Every hash must be attacked separately.

Finally, you should consider using a secret key not stored in a database as a component of the hash.  This is sometimes called a "pepper" and the result is a keyed hash.  The attacker who gets hashes through something like SQL injection will not be able to crack them because that secret key is needed.  (Of course, the attacker who compromises the OS can get everything, but that's significantly harder than just compromising a database.)

The question (and answer) noted by Xander have thorough coverage: How to securely hash passwords?  There's a good essay here: https://crackstation.net/hashing-security.htm and some more advice here: http://bitmonger.blogspot.com/2012/07/six-simple-rules-for-secure-storage-of.html


Is `iss` property in JWT tokens redundant? I'm reading up on some OpenID Connect documentation trying to get my head around the protocol. I came across the issuer property that is common in the JWT tokens. How come this is required if we should always check the signature of the token against the expected endpoint?
I understand that one can validate against either a symmetric or asymmetric hash, but validation is expected either way.
Have I missed an important feature of the JWT?

Think of the Issuer as kind of a namespace. Your subject, which identifies the principal, usually has some kind of id. If the id is simply an autoincrement integer from a database, it will most likely be not unique if you accept JWT from different issuers within one application.
Have a look at RFC 7519, where states uder 4.1.2: The subject value MUST either be scoped to be locally unique in the context of the issuer or be globally unique.
4.1.1.  "iss" (Issuer) Claim

   The "iss" (issuer) claim identifies the principal that issued the
   JWT.  The processing of this claim is generally application specific.
   The "iss" value is a case-sensitive string containing a StringOrURI
   value.  Use of this claim is OPTIONAL.

4.1.2.  "sub" (Subject) Claim

   The "sub" (subject) claim identifies the principal that is the
   subject of the JWT.  The claims in a JWT are normally statements
   about the subject.  The subject value MUST either be scoped to be
   locally unique in the context of the issuer or be globally unique.
   The processing of this claim is generally application specific.  The
   "sub" value is a case-sensitive string containing a StringOrURI
   value.  Use of this claim is OPTIONAL.


Why is DKIM configuration testing not working the same for every test site? basically, I have setup spk, dkim and dmarc for mail authentication. For this, I used this tuto. All worked correctly and I got this result:

seems like everything OK.

Now to confirm everything is working correctly, I have tried, on and another site (here), But seems like dkim does not work. I am new in this technology. I have read about dkim, spf, dmarc. But I have not practical experiment with it.

Why are these site giving a different result?
I am new in this technology I want to know Where I should start to solve this?

thanks in advance.

It looks like that you did not specify any DKIM selector on the second test site. And if the one you use for your site is not one of the several the test site tried then it will fail to check for a DKIM DNS record.

Apart from that the second test site seems to have more strict and non-standard requirements than the first site. While it successfully validated a domain I own with a non-standard DKIM selector it failed to verify DKIM setup on gmail.com with the current selector 20161025. The reason might be that my DKIM DNS record included the recommended (but not required) v=DKIM1 at the beginning while the record for gmail.com did not.


How to perform XSS in hidden HTML input fields using accesskey? I am trying to insert a XSS payload into a hidden HTML input field. I know it works with a script tag like below, but I am looking for other alternatives.

<input type="hidden" name="date" value=""/> <script>alert('0');</script>" />

I found this article, that says it can be done with the accesskey attribute:

  Eventually I learned about XSS through access keys from above article and wondered if the onclick event would be called on the hidden input when it activated via an access key.
  From articles I learnt, we can execute an XSS payload inside a hidden attribute, provided you can persuade the victim into pressing the key combination. On Firefox Windows/Linux the key combination is ALT+SHIFT+X and on OS X it is CTRL+ALT+X..

As of now I know it works with some type attribute value, e.g:

<input type="text" accesskey="X" onclick="alert(1)">

I was trying with a hidden field:

<input type="hidden" accesskey="X" onclick="alert(1)">

But this is not working for me in several browsers, assuming it might have been handled for recent browsers, so then also tried with some lower versions like firefox 4, but din work out.
Can anyone help with this?

After your injection, the resulting code should look like this:

<input type="hidden" accesskey="X" onclick="alert(1)">

For the payload to be executed, the user needs to press the access key combination for the hidden input field (for Firefox, Alt+Shift+X, see this for other browsers). If you want to make sure you are fireing the access key, you can switch from hidden to text to check that the field recieves focus.

I checked on Windows, and this does not seem to work in Chrome 62 and IE 11. However, it does work in Firefox 57. So while Firefox fires the onclick event when accesskeys are pressed, other browsers do not.

Here is a working example if you want to try yourself.

So why doesn't it work in Firefox 4? Since the behaviour here isn't consistent across browsers, it wouldn't surprise me if it's not consistent across different versions of the same browser either. Try my sample on Firefox 4, make sure that the access key is actually fired, and if it doesn't work thats pretty much it. You'll have to try to come up with something else. And why would you like to target such an ancient browser anyway?

Note that this is quite a limited exploit since it only works on Firefox and requires user interaction. I don't know if there is a better way to do it, but it looks like this is the best the good folks at Portswigger could come up with.


Password seal by paper or by password manager? At my current company, the IT Risk team decided to ensure root passwords of about 90 systems by the following conventional method:

The length of each password must be 16 characters, where they input 8 characters while the IT Infra team give the remaining ones.
Each team will print the partial password on paper and will seal it by envelope, so there are two envelopes to combine the whole password for each account
The authorized representatives will sign and seal envelopes. Unless there is approval from IT Security Officer, these envelopes cannot be unsealed or disclosed to anyone.

My question is that does this way seem so manual and time-consuming? I suggested using password manager, but no one shared the same idea.

This is not unusual for core passwords. Storing them in a digital password manager means that the password manager now has a password that needs to be protected. What do you do with that? Often through a paper process like you described. This type of paper process is normal.

What is unusual is the number of systems involved. A paper process works for a handful of core passwords.

What you might want to suggest, instead of a password manager, is a Privileged Access Manager tool. This will manage root and admin passwords in a variety of useful ways, like changing them every time they are used, etc.


How to securely delete a table in MS-Access? I have a Windows 7 computer which currently has a large working Microsoft Access 2007 database on it containing some tables with confidential data.  I would like to securely delete/remove the tables with the confidential data.  I'm looking for a good protocol on how to do this.

Does all the data live in the *.mdb file?

Should I be concerned about temporary back-ups made by Access while the DB is open?

I would also like to kill the backups managed by Windows 7 back-up.  Is there a good way to remove sensitive data from a Windows backup?

All data lives in the mdb, so once you delete the table, the data is gone.

The backups are going to be the tricky part. If you are using Windows 7 Backup, then you cannot selectively remove data without making the backup potentially unusable for a restore (unlike other backup solutions).

I would delete all backups, remove the data from the Access database, then perform a fresh Full backup of the system. I would also look for any backup media that would have the old mdb files and delete those, as well.

If deleting old backups is not possible, I would encrypt and physically secure the backup media.

All this is assuming that the removal of the confidential data will not break the database or the application relying on the database. I, personally, would keep a copy of the current database before deleting and let the application run for a period of time to determine the effect of the data removal. Then delete the one-off backup once I was sure things ran as expected.


Tor Browser: Could a website or ISP detect modification to DOM done by users if Javascript is disabled? I have Tor Browser (which is basically Firefox ESR) on "Safest" setting (Javascript disabled). We're generally scolded about using extensions in it, as they can alter web traffic patterns to or from your browser, adding another fingerprinting vector by distinguishing you from other Tor Browser users.
If JS is turned off even in vanilla Firefox, and I apply modifications to the DOM (like CSS mods, zooming in etc.) after the website has finished loading, I can't see how a website or ISP could detect what the user is doing in the DOM.
I know if you, for example, hide an element in CSS before it is fully loaded (such as the sidebar), the browser may skip downloading resources (such as icons) associated with the element. This would distinguish your web traffic patterns from other users. That's why I wait till the page is fully loaded (Edit: page is loaded in a default 1000x1000 window). I'm also careful to not trigger CSS media queries which can be set up to connect to a remote URL if triggered (or remove them first if they will be triggered).
I think the above should be enough to avoid distinguishing myself by my web traffic. Do you see any way I could be distinguished with only CSS & HTML?

You are assuming that distinguishing yourself from the others will only be done if Javascript is enabled. But, assuming that all but you have Javascript enabled , exactly disabling Javascript might result (depending on the site you visit) in a behavior which is clearly different from the other users.
Apart from that there are HTML features like responsive images or lazy loading where images are loaded depending on the size of the browser window or only when the image gets visible - without any Javascript involved. These can be used for fingerprinting clients and client behavior too.


WireShark and Facebook Some time ago i try Wireshark at my home local network just for see how it works. I scan the connection of my mac to the router and also to other external ips. The flow of connections were high when i was surfing on web and low when the browser was shut down. My question is: why also when all browser were turned off i was able to see some Facebook connection between my mac and their servers?

One possibility is that the connections haven't closed yet they are waiting for any delayed packets before they close completely(if they're CLOSE_WAIT(Facebook closed the connection) or TIME_WAIT(You closed the connection), these connections will typically close on their own within 5 mins.

Another possibility is that your browser keeps some tabs JavaScript running after closing because of a feature or a bug. A good test for that is to look in your task manager for anything related to your browser.


SHA-1 deprecation and impact on self-signed certificates What the impacts of the SHA-1 deprecation will be on internal/intranet self-signed certificates?

Will this impact/stop internal/intranet HTTPS service such as web interfaces?

As an organization, you typically have control on the policies implemented in your infrastructure, this includes policies governing the behavior of client software regarding certificate handling.

I am assuming you discuss the classic browser - web service relationship. With this in mind, take a look at the two main player's statements on this matter:

https://blogs.windows.com/msedgedev/2016/04/29/sha1-deprecation-roadmap/

https://security.googleblog.com/2014/09/gradually-sunsetting-sha-1.html

Even so, depending on the type/version of your clients, enforcement of bypass policies may be possible. Not that this would be an advisable course of action.


Should I take over a compromised website from another hacker? A website (www.blue*****art.com) is trying to attack my server using the Shellshock vulnerability. After doing an Nmap scan on the attacking IP address, I found many open ports. It looks like the website is running Exim, which is vulnerable to GHOST.

The website in question has not been maintained for the past three years (from copyright date, Twitter and Facebook status); possibly the owner passed away. A check with Sucuri shows that it is currently not blacklisted, because no malware has been found.

Should I retaliate by taking over the website from the hacker and shutting it down to stop it from scanning other people's computers?

Not if you want to stay out of trouble.

What you are suggesting is vigilante action, and most legal systems do not look kindly upon that. Even though you may feel you are protecting other, less tech-savvy people, it would probably still constitute a crime.

What you could do, is try and find out if there are authorities to warn. This could be the hosting provider, the registrar, or the police of the country where the website is hosted. Or, if you believe the site has been hijacked, find either the owner or their remaining relatives.


Storing Bank Account information or third party services providing data store and payout service I am going to launch a website in India which would need users bank account numbers and IFSC for me to pay some money to them. I am concerned with the security and safety in storing such information.

Is there any best way to do this? I have already read so many questions about this which talks about so many options but no one recommends the best.

Some posts talked about using third party payout processors but I couldn't find any such service.

Can someone please suggest a good option?

A good option: don't do it.

The advice sounds dumb and you may have seen it in the posts you read but writing a secure application is not easy, you need to take zillion things into account.

Writing a secure application which will store sensitive financial information is not only difficult, but you now may run into liability issues. Depending on the country you may be responsible for losses of your customers after someone has hacked into your system.

You could either use some hosters which give you the ability to build an e-commerce site and maybe start from there, or have a reputable company writing it for you.

If you really, really want to do it yourself, start with OWASP. You also want to have a look at PCI-DSS. It is not exactly relevant in your case but the PCI-DSS SAQ-EP is interesting, it will hive you a hint on what is expected for e-commerce applications.

But really don't.


How did GamerFood hack the Starcraft IEM Taipei Tournament? During the recently completed professional Starcraft tournament, Intel Extreme Masters (IEM) Taipei 2015, the notorious cheat software company Team Gamer Food hacked the cast somehow. How did they do it? I have included a screen shot below showing the hack:

Just to give the background on this for people unfamiliar with the domain, for some time now Gamer Food has been hacking CounterStrike and Half Life tournaments with advertisements. The way they do this is by setting up private servers with names very similar to popular servers. If you play on their server, they use admin privileges to replace your configuration. The substituted configuration then changes your keybinding, so you click the wrong key and bam ads start appearing on the screen that everybody sees. Doing this they have been a plague on pro CounterStrike tournaments and other FPS venues.

HOWEVER, Starcraft does not work like this. There are normally no private servers. Everyone uses Blizzard servers, so the FPS private server trick does not work.

So, the question is how are they doing it?

It looks like observer chat so I would guess it is most likely the result of a password compromise. Either the tournament password or one of the official observer accounts used to televise/stream/shoutcast the game.


How do you scale threat modeling? Small threat models are relatively easy to build but building and maintaining a threat model that contains a few dozen components becomes difficult pretty quickly.

What tools do you use to collaborate across teams to build and maintain large threat models?

Specifically looking to address the needs of:

a highly distributed organization
a system that does not have clear separations of concerns that can be allocated to a single team

The same tools that they use to build and maintain large complex features: version control, engineering process artifacts (like specs and architecture overviews), and bugs/task/issue tracking.

So let's say Alice does a STRIDE analysis and finds a set of spoofing issues.  As part of doing that, she adds some trust boundaries to an architecture picture, and updates the version in the wiki.

She documents the set of threats and checks it in as a .txt file next to the code for the component.  Some apply to her component and become issues to investigate, some apply to Bob's component, and so she opens bugs for him, and some are unclear, so she shoots off an email which leads to a discussion meeting.

(This is a pretty broad question, so if my answer isn't helpful, let me re-frame your question a little: What tools do your teams use to collaborate across their large projects, and in what ways do those not work for threat models?)


When storing private identifying information in a web application, what is "industry standard" best practices? I am building a hosted (SaaS) web application that stores PII like name, email address, and employer of the user. As of right now, I don't intend to ever store credit card numbers or bank account numbers or social security #'s, etc.

I would like to be able to claim that my service follows "industry standard" security practices, but I am a bit unclear what this means today. For example, is a password hashed by SHA-1 or MD5 that is properly salted still considered industry standard and acceptable?

In general, what guidelines do people follow to determine "industry standard" practices from all angles so 1) you are adequately protected from malicious activities and 2) won't get hammered in court if you ever get sued over a data leak.

Also, how does this change if you store more sensitive PII like a social security #?

If you are not using credit cards, or similar information, you (thankfully) do not need to consider PCI-DSS compliance.

For general 'industry standards' based security for web hosting, look to OWASP:

https://www.owasp.org/


CSR expiry date / validity date If I create a CSR with openssl and set the expiration day to 5 years is it possible that the signing CA will set the expiry date to say one year ? Which one takes precedence ?

EDIT: ok, I think the answer from the StackOverflow post answers the question

Extract requested validity period from a Certificate Signing Request using OpenSSL

  I've been trying to figure out how to request a specific validity period in a CSR, and as far as I can tell, the CSR simply doesn't carry that information. The CSR's structure is defined in PKCS#10 / RFC2986, and it doesn't have a field specifically for a requested validity period. The attributes and extensions that can be put in the CSR are listed in PKCS#9, and there's nothing there about validity periods. And finally, I can do a openssl asn1parse on my generated CSRs and find that there's no validity-period-related information included regardless of what I pass to openssl req"

Correct. The relevant standard is the X.509 spec in RFC5280:

  4.1.2.5.  Validity

  The certificate validity period is the time interval during which the
     CA warrants that it will maintain information about the status of the
     certificate.

Basically, as the certificate requester, you have absolutely no say in the validity period of your cert, this is 100% at the discretion of the CA.

To get an intuition for why this makes sense, consider the other use that X.509 was designed for: S/MIME email certs in a corporate environment. Clearly your corporate sysadmin gets to choose how often you roll over your keys, not the end-user.

This philosophy applies to web TLS certs in that CAs have a responsibility not to issue certs valid for a longer period that it will take to crack them (imagine someone requesting a 10-year cert for an RSA-1024 key). This responsibility is governed in part by the CA/Browser Forum. For example, see this CA/B requirement:

  What are in the Baseline Requirements?

  Validity period for certificates issued after July 1, 2012 must not exceed 60 months and issued after April 1, 2015 must not exceed 39 months.

In practice, each CA has a fixed validity period for all certs it issues, though some CAs will issue longer certs at an increased price.


How can Twitter and GitHub be sure that they haven't been hacked? Yesterday, Twitter anounced that they recently identified a bug that stored passwords unmasked in an internal log. Recently, Github also had a similar bug. In both cases, they claim that nobody had access to these files.

Twitter:

  We have fixed the bug, and our investigation shows no indication of breach or misuse by anyone.

  Again, although we have no reason to believe password information ever left Twitter’s systems or was misused by anyone, there are a few steps you can take to help us keep your account safe:

GitHub:

  The company says that the plaintext passwords have only been exposed
  to a small number of GitHub employees with access to those logs. No
  other GitHub users have seen users' plaintext passwords, the company
  said.

  GitHub said it discovered its error during a routine audit and made it
  clear its servers weren't hacked.

  To note, GitHub has not been hacked or compromised in any way.

How can Twitter and GitHub be sure that they have not been hacked or compromised in any way?
Would someone who is compromising a server and read/copy a file always leave traces?

They can't be sure. In fact, you can never be sure you haven't been hacked. But a thorough examination can make you conclude that it is more or less likely.

The Twitter statements only says that there is no indication of a hack. That doesn't exclude the possibility that they were hacked, and in urging their users to change their passwords they implicitly admits that.

As for GitHub, the wording is a bit more categorical. But I think forcing a password reset shows that they understand the risks involved.


Can a badly configured AppArmor profile reduce security? Can a badly or even maliciously configured AppArmor profile reduce security, or can it only improve it? I read that apparently AppArmor cannot override unix file permissions, so it shouldn't give a user more read-write-execute permissions than those they already have, but I'm not completely sure of this. I'm also not sure what a profile can do with all other options, including maybe less known options. So I wonder if an AppArmor profile can only add restrictions and therefore always increase security of an application (maybe even at the expense of usability), or if it can also make the application less secure than it would be by default, maybe giving it more privileges than it should have. The answer to this question might help me to understand if I can trust profiles written by others, or trust myself while I'm learning to write profiles.

Note: I found this related question ( Can too restrictive Linux MAC policy decrease security? ) that partly answers my question, although I wouldn't consider it an exact duplicate because what I'm asking seems a bit more general.

You are asking, whether maliciously or very badly written AppArmor profile can reduce security. Considering this question already states, that you can indeed reduce security using restrictive MAC, using restrictive AppArmor can obviously also decrease security in all the same ways, possible in some additional new ways as well. So YES, it indeed can decrease security.

As for giving processes additional permissions, I am reasonably certain it can't. Unix permissions (DAC) are checked separately before MAC, so it should be impossible to override them.


Obfuscating JavaScript code Some Flash developers are afraid of JavaScript. Their point of view:

Stealing JS source code is effortless, one would just 'view source' and copy it. Yes, you can decompile Flash bytecode, however it requires more time and knowledge. As a result, JavaScript is not suitable for commercial software development, because competitors will steal the code and put the original developer out of business.

Does obfuscating JavaScript code make sense when developing commercial web applications?

Are there any obfuscation techniques that actually work? Are large companies like Google obfuscating their web application code. For example are Gmail or Google Drive somehow protected?

I think the operative word in the question here is "afraid."  The aversion is based on fear, not fact.  The reality is, the threat model isn't particularly realistic.  Commercial web software development companies nearly universally use JavaScript these days, obfuscated or otherwise, and I challenge you to find me even a single example of one that's had it's JS stolen by a competitor and then been driven out of business because of it.  I'm quite confident that it hasn't happened, and isn't likely too.

Too your second question, do companies like Google obfuscate their JavaScript?  Yes, but not for security!  They obfuscate to minimize the size of the code, in order to reduce the download size and minimize the page load times.  (See the Google Closure Compiler.)  This is not necessarily how you'd obfuscate for security because the only goal is to minimize the number of bytes that have to be delivered to the client.   This is what you should be focused on with JavaScript, not worrying about whether someone will be able to read it or not.


How safe is FireFTP? After a bad experience with FTP credentials hacking I decided to start using SFTP and stop having FTP credentials stored in clear on my computer (Filezilla).

I now use FireFTP which encrypts credentials. However I was wondering how hard is it for a hacker to hack FireFTP credentials file?

Encrypted is certainly better than plain text.

Storing a password in the app, however, still has some issues in my mind. By doing so, you are essentially allowing anyone with control of your computer (the "hacker" in your question) to access your FTP server without credentials.  At that point, they really don't need to decrypt your passwords at all... They can just log in and compromise the files on the server without ever knowing the password.

My recommendation is always to use a password manager that supports 2 factor authentication.  Store your passwords there instead of within various apps written by various persons using varying levels of encryption.

Or use keys as @shadur pointed out in comments above... Protected with a pass phrase.


is it possible to detect zigbee traffice via wireshark? if yes , how? I have a zigbee access point. I am not able to detect its network. Also, unable to capture its traffic using wireshark like we capture wifi traffic. Can someone tell me what should be done to analyse the zigbee traffice

Wireshark does have decoders for IEEE 802.15.4, upon which, ZigBee is based. Before you can analyze the traffic, however, you do need a mechanism to capture the data.

You will need to acquire hardware that can capture the correct frequencies. 802.15.4 devices may use one of three possible frequency bands for operation (868/915/2450 MHz) and ZigBee operates in the 2.4 GHz, 784 MHz, 868 MHz, and 915 MHz ranges.

The are some dedicated hardware devices that can capture ZigBee traffic. Wireshark describes the following products:

IEEE 802.15.4 Wireshark USB Stick at € 199.
Exegin Q51 IEEE/802.15.4 ZigBee Transceiver at $500.

The are some other products not mentioned on the wireshark page:

Sewio UWB Sniffer at $500.

You may also be able to use a Software Defined Radio (SDR) to capture and decode the traffic. The HackRF device can cost around $330 but I couldn't find any documentation describe the decoding of 802.15.4.

A Presentation from Joshua Wright describes a KillerBee, a ZigBee exploitation framework. The presentation recommends a AVR RZ Raven USB Stick (RZUSB,
$40) for sniffing 802.15.4.

The KillerBee Framework includes a program called zbdump which has the ability to output to libcap format files, so you can then use wireshark to analyze it.


There are many ports opened by system on a Windows 8 computer - are the system files modified? There are many ports opened by system on one Windows 8 computer:
PORT      STATE SERVICE      VERSION
135/tcp   open  msrpc        Microsoft Windows RPC
139/tcp   open  netbios-ssn  Microsoft Windows netbios-ssn
445/tcp   open  microsoft-ds Microsoft Windows 7 - 10 microsoft-ds (workgroup: WorkGroup)
49152/tcp open  unknown
49153/tcp open  unknown
49154/tcp open  unknown
49155/tcp open  unknown
49156/tcp open  unknown
49157/tcp open  unknown

The 4915x unknown ports are opened by system programs like svchost and wininit.
I think these ports should not be opened, since that:

This computer has not be set to be visited remotely.
I scanned another Windows 8 computer recently, in my memory there are no or very few open ports.

Is this normal? Are the system files modified?

I think this computer is connected to domain environment domain controller should be 2008 R2 or higher version. Therefore these ports are needs to open in client side. Sometimes computer might be previously connected to domain and changed to work-group.
Read this Article.


How to restrict access to API in Azure API Management to known applications? We need to create an API in Azure API Management and allow only known, registered applications to call it.  We can require authentication, which restricts access to only people in our AAD, but how can we ensure that only certain applications can call the API?  I know (a little) about clientIds and secrets, but those are  submitted from the client, which means they can be grabbed and used, for example, by someone knowledgeable and using Fiddler.  We need all AAD users to be able to use the applications, so we can't restrict by user, and we need these accessible both on and off the corporate network so can't restrict by IP address.  What can guarantee that our API is only accessed by the applications we designate?

Short answer: you cannot.
As soon as you ship a secret to the client, the secret is not secret anymore. No matter how many layers of obfuscation you employ, if the application somehow have access to the secret, the attacker have access too.
The only way to protect the API is to only run it server-side, and offer the service for your clients from the server.