DRY API Authentication Design Between Services I am creating an API service that is going to require authentication. this will be the first part of a project that will include a front-end service for my website, and also open up the api for 3rd party client front-ends to the service.

I have been planning out how I am going to split my site into the backend/frontend and think I have come up with a solution where I don't have to have duplicate user tables, but wanted to see if there were any gaping holes in my logic by asking a question here.

The auth system is designed to be similar to the Amazon AWS S3 auth system — assigning each user a key and secret, then using the secret to sign the api requests from the front-end clients. The api then looks up the user from the api_key, verifies that it was signed with the user's api_secret and goes from there.

The biggest hurdle is that I want my user model to live in the fronted. This is due to the existing ties between the user, subscription models and payment information that really have no place in the API service. To work with this, when the API needs to lookup a user api_secret, it has to communicate back to my front-end app (over a secure https line, and a different thread) to get it. This picture will help explain that in step 4.

I think that this will provide a secure auth system for the api, and a way for any front-end client or 3rd party client to implement steps 1 and 2, while not duplicating any user data in the backend. Step 4 would still always call my specific front-end app which holds all the user tables.

Is this a dumb way to do this?

Who are you trying to protect? the user? the front-end web? or the API?

I see one problem in that the API secret is stored on the front-end, which is more likely to be exposed to the outside world. If the front-end is compromised, then anybody can access the backend impersonating the user. It is a likely point to intercept in order to gain access to those secrets, otherwise only known to two parties.

I'm not sure I understood the point of the user providing the api secret, or whether it was stored on the front-end, and the access was granted by e.g. a username/password.

Otherwise, it sounds like you can benefit from using OAUTH to sign requests. OAUTH has a (oddly not very known it seems) two-legged mode, where you can easily exchange signed messages between two entities with a shared key.

All and all, looks like either a bit of a confused/confusing design, or perhaps it's hard to explain without giving more context. Best advice is to try not to reinvent the wheel and use existing algorithms/solutions/architectures as much as possible.


What is the purpose of the OAuth2 client secret? A typical OAuth2 Authorization Code Flow scenario looks like this:

What I'm not understanding is the purpose of the client secret in steps 6 and 7.  If the auth server is guaranteed to redirect back to the web app and send its authorization code there, how could an attacker get the authorization code (which is presumably the reason for the client secret)?

In addition, it seems that the PKCE extension does away with the need for the client secret, but reading the RFC for that I can't see any reason why it should.  Could somebody explain this for me?

In the context of an authorization code grant, the main purpose of the client secret is to prevent client impersonation. That is to say, it prevents a malicious client from pretending to be a legitimate client in order to get an access token from the resource owner under false pretenses.

It is worth pointing out that using a client secret is not the only means available to prevent client impersonation. For public clients (such as mobile apps and single page apps), client impersonation is prevented by the use of fixed https redirect uris. By only allowing specific, https redirect uris, a malicious client attempting to act as a legitimate client would be unable to intercept the authorization code. By being unable to intercept the authorization code, the malicious client would be unable to make the request to the token endpoint.

PKCE solves a different problem - basically, it prevents a malicious client that has somehow received an authorization code from using it to request an access token from the token endpoint. This was originally recognized as a problem in the mobile app space, but it is a useful technique for single page apps too. There is actually no harm in using PKCE with every OAuth 2 client, even those which use a client secret. The OAuth 2 Best Current Practice recommends using it everywhere.


Why should I convert & to & in XSS prevention? In their RULE #1, OWASP suggest that & should be encoded as &amp; before it is inserted into a HTML page. However, in the cases below:

<tag>userInput</tag>

<tag attribute="userInput"></tag>

If I only escape the four characters <, >. ' and ", but not &, is there any payload that could still cause XSS? Or are there any cases where & have to be escaped to prevent XSS vulnerabilitites?

As the comments say and from your linked document:

  Rule #1 is for when you want to put untrusted data directly into the HTML body somewhere. This includes inside normal tags like div, p, b, td, etc.

So your question can be answered with "because you apply the wrong rule for your context".

But to cite the applicable rule as well:

  The reason this rule is so broad is that developers frequently leave attributes unquoted. Properly quoted attributes can only be escaped with the corresponding quote. Unquoted attributes can be broken out of with many characters, including [space] % * + , - / ; < = > ^ and |.

So, yes, if you consistently and always use quotation marks on attributes, you only need to escape those. But that only needs one slip up and things fall apart, so the general rule is to be more rigorous than absolutely necessary.


Is the master keypair in OpenPGP ever used for encryption, or just signing? I've been reading this page about subkeys and I was surprised to read that "GnuPG actually uses a signing-only key as the master key".  I can understand how this was the case when DSA was the default (at least for GPG) for the master key, since DSA is a signing algorithm.  But now, RSA is standard and RSA if I understand correctly RSA can both encrypt and sign.  If I publish my public key (which I guess includes my subkeys??), how does the client know which key, master or subkey, which may be both RSA, to use to encrypt their message?  For that matter, what if I have multiple RSA and el-gamal master and subkeys?

In the OpenPGP format, public keys are distributed with signatures; every key is signed by another key. A "master" key is a key which is signed by itself. The signature includes some flags which tell what the signed key may be used for; these are described in section 5.2.3.21. Thus, a key intended for signatures only will be distributed with the flag "This key may be used to sign data" but not with the flag "This key may be used to encrypt communications". What you consider as the "master key" will be flagged "key meant to certify other keys" but will not be advertised as fit for encryption, even if the underlying key type mathematically allows it (e.g. RSA key).


Can I combine two of SHA-3 candidates cryptography hash functions and obtain more secure Algorithm? Possible Duplicate:
  Are different hash algorithms ever used together?

For example, Is possible to combine (Concatenate or Chain or XOR) Skein SHA-3 candidate with Grostl SHA-3 candidate to increase security?

Note: I just want more secure output and CPU cycles does not matter. I would like to come up with my two combine hash functions to protect a certain document's data integrity that I have. And of course, I want this protection to last for the next few years, So I decided to choose to combine two of SHA-3 candidates, Any suggestions?

For increased protection against collision vulnerabilities, compute both hashes and store them both. Combining them is an unnecessary step. The resulting protection is equal to the stronger of the two.

Keep in mind that there are some other scenarios to keep in mind:

If you hash a message with H1(H2(m)) you only get collision resistance from H2.
If you hash a message as H1(m) ⊕ H2(m) you get exactly the same security as not xoring the two together, since a collision on H1 will be negated by the fact that H2 changes the resulting hash.
It may turn out that if an attacker knows both H1(m) and H2(m), where H1 and H2 are different hash algorithms, they can deduce some information about m. This is unlikely, and I'm unaware of any attacks that do this, but it's an interesting concept. This is not applicable to your scenario, since you're only dealing with integrity, but it's an interesting concept.


Is a "standalone WPS server" possible? Wi-Fi Protected Setup (WPS) is

  a network security standard to create a secure wireless home network.

It aims at simplifying the enrollment of WiFi devices in a WiFi network (via a PIN, a button, ...).

I have a standalone AP which does not provide this functionality

for practical reasons (the AP is placed in possibly difficult to access places)
for security reasons (WPS is somehow broken (the PIN method is, and it is required by the standard to be in place, even if there is a button)).

After reading about the protocol, I have the impression that this is just a way to initially provide the connecting device the WPA2 shared key in a simpler way.
   Specifically - that APs (the ones who support WPS) do not keep track of the devices enrolled via WPS because these clients are (after the WPS exchange) simply devices which hold a correct WPA2 key, similar to the ones who have been enrolled "manually" by typing in the key.
In other words, is WPS only a "WPA2 key provisioning" solution?

Am I correct with this understanding?

If yes - why aren't there (or at least I could not find any) implementations of a "standalone WPS server", a software which would have knowledge of the WPA2 key and implementing the WPS protocol, to provide WPS-only devices (or lazy users) the capacity to enroll a device via WPS? (by launching the program, going though the WPS exchnage and thus providing the device the WPA2 key which would then be used to associate with the real AP)

You got this right. WPS is just a way to provide the data needed to access the AP over WPA2.

Why WPS is insecure

WPS itself is insecure. This is because the PIN which is 8 digits long is split up in two parts. The first part is 4 digits long and the second part is 3 digits long. This means instead of 99.999.999 possible combinatins you only have to try 10.998 (9999 for the first 4 digits and 999 for the last 3 digits) combinations. This is what tools like reaver do: Bruteforcing the WPS PIN.

There are mechanisms to prevent this like delays between attampts and blocking addresses that got the PIN wrong n times but in the end it's just a matter of time till the PIN is guessed.

Why there arent WPS Servers

The capability of a AP to accept WPS authentification is braodcased in so called beacon packets. These packets are send by the AP continiously and contain a lot of metadata about the provided network(s). As the AP is the instance telling someone that WPS is available there can't be any outside servers. Also it wouldn't be a good idea to implement such thing because WPS would still be insecure to use.


How secure is the Windows event log, and how is it secured? I'm curious as to just how secure the Windows event log is, and exactly what security measures it uses.

Does it include any defenses against tampering - for example, does it use digital signatures or hash chaining?

While ACLs are indeed the main way that the event log is secured, it does implement some other security features.

When the event log is cleared from the event viewer, a new event is added which contains the username of the user that cleared it.

Windows also keeps event log files open while the operating system is running, locking the files in such a way that they can only be written to by the event log process[1]. It is however possible for tools to inject malicious code into the event log process to circumvent this. One such tool is WinZapper, though you do need Administrator access, and I haven't played with this since Windows XP - so no idea if it still works on Windows 7.

