network-security

SSL handshake exception while connecting over https using self signed certificate in android Nougat

非 Y 不嫁゛ 提交于 2020-01-01 19:43:16
问题 In my android application i connect over https. I am using a self signed certificate to connect. It is working on devices below api level 24 (before android nougat).But on android Nougat it throws the SSL Handshake exception : javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found. This is how i connect over https:- SSLContext context = null; try { KeyStore keyStore = KeyStore.getInstance("PKCS12"); // Get the raw

Sniffing an Android app to find API URL

半世苍凉 提交于 2019-12-29 02:24:24
问题 I'm curious as to how I could figure out the API URL an Android application (any app I have installed) uses if it makes API calls to some online server (a RESTful service for example). I presume I have to capture packets on the device and maybe analyse them in Wireshark or something to find the URL? I'm fairly competent in Java/Android development, but a bit lost when it comes to any sort of network analysis business. 回答1: you can do this with help of WireShark. I am listing steps here

How to decode data from scapy Dot11 Packet

你。 提交于 2019-12-23 05:00:53
问题 I am writing a program that captures Dot11 Packets for network security testing, in these captured packets I get data as in the following for example: <RadioTap version=0 pad=0 len=36 present=TSFT+Flags+Rate+Channel+dBm_AntSignal+b14+b29+Ext notdecoded=' \x08\x00\x00\x00\x00\x00\x00\xd5~\xbb*\x00\x00\x00\x00\x10\x02\x99\t\xa0\x00\xbd\x00\x00\x00\xbd\x00' |<Dot11 subtype=11L type=Management proto=0L FCfield=retry ID=14849 addr1=48:ee:0c:f4:b7:ea addr2=00:26:82:8e:9a:d4 addr3=48:ee:0c:f4:b7:ea

How to build forged ICMP “Destination Unreachable” Type 3 Code 4 packet

巧了我就是萌 提交于 2019-12-13 03:59:53
问题 I have created forged destination unreachable ICMP with type 3 and code 4 (fragmentation needed and DF bit is set). My setup has Server, Client, and a switch between them. Ideally this ICMP gets generated by router/gateway but I'm generating this at client. I'm creating this ICMP using Scapy tool. Here is how I'm creating: ip = IP() icmp = ICMP() # IP Packet sent to client ip.dst = ip_server ip.src = ip_client ip.protocol = 1 #shows that ip header contains icmp as data # icmp type 3 + code 4

Features' value in KDD99 data set was wrong?

淺唱寂寞╮ 提交于 2019-12-11 15:27:49
问题 In KDD99 data set, a huge number of connections 32nd and 33rd feature’s value is greater than 100. I can’t understand the reason why used a connection window of 100 connections can get a value which is greater than 100? I consulted a lot of information, but found nothing. 回答1: The dataset contains 41 features for each connection. These features were obtained preprocessing TCP dump files. To do so, packet information in the TCP dump file was summarized into connections. Specifically (http:/

Listening to WiFi packets

落花浮王杯 提交于 2019-12-08 13:37:57
问题 I'm only in the pre-first stage of the project, so the question is very straight forward and basic. I like to listen to (using Java/C++) every WiFi packets in the range of my laptop, all I care for are the message headers and the very existence of the message so encryption doesn't really play a role here. Is there a way to get that from Windows(8)/Ubuntu? I didn't manage to find any sort of API form Broadcom, so I guess accessing the card directly won't be trivial. If that's impossible then I

Sandboxing Publicly Accessible GCC

大憨熊 提交于 2019-12-08 04:57:17
问题 I want to add a feature to a linux-based web service that allows untrusted users to upload the source code to a small C++ program, and for that code to be automatically saved to a file on the server and compiled with gcc and then executed, capturing the standard output. (This is a feature not unlike ideone.com, or spoj.pl, or topcoder.com, or codechef.com, or many of other web sites that do this.) My questions are: Q1. How do I sandbox the executable to guard against malicous users that try

Sandboxing Publicly Accessible GCC

对着背影说爱祢 提交于 2019-12-06 22:56:42
I want to add a feature to a linux-based web service that allows untrusted users to upload the source code to a small C++ program, and for that code to be automatically saved to a file on the server and compiled with gcc and then executed, capturing the standard output. (This is a feature not unlike ideone.com, or spoj.pl, or topcoder.com, or codechef.com, or many of other web sites that do this.) My questions are: Q1. How do I sandbox the executable to guard against malicous users that try to damage the filesystem or access the network, etc? Q2. Is there a fair/accurate way of rashoning

OPENROWSET BULK Permissions to Shared Folder

余生颓废 提交于 2019-12-04 05:03:21
问题 OBJECTIVE Use the OPENROWSET feature to JOIN data in a query against a text file. ERROR Leveraging the answer from @gbn on this question I am trying to open a row set just like the OP; though the format of the file is a bit different. However, I'm getting the following error trying to access a shared folder: Msg 4861, Level 16, State 1, Line 1 Cannot bulk load because the file "\MACHINENAME\Share\EC04.txt" could not be opened. Operating system error code 5(Access is denied.). BACKGROUND

Sniffing an Android app to find API URL

。_饼干妹妹 提交于 2019-11-28 15:23:40
I'm curious as to how I could figure out the API URL an Android application (any app I have installed) uses if it makes API calls to some online server (a RESTful service for example). I presume I have to capture packets on the device and maybe analyse them in Wireshark or something to find the URL? I'm fairly competent in Java/Android development, but a bit lost when it comes to any sort of network analysis business. Alok Singh Mahor you can do this with help of WireShark . I am listing steps here Install WireShark on your computer now we have to create Android virtual device(AVD) so we will