Does Hardware TPM have TAB/RM component？ Firstly I am not sure if this is the right place to ask this. If anyone has any idea of where this question belong please tell me.

Recently I was reading about TPM and TSS(TPM Software Stack). The diagram in this document -- TSS TAB and Resource Manager Specification shows the structure of the stack. In my understanding, the TCTI and stacks above is in the library to communicate with TPM; where TAB and stacks below TAB are in the real TPM or virtual TPM device. But I am not sure if my understanding is correct.

My question is: Is there a TAB/RM component (or component with similar responsibility) in a real TPM device? Or does tbs/some modules in OS take this resposibility?

Thank you!

No, the TAB/RM is a software component.

The TPM is a really constraint device with little memory (e.g. few key slots). To solve that problem, there is a TPM Access Broker/Resource Manager (TAB/RM) which automatically saves excess TPM data (encrypted) on your hard disk and loads it into the TPM if needed.

When you're on a linux machine, you might have noticed that there is a /dev/tpm0 and a /dev/tpmrm0. The tpm0 provides direct access while the tpmrm0 uses the TAB/RM (which is part of the linux kernel) to simplify your life. The interface is the same, btw, that is talking to the TAB/RM is like talking to a TPM with infinite resources :)

The TCTI, SAPI, ESAPI and FAPI layers are indeed libraries. They are all provided by this open source implementation.

For completeness sake: there is not only a in-kernel TAB/RM, but also a user space TAB/RM implementation doing the same thing. You can install it e.g. if your kernel is really old.


How to properly implement TLS on an ejabbered server The official ejabbered documentation instructs the user to generate a self-signed certificate like this:

openssl req -new -x509 -newkey rsa:1024 -days 3650 -keyout privkey.pem -out server.pem
openssl rsa -in privkey.pem -out privkey.pem
cat privkey.pem >> server.pem
rm privkey.pem

That is based on the jabbered 2 documentation.

The first thing that caught my attention was the small key size. However, what concerns me more is that they are combining the public and private keys. Isn't the certificate (which in this case contains the public and private keys!) presented to the client upon connection, or does Jabber work differently somehow? How can I impliment TLS on ejabbered securely?

On the connection, the server will send only the certificate (the public part). However, the server needs both the public and the private key to work. The server code expects to find both object in the same file (in the file, both are encoded in Base64 with explicit PEM headers like "BEGIN CERTIFICATE" and "BEGIN PRIVATE KEY", so the server code has no trouble finding out the certificate and the private key).

If unsure, run some network monitor software like Wireshark to see what is actually sent on the wire (observing in details a TLS handshake is a very good pedagogical experience which is highly recommended anyway).


How do you discover what permissions an AD group has, if you have no documentation? You just got hired at company A and the old administrator is no longer there. Requests start coming through for adding users to the internet restrict group. When you look at the groups none of the names make sense and there is no documentation out there to explain what each group has rights to and what it does. That would raise concern to me. For security how do you know if everyone has the correct rights.

How would you discover what the groups have rights to? Is there a tool out there that will find this information for you?

Let me preface what will probably be a longish answer with "There is no simple solution".
Solving this will take some strategic work (which is why I recommended not moving this to SF).

Now I will explain why.

Windows, at its core, is mostly based on the DAC model of access control.
Everything in the OS is securable with an ACL - files, folders, registry, named pipes, sockets, shares, etc etc.

Using AD groups allows you to abstract that into an RBAC-type model, but internally it's still a DAC model. (What I mean is, you can create an ACE (access control entry) for a group (i.e. role), but you're still creating an ACE - and that is what will be verified on access).

Emphasis on "mostly".
There are a few distinct exceptions to this:

There is some implementation of MAC - i.e. Integrity Levels (in Vista/7/2008).
However, this is usually and internal OS protection mechanism, and is usually not leveraged for real access control (other than the built-in UAC). Usually.
OS-level privileges. (Though it is possible to specify a specific user to grant these privileges to, it is intended - and functions as - a RBAC model).

But wait, that's just in the OS itself...
Windows, as a platform, allows and encourages applications (3rd party, MS products, and OS addons) to use AD group membership as an RBAC mechanism:

3rd party applications can verify group membership via a simple AD/LDAP lookup - these apps might be storing the group name and resolving on that, or saving the group's SID and querying directly for that.
Don't forget SQL Server - this is mainly based on (several different types of) roles, however best practice is usually recommended to add AD groups to these roles, and not the users directly.
As long as we're at it, COM+ also manages access by RBAC, but again best practice is to add groups, not users, to COM+ roles.
Sharepoint also manages access to sites according to roles / groups / and mailing lists...

Starting to see my point?
I don't want to say it's hopeless, BUT...

To recap:
In order to find the definitive list of permissions a specific group has, you (or a tool) would need to recursively check ALL of the following (and, dont forget to recurse on group  membership, too):

For each server in your org:

recursively check ACL on all folders and files
recursively check SACL on all folders and files  (system access control lists - these control auditing)
recursively check owner on all folders and files
recursively check ACL, SACL, and owner on all registry keys
recursively check ACL, SACL, and owner on all named pipes, processes and threads, services, jobs, etc.
Check all OS level privileges (though it is possible this can be made easier using GPOs...)
Check all COM+ roles, MSMQ roles, etc.

For each domain in your AD:

Check all domain-level privileges
check all GPOs (group policy objects)

For each database server:

Check all server roles
check all database roles
check all application roles (in MSSQL)

For each Sharepoint portal:

check all server-level roles and privileges
check all site-level and list-level roles and privileges

For each 3rd party application:

Check any use of AD groups
verify how the app uses these roles:
-> Group name vs. DN vs. group SID vs. ... e.g. group GUID
-> does the app explictly check direct role membership, or does it use the "smarter" recursive methods?
Note that this applies both to 3rd party packaged products and platforms (e.g. Oracle, SAP, MQSeries, WebSphere... ), and to custom developed business apps.

Is this complete?
Sadly, no. For example I didnt include reviewing all desktops in the org, since those shouldnt have specific AD-group level permissions set on them (except for e.g. Administrators and HelpDesk) - but note that they often do.
But this is not a complete list...

This is the big disadvantage to using a DAC model - the "D" could just as well have been for "Distributed", since there is not central place to look up all these ACLs.
As I noted in What is the difference between RBAC and DAC/ACL?:

  DAC definitions are typically attached to the data/resource, whereas RBAC is usually defined in two places: in code/configuration/metadata (the roles access), and on the user object (or table - the roles each user has).

Now, a little about solutions:

There are several tools to collect different parts of the above lists, e.g. @Ian's answer using powershell scripts to collect folder ACLs. There are many other tools for that (I've been known to use CACLS in the past), some are noted here.
For requesting a tool/script for a specific part of the list, you might get better ideas at ServerFault.  However take into account that it's only one part of the list.
There are "role management" and "role discovery" products out there, from some of the big vendors, usually in the Identity Management space - I cant specifically recommend one, but worth looking into: CA (formerly Eurekify which was a decent (though not complete) tool), IBM, Oracle.
Of course there are others, and I would lean heavily towards finding best-of-breed smaller vendors, even from a startup (okay, maybe I am biased ;) ). I mean, from those that havent been bought out by the bigger vendors.
You could (and probably should, though this is far from trivial) start the process of mapping out the organization, business requirements, and such - aiming for what privileges they should get, and not just what the status quo is right now.  Some of the tools mentioned in the previous point could help here.
If the previous roles analysis and modeling goes well, consider going for a full-blown IdM/IAM/EAM solution. Again, my comments wrt vendors still stands.
In any event, aim towards minimizing the distribution of ACLs all over the place, and push for minimal RBAC, centralized as much as possible.

And, a final word of warning to those who are lucky enough to be before the unpleasant situation you currently find yourself in:
Definitely look into a centralized authorization platform, such as IdM/IAM/EAM products. (Note that some are much better than others, and some wouldn't even solve this situation either.)

tl;dr: You are rightly and truly screwed. See above. ;)
(but all hope is not lost...)


understanding the point of VPNs I can't really understand the concept of VPNs, since we already have various secure transmission protocols.

Isn't the point of VPNs that people using its 'channels' can send encrypted data to each other?
At the end, isn't it just one client and one server trying to exchange data securely?
We have SSL/TLS for that and many other secure data transfer methods, don't we?

What s the point of using a distinct client software, server software, etc... to access the private network?
What am I missing?

A private netowrk is a network consisting of cables and computers which are physically separated from the rest of the World. This makes for good security, and, furthermore, convincingly good security (having security is part of the goal, but you also want to know it).

A VPN is the cheap emulation of a private network: the wires are still linked with the Internet; the isolation is done with mathematics (cryptography) instead of physics.

Compared to "secure transmission protocols" (which work), the good point of a VPN is that it works at the OS level: as the system administrator, you configure the VPN once, and it protects the data transfer from all the applications, regardless of how poorly these applications were designed. Doing a proper SSL/TLS is not easy; for instance, many applications don't check for certificate revocation. Even if applications do the work correctly, going through the configuration of all of them is tiresome. A VPN saves time, so the sysadmin can more easily concentrate on ongoing attacks or other crucial tasks like resetting users' passwords or "continuous Internet-based training" (aka Websurfing).


At what point does "hacking" become illegal? (US) Hypothetical situation:
before I hire a web development company I want to test their ability to design secure web apps by viewing their previous client's websites.

Issue:
this situation raises a big red flag: with regards to viewing a website, what is and is not within the breadth of the law? Or in other words: at what point does poking around a website become illegal?

View Source with Firebug? Naturally that would be legal.
But what if I change HTML (like a hidden form value before submission)?
Perhaps I then edit or remove JavaScript, like a client side validation script. Would that be legal?
What if I put %3Cscript%3Ealert(1)%3C/script%3E at the end of the URL.
Or perhaps I type the URL: example.com/scripts/ and I'm able to view their directory due to faulty permission settings?
What if I manipulate data passed in HTTP headers, for instance a negative product qty/price to see if they do server side validation (naturally, I wont complete the checkout).

To me, all of this seems perfectly harmless because:

I'm not causing undue stress to their server by spamming, mirroring the site with wget, or injecting potentially dangerous SQL.
I'm not causing any potential loss or monetary damages, because I wont ever exploit the vulnerabilities, only test for their existence (proof of concept).
None of my actions will have any implication for user data privacy. In no way would any of my actions potentially reveal confidential or private information about anyone.
If I did find anything I would immediately notify the webmaster of the potential exploit so they could patch it.

But even though I am logically able to justify my reasons for testing the site, that does not necessarily make my actions legal. In fact, cyber laws are notoriously backwards in the United States, and even the most laughably trivial actions can be considered hacking.

Questions:
Is there a defined line in the sand that separates illegal hacking from "testing without permission"? Or is this whole scenario a grey area that I should avoid (likely the case). Are there any linkable online resources that could expand my knowledge in this wholly grey area? What are the specific acts or laws that handle this?

Please keep in mind that the number one most logical choice would be to simply: ask for permissions. However, due to heavy time constraints, by the time I would get permission it would all be for naught.

The law is unclear. Anything you do, no matter how innocent, could be considered a crime. All the website owner has to do is say "I didn't want that to happen", and you could be convicted of a crime.

Before donating to a tsunami relief website, Daniel Cuthbert typed in ../../../ in the URL. He was convicted of "intent to hack" (in the UK).

Lori Drew was convicted of hacking MySpace, because she violated MySpace's terms-of-service by creating a fake account, that was later used by her 14 year old daughter to harass another girl, who later committed suicide. The convictions were overturned later, and the government decided not to appeal - but it's still an experience to avoid.

Andrew "weev" Auernheimer was found guilty of identity theft, because AT&T provided customer account info for early iPad owners on their website, and he wrote a script that just enumerated the URLs and download them.