It is sensible to ship your logs to a remote, hardened server. A number of free tools, such as Snare, support forwarding Windows logs to a syslog server. Most SIM/SIEM tools also support this either by using locally installed agents to push logs to the remote server, or by the remote server pulling logs from source systems over WMI (less scalable way). You can also use the Windows Event Collector.


HIDS - Choosing between regular OSSEC or Wazuh fork I intend to set up OSSEC and noticed there seem to be two main flavours: plain OSSEC and Wazuh fork.

From what I've been able to gather (from Wazuh's website and documentation), the main advantages of Wazuh are:

its ability to integrate with ELK
an improved ruleset
restful API

I have no interest in using ELK for this project, but we already have a preexisting graylog instance that I'd like to hook up with OSSEC, which should be possible in regular OSSEC using syslog cef format.

I assume I can use the improved ruleset even if I run regular OSSEC, atleast I haven't seen anything that indicates otherwise.

As for the restful API, I'm still very inexperienced and I've only recently heard about REST - I don't even know how I would begin putting it to use - so I'm not sure if I should use the Wazuh fork just for that.

The objective is to run OSSEC agents on the machines in our cloud environment and point them to an OSSEC Server in a machine that's already being used for log management and monitoring on the same network .

Are there any other advantages to running Wazuh instead of the regular OSSEC? Is there anything else I should take into consideration?

Regarding Wazuh differences with OSSEC, the Wazuh team is working on updating the documentation to explain those better (and on a new release and installers).

Wazuh new version (2.0, currently found under the master branch) highlights are:

OpenSCAP integrated as part of the agent, allowing users to run OVAL
checks.
New WUI on top of Kibana 5, and integrated with the RESTful
API to monitor configuration of the manager, rules and status of the
agents.
Improved log analysis and FIM capabilities.
Ruleset with compliance mapping.
Agent-manager communications over TCP supported.
A modules manager that will allow future integration of other tools
(in the roadmap is OSquery and Threat Intelligence sources)

Complete changelog can be found here:

https://github.com/wazuh/wazuh/blob/master/CHANGELOG.md

If you are curious, here are some screenshots of the WUI.

https://github.com/wazuh/wazuh-documentation/tree/2.0/source/images/screenshots

As well it is worth mentioning that Wazuh project, as a fork, is based on the work done by OSSEC developers and contributors to which we are thankful. Wazuh plans to continue contributing to OSSEC Github repository with bug fixes, but we also have our own roadmap so, most likely, both projects will evolve in different ways.


What point in Authenticator App 2FA when SMS fallback is enabled I would like to move away from SMS 2FA (because of Should 2FA over SMS be considered insecure in the wake of recent SS7 attacks? for example).

But some services that provide Authenticator apps actually provide fallbacks mechanisms that go to SMS. For example, LastPass Authenticator gives:

So really, in such a scenario, app 2FA brings no added security to SMS 2FA.

It just brings ease of use I guess, but I'm frustrated to see that. I would prefer to disable 2FA SMS altogether (and rather have backup codes in case of device unavailability). Edit: Just checked, it's possible to do in gmail.

Is there something I miss there, or is it really that sad?

You need in Appenter link description here 2FA, see the attached image as an example in gmail.
Above most operators are installing SS7/Signalling firewall to ensure that subscribers are secure from SMS interception and redirection attacks.


How does Wireshark detect online-messenger traffic? I have been working on how to find use of online messenger (e.g imo.im, ebuddy) using Wireshark. I'm doing, as I need to build SIEM (security information event management) use-cases which detects usage of online web-messenger.

To do little about of research, I went on a few online web-messenger and turned on the Wireshark in the background. After a couple of minutes of browsing the online messenger sites, I stopped the Wireshark and went straight on analysis. At first, I found nothing special / unique which tells me (as a user) an online messaging service / protocol I used as all these sites works on http or https.

However, as I dig deep I find something interesting. The reference is given below:

Hypertext Transfer Protocol
    HTTP/1.1 200 OK\r\n
        **[Expert Info (Chat/Sequence): HTTP/1.1 200 OK\r\n]**
            [Message: HTTP/1.1 200 OK\r\n]
            [Severity level: Chat]
            [Group: Sequence]
        Request Version: HTTP/1.1
        Status Code: 200
        Response Phrase: OK
    Content-Encoding: gzip\r\n
    Cache-Control: max-age=10800\r\n
    Content-Type: text/html; charset=utf-8\r\n
    Date: Thu, 24 Jan 2013 17:58:46 GMT\r\n
    Expires: Thu, 24 Jan 2013 20:58:46 GMT\r\n
    Last-Modified: Thu, 24 Jan 2013 01:07:06 GMT\r\n
    p3p: CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"\r\n
    Server: ECS (fra/D439)\r\n
    SVR: SP002B7\r\n
    Vary: Accept-Encoding\r\n
    X-Cache: HIT\r\n
    Content-Length: 387\r\n
    \r\n
    Content-encoded entity body (gzip): 387 bytes -> 942 bytes
    Line-based text data: text/html

I have searched the src code and beside PI_CHAT constant declaration in header file expert.c. If I follow the code in packet-http.c I see the following code.

saw_req_resp_or_header = TRUE;
        if (is_request_or_reply) {
                char *text = tvb_format_text(tvb, offset, next_offset - offset);
            if (tree) {
                hdr_item = proto_tree_add_text(http_tree, tvb,
                    offset, next_offset - offset, "%s", text);
            }
            expert_add_info_format(pinfo, hdr_item, PI_SEQUENCE, PI_CHAT, "%s", text);
            if (reqresp_dissector) {
                if (tree) req_tree = proto_item_add_subtree(hdr_item, ett_http_request);
                else req_tree = NULL;

                reqresp_dissector(tvb, req_tree, offset, line,
                          lineend, conv_data);

From the code above its hard to comprehend as to what conditions or input brings PI_CHAT variable to be set. Beside code, if anyone can explain in terms of theory as to how Wireshark detects chatting behavior. The theory I have read on the Wireshark official sites says expert info is to detect changes which are abnormal / anomalies in nature. I'm more interested in knowing the 'how' part.

You're misinterpreting the categorization.

    **[Expert Info (Chat/Sequence): HTTP/1.1 200 OK\r\n]**
        [Message: HTTP/1.1 200 OK\r\n]
        [Severity level: Chat]

Other things that might show up there are "note", "warn", and "error". If this were expanded to two words, it would be protocol chat. What this is pointing out is that this packet has some control chatter that relates to the state of the connection. It has nothing to do with the content or nature of your traffic's message at a higher level than HTTP. See http://www.wireshark.org/docs/wsug_html_chunked/ChAdvExpert.html for more info.


Network Forensics - what is in your toolbox In similar vein to this question on computer forensics, what tools would you have in your toolbox for infrastructure and network forensics. Typical example cases would be if you were called in either after an incident, or on suspicion of an incident, and asked "Have we been compromised? What did the attacker do? How did they do it? Are we still compromised? and Is an attack still underway?"

Assume the organisation has logs - which ones would be of most value?
What would you have as essential tools?

Well, for the first 3 questions I would perform a full examination on the machine back at the office. We are lucky enough to have ongoing network monitoring in several locations in our network, both in the form of firewalls and flow collectors.

Flow Records from Argus (similar to Net- or J-flows)
Firewall logs (from both 'near by' hosts and hardware firewalls)
tcpdump (captured from a mirrored port if possible, hub/tap if necessary)
perl/grep/awk

The majority of the magic comes in the form of the perl scripts we have developed over the years, and the analysis/aggregation tools shipped with Argus.

The majority of compromises that I have examined are being used to either serve up illegal movies/music/etc or perform denial of service attacks. In both cases the infections are easy to track from either the flow records or firewalls.


PHP on IIS 7.5 Hacked - How do I find and fix the XSS Injection? I discovered that someone had gained access via FileZilla server software to my Windows 2012 Server. It seems like they had created extra accounts and were trying brute force attempts to get in nearly constantly.

At any rate, any PHP pages running on any of my sites on this server have had an iframe with a link to a malicious exe file from a chinese IP as the source. I shutdown the FTP server and was able to implement X-Frame-Option: DENY in IIS to prevent the file from trying to download. However, now I am trying to play detective and find where this malicious code is.

I tried looking throughout IIS but I believe it must be PHP specific. I looked in the php.ini files for references to this IP address but couldn't find anything.

If anyone could recommend ways to find and clean the malicious iframe code it would be appreciated. I have both PHP 5.3 and 5.4 installed from the Web Platform Installer.

Thanks.

This is not XSS. You got hacked.
You want to check the settings of auto_prepend_file and auto_append_file. This may be in your php.ini or in .htaccess files.
If the attacker had access to the system to the point where he could run arbitrary PHP code, he could have done a lot of worse things. Do find out how the attacker got in if you can, but afterwards, you should get all data off the machine, and wipe and reinstall the entire machine from trusted media. Consider any private keys (e.g. from SSL certificates), passwords, etc. that are stored on the machine compromised (i.e. change passwords, revoke and replace certificates).
Consider the possibility that the attacker hid a backdoor somewhere in your PHP code.  Anywhere. This is actually pretty likely. If you want to copy any of your code to the reinstalled machine, you need to audit all of it (e.g. by comparing it to a known clean copy - pay attention to additional files too) or simply nuke it and reinstall from a clean source. Also check your Wordpress/other CMS database for settings which could allow backdoors.


IP Address and Site Verification I just got interested in the kind of technologies that are employed in verifying the ownership of a website/domain or IP address. More specifically, a couple of online services offer the possibility of conducting vulnerability scanning without the need to install vulnerability scanners. I tried one of them and realized I had to verify ownership of my domain.

My question is, how do these verification approaches work. Can they be circumvented in some way ? The approaches I have observed in use include Google Analytics, DNS records, file upload, meta tag and some manual approaches.

UPDATE..

@yzT's answer has aided my understanding.  A related question is about leveraging browser certificate verification functionality for domain verification. I am not sure how this is possible, but given that browsers are able to validate web server's ssl certificate, can a third party application leverage this in anyway ? For example can a web application query FireFox's (or another browser) certificate store for a specific certificate being presented by an entity, claiming to own a domain ? Or request the entity to present its ssl certificate for verification through the above mentioned approach ? am not sure if this is clear enough though ...

To prove that you own a domain you have multiple methods, being the most common to add a CNAME or TXT record to your DNS, or if it's for a web server, you have the possibility to upload a temporary file (like Let's Encrypt does with the webroot plugin).

Prove that you own an IP is a little more complicated and eventually would need some signed confirmation by your ISP. You can't use file upload because it's not a 1:1 relation. For example, if you have your site in a shared hosting, the IP would be the same for many customer and you just own a VirtualHost in that IP.


What is an electronic document in the context of encryption? I'm reading about a Public key certificate:

  In cryptography, a public key certificate, also known as a digital certificate or identity certificate, is an electronic document used to prove the ownership of a public key.

From the wiki for an Electronic document:

  An electronic document is any electronic media content (other than computer programs or system files) that are intended to be used in either an electronic form or as printed output.

In this case, if I'm curious if a public key certificate is a plain-text file or a binary file does the term "electronic document" tell me any information?

Specifically, would a data file with the extension .cer and a plain-text file with the extension .p12 both be considered "electronic documents"?

In this case, I would recommend not overthinking it.

The primary reason why it matters that it is an "electronic" document is that the document can be readily copied by electronic means.  In public key encryption, you typically transmit the public key over an electronic medium like the internet.  This means the document can be trivially copied and there is no concept of an "original" document being any more meaningful than a copy of the original.

The fact that it's electronic is not essential, but it is helpful for avoiding some potential mishaps if you think about things the wrong way.  For example, if I am crossing a border and want to prove my identity to a border patrol agent, I would show them my passport.  They'd look at it, verify it, and then hand it back to me.  In the case of an electronic document, because the content is just bytes, the normal pattern to prove your identity is that you give the officer a copy of your electronic document, and then they keep the copy.  Most of the time they dispose of it because they have no further use for it, but in theory they could keep it forever, and their copy is as good as my original.  Accordingly, the security proofs regarding electronic identity documents tend to take a different tack than security proofs regarding physical documents.


Http request can't capture from wireshark I am working in wireshark. I am monitoring the wifi traffic on the same network. We have 6 pc's there and one machine was installed on wireshark to  capture wifi traffic. I got my team mates Ip address in the endpoint list.  My machine have installed wiresahrk. whenever they ping to my machine. my machine ip : 192.168.1.214. and others are: 192.168.1.31, 164,188,242. and they ping a request to my m/c I can capture that request.
And if 192.168.1.188 machine send a http request to a local server to other ip like 164, 31 . I couldn't capture that http request. Its hows only mdns protocol.. here is the screenshot..

Why I can't capture the http request ? Why other team mates IP (188-->164.31) was not capture ?  Anyone please help me

I am working in ubuntu machine.

My router type is : Belkin Surf N150 Wireless Modem Router, F9J1001 v1.

Wireshark doesn't show you all the network traffic in a network. It shows you the network traffic that arrives on or leaves one of your computer's network interfaces.

So if you send an HTTP request to one of your team's computers, or if one of your team members sends an HTTP request to your computer, wireshark on your machine will pick it up. But wireshark can't pick up requests that don't pass your network interface.

You can put your wifi network card into promiscious/monitor mode to capture all packets in the air, even if they're not meant for your machine, but wireshark alone can't do that. So if you can't see packets not targeted at you, the reason is that your wifi adapter is not in monitor mode and by default filters all packets not targeted at you.


How to get vulnerabilites by product name and version I have a list of software installed on workstations which contains product name and version, for example my list contains Mysql Workbench 6.3.8. Searching in CVE Details I found out that this software has one vulnerability CVE-2017-3469. Is there any automated tool to do this kind of search in most popular vulnerability databases? What are the others vulnerability databases that I should search?

Vulnerability Management tools are designed to do this very function. They usually are able to scan devices and lookup versions against known patch levels as well as CVEs.

There are a great many to choose from with a wide range of features.

The most crucial sources to check beside the CVE database are:

Exploit-DB
Metasploit exploit repository

There are also a number of tools that can take a csv file of product names and versions and look them up in these sources (or you can make your own).


User authentication in JavaScript application I'm developping a web application which will be communicating with a server over WebAPI. The server side will be on Azure and the client side will be on custom hosting with a JavaScript application (for example with ReactJS).

I want to authentificate the user like this:

User enter login and pass in client app.
Pass and login are sent to server over HTTPS with AJAX.
If authentication succeed, server return a token to the client.
Token is stored in local storage.
All future requests to the server will contains the previously stored token as a parameter.

Is that authentication model secure enough? We always use .NET MVC for now, and store user information in server session, but this is new situation, where client didn't run on server directly, but only communicate with it over HTTPS.

What you describe here is pretty much the equivalent of classic cookie management (besides the parameter issue, see under)

When done on SPA applications like yours, usually the session ID (the token you describe) is part of an HTTP header.

I strongly advise you to avoid sending the session ID as a parameter as you are currently describing. Notably, because :

browsing history (client-side) would disclose the session ID and facilitate session hijacking
server logs would contain session ID's and facilitate session hijacking

Using HTTP headers instead mitigates those issues.

  We always use .NET MVC for now, and store user information in server session, but this is new situation, where client didn't run on server directly,

About this : make sure that all your validation always happens at least server-side (and optionally client-side), and that sensitive session information stays server-side as well.


Am I preparing for a career in cyber security AFROTC properly? What is it like working in military cyber security? What are the restrictions (in terms of software)? Would I be able to pick an OS? Can I use my own tools? Do I have to give the government any tools I write? Is AFROTC viable option with the direction of training I am headed, and if so, should I go enlisted first(as pseudo SMP)?

I'm primarily worried that my time spent in Linux systems would end up being useless in the military. I decided to ask here because I don't know if anyone who works in cyber security for the military. I will try contacting some of the ROTC/air Force reps after posting this.
Some background- About a year ago, in my junior year, I gained an interested in starting a military career. It was also at this time that I was studying networking and started using Debian. After researching, I found that there were many careers available in the military ranging from networking, sysadmin, and pentesting. I was interested in trying out these skills by creating a lab, and I have ended up spending my senior year using it daily and enjoyed every moment. I am currently working on a couple of certifications: ICND1, RHCSA, OSCP. I completed a couple Microsoft certifications through FLVS early in the school year. I settled on starting in cyber security, and have practiced using tools from Kali, writing programs to automate tool usage, learning different concepts and practicing execution in Linux environments. Since I just finished highschool and still 17 untill August,  I worry about what complications with my self taught training could happen when joining military cyber security. I'm hoping someone could relieve me with some clarity. Thank you!

P.S. I wasn't sure where to post this, is there a better place?

Full disclosure, I am prior Air Force and I will answer your questions to the best of my ability.

1.) USAF Officers: So, it seems as if you are still attempting to define how you are going to enter the USAF (i.e. Enlisted/Officer). This is priority #1 before you make any decisions going forward. If you have a 4 year degree completed in a needed field (Mathematics, Cyber Security, Physics, Meteorology, etc), then you should be able to get passed the recruiter and take the AFOQT - Air Force Officers Qualification Test. The test will either deny or accept you entry to Officer Candidate School. However, since you are still is HS, start looking at schools with a ROTC program and a CyberSecurity/ Information Technology Security Major. These should be your first steps

2.) USAF Enlisted: there are sysadmin, network engineers positions within the enlisted ranks. I am not so certain on cyber security though as that takes lots of training and education which, is really more of an officer AFSC. If you are thinking of enlisting for cybersecurity, I would just ask you to go look at ROTC programs first since that will be a much better solution which a much more guaranteed AFSC, and you're setting yourself for a much brighter future.

3.) Linux: Understand it, know how to use it well, Linux is your friend and ally when it comes to pen testing and hacking in general. With that said, you need to understand windows very well too. The USAF and most cyber commands for that matter will have a subset of tools and procedures that you will need to follow if you enter in the service. Just try to learn as much as you can about as much as you can.

4.) Certifications: OSCP is a bitch, if you're going to focus on some certifications, focus on one at a time IMO. If you are studying for OSCP, just study for OSCP! But you should really figure out what you want to do. If it's offensive or defensive security, then from there narrow it down as much as you can.


What is the difference between Broken Access Control and Insecure Direct Object reference? If I understand correctly, the main difference is that the user must be logged in to carry out an insecure direct object reference attack but he doesn't have to be logged in to exploit a broken access control attack.

Do I have this right? What are the differences?

Definition of Insecure Direct Object Reference from OWASP:

  Insecure Direct Object References occur when an application provides direct access to objects based on user-supplied input. As a result of this vulnerability attackers can bypass authorization and access resources in the system directly, for example database records or files.