Brian K. West was threatened with prosecution because he clicked on a button labelled "Edit" on a newspaper website -- and was surprised to discover that this allowed him to edit the actual web page.  After reporting the problem to the newspaper, the FBI investigated him (including searching West's workplace and seizing some materials) and a prosecutor apparently threatened him with a felony prosecution.

In a recent case, it's been found that when you cause an inbox to fill up with spam, thus DoSing it, you are guilty of "hacking" it as defined by the Computer Fraud and Abuse act.

I do all the things you describe. There are lines I won't cross: I'll test for SQL injection, but I won't access the database. But I do this because I can afford high-priced lawyers to defend me. Also, I won't do things that are stupid. For example, Daniel Cuthbert was convicted of "intent to hack" because he kept changing his story when asked why he did it, so the court didn't believe any story.


Certificate Thumbprint / Hash Question If I'm on a domain and I see that the cert tree is the following:

Root CA
Intermediate CA
Site Cert

But then if I implemented a domain wide policy to install a root cert in all browsers it would then look like: (Assuming this, I've never done it)

Domain Root CA
Root CA
Intermediate CA
Site Cert

Would it change the thumbprint//hash of the site cert?

Thank you.

No, this would not change the hash of the site's certificate.

The thumbprint is part of the X.509 container that is essentially an immutable transaction log entry that you get to keep with you.  It was signed by the CA when you submitted the certificate signing request (The intermediate it looks like.)

Adding another Certificate Authority to local machines cert stores would have no effect on that hash.


Finding Windows API Vulnerabilities Currently I'm reading about the Windows API's like CreateProcess and others.

Also I took a look into the Source of the Powershell Script which used the MS16-032 vulnerability.

My Question is: Which ways can you take to find such vulnerabilities in the API's or general to find things like this?

I watched Videos about Windows Kernel vulnerabilities, but can't find any good Documentation where this is described.

Userland:

understand how the Windows native API works, e.g. something like (and probably not accurate): ZwCreateProcess -> NTCreateProcess -> CreateProcess
https://undocumented.ntinternals.net/
https://www.google.com/shopping/product/10794697035904501181?q=native+api+book&biw=1486&bih=811&sa=X&ved=0ahUKEwjFzNPlkLLWAhVkJcAKHdwGDRYQ8wIIgwMwAA

Windows Internals:
https://www.amazon.com/Windows-2000-Native-API-Reference/dp/1578701996

You'll also want to know x86/x64 calling conventions (STDcall), e.g. how arguments are passed and return values.

Last, what the OS expects and how the return values are used.

Ring0:

Uninformed.org has a good writeup:
http://uninformed.org/index.cgi?v=10&a=2


Do these packages indicate nefarious activities? Being security paranoid, I could help but notice that in my autoremove list that there were two packages I did not immediately recognise and was immediately suspicious of:

The first one was obviously a rootkit checker and it was something I had previously had installed. But the other two I did not recognise and their stated purpose has given me cause for alarm:

  (admin): active password cracking tool - character sets

http://packages.ubuntu.com/search?keywords=john-data

And furthermore:

  John the Ripper is a fast password cracker, available for many operating systems. Its primary purpose is to detect weak Unix passwords, although Windows LM hashes and a number of other password hash types are supported as well. John the Ripper is free and Open Source software, distributed primarily in source code form.

http://www.openwall.com/john/pro/linux/

Seeing as I have never installed any security software designed to detect weak passwords, and I have never installed a password cracker before (and why even on my own machine?), do I have to seriously consider this to be particularly nafarious?

I might add for context I'm in proceedings with the Investigatory Powers Tribunal over illegal surveillance from GCHQ and the presence of a password cracker (which has to be the second weirdest thing within the last two weeks, the first being a phone call from Palestine/Israel) has me particularly unnerved, especially given I am unaware of any particular packages that would require a system to expose vulnerable packages.

Should I consider this nefarious, or am I mistaken?

[My sudo password has already been changed in light of this.]

John is not typically run on victim's computers. It has two uses. First, an attacker runs john on their computer to try and crack a victim's password. Second, a sysadmin can run john locally to look for weak passwords. So I wouldn't assume that you've been hacked just because john was installed.

From the message in your post, it looks like you installed some package X that required john and then subsequently uninstalled X. Now the system is offering to clean up for you.

Exactly what package X was is impossible for me to know. Perhaps someone on AskUbuntu knows how to do some package history magic so that you can recover that information.


How to stop/detect someone else registering a certificate for my domain With the proliferation of low-cost automated CAs what can be done to mitigate the attack of someone doing a spear phishing attack to get a login to our webmail system, then using an automated service like RapidSSL to issue a new certificate for widgetco.com to OverlyTrustingReceptionist@widgetco.com?

I am sure some eyebrows would be raised at RapidSSL, if someone like google.com requested a certificate. Is there anything I can do too?

This is really a matter of each CA's policies.  Most of them require proof of ownership of a domain before issuing a certificate.  Even with cheap CAs this usually involves either verifying an e-mail can be received by a WHOIS contact or making entries in the DNS records for the domain.


How do I prevent my twin sister's "pulled from public record" information from being used when I try to answer security questions? Several times in the past months, I have been asked security questions that are "pulled from public record" to verify my identity, either over the phone or on a website (Chase Bank, Walgreens Pharmacy, and a credit card company are just a few of the institutions that have used this process with me.)  The problem is, I have a twin sister, and half the time the questions are about HER.  How can I prevent this from happening?  It had led to me "failing" the questions and not being allowed access to accounts that belong to me.  Any insight that anyone may have would be helpful, and i can't imagine I am the only twin that is discovering this frustrating issue!!

Typically "Public Record" is your credit record or your past dealings with the company in question. The solution is to fix the source. Get a copy of your credit report and check for inaccuracies. If the details are incorrect, get them fixed. Additionally, once you've authenticated with the company, go over the inaccuracies with them; they may be able to correct inaccuracies in their own records. ...Or maybe not; unfortunately, if a problem is uncommon enough, there may be no provision for dealing with it. But at the very least, you should try to find someone with the authority to fix their records.


What type of encoded text is this and how can I translate it? I have no experience, but I've been playing a game and it's rather interesting.  One of the character files has a long line of scrambled text and I was wondering if someone could tell me if it's cipher and if you could nudge me in the right direction of solving it. Here's a pastebin link, but if you don't want to open it I'll put a few lines of it here:

SWYgeW91IGZvdW5kIHRoaXMgbm90ZSBpbiBhIHNtYWxsIHdvb2RlbiBib3ggd2l0aCBhIGhlYXJ0IG9uIGl0LCB0aGV
uICpjb25ncmF0dWxhdGlvbnMhKiBZb3UgYXJlIHByb2JhYmx5IHRoZSBmaXJzdCBwZXJzb24gdG8gcmVhZCB0aGlzLi
BJIGRpZG7igJl0IHJlYWxseSBwbGFuIG9uIHNoYXJpbmcgdGhpcyB3aXRoIGFueWJvZHksIGJ1dCBmb3Igc29tZSByZ
WFzb24gSSB0aGluayBpdOKAmXMgZXhjaXRpbmcgdGhhdCBzb21lYm9keSBvdXQgdGhlcmUsIGEgY29tcGxldGUgc3Ry
YW5nZXIsIHdpbGwgY29tZSBhY3Jvc3MgdGhpcyBub3RlIGFuZCByZWFkIG15IHN0b3J5LiBTb21lb25lIEkgd2lsbCB
uZXZlciBtZWV0LCBzaGFyaW5nIHN1Y2ggYSBwZXJzb25hbCBib25

Since this looked like Base64 encoding, I opened the first online encoder/decoder tool from Google (https://www.base64decode.org/) and inputed your string. After decoding, got this result:

  If you found this note in a small wooden box with a heart on it, then
  congratulations! You are probably the first person to read this. I didn’t really plan on sharing this with anybody, but for some reason I
  think it’s exciting that somebody out there, a complete stranger, will
  come across this note and read my story. Someone I will never meet,
  sharing such a personal bon

As said, this is encoding, not encryption. Both of the techniques obfuscate clear text but the purpose of encoding is to protect the message from bad parsing, meanwhile the purpose of encryption is to hide it from someone who is not supposed to read it.


Detect what is running on an open port? I have a wireless camera in my network. Running nmap on the camera, I discovered that the port 1010 is open but I could not find what it is used for. I looked in the administration pannel and did not find any application that was configured to use that port. With nmap or wireshark, it is qualified as "surf".

I can connect to it using telnet, it works but I don't have a shell (so not a telnet server), I tried to send GET or HELO message but I had no reply. I tried using usual applications as ftp or ssh.

Is there any tools to detect what service use this port ? Any other request than these two I can test ? I am wondering what it is used for and if there is any risks with it.

You can try nmap with nmap -sV, who is much more intrusive when searching for services.


Snort/IDS detect and alert on possible DoS/DDoS attack? As per the title, I'm attempting to configure Snort to detect and alert on a incoming Denial of Service attack.

Looking at the rulesets, which are primarily signature based rules, I can't see a logical way of looking for a flood of SYN ACK packets?

I've seen some of the examples from the following link, but they appear to be mostly anonmalay based examples (What approaches are to detect DoS attack in IDS/Firewall?) - I'm wondering if there's a rule available to detect such an attack.

Thanks!

Web Application layer Firewall like Modsecurity and Application layer filter like snort ruleset are generally signature bases rule. These rulesets are very comprehensive and covers most of application layer attacks like XSS, SQL injection. Though these firewall have support to protect against DoS through session and user level counters but this is not generally recommended as it requires lot of computing.

For understanding of mitigation strategies against Application Layer Dos you can explore Mod_Evasive an apache module. There are five directives to be configured to protect against DoS from Blacklisted IPs.

DOSPageInterval : Sets the minimum accessible interval between two
requests to a page from the same IP.
DOSSiteInterval :  Sets a minimum accessible interval between two
requests to a site from the same IP.
DOSPageCount :  Sets the limit for a number of too short requests to
the same page
DOSSiteCount :  Sets the limit for a number of too short requests to
the same site.
DOSBlockingPeriod: How much time bad IP should be blocked.


Is it possible to create DNSSEC chain of trust for local root zone I have local (private) root domain domainX.example  and subdomains : subdomainY.domainX.example and subdomainZ.domainX.example.

How would I create chain of trust without using root-servers.net?

Look at https://ftp.isc.org/isc/bind9/cur/9.15/doc/arm/Bv9ARM.ch05.html#dnssec-keys

  A trust anchor is defined when the public key for a non-authoritative
  zone is known, but cannot be securely obtained through DNS, either
  because it is the DNS root zone or because its parent zone is
  unsigned. Once a key has been configured as a trust anchor, it is
  treated as if it had been validated and proven secure.

  The resolver attempts DNSSEC validation on all DNS data in subdomains
  of configured trust anchors. (Validation below specified names can be
  temporarily disabled by using rndc nta, or permanently disabled with
  the validate-except option).

And the example at https://ftp.isc.org/isc/bind9/cur/9.15/doc/arm/Bv9ARM.ch04.html#dnssec_config

dnssec-keys {
        /* Root Key */
        "." initial-key 257 3 3 "BNY4wrWM1nCfJ+CXd0rVXyYmobt7sEEfK3clRbGaTwS
                                 JxrGkxJWoZu6I7PzJu/E9gx4UC1zGAHlXKdE4zYIpRh
                                 aBKnvcC2U9mZhkdUpd1Vso/HAdjNe8LmMlnzY3zy2Xy
                                 4klWOADTPzSv9eamj8V18PHGjBLaVtYvk/ln5ZApjYg
                                 hf+6fElrmLkdaz MQ2OCnACR817DF4BBa7UR/beDHyp
                                 5iWTXWSi6XmoJLbG9Scqc7l70KDqlvXR3M/lUUVRbke
                                 g1IPJSidmK3ZyCllh4XSKbje/45SKucHgnwU5jefMtq
                                 66gKodQj+MiA21AfUVe7u99WzTLzY3qlxDhxYQQ20FQ
                                 97S+LKUTpQcq27R7AT3/V5hRQxScINqwcz4jYqZD2fQ
                                 dgxbcDTClU0CRBdiieyLMNzXG3";
        /* Key for our organization's forward zone */
        example.com. static-key 257 3 5 "AwEAAaxPMcR2x0HbQV4WeZB6oEDX+r0QM6
                              5KbhTjrW1ZaARmPhEZZe3Y9ifgEuq7vZ/z
                              GZUdEGNWy+JZzus0lUptwgjGwhUS1558Hb
                              4JKUbbOTcM8pwXlj0EiX3oDFVmjHO444gL
                              kBOUKUf/mC7HvfwYH/Be22GnClrinKJp1O
                              g4ywzO9WglMk7jbfW33gUKvirTHr25GL7S
                              TQUzBb5Usxt8lgnyTUHs1t3JwCY5hKZ6Cq
                              FxmAVZP20igTixin/1LcrgX/KMEGd/biuv
                              F4qJCyduieHukuY3H4XMAcR+xia2nIUPvm
                              /oyWR8BW/hWdzOvnSCThlHf3xiYleDbt/o
                              1OTQ09A0=";

...

So define your key for your zone in one such dnssec-keys statement, and set dnssec-validation to yes (not auto).

See also this explanation later:

  The keys specified in dnssec-keys copies of DNSKEY RRs for zones that
  are used to form the first link in the cryptographic chain of trust.
  Keys configured with the keyword static-key are loaded directly into
  the table of trust anchors, and can only be changed by altering the
  configuration. Keys configured with initial-key are used to initialize
  RFC 5011 trust anchor maintenance, and will be kept up to date
  automatically after the first time named runs.


Strange response body in burp suite When I capture HTTP requests and responses with Burp suite, everything works fine except when I want to capture facebook.com responses, I get a strange response body which is in some unreadable format that is not HTML, but just some strange symbols (the response headers are ok and readable, but the body is not). Does anybody have an idea what could be the reason for that and if there is a fix? The burp cert is configured in my browser. And the response renders fine in my browser.

Edit:

The response headers (without some values for which I'm not sure if I should post them) are:

HTTP/1.1 200 OK
P3P: CP="Facebook does not have a P3P policy. Learn why here: http://fb.me/p3p"
X-Frame-Options: DENY
X-XSS-Protection: 0
X-Content-Type-Options: nosniff
public-key-pins-report-only:
Pragma: no-cache
content-security-policy: default-src * data: blob:;script-src *.facebook.com *.fbcdn.net *.facebook.net *.google-analytics.com *.virtualearth.net *.google.com 127.0.0.1:* *.spotilocal.com:* 'unsafe-inline' 'unsafe-eval' fbstatic-a.akamaihd.net fbcdn-static-b-a.akamaihd.net *.atlassolutions.com blob: data:;style-src data: 'unsafe-inline' *;connect-src *.facebook.com *.fbcdn.net *.facebook.net *.spotilocal.com:* *.akamaihd.net wss://*.facebook.com:* https://fb.scanandcleanlocal.com:* *.atlassolutions.com attachment.fbsbx.com ws://localhost:* blob:;
Cache-Control: private, no-cache, no-store, must-revalidate
Strict-Transport-Security: max-age=15552000; preload
Vary: Accept-Encoding
Content-Encoding: br
Content-Type: text/html
X-FB-Debug:
Date: Mon, 05 Sep 2016 22:09:00 GMT
Connection: close

And the first few bytes of the response body in HEX look like this:

0a 07 30 0c 00 e4 af 9f ab fe f7 e7 cb 7a 7b 41

The response of the server reply is Brotli encoded:

  Content-Encoding: br

I think that the Burp Suite doesn't decode this, so you're seeing the compressed version of your response.

For more information about Brotli you can look here.

Update:

Until the Burp Suite supports Brotli, you can override the Accept-Encoding-Header as a workaround. Go to Proxy -> Options -> Match and Replace. There is allready a template named "Require non-compressed responses" that you can simply activate:


Socks5 proxy: Danger of MITM malicious injection wget/ httrack? I occasionally use HTTrack or wget on Linux to clone and archive websites for offline viewing. I use proxychains and a random socks5 proxy I find in those proxy lists on the Internet. The websites I clone have https and I always initiate the crawl with https://.

My concern is, if the socks5 proxy can inject or add malicious code to the traffic as he is literally the man in the middle and I'm not using a web browser to see if the certificate validation fails?

Does wget or httrack or proxychains validate the https connection and abort the connection if it gets tempered with?

Does wget or httrack or proxychains validate the https connection and abort the connection if it gets tempered with?

Proxychains does not need to verify the connection since it is only forwarding data and is not involved in any TLS itself at all. Current versions of wget verify the certificates and there is an explicit option to switch verification off. No such options seem to exist for HTTrack and it is not obvious from the documentation or changelog if proper certificate validation is done.

When in doubt just try. There are sites which have explicitly invalid certificates for this purpose, see badssl.com.


How to devise a security policy? I've recently been tasked with putting together a security policy for a small startup firm consisting of ~30 people in the UK. Largely up until now there has been nothing concrete in place, however as we're looking to take on clients in the financial and banking services sector this needs to change.

Having very little security experience (I'm a software engineer by day); and working on a very tight deadline, I'm hoping that there are off the shelf templates/guides I can use to aid in drafting this policy. Additionally what would one expect to see in a robust security policy i.e. one a financial service firm might be happy with?

As Eric said in his answer, the SANS site has a great set of security policy templates. BERR, a UK government department, also wrote an excellent document[PDF] that gives some great structural advice for creating security policies.

I can also offer you the following advice:

Ask your employees for input when creating the policies. Can they see areas of their work that might be hindered by a particular rule? Can they think of things that you've forgotten?
Identify what you're trying to protect. If your answer is "the network", you're not thinking hard enough. What assets are important to you? Source code is an obvious one, but SSL certificate private keys, design documents, financial information, purchase orders, etc. are all important to your success.
Security policy should be combined with a usage policy. Some people dislike this, but it's important to get the right context. The security policy essentially boils down to what a user can and cannot do, and what the should and should not do. Usage is an important extension of this.
Security policies often get bogged down in what isn't allowed. Don't forget to include exceptions, and a list of things you feel are acceptable (e.g. "browsing semi-NSFW web comics / funny cat picture sites is fine during lunch hours, as long as you know they're reputable and won't perform drive-by browser exploits").
Don't try to come up with exhaustive lists when a "within reason" clause could be used instead. This allows you to treat things on a case-by-case basis. Expect your employees to find a good balance, and be responsible.
Include sections of text that explain why a policy is in place. Format these sections differently, e.g. with a lightly shaded background, and explain at the beginning of the document that these sections are not considered a binding part of the policy.
Policy is about humans, so make it human-readable. For all intents and purposes, lawyers are not human. Just because your document is written in simple, informal language, does not mean that it isn't legally binding or serious. There's absolutely no need for huge blocks of scary legalese in block capitals, exclaiming that "VIOLATIONS OF THE SECURITY POLICY WILL RESULT IN THE EMPLOYEE BEING FIRED OUT OF A CANNON ONTO THE MOON TO GO LIVE WITH WILLZYX AND TOM CRUISE".
Perhaps most importantly, don't write anything you wouldn't want to agree to yourself. Furthermore, stick to the security policy yourself. If a staff member sees you violating the very security policy you made them sign, your authority is worth zero and the policy is worth zero.


Are "Certificate Templates" used only as a "Template" or do they validate a certificate request? I'm trying to learn how Microsoft Certificate Templates interact with a certificate request, and can only guess that they take on one of the two/three forms:

They simply help the client create a request, EKUs, and other settings for the PKCS10 submission to the server.
OR they are used to validate, control, and restrict what exactly a user can do when uploading a PKCS10 request.  Kinda like an application level firewall
Some combination of the above that either uses data in the certificate, or heuristics to automatically issue or deny a certificate.

What I'm trying to prevent

I want to prevent a user from diverging from the approved templates I've offered them, in any and all ways... in particular, I want to prevent a change of:

Expiration date
EKU
Basic Constraints
Critical / Non critical sections
Key usage
Etc.

... if they paste in the manual certificate request in the enrollment page (that doesn't use a template)

Research

I'm looking at the docs for Certenroll and see there is an enrollment method that uses a template, and a submit method that does not.

I assume the Submit() method from CERTCLILib.ICertRequest3 needs to be run under a controlled service account since anything can be sent to the server, but things aren't too clear from a documentation standpoint.

Since there seems to be some flexibility in using templates at a programmatic level, I'm unsure how to describe the benefits or utility of a Server Template.

Finally, it's possible that the "Application Firewall" for certificate requests, exists in the form of custom code, or Microsoft Forefront Identity Manager, or some other product.

Assistance is appreciated.

In an Active Directory setup, the "certificate templates" are supposed to be used by the clients and by the CA itself ("AD Certificate Services").

For the CA, the templates describe how certificates shall be issued, including:

The certificate contents, including all the extensions, validity period and so on.
The issuing conditions, e.g. whether the request must be signed by some authorized RA agent or not.
The template access rights.

There are many variations, because templates have been enriched along Windows versions (so there are "Windows 2000", "Windows 2003" and "Windows 2008" templates), and the CA itself can be "stand-alone" or "enterprise" -- in the latter case, the CA is supposed to automatically feed on the AD accounts and ACL to know whether a given certificate request shall be honoured, while in a stand-alone CA most requests will be subject to a manual intervention from the CA manager (who will click on "issue" or "deny").

The AD tree contains all the known templates (you can create your own). The CA itself (the AD CS service) will "publish" some of these templates: this is the list of the templates that the service will actually use.

In any case, the contents of the certificate requests from clients will be mostly ignored (except, of course, the public key); the templates decide what goes into certificates, not the request. There are exceptions; for instance, the template may specify that the Subject Name shall be taken from the request, in which case the SubjectDN and the Subject Alt Name extension will be imported "as is" from the request (at configuration time, you may get a warning from the GUI that such a setting in an "enterprise PKI" can be dangerous because whoever is allowed, at the AD level, to request such a certificate, may then put an arbitrary name in there, so you'd better double-check your access rights).

For the client, templates are advisory: they document the kind of certificate that clients may request, and what they should put in the request. For instance, the template may state that clients shall use a specific CSP (Cryptographic Service Provider) to generate the key pair; since the CA cannot actually verify that the specified CSP was used, this is only for the benefit of clients. Some other settings are used by both client and server (e.g. key size).

The template can be used only by clients who have access to the AD server, i.e. within the domain. Clients outside of the domain shall build their requests in any way they see fit, based on information transmitted out-of-band. One usual method, in the Windows world, for an out-of-domain client to generate a certificate request, is to use the certreq.exe command-line tool with a "policy file" and the -new option.

CertEnroll is a programmatic API to be used on the client side; it encapsulates several functionalities:

CertEnroll can generate a new certificate request (including key pair generation). It may do so by feeding on programmatically-provided request parameters (e.g. key type and size). It may also automatically access the AD server to get the information from a published template.
CertEnroll can talk to the CA to submit the request.
CertEnroll locally saves the requests (in a dedicated certificate store) so that, when the certificate is received and imported, the link with the private key (which never left the client machine) can be restored.

To sum up:

Certificate Templates are the method by which you may configure what the CA puts in the certificates it issues, and under what conditions it may issue the certificates.
Clients are supposed to send requests which "work" with what the CA expects (e.g. key type and size). Clients may use the templates to get that information, if they have actually access to the templates (i.e. the clients are within the domain). Template usage by clients is not mandatory.
However, when a client requests a certificate, the CA must somehow "know" to what template the request relates. The template name can be included within the request (as a Microsoft-specific extension) or provided along with the request; CertEnroll and certreq.exe know how to do that.


Why does Hydra return 16 valid passwords when none are valid? I've been playing around with Hydra and DVWA and I've hit a bit of a snag - Hydra responds letting me know that the first 16 passwords in my password list are correct when none of them are.

I assume this is a syntax error, but I'm not sure if anyone has seen this before. I've followed several tutorials with no luck so I'm hoping someone where can help.

Syntax :

hydra 192.168.88.196 -l admin -P /root/lower http-get-form "/dvwa/vulnerabilities/brute/index.php:username=^USER^&password=^PASS^&Login=Login:Username and/or password incorrect."

Output

Hydra v7.3 (c)2012 by van Hauser/THC & David Maciejak - for legal purposes only

Hydra (http://www.thc.org/thc-hydra) starting at 2013-06-05 22:30:51
[DATA] 16 tasks, 1 server, 815 login tries (l:1/p:815), ~50 tries per task
[DATA] attacking service http-get-form on port 80
[80][www-form] host: 192.168.88.196   login: admin   password: adrianna
[STATUS] attack finished for 192.168.88.196 (waiting for children to finish)
[80][www-form] host: 192.168.88.196   login: admin   password: adrian
[80][www-form] host: 192.168.88.196   login: admin   password: aerobics
[80][www-form] host: 192.168.88.196   login: admin   password: academic
[80][www-form] host: 192.168.88.196   login: admin   password: access
[80][www-form] host: 192.168.88.196   login: admin   password: abc
[80][www-form] host: 192.168.88.196   login: admin   password: admin
[80][www-form] host: 192.168.88.196   login: admin   password: academia
[80][www-form] host: 192.168.88.196   login: admin   password: albatross
[80][www-form] host: 192.168.88.196   login: admin   password: alex
[80][www-form] host: 192.168.88.196   login: admin   password: airplane
[80][www-form] host: 192.168.88.196   login: admin   password: albany
[80][www-form] host: 192.168.88.196   login: admin   password: ada
[80][www-form] host: 192.168.88.196   login: admin   password: aaa
[80][www-form] host: 192.168.88.196   login: admin   password: albert
[80][www-form] host: 192.168.88.196   login: admin   password: alexander
1 of 1 target successfuly completed, 16 valid passwords found
Hydra (http://www.thc.org/thc-hydra) finished at 2013-06-05 22:30:51

EDIT

I was successful in brute forcing the admin credentials. Once I had authenticated to DVWA I needed to find the cookie information (easily done via your browser or Burp Suite). Once I had the cookie information I issued the following command which worked.

hydra 192.168.88.196 -l admin -P /root/lower http-get-form "/dvwa/vulnerabilities/brute/index.php:username=^USER^&password=^PASS^&Login=Login:Username and/or password incorrect.:H=Cookie: security;low;PHPSESSID=<value for PHP SESSID cookie"

Same problem happened to me when I was playing with DVWA. The reason is that you're trying to brute-force YOUR_SERVER/dvwa/vulnerabilities/brute/index.php which needs authentication. Try to visit that page in your browser and you'll be prompted to enter a username and a password (different form from the one you're trying to brute-force)

So while you're trying to brute-force this:

Hydra is actually "seeing" this:

On the second form you won't get the message "Username and/or password incorrect.", which you told Hydra to use to differentiate between failed and successful logins. Hydra doesn't see that failed login message, so it's assuming that the login was successful.

So you need to login using a browser, get the session cookie (by default, PHPSESSID) , and feed it to Hydra, and then Hydra will be able to "see" the first form.

Supposedly, you can set the cookie in the HTTP headers in Hydra by doing H=Cookie:NAME=VALUE or pointing Hydra to a file which sets the cookie by doing C=/path/to/file. Unfortunately, non of these worked for me.

After getting frustrated, I ended up commenting Line: 5 (dvwaPageStartup) in the file /dvwa/vulnerabilities/brute/index.php, which allowed Hydra to see the actual vulnerable login form.


Performant ways to identify potential SQL injection vulnerabilities in web applications I [itsec novice] am developing a workflow/application for identifying potential SQL injection vulnerabilities in web applications and would like to get some professional opinions on my approach.

Roughly my approch is

Step 1: Identifying potential vulnerabilities
Step 2: Exploiting/Verifying them via sqlmap

First question (regarding existing tools):

Considering speed, would you recommend to use existing applications like sqlmap?
It feels like there is much overhead when scanning with sqlmap, but I didn't try out every switch.
What do you think? My assumption is that a own application would be faster, but is this true and is there a rule like "do not roll your own" like for encryption?

Second question (regarding vuln identification):

Currently I am thinking of two ways to identify entry points. Both of them are applied to GET&POST parameters, cookies and HTTP header values.

Appending ' to the parameter value (and encoded variants) and checking for SQL errors or differences in the rendered page
Appending a true/false condition (with/without encoding and commenting characters) and check if the rendered pages differ

Are there any other ways which I should implement or should these two ways identify most vulnerabilities?

It's easier to use the tools that the attacker might try to figure out the holes. This is the lowest hanging fruit that you can do to ensure your application is safe.


Was the Raspberry Pi-related NASA JPL network breach primarily caused by the failure to keep an updated list of authorized devices? The question What information was stolen from JPL during the Raspberry Pi hack? refers to an event in recent news (e.g. Engadget's A rogue Raspberry Pi helped hackers access NASA JPL systems) and references NASA's Office of Inspector General June 2019 report Cybersecurity Management and Oversight a the Jet Propulsion Laboratory which states on page 17 in the section titled Incomplete and Inaccurate System Component Inventory:

  Moreover, system administrators did not consistently update the inventory system when they added devices to the network. Specifically, we found that 8 of 11 system administrators responsible for managing the 13 systems in our sample maintain a separate inventory spreadsheet of their systems from which they periodically update the information manually in the ITSDB. One system administrator told us he does not regularly enter new devices into the ITSDB as required because the database’s updating function sometimes does not work and he later forgets to enter the asset information. Consequently, assets can be added to the network without being properly identified and vetted by security officials. The April 2018 cyberattack exploited this particular weakness when the hacker accessed the JPL network by targeting a Raspberry Pi computer that was not authorized to be attached to the JPL network. 32 The device should not have been permitted on the JPL network without the JPL OCIO’s review and approval.

Question: I'm asking for a better understanding of the explanation given related to the Raspberry Pi incident. Is the failure to keep an updated list of authorized devices a central cause or primary contributing factor to the breach, or is the list a peripheral issue and the network should have been secure against connection of any Raspberry Pi, authorized or not.

This answer starts to outline the seriousness of the breach.

There's no one central cause, the breach was a product of multiple failures. Like space launch failures or airplane crashes it was a cascade of failures, preventing one of them would have at least lessened the severity of the breach:

Poor training and security awareness: putting a raspberry PI on the network was a big no-no, the user who did it shouldn't have done it and colleagues should have spoken up
Problems weren't fixed: the security operations group were massively behind in investigating incidents. Because it took so long to resolve tickets people may have stopped reporting issues, which may have contributed to 1
No VMS (Vulnerability Management System): A VMS is technology and process to scan for and remediate vulnerabilities on a network. The technology side is agent or engine based and set up to sweep an entire network in a discovery scan and then do a deeper scan on detected devices in order to determine a) what they are and b) what vulnerabilities they may have. The process side is for the the information to be used by automated systems or interpreted by people to find the threats. A halfway decent VMS would have found that PI and action would have been taken to get it off the network
Poor network protection: there's several issues, the firewall rules to limit access from one network to another were wide open, and access to the network wasn't limited to only recognized devices. If the firewall rules had been stronger or the JPL had been tighter in permitting only recognized devices on sensitive networks then the breach would have been mitigated or prevented

If I had to sum it up in a single line, the breach was due to the lack of a robust security program with a failure to maintain defense in depth.


sqlmap load https request using "-r REQUESTFILE Load HTTP request from a file" I'm testing a site that automatically redirects http request to https. When I'm using Burp I set the target to use https and the request goes through without a problem. However when I use the same request in sqlmap I get a follow redirect. How can I set the requestfile to use https?

Command:

C:\Users\Oscar\Desktop\sqlmap-master>python sqlmap.py -r testsite.txt --level=5 risk=3 -p id

Host:

GET /user?id=1 HTTP/1.1
Host: www.testsite.com

Found two possible solutions from https://github.com/sqlmapproject/sqlmap/wiki/Usage.

--force-ssl:

C:\Users\Oscar\Desktop\sqlmap-master>python sqlmap.py -r testsite.txt --level=5 risk=3 --force-ssl -p id

Host:

GET /user?id=1 HTTP/1.1
Host: www.testsite.com:443


Is 'looking for all XSS in my code' a solved computer science problem? I have a fundamental theory question. Is looking for cross-site scripting a solved computer science problem? Or is it an open problem? Does it approximate the halting problem, injection problem or similar known CS problems?

Or is XSS not intractable but just tedious to find and fix as there are many possible sources and sinks to a scripted web page, poor programmer understanding of the vulnerability, etc or the plethora of web technologies out there that impede the solution to a sound solution? (I'm thinking about content security policy as an equivalent of NX bit in native code).

Anyone can point me to any resource (academia included) would be much appreciated.

Edit 2020-03-10: The XSS problem is far from being solved despite it being 'easy' to solve as a technical problem. According to HackerOne, it is the by far the most preferred attack vector. Further in 2019 it is increasingly the favourite attack vector among white-hats: 38% in 2019 vs 28% in 2018.

I am no expert on formal proofs, but I can at least point you in the right direction.

Searching for XSS vulnerabilities comes down to three elements:

A finite set of untrusted entry point. XSS can only happen, if you process untrusted data. The first thing you have to do is identify all untrusted entry points. In a web application those are usually GET and POST parameters as well as headers. But there are potentially many more indirect / second order entry points like environment variables, untrusted database content, data fetched from untrusted local files or from remote, etc. If those sources are considered trusted or not, depends on your architecture and the attacker types you want to protect against.
A finite set of locations where dynamically generated data is included in a server response (i.e. the website). To trigger a XSS vulnerability, an attacker must be able to create malicious output that is interpreted by at least one browser engine as script code. To identify all locations where this can happen, you have to analyze the output layer of the application and check where dynamically generated output is injected into the website.
All paths between untrusted entry points (1) and potentially vulnerable output locations (2). Performing data flow analysis allows you to find all paths that connect (1) and (2). Each path has the potential to allow XSS, as it connects untrusted input to a potentially vulnerable data output location.

That's the model you are working with. The next step is tracing all identified paths and check for functions that validate or encode the data in a way that prevents XSS. This is tricky, because different types of output locations may require different types of filtering / encoding to protect against XSS. Only the correct method can protect against exploitation of a specific path.

Please note that I deliberately ignored additional protection mechanisms against XSS, which can be considered a second line of defense.

So what does this mean? Yes, you can find all XSS vulnerabilities if you are able to identify all untrusted entry points, all dynamically generated data output locations and all paths between them, including the verification that certain functions protect against specific types of XSS. So why isn't there a single source code scanner out there that will find all XSS vulnerabilities in a complex website?

Fulfilling any of those requirements is highly complicated in practice. Today's web applications consist of a huge amount of different frameworks, containing millions of lines of code. Entry points - especially second order entry points - are easily overlooked and often vast. Data flows are highly complicated, passing through a lot of frameworks and functions. Modern coding patterns (e.g. reflection) make data flow analysis even harder. Judging, if a validation function really protects against a specific type of XSS, can be complicated for certain types of input.

So while it seems to be feasible in theory, there is still no source code scanner out there, that can handle all those difficulties. Which means, no one had yet been able to implement this seemingly simple approach for a wide variety of technology stacks.


Client HTTPS request redirection attack Assume a Mam in the Middle that wants to redirect a client's HTTPS (Secure HTTPS) request from a.com to b.com. The MitM can not impersonate neither a.com nor b.com. The MitM does not have to use a TLS certificate to let the client encrypts the traffic for him/her, i.e. the MitM can not access the HTTPS encrypted traffic and does not have valid nor forged certificates.

For example, DNS spoofing is something related, where the attacks can trick the user into requesting/opening b.com while the client actually want a.com

My Question: Can the MitM changes the client's HTTP request headers at leasure to order b.com instead of a.com without having to use faked TLS certificate with the client?

There are a few options:

DNS record

If the attacker changes the DNS record (which is still often completely insecure) than they can convince the client a.com is at the IP address of b.com. However, because the client is expecting to be connected to a.com and the certificate will likely be for b.com, the client will get invalid certificate error. However, if lets say we redirect from a.google.com to b.google.com and the certificate is for *.google.com, then this attack may work.
MITM Redirect

You can just intercept the traffic and send it to the IP of b.com without changing the DNS records. The result is the same as in 1.
HTML Redirect

You can try to redirect a person from a.com to b.com using for example javascript or 303 redirect, but if HTTPS is being used to connect to a.com, you won't be able to do this without compromising a.com. This however does not necessarily require their certificate. Being able to do XSS attack may be enough.

In conclusion, HTTPS protects HTTP headers as well and the client knows what website it is trying to connect to, so it is not possible to do the redirect just with pure MITM.


What is the most secure way to lock a Linux Distros Desktop? So it's an everyday thing... people don't want to turn off their computer while their going out to the toilet..., etc. So they hit "ALT+CTRL+L", and the GNOME-screensaver locks their Desktop. After they return they just type in their passwords, and the work could go on..OK!

BUT: There are usually problems:

NEW (today): http://gu1.aeroxteam.fr/2012/01/19/bypass-screensaver-locker-program-xorg-111-and-up/

http://www.h-online.com/open/news/item/GNOME-screen-lock-ineffective-in-openSUSE-Linux-Update-928794.html

So what is the most secure way to Lock the computer?

Use the first screensaver for X servers: xscreensaver.

All the vulnerabilities that the new screensavers recently fell victim to were first found in xscreensaver, fixed and forgotten. They (both KDE and Gnome guys) try to reproduce the functionality of this software without looking at its mistakes. The sad part: they do this just for the bling.


Identifying attacks by network activity Is it possible (and how) to tell from a network dump if there is a buffer overflow attack, DoS or brute force attack? A DDoS would be more obvious to identify, but those attacks mentioned above I think would look a little more like normal activity.

Sorry for my newbie question, your answer would help a lot. Any information on how to identify these attacks from network dumps would be extremely appreciated.

It would depend on a number of factors, such as what protocol was used.
Let's assume for the sake of the answer that the protocol in question is unencrypted HTTP.
Buffer Overflow.
This would be the trickiest of the 3 to identify, as it could just look like a large request.  It's possible that you could identify it from some common patterns that people use in Buffer Overflows (e.g. a series of 'A' characters) but that's not a requirement of the attack so in many cases it could be hard to detect, depending on how similar it looks to a standard request to the application
DoS.
This should be relatively easy to spot from a Network dump.  You would likely see a large number of requests to the service either SYN packets (for a standard SYN flood attack) or perhaps a specific application request (like a search) for an application DoS, it would likely be visible as the volume of traffic to the service would go up quickly.
Brute Force.
In most cases this would be quite easy to pick out from a network dump as you'd see a large number of unsuccessful logins to the application either coming from one IP address or a range (depending on whether the attack was distributed or not).  This would likely stand-out from ordinary traffic patterns, so be relatively easy to spot.


Evaluate this approach: set production DNS to point to 127.0.0.1 I am evaluating a vendor whose technology takes the following approach:

My website asks user to install vendor's executable (EXE) on their machine. This EXE does operations that cannot be done in-browser
EXE also starts a local web server on client's machine
My website connects to 'exe.vendor-website.com'. This is a public domain, but its DNS resolves to 127.0.0.1 (I'm surprised DNS providers allow this). Vendor does this because it then allows them to make HTTPS connections to the local EXE web server (via https://exe.vendor-website.com)
My website talks to local EXE web server (via client-side JavaScript) to retrieve information (over REST) which therefore never leaves the client's machine. This is the primary advantage of their approach.

Note this is a public production solution, not a development-only or intranet-only solution. Vendor used to use ActiveX, but switched once ActiveX stopped being supported.
I would like to understand what security/reliability holes may exist with the vendor's design.
Updates

"Why is it necessary to spoof DNS" - some browsers don't allow JavaScript to connect to http://localhost (if the site itself is not running on localhost). Marked WONTFIX: https://bugs.chromium.org/p/chromium/issues/detail?id=67743#c17
"Did the vendor embed the private key for exe.vendor-website.com in their executable" - yes, they implied this

The vendor is shipping their private key to all of their customers, on purpose. Even if this shouldn't really matter since it's only used to encrypt traffic going over localhost, it demonstrates a severe lack of security knowledge on the vendor's part. My advice: avoid like the plague.


Sample test cases for all owasp top 10 vulnerabilities I am looking for sample test cases for all 10 vulnerabilities to exploit those scenarios. I would highly appreciate if any one share or share the link for test cases for a web application with all 10 vulnerabilities or any OWASP vulnerability?

There are loads. Mutillidae, Damn Vulnerable Web App, WebGoat, BWaPP etc. Also, check out vulnhub, hack.me and others like them.


Can a router be configured from outside the local network? My router can be configured by going to 192.168.1.1:80 when connected either by WiFi or by Ethernet cable.
Can the same configuration web interface be accessed from the external interface (the public IP of the router)?
Some background:
I have a "Technicolor TD5130" and I wanted to change the default password that the ISP preconfigures. But even after changing the password, the default weak password for some weird reason still works. So I'm wondering if someone can access the router configuration if they can't initially connect to the router through Ethernet nor WiFi.

According to the manual, if Remote Assistance is enabled, than outsiders can access your router management via the external IP address:

So, it is possible, but is disabled by default, and appears to reset itself to disabled after a reboot.  You should check your configuration as shown to be sure.


Would making an IIS web server appear to be running Apache instead improve security? As you can see from the tag, I know that security by obscurity is not true security.

So consider a server available to the Internet on port 443 (SSL) of a fixed IP address in the dialup range of a telecommunications provider only. When https'ed, it shows an IIS 8 welcome page. The server can be reached via IP address only, no DNS entry (except the usual ip-<ip>.customers.provider.com entry that is set for EVERY IP address in the provider's range). The IP address is stored in the mail accounts of Windows Phone, iOS and Android devices, and entered from browsers with Google, Bing, and Yahoo auto-search, thus technically known to Google, Apple, Yahoo and Microsoft, and possibly other third-party application vendors if these can access mail account settings from their applications.

Furthermore it is used for browsing the Internet and writing email, and is stored in many server logs, etc., etc., and especially on the sites where one has to log in, like Stack Exchange, you can see easily that it is a fixed IP address, since the IP address has always been tied to the same username for the last two years.

On that IIS server, OWA and ActiveSync are running. Both are required to access mail from everywhere. These are the applications that I would expect on an IIS server, and try first when I see an IIS welcome page.

Apart from doing Windows/Exchange updates regularly, using hard passwords, introducing all employees to the concepts of phishing and social engineering, and hoping that our email is not interesting enough to justify a fully fledged attack directed at us especially, could it make sense to "secure" the server by changing the page returned on a "naked" HTTPS request to a page indistinguishable (including all headers) from an "It works!" Apache page?

I could use some gooood arguments that a CEO, who came up with that idea in the first place, may understand.

EDIT: No, I don't need to get top management's support for security. The CEO seems to care for security already, or else he would not come up with such ideas for "improvement". I am not a security guy with certificates and all, just a concerned citizen, mainly developer, part-time server administrator. Our company does not have a real security guy; we are four people right now.

Since I do server administration part time, I was asked to change the server. But before I dig down deep for information on how to change the default headers in IIS, I would like to question the whole "project"...

You don't need DNS names to be detectable.
The entire IPv4 can be scanned in less than a day. And it has been done. And it is still going on.
Therefore you must assume, that your IP address has been discovered.

You can download all the certificates for all the IPv4's port 443 from Rapid7's Sonar project.

-> Make this a nice demo. Download the 25 GB dump and show your CEO that your company's certificate is in there.
Further reading

Who’s Scanning Your Network? (A: Everyone)

Masscan: the entire Internet in 3 minutes


Mirroring images in a blog article When visiting this website, I spotted something weird about the images used. The sources of all images are mirrored horizontally and are being mirrored back with css: transform: scaleX(-1);.

Why would someone do that when posting a blog article etc. ? I can imagine that an image-search would not find the images on the given website, but security-wise I do not see any benefits. If anyone wants to steal one of the images, they can just mirror them on their own, which even works out with MS Paint.

I can see two reasons, both only half related to security:

The owner of the blog does not have the right to use the images, and does not want the owner of the images to find out that they are being used by image googling them. I assume Google will not pick up upside down matches. (There could also be other reasons not to want to have your images easily reverse googled.)
The owner of the blog wants to prevent people from hotlinking the images. While not impossible, it makes it tricky to link to them (especially on e.g. a forum where you can not set CSS) if you only get them upside down. If nothing else, it is quite a fun prank...


Is mosh now recommended by the security experts? (2014) Mosh has been around for a while now.  Although it's claimed to be "a replacement for SSH" by its authors, mosh does actually depend on ssh to do the initial authentication, after which an instance of the mosh binary is started on the server, the established SSH connection over TCP is abandoned (after serving its purpose for the authentication and the bootstrapping), and all shell communication and the network roaming henceforth happens through a mosh protocol over UDP, still with some kind of encryption, but completely separate from ssh.

This all sounds quite simple and elegant, however, devil is always in the details.

What do the security specialists think of mosh now that it's been around for a couple of years?

This used to appear in their FAQ:
Q: Has your secure datagram protocol been audited by experts?
A: No. Mosh is actively used and has been read over by security-minded crypto nerds who think its design is reasonable, but any novel datagram protocol is going to have to prove itself, and SSP is no exception. We use the reference implementations of AES-128 and OCB, and we welcome your eyes on the code. We think the radical simplicity of the design is an advantage, but of course others have thought that and have been wrong.


Why does Firefox not trust this US government SSL certificate? Shouldn't this be a trusted certificate considering it's a wildcard SSL certificate?

That is, shouldn't *.delaware.gov cover www.corp.delaware.gov?

The wildcard replaces only one part of the hostname, e.g. *.delaware.gov covers www.delaware.gov or corp.delaware.gov but not www.corp.delavware.gov. From RFC2818, section 3.1:

  ...Names may contain the wildcard character * which is considered to match any single domain name component or component fragment. E.g., *.a.com matches foo.a.com but not bar.foo.a.com. f*.com matches foo.com but not bar.com.


Man in the Middle attack? in a scenario where I have a gateway to the Internet and a switch(layer 2) connected to this gateway. I have two computers in the same broadcast domain connected to the switch. all traffic to the Internet has to go through the gateway.

from one of the computers I ARP poison the other by sending false ARP reply's indicate this computer is the gateway. so now one of the computers thinks the other is the gateway. then I ARP poison the gateway for this same victim computer and now one of the computer is acting like MITM this is working and I can see the ARP caches have changed MAC address. all internet traffic can be sniffed (ignore SSL for this experiment). only traffic issued via the gateway can be sniffed as one computer is in the middle.

let's say a web server is added to the switch and the traffic from both computers on the same switch do not have to go through the gateway to access the web server because the switch has an CAM table and traffic from computer goes to switch and the switches CAM cache says MAC address is on port x so basically traffic does not go via gateway. in this scenario how does one act as MITM ?

do you arp poison or something similar the switch it is a layer 2 switch? how do arp poison a switch for a MITM attack ?

I feel like I am missing something simple

my experiment allowed me to sniff all traffic going to the Internet but I could not sniff the traffic going to the web server sitting on the switch. maybe I "simply" arp poison the web server arp cache and again arp cache the victim computer ?

yes port forwarding is enabled just in case it's asked.

The basic idea is simple as you've mentioned, MITM works in ARP spoofing scenario as follows:

To perform MITM between A and B:

Trick A to think you're B
Trick B to think you're A
Enable packets forwarding

That's it! so regardless of your environment, whether it's a switch or hub or even a proxy server, the principle is same.

So, the answer to your question is: Yes. You have to perform the attack between the victim and the server that's run on the same network. And for each server you put on this network, you'll have to do the same.

PS:It's not a good idea, but you can use what's so called 'Hail Mary' ARP spoofing attack, basically you run ARP spoofing on all local devices and claiming to be one or more device. In that way, all the devices will be tricked to believe that the attacker is the server, the gateway and all other important machines.


Remote PC shutdown security implications What are the security implications of using a remote PC shutdown (from Iphone) software?
E.g. https://s3-us-west-2.amazonaws.com/mark-bridges.com/Off.html

My fear is that this opens a port vulnerability. In which case what kind of attacks are possible?

One of the things that trouble me is that I failed to find anything related to security in that website, it sounds like a well intentioned hobby project that got exposure.

Yes, it opens a port and exposes a service. Knowing which port it uses is possibly very easy if you download it yourself, it is possible they don't randomise the port in use but even if they did a port scan would discover it fairly quickly. Then its a matter of playing with packets and see what sort of authentication is in place.

The immediate risk that I see is that the computer would shutdown or restart before you want it to happen, it seems however that this is targeted at home users where this wouldn't be much of a problem, even if it can be annoying I don't see a direct relation towards data loss or compromise, partly because it runs on Java and it is a sandboxed environment.

If you are concerned about security and need to use this tool, I would recommend not having the PC connected directly to the internet, you should still be able to use the program from within your home network, and if you want to be completely safe you can disconnect the internet cable from your home router.

The usual home safety recommendations apply, use strong encryption on your connections, if available only allow connections from specific MAC addresses...


How much of a security risk would the apps on my iPhone pose if I did my banking on iPhone? I have a bunch of different apps on my iPhone 7 (iOS v.12.4.1). Some of these are made by large companies such as Amazon, McDonalds, and so on. There are also some that have been made by perhaps a single developer. Some of my apps are quite well known in the Apple App Store while others, not so much (judging from very few reviews).

With this question I wanted to ask about what security risks these apps would pose on my banking sessions if I were to do my banking (using the app from my bank) on the iPhone.

For example, many of the apps (but not all) have a "Background App Refresh" toggle switch like what is shown below.

And then there is the possibility to have more than one app running simultaneously, and switch between them using the App Switcher. Like what is shown in below screen shot.

And some apps, such as a VPN app named Freedome (made by F-Secure), are apparently able to run completely in the background, without a visible UI.

So while there is some possibility for background processing, I was thinking that one app cannot have much of any effect on another (or on the banking sessions made from iPhone) because they are in some sense isolated from each other.

But in order to confirm that, here's my questions.

How much damage could some app XYZ cause on the banking sessions I do on my banks app in below cases:

If the XYZ app has "Background App Refresh" enabled?
If "Background App Refresh" is not enabled but I have it running
while I am using my banking app?

iOS does indeed sandbox apps from one another. Unless some of your installed apps had special exceptions to the usual list of permitted capabilities (permissions), they cannot read or write any files in your banking app, nor can they interfere with its execution in any way.

With that said, there are a few exceptions to be aware of:

Custom keyboards could potentially capture sensitive data. I don't know what the state of third-party keyboards currently is on iOS, but on Android it's been a concern for some time. Apps should be able to force the user to use the standard keyboard for sensitive content (credentials, etc.).
Local network connections (typically using loopback / 127.0.0.1) are not secure. An app that talks to itself or to another trusted app over the network this way could potentially be attacked at either end by a malicious app running at the same time (that is, the malicious app could launch its own server on the same port and try to get the victim to talk to it, or could make requests from its own client to the legitimate server and try to compromise the process or extract information from it). The insecurity of this design pattern has been known for years, and there are well-known superior options for most use cases, but people insist on doing this anyhow (partially because it's one of the only ways for a web page in the browser app to establish bi-directional communication with a store app). Hopefully your bank isn't doing anything like this - or if it is, it's hardened the channel very carefully - but it it's a risk.
Apps that use root privileges on jailbroken devices, or that use the kind of privilege-escalation bugs used for jailbreaking, are able to ignore their sandbox and interact with any processes or files on the device. In this way, they're more like a local app running as Admin/root on a PC. Obviously, if such an app is malicious or compromised, there's nothing you can do safely on that device.

Apple does perform a security review of every app before they approve it for the store. This review process has known holes - even manual line-by-line review wouldn't necessarily catch everything, and Apple can't afford that kind of effort so it relies heavily on automated tools that can be tricked - but for the most part there's extremely little malware in the iOS App Store.


What can be derived from someone else's Google Analytics id? A web page, which I'd expect to respect users' privacy, contains Google Analytics tracker. I consider it to be a wrong thing; before raising this to the site owner, I'd like to do minimal "research". The site is likely built by a subcontractor. I see two concerns:

Google gets the data it wants.
The analytics script is in fact used by the subcontractor company, not by the site owner; so the subcontractor gets the analytics Google provides.

Thinking on the second one: is it possible to figure out the Google account, which owns the tracking code (UA-xxxxxxxx-xx)?

Does the GA request URL reveal anything else?

It does not reveal anything more than what it is: a pseudonym used by Google to trace some activity wherever it is placed.

You cannot figure out the owner of such pseudonym unless you are Google or have access to Google's database on this (or whoever generated such ID places in some other webpage by mistake and that webpage has personal information that eventually leads to the owner of the Google account, but this is just being careless).

Your scenario of the subcontractor does not need to use Google's ID, they could use other solutions available out there for those who do not want to rely on Google to track their visitors.

Whether tracking users or not is good or bad is another question (and actually more like a discussion).


How to detect XSS in GET requests? How to detect XSS in HTTP/1.1 GET requests? A request can be malicious and I want to know how to detect if the GET request to a server is trying to XSS my website?

You should not only protect yourself from XSS by scanning HTTP requests for attacks. Such a scan will never be complete, and there will always be some smart tricks that slip through the net. Your first line of defence must always be to properly sanitize untrusted data, so as not to create any XSS vulnerabilities in the first place.
For how to do that, see OWASPs cheat sheat on the topic. If possible, I would recommend you to set the Content Security Policy header strictly, as this will give you a solid defence on modern browsers. It even has a reporting directive that will instruct the browser to inform you about attempted attacks.
That said, for defence in depth it can be good to also scan HTTP requests to filter out any XSS attacks you can detect. Most web application firewalls, like Naxsi for Nginx, will do that. I recommend using an existing WAF here and not try to roll your own - there is no simple regex that will catch all XSS attacks.
So how does Naxsi do it? According to themself:

This module, by default, reads a small subset of simple (and readable) rules containing 99% of known patterns involved in websites vulnerabilities. For example, <, | or drop are not supposed to be part of a URI.
Being very simple, those patterns may match legitimate queries, it is Naxsi's administrator duty to add specific rules that will whitelist those legitimate behaviours.

By the way, it is not only GET request you have to worry about, but also POST or any other HTTP method. XSS attack vectors can be anywhere - in the URL, in the coockies, in the POST data, in the user agent header, etc, etc.


Tracking an anonymous comment back to my work computer I used a work computer to post a comment that someone is trying to track with the help of a lawyer.
Under subpoena, the site gave up the IP address that was active during the time I made the post. The ISP can now trace the IP to my employer. I used a computer that is wired to the network. Will the IP lead directly to that terminal? Or would it be inconclusive because there are hundreds of wired terminals on the network and my employer also offers public wifi? I'm wondering if the IP address can be traced all the way back to the specific terminal I used to post the comment, or if the trail will only go as far as the building the computer was in.

The public IP will lead them to your company's network.  Your company's network administrator may then be able to look at their logs to determine which computer inside the network initiated that outbound traffic.  In general, you should always assume your employer knows everything you are doing on their network.

There are also additional ways to identify you other than by IP.  Depending on how ill-advised of an action you took, these may or may not come into play (posting an abusive comment, probably not; accessing child porn, certainly).


SSL Certificate for an email server I am completely new to SSL/TLS and would appreciate any help you guys could give me.

To give you some background info, our company website is hosted externally by our ISP, however our email is redirected by our ISP to a mail server which is located at our offices.

We use communigate pro.

We have a customer who until recently had no problems in sending us emails, however, we now have a situation whereby their mail server is stopping emails being sent to us.

I believe the root cause of the problem is that when SSL is enabled, the customer's mail server recognises this and so attempts to send email using TLS encryption. However, the SSL certificate used by our mail server is self-signed and, as a consequence, is rejected by the customer's mail server.

The error message returned to our customers is:

    (Certificate rejected over TLS. (sslv3 alert unexpected message))

If SSL is disabled on our mail exchange server, we can receive emails from our customer.

I have acquired a Free Trial SSL certificate issued by comodo, however, it appears that this is still causing a problem. The Certificate is generated for ourdomain.com.

Should this be something like mail.ourdomain.com or should we purchase a wildcard SSL Certificate? I apologise if I have not worded this very well but any advice or other suggestions would be greatly appreciated.

Thanks

It has to be the FQDN of your mail server. This would be what your DNS MX records point to, e.g. mx.mydomain.com.

A mail client will find to which system it needs to send an email based on the mx record associated to the domain of an email address, e.g.

john@test.com: what's the MX record of test.com? mx.mailserver.com

Then and only then will TLS enter the picture. It will connect to mx.mailserver.com and validate it is really talking to mx.mailserver.com via a signed TLS certificate.


Is it safe to use Diffie-Hellman public keys as nonces to protect against replay attacks? I have an interesting case regarding protection against replay attacks. Under the assumption that Alice and Bob have used Diffie-Hellman key exchange to establish a secure temporary session, would it be safe for them to use the public portion of their DH keys as nonce seeders in combination with HMAC to protect from replay attacks? In pseudo code -

Establishing a session:

a:
    (dhA, dhSecret) = DH_GEN(common)
    a->b (dhA)

b:
    (dhB, dhSecret) = DH_GEN(common)
    b->a (dhB)

a:
    a<-b (dhB)
    sessionKey = DH_KEY(dhB, dhSecret)

b:
    b<-a (dhA)
    sessionKey = DH_KEY(dhA, dhSecret)

Now when Alice wants to send some data to Bob:

a:
    data = ENCRYPT(sessionKey, data)
    dhA++
    hmac = HMAC(sessionKey, data | dhA)
    a->b (data, hmac)

And on Bob's side the process is reversed:

b:
    b<-a (data, hmac)
    if (hmac == HMAC(sessionKey, data | dhA+1)) {
        dhA++
        data = DECRYPT(sessionKey, data)
    }

The same thing happens in the opposite direction:

b:
    data = ENCRYPT(sessionKey, data)
    dhB++
    hmac = HMAC(sessionKey, data | dhB)
    b->a (data, hmac)

a:
    a<-b (data, hmac)
    if (hmac == HMAC(sessionKey, data | dhB+1)) {
        dhB++
        data = DECRYPT(sessionKey, data)
    }

And the second question - would it be easier and just as safe to use a self-incrementing nonce starting from a fixed number (say 0) instead of using fairly large DH public keys for the initial nonce?

What are the perils (if any) of such approach, aside from a possible MITM attack during the session establishment which can be thwarted using some form of authenticated Diffie-Hellman KE (e.g. having the generated public keys signed by trusted certificates during the exchange)?

Thanks

A nonce is a "number used once".

This is question is asking "should I use a the same value for my nonce each time". The answer is no.

Start with a number which is not predictable, e.g. from a good random source.

Edit 2: You gave the answer yourself. The nonce need not be kept secret. But the DH shared key must be. If you use the key for the nonce you will then need to keep the nonce secret...

Edit: I think what we have here is that nobody has ever considered the question, in the same way as nobody has ever asked "is it safe to clean my teeth with the polishing bit on a dremel". Spending any time thinking about the question is a waste of time.

To clean your teeth, use a toothbrush.
For a nonce, use a good random source.

Then get on with the next job.

Or, to be slightly less snarky, you need to ensure the number is only used once. A good random source achieves that statistically. Using e.g. the time remote IP achieves that physically. Neither of those uses information which must be kept secret.


Are PCI DSS standard requirements regarding TLS applicable only to customer facing webs or to whole even internal networks? I have found Are You Ready for 30 June 2018? Saying Goodbye to SSL/early TLS article that says TLS 1.0 should be disabled:

  30 June 2018 is the deadline for disabling SSL/early TLS and implementing a more secure encryption protocol – TLS 1.1 or higher (TLS v1.2 is strongly encouraged) in order to meet the PCI Data Security Standard (PCI DSS) for safeguarding payment data.

Is PCI DSS standard requirements regarding TLS applicable only to customer facing webs or to whole even internal networks?

As far as I know internal SSL is also required. CC data needs to be encrypted in transit, and that includes both public and private networks. Depending what your apps connect to it it also means connections from applications to the DB/messaging systems/you name it... and also if you use an CDN/SSL accelerator like Akamai, the SSL accelerator shouldn't see the plain CC details, unless they are PCI Certified themselves on the services you use AND you need to have evidence they are certified (aka a signed document, which usually costs a pile of money, saying they are certified).

Reference: Talks with a QSAs.


How do I create a valid email certificate for Outlook S/MIME with openssl? I need to create a certificate for email encryption and signing that has to be used by Outlook 2003+. I'm using OpenSSL, my self-signed root-CA is already imported into the trusted root-CA store. These are my steps to create a p12 Identity file importable by Outlook:

openssl req -batch -newkey rsa:1024 -keyout KEY.key -out KEY.csr \
  -nodes -config openssl.cnf &&\
openssl x509 -req -sha1 -days 1000 -in KEY.csr -CA ca.crt -CAkey ca.key \
  -set_serial 1 -out KEY.crt -setalias "FRIENDLY_NAME" \
  -clrtrust -addtrust emailProtection \
  -addreject clientAuth -addreject serverAuth -trustout &&\
openssl pkcs12 -export -in KEY.crt -inkey KEY.key" -out KEY.p12 \
  -name "FRIENDLY_NAME" -passout pass:PASSWD &&\
chmod 0600 KEY_CN.{key,p12} &>/dev/null

Here is the relevant segment of my openssl.cnf:

[ usr_cert ]
basicConstraints = CA:FALSE
authorityKeyIdentifier = keyid
subjectKeyIdentifier = hash
keyUsage = critical, digitalSignature, keyEncipherment
extendedKeyUsage = critical, emailProtection
subjectAltName = email:copy
authorityKeyIdentifier = keyid
subjectKeyIdentifier = hash

I inspected another valid p12 file to get these settings - and the -name cli option in the 3rd openssl-statement above.

My problem: Outlook still chokes on this (it's valid in Thunderbird, though).
I don't have the English error message (could provide the German one, though), these are the rough translations of the dialogs I see:

"Grant usage of a key to the application: Grant / do not grant" (you may show key details in the lower left - it says there is no description and no context information)
"Repeat the procedure. The protected key cannot be accessed, make sure the specified password is valid." (I did - I even tried every possible variation of password/no password in openssl and Outlook! For the next step, I'm led back to the first dialog and click "Cancel")
"Error in the underlying security system. Access denied!"

My current setup in Outlook:
Sign emails, transfer text and signature in plaintext and attach the certificate. I also restricted the certificates usage to secureEmail and disabled OCSP.
When importing the certificate (and on generation) I used the exact same password for every password request and the same description as friendlyName, CN and alias (maybe these can be different, I just didn't want to risk anything while trying).

I really don't get what Outlook doesn't like / wants to tell me.
If needed, I will gladly provide additional details.

Thanks!

The dialog box in #1 is expected when operating under Medium security.  The OS is supposed to verify the PIN before using the key for the first time.

The dialog boxes in #2 and #3 indicate more of a file-based permissions issue.  Are you doing this in Cygwin under Windows or a Unix host and transferring the file over?  There might be a problem in the chmod at the end under Cygwin.

Consider removing the "-clrtrust -addtrust emailProtection -addreject clientAuth -addreject serverAuth -trustout" options and seeing if it works when all intended uses are allowed.  Then start scaling back the intended uses.

For example, the following works for me, but obviously has "all" intended uses which may not be desirable:

$ openssl genrsa -aes128 -out email.key 2048
$ openssl req -new -key email.key -out email.csr -config email.cnf
$ openssl x509 -req -days 365 -in email.csr -CA ca.crt -CAkey ca.key -set_serial 10 -out email.crt
$ openssl pkcs12 -export -in email.crt -inkey email.key -out email.pfx

I use a very basic cnf file:

[ req ]
default_bits           = 2048
distinguished_name     = req_distinguished_name
prompt                 = no

[ req_distinguished_name ]
C                      = {Country}
ST                     = {Provice/State}
L                      = {City}
O                      = {Org}
OU                     = {Org Unit}
CN                     = user@domain.com
emailAddress           = user@domain.com

Load the email.pfx into the Windows Certificate Manager into your Personal certificate store.  Now, I have Outlook 2010 running under Windows 7, so I have to also create the entry I will use for default security settings.  This involves going to the Outlook Trust Manager (File | Options | Trust Center | Trust Center Settings | Email Security).  The "Encrypted Email" grouping is where you can create a new "Default Setting" which includes the newly imported certificate.  (The "Import/Export" button in Outlook 2010 can be used as a way to import the .pfx into the cert mgr.)


Preventing tracking pixels on Mozilla Thunderbird Is there a way to prevent loading of tracking pixels on Mozilla Thunderbird ? I know there's a way to prevent loading images by default but I'd like to be able to load images without having to worry about being tracked. Basically, I'm looking for some configuration setting (or addon) that gives me the functionality of uBlock Origin on Mozilla Thunderbird.

Thunderbird on Linux, I assume Windows is similar, has 3 viewing settings:

View

Message Body As

Original HTML
Simple HTML
Plain Text

Original will pull from remote locations to include trackers.

Simple will display only embedded content such as attachments or inline pictures.

Plain is text only with no HTML processing at all.

Setting to "Simple" will eliminate tracker loading as well as all remote loads.


Should big companies publicly list their legit emails and links? I've been going through a hassle with a big mobile company about if I should click into a link in an email that I think is from them. The email and the link inside is not obviously from the company, as the domains do not match up to the providers domain, or alternate domains. It seems through discussion on the company forum that it's not clear that this email is legit. This has been a confusing situation.
Should large companies have a security standards page, wherein they list all legit emails and domains that belong or are associated with them? For someone like me who checks the sender email and the domain of the links within it, I want to know who they are. If the company listed them on their website I would feel instantly safe. But instead I've wasted hours trying to resolve this situation without an answer yet.
My question - does such a scheme exist to list legit emails/domains on company websites? If not, why? If so, where?

Opinion: They SHOULD use their own domain both as the from-address in mails as well for any links in any communication.
It's only for their benefit. This will help mitigate password stealing for their users, avoiding bad press in the long run.


Collect infected email attachments I am having catch-all mailboxes for a lot of domains. The mails I receive for them are either spam or have viruses or trojans attached.

So far I am just throwing them away, but I wondered if it wasn't possible to use the mailboxes as some kind of honeypot and forward them to a anti-spam foundation or virus trap if something like this exists!?

Do you know any service or organization I can forward all this scam / viruses to so they get detected and help reducing spam and scam on the internet?

Your email provider will probably have a way for you to report spam for analysis, there are lots of organizations that fight spam and make internet a better place. Here are a few that allow you to submit spam for analysis:

spamcop
sophos
microsoft
mcAfee
websense
gmail
forward your email to spam@uce.gov
canadian spam reporting center

you can use your favorite search engine and search for the term "submit spam" to get a list of sites that allow submission of spam for analysis.


Is there a compatibility issue between IPv6 and security testing tools? Now that IPv6 is slowly coming into the picture, will there be a compatibility issue with using security testing tools, e.g.,:

Network vulnerability scanning tools
Web Applicaiton vulnerability assessment tools
Secure source code analysis tools

This was a question raised in today's brain storming sessions, and I don't get the picture here! In what way does migration to IPv6 affect the compatibility with these tools?

Most security tools have had IPv6 compatibility built in for years. For example, see nmap’s multitude of IPv6 options. With nmap6 being launched yesterday, it’s even more clear that nmap is much more than a vulnerability scanner.

Nessus has supported IPv6 since version 3.2, which was out in 2007.

Similarly, Metasploit has had it since 2007 (version 3.1), though it took a few months for payloads, stagers, etc. to catch up.

I haven’t used w3af in a long time, but it also had IPv6 support and since it’s part of Rapid 7, it obviously links in very well with Metasploit (as does nmap).

I don’t play much with code analysis tools, but as far as I know there are no compatibility issues for most.

You’ll obviously have to change your scripts from IPv4 addresses to IPv6 so there’ll be some tedious work there as you check things and validate that everything still works, but in terms of the tools actually working, the compatibility with IPv6 is built in for most of them.


How safe is the encryption offered by Mac OS X's Finder? If you plug in a USB drive, open it in Finder and right-click the Finder window, you get the option to encrypt the drive.

What methods does Finder use to encrypt the drive and how safe is it actually? Is it a smarter idea to use the TrueCrypt 7.1a version instead?

PS: I am using the current version of Mac OS X 10.11.1 "El Capitan".

I would not use TrueCrypt since it is no longer actively maintained, therefore, no longer safe to use. Truecrypts own website states “WARNING: Using TrueCrypt is not secure as it may contain unfixed security issues”

I would recommend using Apple's Built In Feature it is safe and secure, and of course, your files are as secured as the password you use to secure them. As far as the algorithms used to encrypt your password, gives you two options, choose the more secure option is somewhat slower encrypting/decrypting, of course you will only notice the difference with large files. You can choose 128-bit or 256-bit AES algorithms. The cipher AES 128-bit and/or 256-bit are both very secure TSL/SSL use it to encrypt end-to-end traffic across the Internet, it is considered among the top ciphers (Although NSA has categorized this to be in Grade-B, and their recommendation is to use 256-bit keys for encryption). Anyway to answer your question most third party programs today offer AES among other options to encrypt your data, therefore, I don't see any reason why you shouldn't use the built in feature for encryption.