Definition of  Broken Access Control from OWASP

  Access control, sometimes called authorization, is how a web
  application grants access to content and functions to some users and
  not others. These checks are performed after authentication, and
  govern what ‘authorized’ users are allowed to do. Access control
  sounds like a simple problem but is insidiously difficult to implement
  correctly. A web application’s access control model is closely tied to
  the content and functions that the site provides. In addition, the
  users may fall into a number of groups or roles with different
  abilities or privileges.

Depending on how you want to interpret these non-standard terms, they could be construied as the same.

However, direct object access typically means there is a lack of an authentication control in order to gain access to privileged information whereas broken access control indicates the access control is not functioning as intended.

For example, if you create reports for a specific user at some URL like: http://example.com/some-report/report-1231231231312.pdf and the application does not require authentication this would be direct object access. It is possible the developers never implemented any access control in the first place, therefore, the access control is not broken, it just direct object access - i.e., the report is written to a url, but it's just a file location separate from the core application so the application does not have control over delivery of the resource.

In many cases, both terms could be used to describe the same vulnerability as well. E.g., The report is generated dynamically only for logged in users, but the report is accessible later without having to log in. In this case, developers only put the access control on the function to create the report but not to access.

Insecure direct object reference


Security on passwords stored by Firefox vs password manager I am wondering about the safety of my passwords stored in FF > 57.

I guess passwords stored in a Keepass database file are safe against cracking, as much as possible given its AES algorithm.

Are passwords stored in FF builtin password manager are as safe as that, given its algorithm?

Well, they are encrypted with AES, but they are not as safe. FF does not use slow key derivation function, which allows the password to be brute forced. Also sync is not encrypted anywhere as well, so you should at least disable sync on FF. In general, FF is convenient and secure enough for basic protection but not as secure as keepass.


How could `iptables -F` lock me out of the server? I was just configuring IPtables and whilst doing so, had the default chain policies set to ACCEPT, but when happy with the generated rules I changed that to DROP for all chains.

I did not run iptables-save at any time.

After do this, I still had good access, but noticed that one of the rules wasn't right, so I decided to flush the rules immediately to avoid interrupting the users.

When I did this using iptables -F I was immediately denied access to the server (along with the rest of the world). So much for not wanting to interrupt the users!

Is it possible that the rules were flushed but the default policies were left as DROP?

What went wrong and what should I have done?

iptables -F does not change the default policy. So when you set it to DROP and do a flush afterwards, it stays on DROP.
I use the following commands to flush the tables

iptables -P INPUT   ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT  ACCEPT
iptables -F
iptables -X

This changes the default policies to ACCEPT for all filter chains, flushes the rules and removes all custom chains.


Is there a difference between a VTI and a regular VPN tunneling process? Is there a difference between a VTI (Virtual Tunnel Interface) and a regular VPN tunneling process?

Or have I got the whole concept wrong?

Quick Googling indicates (1,2) that the idea of VTI is to use virtual interfaces to de-attach the routing from the VPN tunnel.

Specifically, IPsec configuration typically requires you to specify the IP networks that you want the IPsec engine to handle. As a result of that handling, the packets are encapsulated and so the routing decision for that packets implicitly changes. So to understand how packets are routed you have to understand the routing table AND the IPsec security policy (SPD).

What Cisco proposes in the above pages is to use another layer of encapulation, GRE(3), to detach routing from the VPN channels. They setup virtual interfaces with GRE that provide a simple IP tunnel. Then they configure IPsec to work only for those configured GRE tunnels(based on their outer IP headers, which you can chose to be small networks(transfer network, /2) with untypical IP addresses.

As a result, you can use the regular (much more flexible) routing tools on these interfaces to determine which traffic should go through the IPsec tunnel.

This can make sense in case you have many VPNs with sometimes changing IPs, or in some very special setups. For example, I recently had the problem to connect two networks with IPsec and also let network A be the Internet gateway for the other network B. That means network B has no dedicated Internet but should have a default route towards network A. It also means that the IPsec policy should apply to all traffic(0.0.0.0/?), which apparently does not work in practice in Linux. So we used GRE tunneling and set the default route towards the virtual interface provided by GRE.

Not new technology but certainly has the potential to ease use and management in some cases..


WDigest password stored in cleartext - Windows A well known security-vulnerability in Windows (up until Windows 8.0) is that the WDigest password is stored in cleartext and can be extracted by using Mimikatz.

I found out that this password is in memory even if the user hasn't logged in yet (and hasn't typed his password once after rebooting).

Does anybody know why this password is already in memory after rebooting? I was thinking about certain processes that need to be started when booting, but I can't imagine that these processes would require a cleartext stored password.

This is to allow the user access when there is no domain controller. If you've ever turned off a domain joined computer, disconnected it from the domain, and turned it back on, you'd notice you can still log in with the domain account you usually use.

Regardless of whether you disable or enable WDigest, Windows will still store cleartext credentials for Kerberos authentication, so that it can renew tickets and stuff without you having to type the password every time. It's not necessarily a Windows issue, as it's the same for Linux and OS X.

Cleartext password dump for Linux:
https://github.com/huntergregal/mimipenguin


Is there anything I can do past SSL pinning to secure my connection? My goal is to prevent man-in-the-middle (MITM) attacks through proxies. I've implemented SSL pinning, which has helped significantly, but I'm wondering if there's anything more I can do that's worth the time in securing my connection? What can a user do to get around SSL pinning? Is there anything I can do to further prevent MITM attacks if the attacker gets around SSL pinning?

Right now, we're concerned with an attacker getting around pinning and using a proxy to be able to open the html page (by getting its URL from the proxy) in a device browser (like Chrome) outside of the app.

Right now, we're concerned with an attacker getting around pinning and using a proxy to be able to open the html page (by getting its URL from the proxy) in a device browser (like Chrome) outside of the app

Pinning is to ensure in the client that it connects to the right server. But it looks like that this is not your actual problem. Instead you are trying to ensure that the expected client connects to the server. In this case you obviously need to authenticate the client - client side pinning only authenticates the server to the client.

To authenticate a client to the server client certificates can be used which then of course need to be properly checked by the server. Note that it might still be possible to extract the certificate and use it outside the application. This again might be prevented by hardware backed certificates, i.e. certificate on a smartcard or similar.

Note that all of this does not help to protect the manipulation by an attacker which has full access to the device, i.e. you cannot use this to hinder the owner of a device to reverse engineer and use the application in a way which was not intended by you.


Possible SQLi with self-made prepared statements and real_escape_string? My current assignment is to find a possible SQL injection in a PHP WebApp. While looking at the source code, I noticed that the way the script is handling prepared statments is weird.

$query = db::prepare("SELECT password FROM vault where id=%s", $_POST['id']);
$res = db::commit($query);

The interesting part from the prepare function looks like this:

    // escape
    foreach ($args as &$value){
        $value = static::$db->real_escape_string($value);
    }

    // prepare
    $query = str_replace("%s", "'%s'", $query);
    $query = vsprintf($query, $args);
    return $query;

Now, looking around for ways to bypass this, I noticed that single quotes are escaped, obviously because of the real_escape_string function. Looking around here, I found the following post which states that setting %s in single quotes preemptively looks highly suspect. However, I still haven't found any way how to exploit this, or if it is even exploitable.

Can anyone tell me, if there is anything wrong to escape and process user input like that? I know using the original mysqli/PDO prepared statement functions are a better idea, but given this isn't my code, it would be great to find out what exactly is wrong here and why you shouldn't do it like this.

if there is anything wrong to escape and process user input like that?

To clarify, there is nothing wrong with escaping per se as long as it is used on purpose - to escape not the arbitrary "user input" but specifically data to be used in the string literals in SQL query. Frankly, as long as the data in SQL query is both quoted and escaped, there should be no harm possible.

The code in question is a special case. Although bulk escaping is used (which is a big red flag as a rule), in this case it should be considered safe as long as only basic printf placeholders are used (i.e. %s, %d, %f etc), without argument swapping and other fancy stuff. As a result every input variable would be either

wrapped in quotes if %s placeholder is used (and thus gets quoted and escaped to satisfy the rule from the above);
or gets formatted as a number in case any other placeholder is used.

So I don't see any possibility for the injection.

The only slight security concern here is to use mysqli::set_charset() to set the connection encoding, to avoid a virtual vulnerability when a peculiar outdated encoding is used.


Can I configure a router to control access from my children's telephones as well as other devices? Our children use both iPhones and Motorola phones. We get worn down by the fights about "confiscating" the phones, and want to be able to block access to the Internet on a device-by-device basis when we need to. Is there a router or other device/configuration that can control access on such a basis?

You could block the devices based on their MAC address. In short, a MAC address is a unique identifier for a device. This method can be used until your kids are smart enough to spoof them.

In your router you should be able to view all the assigned IP addresses, including their MAC addresses in the DHCP configuration. Then you could enable MAC address white-listing by entering the MAC address of the devices to which you want to allow internet access.

As you have not mentioned what type of router you have, I've added this (random) picture so you get an idea of what you're looking for:

Aside from the technical aspect, why not tell your kids they will lose their phone for a week if or when they start fighting?! And if they do it again, they'll lose it for a month.

Technology should not be a solution for your children's misbehaviour IMHO.


Can Exchange/OWA still compress static images and be immune to HTTP compression attacks? Microsoft Exchange / OWA (Outlook Web Access) allows for three different types of compression (link for Ex2010)

Compression setting   Description
High                  Compresses both static and dynamic pages.
Low                   Compresses only static pages.
None                  No compression is used.

Given the known attacks against HTTP and SSL (namely BEAST, CRIME, and BREACH, is it safe to use a compression setting of "Low", wherein only static pages are compressed?

The recent compression-related attacks all work on the same principle: some chunk of bytes is compressed, containing both a data element that the attacker chooses, and a data element that the attacker wants to uncover. The resulting compressed length is used as a binary oracle in successive "guesses" from the attacker, who progressively rebuilds the secret value, one byte at a time.

This cannot work with static pages, because static pages are static. By definition, this means that their contents does not change often (i.e. never except by explicit action of the site administrator), and, in particular, the attacker does not get to put his own data in them.

It can be pointed out that compression is a matter of performance and, as such, is not warranted until performance problems have been duly noticed. I suggest that you first deactivate compression altogether, and see if this works well for you. If, and only if, you notice excessive network consumption or latency, does it become relevant to try higher compression levels.


Can closed, sleeping MacBook send network data? I would think the answer is unequivocally, "No." But...

My MacBook Pro logged "Diagnostic and Usage Messages" in the Console, at 4:19am, while it was physically closed and (therefore) sleeping. I was physically asleep from a bit before 1am until 8am. I'm the only one who was here last night. When I woke up, I actually became alarmed that something in my house was physically out of place (although could try to chalk this up to paranoia and poor memory), so began to worry about a physical intrusion. I went to check my laptop, opened it and as soon as it woke, I got Little Snitch dialogs about connecting to radarsubmissions.apple.com, which I looked up and see this is usually for crash reporting diagnosics. No programs appear to have crashed. This led me to the Console application, where I see the entries from the middle of the night.

Is this determinate of a physical intrusion, or is there another possible explanation where my laptop stayed closed all night? I do see in the Console going back 6 days, all other logging is from times when I would have been using the laptop.

When you close the lid of a MacBook, it triggers a sensor which says to the running operating system "the lid is closed". It is up to the OS to decide what to do in this case. In particular, nothing forces the OS to go to sleep; the machine may perfectly operate while closed (this is not recommended because heat dissipation does not work as well when the lid is closed, but there is no impossibility). If the OS decides to go to sleep, then it also registers to the relevant circuitry the nature of the hardware events which may wake it up; these may include "opening the lid" but also "reaching a given specific time".

There are in fact several levels of sleeping; see for instance this page. Depending on the level, the extent of the sleeping changes (i.e. which elements are stopped and which keep on running). In any case, if the machine has been corrupted by some malware, then that malware may well make it so that when you put the machine to sleep by closing the lid, the "sleep mode" is only emulated, and the machine still runs; or the malware schedules an automatic wake-up even if the lid is still closed, in order to further its nefarious schemes.

It is even possible that the people at Apple really play such games for totally honest and harmless reasons, e.g. to run normal regular housekeeping tasks when it is least consequential for the human user, i.e. when the user is not in front of the machine and using it.

Alternatively, you are a sleepwalker.


Can an SSL certificate be used to generate a SAML token An external application (B) requires a SAML token to allow users who log into my application (A) to access it directly without having to log in again. This access is not built yet. My organization has an existing SSL certificate and certified domain which is used to access data from another external application (C). Is it possible/ok to use the SSL certificate used for C to generate a token for users who want to access B?
Thank you

Yes, it's possible. As far as I know, the SAML standard has no restrictions on type of certificate to be used, and in practice you often have self-signed certificates with the public key communicated out of band rather than depending on chain of trusted certificate authority.

Regarding whether it's OK/advisable, some things to think about:

Deploying it this way will require your application to have access to the private key of the certificate, where I assume it did not need this permission before (since that would typically be handled at the web server or load balancer level). More things with permission to your SSL cert broadens the risk of compromise.
You've now complicated your SSL cert rollover procedures and potentially need to involve the external application's staff in the timing of this.


Why sign SAML authentication requests In SAML, signing or encrypting the assertions seems to be essential, but I'm not finding much information describing any benefits or drawbacks of signing the authentication request in real world "practical" scenarios.

Security and Privacy Considerations forthe OASIS Security Assertion MarkupLanguage (SAML) section 5.2.1.2 talks about that it can prevent DOS attacks.
but are there any other attacks that signed requests would prevent?
Are there any other benefits or drawbacks of using signed authentication requests from the SP?

Signed requests can help in the scenario where the Assertion Consumer Service URL requested after authentication can be to a variety of domains or URLs. To avoid being used as an open redirector, the IDP would generally validate based on a predefined list of valid URIs. This list would be obtained from the SP metadata or manually entered from a known list. But if the SP signs the authentication request, then the IDP has some assurance that the request is valid even if the URI is not in the predefined list.


User account existence confirmation It used to be the case that authentication systems wouldn't confirm whether a user account existed and, instead, would simply report that the user logon name or password was incorrect.

Nowadays, a lot of authentication systems (particularly those for Google Accounts, Microsoft Accounts, etc) will (1) confirm that the user account exists by use of the submitted user logon name then (2) prompt for the password.

Why did this change?

There is a trade off here between usability and security. Keeping the username secret is more secure, but makes it harder for the user to use the application. Confirming whether a username exists is a marginal risk: the attacker can guess a limited number of values. If the username is an email address, the protection is reduced even more since email addresses are generally public. These providers think that the little reduction in security is worth the extra usability this offers for the user.


Saving unhashed first name and last name on a non-encrypted database on phone Using react-native, we save the first name and last name in Redux, which is a non-encrypted database within the app.

I have been tasked to secure this data. Either encrypt these two fields or save them in the storage of the phone.

How risky is to have the first name and last name saved in clear. Is it a security risk?

I have been tasked to secure this data. Either encrypt these two fields or save them in the storage of the phone.

Modern smartphones (Android, iOS) already encrypt their flash when a pin or passcode is set. Your app's storage should be isolated and cannot usually be read by other apps. Assuming your app doesn't ask your user for a master password, any additional encryption you add can just be defeated by reverse-engineering your app. If you could store a per-user encryption key on the server side then you could just store the name and pass on the server anyway, so that's a pointless approach.

  How risky is to have the first name and last name saved in clear. Is it a security risk?

I would call it a minimal security risk in most contexts except a few. If your app contains medical data or allows medical data to be inferred (e.g. if your app was for, say, a HIV support group) then you may be beholden to legislation such as HIPAA, not to mention a moral obligation to protect those names. The same goes for things like dating apps where sexual orientation or gender expression are stored, which may be problematic to some people's family situation, or worse under certain governments. You can continue this line of thinking for other threat models of this ilk; effectively, if the use of your app may indicate behaviour or beliefs that could lead to persecution or harm, then you should strongly consider this while developing a security program around your app.

In some jurisdictions a name alone is considered to be personally identifying information (PII) that you have a duty to protect. In the UK, for example, this is covered by the Data Protection Act (DPA). However, the general way this legislation is written usually only makes you liable if you were negligent. I don't think that storing a name alone, in an app's isolated storage, could be considered negligent. The key factor here is that the PII is stored using standard practices (app isolated storage) on a device that the user controls, and the user is responsible for the security of their own device. If they root their device and install a shady app that steals their data, you cannot control for that.


Profile applications from traffic analysis I'm investigating options for segmenting a less secure business unit behind a Cisco 5505. I want to take this action quietly and transparently for political reasons.

I want to know if it is possible to feed traffic analysis into some kind of engine to parse out a whitelist of applications and ports. E.G. load a few day's worth of pcapng files and get back a list of "IP.src, IP.dst, Port, Application name". Are there any tools for that kind of profiling?

You can use Wireshark to extract conversation statistics from the packet captures.  This information can then be sorted through to determine which ports are used regularly:

This screen is from the Wireshark Statistics->Conversations menu items.  It also has a "Copy" button which will allow you to get this data as CSV; you could then extract destination ports simply:

gawk -F, '{print $4}' convo.csv | sort | uniq -c

or do more complex analysis based on source and destination.  Personally, if I were doing it, I'd load the CSV into a sqlite database for ease of querying seven ways from Sunday.

You can also automate the extraction of the conversation statistics by using tshark to cut your workload - less clicky clicky, more worky worky.


Is Twitter digits login (sms auth code) insecure? Twitter released(some time ago) a new kit named Digits which allows the client to login with a phone number and an authorization code (received through sms). I find it great for the user experience and I was thinking to implement it on our app/website too but isn't this "very" insecure?
I can imagine several issues:

the phone number is easy to guess: This allows the attacker to run successful blind SPAM campaigns even location-based(state, city based on the prefix). If most of the internet users would use phone numbers instead of email addresses I'm sure the amount of spam they receive would be higher. The spammers won't need to worry about email addresses harvesting. They would just generate phone numbers with a good chance to catch valid/active ones.
the sms is insecure: Unlike the email service the SMS has no authentication protocol(as far as I know) such DKIM, SPF so even experienced clients are unable to verify the integrity of the sender(i.e. if it's twitter or a spoofed number). Once you register/authenticate with the phone number you also establish SMS as communication channel. So it's not only the authentication code that you receive through sms but all the communications (confirmations or whatever twitter sends) are are sent though a channel which doesn't support authentication. This is basically like email without DKIM, SPF and even without any SPAM filter.
disturbance: brute forces most of the the valid phone numbers just for fun to generate disturbance(i.e. make twitter send auth codes to all the possible phone numbers). There may be sensible IP restrictions but I can't see this stopping the attacker.
data harvesting  ->  malware: The attacker finds what phone numbers are registered on twitter(see brute-force), sends them SMS (which looks like a twitter notification) with malicious links.
phishing: the client may be more willing to disclose a code received through sms than a password. If a phishing form is asking for a sms received from twitter(MITM) I think the client is more willing to provide it than a password as the code is received on request (not expected to be a secret the client is remembering) and the process( wait for the SMS and copy/paste it) distracts the client from the login page. It's also worth to note that the SMS notification covers the header of the UI(address bar).

Digits leverages a single 'factor' typically used in multi-factor authentication: "something you have", which in this case is your phone. Yes, there are weaknesses in the security of a single factor, just like only using a password, but there are strengths over and above a simple password, too.

disturbance - yes, an attacker could spam the phone network, but that in and of itself does not reduce the security of the process. It might create a DoS scenario depending on how Digits is design in the backend.
data harvesting -> malware - I tried the demo with a phone that is not registered with Twitter and it worked. I don't see this as a valid way to discover registered Twitter users for targeted phishing, no more than blanket spam does.
data harvesting -> phishing - As a phishing researcher, I could imagine this could be true. But I'm not sure if a user would realistically be more susceptible to phishing in this way than any other type of phishing for passwords. I don't think I understand your threat scenario here.
the sms is insecure - yes, SMS is not a secure channel, just like email, but you get a code when you have triggered the code to be sent. I'm not sure that one would receive a gratuitous code and start hunting around for an app they didn't log into for the purposes of entering it. As for MITM, the same protections of the website apply for certs, DNS, etc. and the threats would be common for password-based logins.

Given your risk model, I'm not sure that Digits is less secure than a password at all. It is a challenge-response mechanism using a phone as a factor. Protections of the login page and the personal protections of the phone (locks, encryption, remote management) can all be employed by the user to possibly make this more secure than a typical password mechanism. Yes, it is still a single factor, and yes there are ways for a user to make this insecure, but the mechanism itself is not inherently insecure.


Why would Comodo SSL certs have two intermediate CAs (chain length 4)? Comodo certs such as PositiveSSL have a chain length of 4, including two intermediate CA certs.

What would be the benefit to them, or to me, of this length chain instead of a chain length of 3 with a single intermediate CA as other providers seem to use?

I am aware that it results in a slight increase to the data exchanged during handshake.  But what would be the benefit?

In many cases, the intermediate certs do mean something. Sometimes it mean the Insurance level (how much the signer will pay you in the event of a fraudulent verification) or it can mean the validation level (only domain verified, or full verified with Company details and Everything).

In this case, Comodo isnt even the top signer. Instead its a Company called UserTrust ( http://www.usertrust.com ). The Company is apparently owned by Comodo, which might tell that Comodo sub-licenses its certificates to other CA's so those CA's dont want "Comodo" as their top certs.
Now we have travelled 2 steps down the chain.

The third certificate, in Comodo's case, tells the verification level. For the SSL cert used on Comodo's own website, that intermediate certificate tells that the site certificate is a "EV Green Adress bar" certificate. The fourth certificate is the site certificate itself.


How can an online hack be traced back to the perpetrators? What sort of evidence might be used in linking, say, the Sony hack to North Korea? While I am curious about what was used in this particular case, my question is meant to be a more general question about what sort of things might be act as a tipoff in general situations like this.

Things I speculate:

Using the user agent string from a web request as a sort of fingerprint. This seems like it has a relatively small amount of information and would be fairly spoofable.
Seeing the language of compilation or comments (the most publicized bit of evidence in the Sony hack). This again gives very little information and is easy to fake.
Tracing an IP. Even if this is done successfully, it seems like a competent hacker would be using some form of redirection to hide themselves. (I found one site claiming that the Sony hack had an IP traceable to SE Asia, but that's still pretty broad and circumstantial)
Finding a distinctive sequence of commands in some malware that links it to some previous malware (e.g. how antivirus often works). However, it's turtles all the way done, and I'm unclear how the original malware could have been linked to North Korea (or wherever else).

I see this very related question, but the only concrete tidbit from those answers is that if you can see the available wireless networks on a hacker's computer, you could use that information to localize. Getting that information seems fairly unlikely though.

I also see these tangentially related questions that essentially say "yup, tracking people is hard".

There's this question about investigating hacks, but its answer only deals with the series of steps in recovering from the hack.

That all said, I've only seen one reasonably credible news source questioning that the FBI and the US government settled on North Korea. Thus, I assume I must be missing some reasonable ways that the hack could be traced.

I totally understand that the public probably doesn't have all the details on the hack (and possibly never will). I'm looking instead for what sorts of things would serve as convincing evidence and might reasonably have been found.

Your points are good ones, and this is the interesting thing about tracing hacks: it is easy to cast suspicion, but is very difficult to conclusively prove where an attack came from.

Some things that narrow the field:

The language in which a program was written can often be determined, as you suggest.  This is of course suggestive, but not definitive.
As you also suggest, motive is a consideration.  Perhaps a bigger consideration is resources.  As usual, the physical resource constraints of the real world do a lot to narrow down possibilities.  This is why "following the money" is such a valuable tool in investigations.  It takes a lot of time and effort to do a really good job of hacking a network.  In this regard, it's fairly easy to distinguish between a well-funded and well organized group and script monkey messing around.  There are only so many people with motive AND resources.  Again, not definitive, but helpful.

There are several ways in which hackers might do something stupid

leaving their real name in a message/log/etc...
using their real login credentials to some known service
leaving metadata in a request that they send that can be used to identify them.  You allude to this when you talk about the user agent string.  In fact, there are many more things that a server can use to fingerprint a user.  This all presumes a web browser, though, and there are many more ways to carry out an attack.
the metadata-in-the-request problem is only really a problem if (1) the metadata gets logged, and (2) the hacker isn't careful enough to erase the log.

Barring the hackers doing something stupid, I would argue that tracing an IP down to it's source is the only real way to de-anonymize the attackers: other things help but are circumstantial.  Some things that make this hard:

clever and well equipped hackers will indeed use multiple layers of VPN software to protect themselves.  Often, when possible, VPN accounts are purchased in ways that are as anonymous as possible, making it difficult and time consuming (but by no means impossible) to trace back to the original IP address.
things like server logs will often preserve the ip address of the final hop in this VPN chain, at least giving you a starting place, but these are often doctored by clever, careful, and well-equipped hackers, making it difficult even to get started.
If you don't get to watch the attackers as they are actually working, tracing back by asking the VPN service to cough up the originating IP address may not be feasible, as they simply may not have the logs, or may have deleted them.

mitigating factors to the difficulty of tracing IP addresses:

there is no way to spoof a TCP connection, as setting one up requires a three way handshake: client sends a SYN packet, server sends a SYN ACK packet, and client sends another SYN ACK packet.  The client must thus provide a real IP address to the server (one that actually lets packets get back to the client).  This means that you can always at least get a start if you watch the attack happening.
if you can get timestamped logs of the right traffic data, there are correlation attacks that you can use to de-anonymize someone behind a vpn redirection service, or even multiple such redirection services.  The tor project people have details about many of these attacks, and have had recent issues along these lines.  Think of the packets coming from the attacker and the corresponding packets arriving at the attacked network (through multiple layers of vpn).  The time delay through the interleaving networks will be mostly the same for those packets, and some statistical analysis will then let you match them up with high confidence (see here, for instance). Clearly, the difficultly here is obtaining the requisite timestamped packet logs.  It is also possible for one of the interleaving networks to wait a random amount of time before forwarding packets, which would break this correlation attack.  It is my understanding that the wait time would have to be pretty long and would significantly degrade the usabililty of the newtork, which is why the tor network explicitly doesn't do this.


How do I find the number of hash calculation required to reverse a hash? Let x be an arbitrary 256-bit value. The output of H(x) is smaller than 2^215. How many hash functions do I have to compute to find a solution?

I have tried to solve this problem with a pre-image attack.
And the result came that if the output of the hash is less than 2^215 then we need to compute the hash 2^215 times. Is that correct?

A good hash function trying distinct new inputs will uniformly sample the output space with 2256 possible outputs.  Now for the output to be less than 2215 there are exactly 2215 potential output values (from 0 to 2215-1) that satisfy it.  So the probability of getting an output in this range by trying one hash is p₁ = 2215/2256 = 2-41.

Now if you try this twice (e.g., hash two distinct random inputs), the chance of at least one output being in range is p₂ = 1 - (1-p₁)*(1-p₁), as (1-p₁) is the probability of the first hash not being in less than 2215, (1-p₁)(1-p₁) is the probability of both the first and second hash not being less than 2215, and then we take the complement of that probability (to ensure that either the first hash or the second hash is in the range).  Similarly, if you did hashed three random inputs, the chance of at least one output being in range is p₃ = 1 - (1-p₁)*(1-p₁)*(1-p₁); that is unless all three are simultaneously not in the range, then at least one of them is in range.  As you can see, this generalizes for hashing N separate hashes to be p(N) = 1 - (1-p₁)^N.

If you want to have say a 99% chance of a solution, you set p(N) = .99 = 1 - (1-p₁)^N and solve for N, which rearranging becomes (1-p₁)^N = .01, then taking the natural log of both sides and using properties of logs becomes:

N = (ln .01)/(ln [1 - p₁]) = 10126876334760.2 ~ 1.01 x 10^13

Note, you can use the Taylor series approximation that ln (1 - x) ~ -x when x is small (e.g., in our example when it is 2^-41)in the above equation to simplify it to N = ln (1/100) / (-p₁) = 241 ln 100 if you want to evaluate it analytically.


Should I use TOTP when using OAuth2 I'm implementing TOTP in my application to allow users to use two factor authentication with Google authenticator and the like.

However I've also implemented "social login" using OAuth, should the users be prompted for their TOTP codes when logging in with those OAuth accounts as well? (Given that users might already be using 2FA on that service the login experience could become cumbersome)

Depends what you want to achieve. When using "social login" you are delegating user security responsibility to a third party (well, in a way to your user as in most of these authentication sources 2FA is optional).
If you want your service access to be MFA protected, then you should not be even allowing OAuth


When using a recovery disk, like AVGs boot-able CD, to scan for viruses, malware etc... what are the limitations? What I like about about the boot-able CD concept, is it can connect to the Internet and get updates, however I'm not clear how effective they are at really finding things that are heuristic?  How do heuristic scans even work, if an executable isn't actually running?

The core difference a boot disk gives you is the ability to scan the applications through a 'known good' fliesystem, as opposed to a potentially rootkitted filesystem, which may hide any/all malware from a scanner.

The basic problem is that if malware has compromised your system, it could be configured to return anything the author wants when a scan of a file is run, to make it appear the system is clean.

By booting from a CD or other read-only material, as long as you have a clean boot disk it will not be able to be compromised by malware and should give correct results. The assumption here is that you have a clean download.

Aside from that, the usage is the same as a version running on the normal OS - scanning for known patterns, or code which meets certain suspicious indicators.


Is this a secure hash "Function" for integrity? I was wondering what were the posible security (not efficieny) issues with this hash "function":

Although not an actual function, this method turns a message of any length into a message of fixed length. Where it is infeasible  to derive the message from the hash fixed length message.

-Alice wants to send a (m)message to Bob.

-Alice and Bob use a symmetric cipher with a key shared some other way.

-Alice then generates two truly random numbers of same length as the message (m) and performs a OTP on the message twice, one key applied to m and one key applied to the result of the other key and m.. Alice destroys the keys.

-There is a server called a "hash server" which is a 3rd party member trusted by Alice and Bob and all other message senders.

-Alice send the double OTP ciphertext to the server.

-The server then replies with a fixed length message shorter than the cipher text and calls it the hash of (m) which the server doesn't know. This fixed length message is a truly random number which is stored on the server and sent to Alice.

-Alice concatenates the double encrypted OTP with m and uses the symmetric cipher to encrypt  that.

-Alice sends the (MAC) along with the ciphertext

-Bob sends the double encrypted ciphertext to the server. The server checks if that matches anything in its database and sends the resulting "hash" to Bob. If the result matches Alice's MAC then the message is intact.

There are no collisions since the server will never send the same random number out for two different messages. The double encryption is so that Bob cannot derive Alice's  OTP key from the message he got from her.

I am kinda confused about what you are trying to achieve with this rather complicated and error-prone protocol.

If I understand your idea correctly, you are basically just moving the problem of integrity onto the communications with the "hash server". If someone was able to MITM both Alice's and Bob's in- and outbound traffic, they could mess with Alice's message, then make the server send an arbitrary "hash" to Alice when she requests one and return that same value to Bob when he asks for a "hash" the next time.

There are also some other assumptions that seem contradictory for me; For example, it is mathematically impossible for the server to "never send the same random number for two different messages" if you also require that every hash is a "fixed length message shorter than the cipher text". Also, I see no reason why Bob shouldn't be allowed to "derive Alice's OTP key" - what would he do with it anyway? Thus, the "double OTP" encryption seems unnecessary to me.

You have probably heard it before, but there is this rule in cryptography that says "don't roll your own", which basically means you should not try to invent your own protocol if there are established solutions that haven't been broken so far. The reason is that these well-established protocols have usually undergone a lot of research from large numbers of very intelligent people, as opposed to your "new" algorithm that you have put on the stackexchange forums for discussion ;)


Will this sandbox my user's javascript from my web IDE properly? I'm working on an IDE that should run a user's JavaScript in the Browser. I don't want to just eval arbitrary code, especially as code may be shared between users. From here and other sources, I learned iframes to be the likely tool for this.

On the other hand, things like Caja are also suggested, and I haven't found any example code particularly on how to use iframes for this purpose. This makes me feel too uneasy to just accept what I have come up with, without any feedback.

To reiterate, I want to:

let users write small JavaScript programs that interact with the "world" over a small set of allowed APIs,
execute them in their browser,
make this secure for users who try code they didn't write themselves.

Here's what I have come up with: index.html can launch a sandboxed iframe for src child.html. The iframe is sent the user's code, which is then eval'd and invokes some APIs (dispatched via postMessage). (the origin checks are missing and targetOrigin is '*' because I'm testing on file://.)

index.html

<html>
<head>
</head>
<body>
<div id="mountpoint">
</div>
<script type="text/javascript">
const handlers = {
    // print program output to the console
    print: function print(source, text) {
        console.log(event.data.payload);
    },
    // clean up an iframe after execution
    exit: function exit(source) {
        const i = frames.findIndex(function(item) {
            return item[0] == source;
        });
        frames[i][1].remove();
        delete frames[i];
    },
};

// dispatch commands from the iframe
window.addEventListener('message', function receiveMessage(event) {
    // if (event.origin !== "http://example.com")
    //   return;

    const handler = handlers[event.data.command];
    if(handler) {
        handler(event.source, event.data.payload);
    }
}, false);

frames = [];

// create a new iframe and send it code
function execute(code) {
    let frame = document.createElement('iframe');
    frame.setAttribute('src', 'child.html');
    frame.setAttribute('sandbox', 'allow-scripts');
    frame.style.display = 'none';
    document.getElementById('mountpoint').appendChild(frame);

    frames.push([frame.contentWindow, frame]);

    function sendMessage(command, payload) {
        frame.contentWindow.postMessage({
            command: command,
            payload: payload,
        }, '*');
    }

    // wait for the iframe to load before sending `execute`
    setTimeout(function() {
        sendMessage('execute', code);
    }, 0);
}

execute(`
sendMessage('print', 'this is the child!!');
`);
</script>
</body>
</html>

child.html

<html>
<head>
</head>
<body>
<script type="text/javascript">
const handlers = {
    // execute the given program
    execute: function execute(source, code) {
        function sendMessage(command, payload) {
            event.source.postMessage({
                command: command,
                payload: payload,
            }, '*');
        }

        try {
            // run the code
            eval(code);
        } finally {
            // ask parent to clean up
            sendMessage('exit');
        }
    },
};

// dispatch commands from the parent
window.addEventListener('message', function receiveMessage(event) {
    // if (event.origin !== "http://example.com")
    //   return;

    const handler = handlers[event.data.command];
    if(handler) {
        handler(event.source, event.data.payload);
    }
}, false);
</script>
</body>
</html>

Is this a proper sandboxing approach? Are there ways to escape the sandbox with what I've written here? As a bonus, what better results could I get from using Caja, or other libraries that get mentioned with respect to this topic?

Use 2 separate hosts. On the IDE host deploy you services that provide IDE functionality: Editing of JavaScript, saving, comparing, etc. When user want to see how his code works, deploy it to another host, say USER host. Browser should load users code from this USER host and execute it. If you need to call some services on USER host from your IDE script, allow CORS requests on your USER host.


How can I use a VPN to protect my privacy How should I configure a VPN in order to access blocked websites and to hide my identity?

Usually I use SSH tunneling to protect my privacy and to escape censorship. I know nothing else about VPNs but I would like to know how to use it correctly.

(I'm on Mac OS X)

I'm afraid your question is rather vague, but I'll provide some quick answers for various possible interpretations :

You should try out the Tor Browser Bundle because Tor has grown incredibly user friendly under Mac OS X and usually offers better 'privacy' than VPNs, especially now that Aurora uses HTTPS Everywhere by default.  There are always bandwidth considerations with Tor that might make it unsuitable.  You cannot realistically use bittorrent over Tor in particular, but you indicated web browsing.

If you aren't concerned about privacy, but reside in a country that blocks some website, then you could probably bypass their blocking by using a DNS provider outside you country.  I used this for bypassing Turkey's youtube ban in 2009 for example.

If you are only visiting such a country, your employer or university abroad might offer a free VPN service which could be used to bypass their filtering, even if they go beyond DNS filtering.  You'd enjoy some privacy from the local authorities by doing this, but not from your employer or university.

If you are a resident of a country who's filtering goes beyond DNS, there are various public service VPNs offered by humanitarian organizations like Telecomix (starting point).  There are also various commercial VPN providers if you aren't eligible for humanitarian ones (previously).

There is a delicate question about exactly when any VPN solutions offer enough privacy, but again HTTPS Everywhere improves that situation significantly.  In fact, you should also check if HTTPS Everywhere solves your problem completely all by itself.


How important is user acceptance when deciding whether to deploy biometric authentication? I've been browsing through several studies on user acceptance of biometrics, and I've been noticing that they all focus on attitudes and beliefs about biometrics. While it's important to know a sizeable portion of the population has objections to using biometrics in certain circumstances for various reasons, I am much more interested in knowing if people with such objections will resist if biometric authentication is made mandatory in the workplace. What are some of the ways you have seen people negatively react to it beyond complaining? How long does the defiance last?

Ultimately, how important is user acceptance when deciding whether to deploy biometric authentication?

Edit

To clarify, I am most interested in hearing any stories of pushback due to non-usability reasons, such as privacy concerns, feelings of awkwardness when authenticating, plain old resistance to change, or fear that someone will cut off your finger to access your account. I tend to dismiss such concerns as whining that will go away after awhile, but I can't take the risk of assuming that I'm right.

The answer depends upon, among other things:

the specifics of the situation where usage of biometric controls is
being considered,
the type of biometric control being considered
and how invasive it is,
the target population for the control.

Administrative staff having to submit to a retina scan every morning to gain computer access would likely invoke greater resistance than the security administrators would in having to use a fingerprint reader to gain access to a sensitive area.

User resistance could be reduced by taking steps to address accuracy and privacy issues, as well as issues regarding potential health risks that may exist with more invasive controls.  And whatever control is being implemented should be usable by everyone - not everyone may have fingerprints for example. The key is awareness and training.  Staff should understand what is being implemented, why it is being implemented, and what is being done to address their concerns.


How to securely send a password from one app to another app? See this question/answer first: When calling a process from another process, Is sending stdin password more secure than sending an ENV variable?

I am a Java developer that is building an app where it needs to call a C# process from within. In my situation, the Java app is calling this C# program https://github.com/nddipiazza/SharepointOnlineCookieFetcher.

We have established that this is not secure to send the password via environment variables nor with stdin.

What is the best practice for providing the password to this app?

From my understanding, this is your threat model: You have two programs, one will execute the other. The first program must pass some secret to the second program. An adversary must not be able to record, intercept, or modify this secret. Both processes trust each other and run on the same system.

The answer depends on whether or not the executable is writable by an adversary. If it is kept in a privileged system path or has at least the same level of integrity as the parent executable, you can be sure that you can trust it not to have been tampered with. When both processes are trusted, the simplest way of sending data between two processes is a pipe, such as stdin. It would also be possible to use shared memory, which is a region of memory a parent process can create that will be shared by its child, allowing for more efficient communication than over a pipe. Unauthorized parties will not be able to intercept or modify the contents of the communication, unless they are able to:

Modify either the parent or child executables directly.
Trick your program into running the wrong executable, e.g. by abusing PATH.
Run as the same user as your program, making it possible to compromise them.
Modify the environment (e.g. LD_PRELOAD) of either the parent or the child.

I would suggest not using an environmental variable. The environment is not meant to be secret and often other users are able to view the environment of various processes on the system. On Linux for example, the environment of any process can be obtained by reading the /proc/<pid>/environ file.


What are the laws regarding ISP recording IP addresses? How would they know who had which? Since most internet users have ISPs using dynamic IP addresses (e.g. someone gets a new external IP address every few days) are there any laws requiring the ISPs to keep logs associating an IP address on a certain day with a certain individual? For example if someone hacks a website and their IP address is found, can anything be done about it? If ISPs do keep logs, what is associated with a persons IP address? I mean does DHCP somehow know the geographical location of who gets what IP, and then that information is stored?

Some ISPs force a connection reset every 24h and you get a new IP address assigned, others don't force you and yet others give you a fixed ip address.
There are laws requiring the ISPs to log the User - IP association (which in turn is associated with your contract)... but e.g. in the EU there is the data retention directive that requires ISPs to even log individual connections.
(Actually the EU directive is a "contract" between the European Council/Parlament and member nations, not between EC/EP and ISPs. The nations must adopt the directives in local law themselves. Usually they either adopt it as is, adopt it and extend it, have already adopted it or refuse to do so (this usually works by ruling that it conflicts with constitution).)
read more at http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=CELEX:32006L0024:EN:HTML.
There is a visualisation for retained mobile phone connection metadata at http://www.zeit.de/datenschutz/malte-spitz-data-retention

Concerning your question about geographical location:
There is a limited number of IP adresses available. They are goverened and distributed by organisations like http://www.iana.org and (?) http://www.ripe.net/ . Now your ISP buys IP addresses (whole ranges and networks) and uses them to connect you to the internet. They are not sitting there and free to use like on a private network with DHCP.
(Try looking up your IP address and looking it up at https://apps.db.ripe.net/search/query.html)

There are databases like http://www.geoiptool.com/ that try to provide location information for any given ip address, but their accuracy greatly depends on different factors (e.g. if your ISP only operates in a small regional area or in the entire USA). Usually those databases are only good for associating IPs to countries.


Is my Windows phone protected from attacks that reveal list of ssids it knows about? My goal is to see the SSIDs requested by mobile devices in my home.  For example, my Windows phone knows about SSIDs called "coffee_shop", "planet_fitness" and "library".  I have my phone set to "connect automatically" to those known networks.
I understand from this article that that I should be able to capture the SSIDs my phone knows about by sniffing wireless traffic on another device.

On another computer, I have a wireless adapter put into monitor mode by airmon-ng (channel 6, but all channels seemed about equal in the traffic captured).

Reading the packets with t-shark with the command tshark -i wlan0mon subtype probereq I can see many probe requests that include the SSIDs of (hidden or not ) wireless access points in my home that other devices are connecting to.  I can see other probe requests coming from my Windows phone (based on the MAC address is the same), but the SSID for those probes just says "broadcast".

  A probe request is a special frame sent by a client station requesting information from either a specific access point, specified by SSID, or all access points in the area, specified with the broadcast SSID

Can I conclude from this that my phone only sends "broadcast" probe requests and connects automatically to known access points when they identify themselves (rather than my phone sending the specific info "coffee_shop")?  If so, can I then conclude that my phone does not reveal access points it knows about unless one responds to a broadcast probe request?

If all mobile devices behaved like my phone, then how would an attacker pull off the type of attack used by Wifi Pineapple, which works by answering "yes" to probe requests from wireless devices sending specific SSIDs?

This is what the WiFi Pineapple abuses.

When you walk around with your digital device with WiFi enabled and connect automatically set to on, everytime your device detects a wireless signal it will send out probe requests to see if the SSIDs match.

With a regular Access Point nothing happens, meaning the AP just discards the probe, but with the WiFi Pineapple or a similar device, it will say yes, I am this network. Connect to me, and emails and applications that auto-update will do so.

If this malicious AP then runs wireshark, or another packet sniffer, and a version of SSLstrip (or something similar), it will sniff credentials. On the Pineapple this feature is called Karma. If a connection is established you get the MAC address of the device.

This problem has become quite known these days, and methods to hinder this simple MITM attack are put in place by forcing the clients browser to use HSTS layers. This means that if the client will send a request to the server over HTTP, the server will respond that it only accepts HTTPS and will force the client to use it. You can find more info on the Pineapple at Pineapple Uni.

Not all sites use HSTS yet, so the Karma function will still work on some websites, but either way, the Pineapple, or a similar device, will sniff the SSID.


PHP - Does password_hash/Argon2i effectively truncate passwords after certain length? If I'm not wrong, by default PHP's password_hash with PASSWORD_ARGON2I outputs a 43-character alphanumeric hash among other things. While this means that simple passwords that are shorter than 43 characters, or those that use only alphanumeric (or fewer) chars would be sufficiently encrypted, I would like to know if this effectively results in passwords after a certian length being truncated. Also, how does it affect passwords of sufficient length that use special characters?

Why would it not be more secure to use a longer hash?

Argon2 is a key derivation function, or KDF. It is designed to be computationally-expensive and require a large amount of working memory in order to make brute force attacks more difficult. Internally, Argon2 uses a fast cryptographically-secure hash function called Blake2b.

A hash function takes an input of arbitrary length (the message) and maps it to an output of fixed length (the digest). When any single bit in the message changes, 50% of bits in the digest are expected to change. This effectively means that any change to the input results in a completely different output. Because the digest is a fixed size, the pigeonhole principle dictates that there will be some distinct messages which inevitably result in the same output digest. A cryptographically-secure hash function ensures that there is no mathematical way to predict what inputs will result in identical outputs. Any technique that makes finding such identical outputs easy is a collision attack.

A collision attack is any attack against a hash function f where a pair of inputs m ≠ m' is found and f(m) = f(m'). A 43-character base64-encoded output is 256 bits of data. Due to the birthday paradox, the collision resistance of an n-bit digest (a digest with a keyspace of 2n) is 2n / 2. This means the collision resistance of a 256-bit digest will be 2256 / 2 = 2128. A more mathematical explanation of hash function collisions and the birthday paradox is provided over at Crypto.SE.

In an information-theoretic sense, it would be more secure to use a larger output digest in that the output space would be larger. In practice, 128-bit collision resistance is more than enough.


WiFi deauth attack - Difference between Aireplay and MDK3 I am currently working on some WiFi related security issues, and something appeared to me.

I have an Open WiFi network, to which a client connects.

I try the Deauth attack from Aireplay

  aireplay-ng -0 0 -a 00:14:6C:7E:40:80 -c 00:0F:B5:34:30:30 mon0

However, this has no effect on the client nor the AP.

But, then I use MDK3 which is a software using the osdep library from the aircrack-ng project.

I do:

  echo 00:14:6C:7E:40:80 > myfile

Then

  mdk3 mon0 d -b myfile -c 11

And it works instantly! I tried to use wireshark to see what MDK3 is sending but there is too much WiFi pollution around and I don't know what I am looking for, I can't figure out what to do with it.

I would like to know if they are both sending Deauth frames, and if so, what is the difference between them ?

Do I misunderstand the attack run by MDK3 and therefore, could you please explain it to me ?

I was able to sort out the difference in the attack, I think.

I found out that to filter MAC addresses for 802.11 packets I had to use wlan.addr.

After it, I could see that MDK3 would be sending both disassociation and de-authentication packets, where aireplay only sent de-authentication packets.

Since I am using a particular type of wifi, I think this is the reason why aireplay wasn't able to break it. When using a reguler Open Wifi AP, both of them would break the network,

Cheers