Git Product home page Git Product logo

mcgill-dmas / kam1n0-community Goto Github PK

View Code? Open in Web Editor NEW
602.0 51.0 132.0 473.92 MB

The Kam1n0 Assembly Analysis Platform

License: Apache License 2.0

Python 11.32% HTML 2.56% JavaScript 10.13% Shell 0.01% Batchfile 0.02% C# 0.12% XSLT 0.01% Java 14.95% CSS 0.64% Dockerfile 0.01% C 60.14% Makefile 0.01% Haskell 0.01% Perl 0.05% Assembly 0.01%
binary-analysis reverse-engineering machine-learning data-mining

kam1n0-community's Introduction

What Is Kam1n0 v2?

image GitHub (pre-)release Github All Releases JDK PRs Welcome

Build latest development release (Windows) Test release build (Windows)

Kam1n0 v2.x is a scalable assembly management and analysis platform. It allows a user to first index a (large) collection of binaries into different repositories and provide different analytic services such as clone search and classification. It supports multi-tenancy access and management of assembly repositories by using the concept of Application. An application instance contains its own exclusive repository and provides a specialized analytic service. Considering the versatility of reverse engineering tasks, Kam1n0 v2.x server currently provides three different types of clone-search applications: Asm-Clone, Sym1n0, and Asm2Vec, and an executable classification based on Asm2Vec. New application type can be further added to the platform.

A user can create multiple application instances. An application instance can be shared among a specific group of users. The application repository read-write access and on-off status can be controlled by the application owner. Kam1n0 v2.x server can serve the applications concurrently using several shared resource pools.

Kam1n0 was developed by Steven H. H. Ding and Miles Q. Li under the supervision of Benjamin C. M. Fung of the Data Mining and Security Lab at McGill University in Canada. It won the second prize at the Hex-Rays Plug-In Contest 2015. If you find Kam1n0 useful, please cite our paper:

  • S. H. H. Ding, B. C. M. Fung, and P. Charland. Kam1n0: MapReduce-based Assembly Clone Search for Reverse Engineering. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (SIGKDD), pages 461-470, San Francisco, CA: ACM Press, August 2016.

  • S. H. H. Ding, B. C. M. Fung, and P. Charland. Asm2Vec: boosting static representation robustness for binary clone search against code obfuscation and compiler optimization. In Proceedings of the 40th IEEE Symposium on Security and Privacy (S&P), 18 pages, San Francisco, CA: IEEE Computer Society, May 2019.

Asm-Clone

Asm-Clone applications try to solve the efficient subgraph search problem (i.e. graph isomorphism problem) for assembly functions (<1.3s average query time and <30ms average index time with 2.3M functions). Given a target function (the one on the left as shown below), it can identify the cloned subgraphs among other functions in the repository (the one on the right as shown below).

  • Application Type: Asm-Clone
  • The original clone search service used in Kam1n0 v1.x.
  • Currently support Meta-PC, ARM, PowerPC, and TMS320c6 (experimental).
  • Support subgraph clone search within a certain assembly code family.
    • + Good interpretability of the result: breaks down to subgraphs.
    • + Accurate for searching within the given code family.
    • + Good for differing various patches or versions for big binaries.
    • - Relatively more sensitive to instruction set changes, optimizations, and obfuscation.
    • - Need to pre-define the syntax of the assembly code language.
    • - Need to have assembly code of the same chosen family in the repository.

Sym1n0

Semantic clone search by differentiated fuzz testing and constraint solving. An efficient and scalable dynamic-static hybrid approach (<1s average query time and <100ms average index time with 1.5M functions). Given a target function (the one on the left as shown below), it can identify the cloned subgraphs among other functions in the repository (the one on the right as shown below). Support visualization of abstract syntax graph.

  • Application Type: Sym1n0 (v2 only)
  • Clone search by both symbolic execution and concrete execution.
  • Differentiate functions based on their different I/O behavior.
  • Clone search conducted on the abstract syntax graph constructed from Vex IR (powered by LibVex).
    • + Clone search across different assembly code families.
      • For example, indexed x86 binaries but the query is ARM code.
    • + Subgraph clone search.
    • + Support a wide range of families throub LibVex.
      • x86, AMD64, MIPS32, MIPS64, PowerPC32, PowerPC64, ARM32, and ARM64.
    • + An efficient dynamic-static hybrid approach.
    • + Ideal for analyzing firmware compiled for different processors.
    • - Sensitive to heavy graph manipulation (such as a full flattening).
    • - Sensitive to large scale breakdown of basic block integrity.

Asm2Vec

Asm2Vec leverages representation learning. It understands the lexical semantic relationship of assembly code. For example, xmm* registers are semantically related to vector operations such as addps. memcpy is similar to strcpy. The graph below shows different assembly functions compiled from the same source code of gmpz_tdiv_r_2exp in libgmp. From left to right, the assembly functions are compiled with GCC O0 option, GCC O3 option, O-LLVM obfuscator Control Flow Graph, Flattening option, and LLVM obfuscator Bogus Control Flow Graph option. Asm2Vec can statically identify them as clones.

  • Leverage representation learning.
  • Understand the lexical semantic relationship of assembly code.
    • + State-of-the-art for clone search against heavy code obfuscation techniques.
      • (>0.8 accuracy for all options applied in O-LLVM, multiple iterations).
    • + State-of-the-art for clone search against code optimization.
      • (>0.8 accuracy between O0 and O3, >0.94 accuracy between O2 and O3)
    • + Even better result than the most recent dynamic approach.
    • + Much more efficient than recent dynamic approaches.
    • + Do not need to define the architecture. It self-learns by reading large volume of code.
    • + Static approach: efficient and scalable.
    • - No subgraphs.
    • - Assume the assembly code come from the same processor family.
    • - Static approach: cannot recognize jump table, etc.

Executable Classification

In this application, the user defines a set of software classes which are based on functional relatedness and provides binaries belong to each class. Then the system automatically groups functions into clusters in which functions are connected directly or indirectly by clone relation. The clusters that are discriminative for the classification are kept and serve as signatures of their classes. Given a target binary, the system shows the degree it belongs to each software class.

  • Use Asm2Vec as its function similarity computation model

    • + Provide interpretable classification results.
    • + Learn common characteristics (i.e., function clusters) of each class.
    • + Able to handle smaller and imbalanced datasets than an ordinary machine learning model.
    • - The limitation is that the assumption that binaries in the same class share some common functions must hold for the system to work.

Platform Overview

The figure below shows the major UI components and functionalities of Kam1n0 v2.x. We adopt a material design. In general, each user has an application list, a running-job list, and a result file list.

  • Application list shows the application instances owned by the user and shared by the others.
  • Running-job list shows the running progress for a large query (such as chrome.dll) and indexing procedure.
  • Result file list displays the saved results. More details of the UI design can be found in our detailed tutorial.

Installation Instruction

The current release of Kam1n0 consists of two installers: the core server and IDA Pro plug-in.

Installer Included components Description
Kam1n0-Server.msi Core engine Main engine providing service for indexing and searching.
Workbench A user interface to manage the repositories and running service.
Web user interface Web user interface for searching/indexing binary files and assembly functions.
Visual C++ redistributable for VS 15 Dependecy for z3.
Kam1n0-IDA-Plugin.msi Plug-in Connectors and user interface.
PyPI wheels for Cefpython Rendering engine for the user interface.
PyPI and dependent wheels Package management for Python. Included for IDA 6.8 &6.9.

Installing the Kam1n0 Server

The Kam1n0 core engine is purely written in Java. You need the following dependencies:

  • [Required] The latest x64 11.x JRE/JDK distribution from Oracle.
  • [Optional] The latest version of IDA Pro with the idapython plug-in installed. The Python plug-in and runtime should have already been installed with IDA Pro. Reinstall IDA Pro if necessary.

Download the Kam1n0-Server.msi file from our release page. Follow the instructions to install the server. You will be prompted to select an installation path. IDA Pro is optional if the server does not have to deal with any disassembling. In other words, the client side uses the Kam1n0 plugin for IDA Pro. It is strongly suggested to have the IDA Pro installed with the Kam1n0 server. Kam1n0 server will automatically detect your IDA Pro by looking for the default application that you used to open .i64 file.

Installing the IDA Pro Plug-in

The Kam1n0 IDA Pro plug-in is written in Python for the logic and in HTML/JavaScript for the rendering. The following dependencies are required for its installation:

  • [Required] IDA Pro (>6.7) with the idapython plug-in installed. The Python plug-in and runtime should have already been installed with IDA Pro. Reinstall IDA Pro if necessary.

Next, download the Kam1n0-IDA-Plugin.msi installer from our release page. Follow the instructions to install the plug-in and runtime. Please note that the plug-in has to be installed in the IDA Pro plugins folder which is located at $IDA_PRO_PATH$/plugins. For example, on Windows, the path could be C:/Program Files (x86)/IDA 6.95/plugins. The installer will detect and validate the path.

Setting Up Kam1n0 on Ubuntu/Debian-based systems

  • Ensure you have the Oracle version of Java 11. (Not default-jdk in apt.)

    • Add Oracle's PPA and then update your package repository: sudo add-apt-repository ppa:webupd8team/java
      • If you encounter any errors (such as ~webupd8team not found), if you are on a proxy, make sure you set and export your http_proxy and https_proxy environment variables, and then try again with the -E option on sudo. Additionally, if you are getting a 'add-apt repository command not found error, try: sudo apt install -y software-properties-common.
    • Afterwards: sudo apt-get update, and sudo apt-get install oracle-java8-installer
      • Verify your Java version with java -version; you may need to manually set the JAVA_HOME environment variable (in /etc/environment), JAVA_HOME=/usr/lib/jvm/java-11-oracle
  • Download the latest release for Linux (Kam1n0-IDA-Plugin.tar.gz and Kam1n0-Server.tar.gz) from Kam1n0-Community.

  • Extract the two tarballs (i.e. tar –xvzf Kam1n0-IDA-Plugin.tar.gz and tar –xvzf Kam1n0-Server.tar.gz)

  • The Kam1n0-Server.tar.gz file will create the server directory.

  • Inside the server directory, you should see a file called kam1n0.properties, which is where you will set various configurations for kam1n0; this is very important.

  • Set kam1n0.data.path to where you would like your kam1n0-related data to be written to. We choose to put it in the same place that we keep our server. kam1n0.ida.home refers to where your IDA installation is located. Comment this line (and kam1n0.ida.batch, the line following) if you do not have IDA and don't plan to use kam1n0 for disassembly. For more (accurate) information about the kam1n0.properties file, see the kam1n0.properties.explained file.

  • Run kam1n0-server-workbench: java -jar kam1n0-server-workbench.jar. This should cause a window to pop up, which prompts you to actually start kam1n0. Alternatively, run kam1n0-server: java -jar kam1n0-server.jar --start. This starts the server from the console without a window.

  • To connect and use it, go to 127.0.0.1:8571 (the default port kam1n0 listens on should be 8571, but can be changed in kam1n0.properties) in your browser. You should see the pretty kam1n0 web UI. From there, follow the tutorial on the Kam1n0-Community repo if you do not know how to use kam1n0.

Backward Compatibility

The assembly code repositories and configuration files used in previous versions (<2.0.0) are no longer supported by the latest version. Please contact us if you need to migrate your old repositories.

Documentation

Development

Clone the latest stable branch (don't forget --recursive!):

git clone --recursive -b master2.x --single-branch https://github.com/McGill-DMaS/Kam1n0-Community

Importing the project.

IntelliJ: Import the root /kam1n0/kam1n0/ as a maven project. All the submodules will be loaded accordingly. EclipseEE: Add the cloned git repository to the git view. Import all maven projects from the git repository. You may need to modify the classpath to address any error. All the resources path are dynamically modified when running inside an IDE (through the kam1n0-resources submodule).

To build the project:

cd /kam1n0/kam1n0
mvn -DskipTests clean package
mvn -DskipTests package

The resulting binaries can be found in /kam1n0/build-bins/

To run the test code, you will need to first download chromedriver.exe from http://chromedriver.chromium.org/ and add its absolute path into an environment variable named webdriver.chrome.driver. It is also required that there is a chrome browser installed in the system. The test code will launch a browser instance to test the UI interfaces. The complete testing procedure will take approximately 3 hours.

cd /kam1n0/kam1n0
mvn -DskipTests clean package # you can skip this one if you already built the package
mvn -DskipTests package       # you can skip this one if you already built the package
mvn -DforkMode=never test

These commands only compiles java with pre-compiled wheels of libvex and z3. It works out-of-the-box. The build of libvex and z3 is platform-dependent. We use a fork of libvex from Angr. More serious build scripts as well as installers for windows/linux can be found under /kam1n0-builds/

  • kam1n0: The server's source code.
  • kam1n0-builds: Installer source code and scripts to build the distribution.
  • kam1n0-clients: The clients' source code.

Binary Releases

We have a Jenkin server for contineous development and delivery. Latest stable release will be posted here. Periodically we will synchronize our internal experimental branch with this repository.

Licensing

The software was developed by Steven H. H. Ding, Miles Q. Li, and Benjamin C. M. Fung in the McGill Data Mining and Security Lab and Queen's L1NNA Research Laboratory in Canada. It is distributed under the Apache License Version 2.0. Please refer to LICENSE.txt for details.

Copyright 2014-2021 McGill University and the Researchers. All rights reserved.

Acknowledgement

image

image

image

image

image

image

kam1n0-community's People

Contributors

bcmfung avatar inndy avatar milesqli avatar steven-hh-ding avatar yingwang2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kam1n0-community's Issues

Support for searching multiple binaries

as far as i can tell, Kam1n0 allows you to add multiple files in the Binary Composition tab to search them all against the indexed repo. However, after analysis, the report that is generated only seems to contain the result for the first file.

e.g In the screenshot, I added 6 binaries to be analyzed. However, the resulting report will only contain the analysis for the target file adler32.o. Is this an error in my workflow or more of a feature request?

Screen Shot 2019-09-26 at 10 35 10 AM

Hungging in searching

I am evaluating Kam1n0 for my lab on reverse binary tools, just installed Kam1n0 2.2 ( eventhough the product console still showing v2.0.0, but i believe its v2.2 by verifying the hash), created account of asmclone, loaded in the two example libs, then using adler.txt to search, it just hungging "Searching in Progress..."

I did everything following the tutorial, however having couple of questions though:
How to verify which version of Java the Kam1n0 picked? i have several Java installed including the one > java 11.
How to verify if the idapython is available (be ready)? I have existing IDA pro 7.6, there's couple of idapython*.dll existing in plugin folder, i assumed its ready, so did the kam1n0-IDA-Plugin.exe completed.

any idea what i should do next?

Jane

asm2vec for downstream tasks

Hello,

I would like to use asm2vec model to run on some downstream task. Is your model available? If not could you please make this model available?

Index Error: FileNotFoundException

I can not upload any files in the indexing window. Every time I click the Index button, I got an "Upload failes" Error. Bellow is my log file:
java.io.IOException: java.io.FileNotFoundException:

C:\Users\yd\AppData\Local\Temp\tomcat.3365707375412800598.8571\work\Tomcat\localhost\ROOT\Data\tmp\yuding\zlib-1.2.7.dll (绯荤粺鎵句笉鍒版寚瀹氱殑璺緞銆�)
at org.apache.catalina.core.ApplicationPart.write(ApplicationPart.java:122) ~[kam1n0-server.jar:2.0.0]
at org.springframework.web.multipart.support.StandardMultipartHttpServletRequest$StandardMultipartFile.transferTo(StandardMultipartHttpServletRequest.java:302) ~[kam1n0-server.jar:2.0.0]
at ca.mcgill.sis.dmas.kam1n0.app.clone.AbastractCloneSearchHandler.postBinary(AbastractCloneSearchHandler.java:115) ~[kam1n0-server.jar:2.0.0]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_291]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_291]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_291]
at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_291]
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205) [kam1n0-server.jar:2.0.0]
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133) [kam1n0-server.jar:2.0.0]
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97) [kam1n0-server.jar:2.0.0]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827) [kam1n0-server.jar:2.0.0]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738) [kam1n0-server.jar:2.0.0]
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) [kam1n0-server.jar:2.0.0]
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:967) [kam1n0-server.jar:2.0.0]
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901) [kam1n0-server.jar:2.0.0]
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) [kam1n0-server.jar:2.0.0]
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872) [kam1n0-server.jar:2.0.0]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:661) [kam1n0-server.jar:2.0.0]
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) [kam1n0-server.jar:2.0.0]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) [kam1n0-server.jar:2.0.0]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) [kam1n0-server.jar:2.0.0]

Restrictive License

Any chance of you changing the license to a free/libre license?
This project looks amazing, but the license makes it almost impossible to use or contribute to.

Failed to locate the winutils binary in the hadoop binary path

Hello. I'm trying to index libpng-1.7.0b54.dll following the Kam1n0 Server Tutorial with your awesome project, but I'm getting some errors:

  1. java.io.IOException: Could not locate executable null\bin\winutils.exe in the Hadoop binaries.
  2. Failed to retrieved IDA Path from registery.

Besides, when I installed Kam1n0-IDA-Plugin, I found it shown 'pipy_cefpython is absent in your system', but I've installed cefpython3 with pip.

My settings:

  1. Win10.
  2. IDA pro 7 at C:\Program Files\IDA 7.0.
  3. Kam1no v2.1 at C:\Program Files\Kam1n0

Full log
spring.log

One-line Functions Still Indexed

One-line functions that just redirect to an external library are still indexed.
An example is the memchr function in libz.so.1.2.11-gcc-g-O0-m32-fno-pic.bin.

img1
img2

INDEX Error: Failed to disasemble the given file.

java.lang.Exception: Failed to disasemble the given file.
at ca.mcgill.sis.dmas.kam1n0.impl.disassembly.DisassemblyFactoryIDA.loadAsMultiPart(DisassemblyFactoryIDA.java:203) ~[kam1n0-server.jar:2.0.0]
at ca.mcgill.sis.dmas.kam1n0.framework.disassembly.DisassemblyFactory.loadAsMultiPart(DisassemblyFactory.java:63) ~[kam1n0-server.jar:2.0.0]
at ca.mcgill.sis.dmas.kam1n0.app.clone.CloneSearchResources.disassembleIntoMultiPart(CloneSearchResources.java:150) ~[kam1n0-server.jar:2.0.0]
at ca.mcgill.sis.dmas.kam1n0.app.clone.BinaryIndexProcedureLSHMR.lambda$runProcedure$1(BinaryIndexProcedureLSHMR.java:70) ~[kam1n0-server.jar:2.0.0]
at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) ~[na:1.8.0_261]
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source) ~[na:1.8.0_261]
at java.util.stream.AbstractPipeline.copyInto(Unknown Source) ~[na:1.8.0_261]
at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) ~[na:1.8.0_261]
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source) ~[na:1.8.0_261]
at java.util.stream.AbstractPipeline.evaluate(Unknown Source) ~[na:1.8.0_261]
at java.util.stream.ReferencePipeline.collect(Unknown Source) ~[na:1.8.0_261]
at ca.mcgill.sis.dmas.kam1n0.app.clone.BinaryIndexProcedureLSHMR.runProcedure(BinaryIndexProcedureLSHMR.java:100) ~[kam1n0-server.jar:2.0.0]
at ca.mcgill.sis.dmas.kam1n0.app.scheduling.LocalDmasJobProcedure.execute(LocalDmasJobProcedure.java:104) ~[kam1n0-server.jar:2.0.0]
at org.quartz.core.JobRunShell.run(JobRunShell.java:202) ~[kam1n0-server.jar:2.0.0]
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) ~[kam1n0-server.jar:2.0.0]

index_error

Incorrect labeling of summary details

While reviewing my results for some binaries with Asm2Vec, I noticed the % of clones found did not correspond to # of matched functions/# of total functions. e.g.:

Screen Shot 2020-08-24 at 12 48 08 PM

in the picture above, the summary displays 80% for the ratio of matched clones to valid functions. However, we actually get 89% (179/201) using the same values according to the tooltip. The 80% is actually being derived from # of matched functions/source binary's function size (179/221).

From debugging, it appears 179 does correspond to # of matched functions but I'm uncertain what 201 and 221 corresponds to (total valid queries vs. source binary's function size).

May I get some clarity on this?

On top of that, would it be possible to add to the tooltip what "Total Valid Queries" and "Source Binary's Function Size" means? I'm assuming "Total Valid Queries" is the set of valid functions extracted from the source binary and "Source Binary's Function Size" is the sum of sizes of all those functions?

Failed to parse the assembly file

Hi. I'm trying to analyze zlib-1.2.7.dll (or any another library) with your interesting project but i'm getting errors:

[ERROR] 05-13 13:27:01.131 ca.mcgill.sis.dmas.kam1n0.framework.disassembly.DisassemblyFactory [DefaultQuartzScheduler_Worker-1] DisassemblyFactory - Failed to parse the assembly file. The output file parts cannot be located.
[ERROR] 05-13 13:27:01.132 ca.mcgill.sis.dmas.kam1n0.framework.disassembly.DisassemblyFactory [DefaultQuartzScheduler_Worker-1] DisassemblyFactory - Failed to parse the assembly file.
java.lang.Exception: Failed to disasemble the given file.
    at ca.mcgill.sis.dmas.kam1n0.impl.disassembly.DisassemblyFactoryIDA.loadAsMultiPart(DisassemblyFactoryIDA.java:118) [kam1n0.jar:?]
    at ca.mcgill.sis.dmas.kam1n0.framework.disassembly.DisassemblyFactory.loadAsMultiPart(DisassemblyFactory.java:45) [kam1n0.jar:?]
    at ca.mcgill.sis.dmas.kam1n0._deamon.service.RestApiProvider.disassembleIntoMultiPart(RestApiProvider.java:176) [kam1n0.jar:?]
    at ca.mcgill.sis.dmas.kam1n0._deamon.service.BinaryAnalysisProcedureCompositionAnalysis.runProcedure(BinaryAnalysisProcedureCompositionAnalysis.java:45) [kam1n0.jar:?]
    at ca.mcgill.sis.dmas.kam1n0.framework.scheduling.LocalDmasJobProcedure.execute(LocalDmasJobProcedure.java:61) [kam1n0.jar:?]
    at org.quartz.core.JobRunShell.run(JobRunShell.java:202) [kam1n0.jar:?]
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) [kam1n0.jar:?]
[ERROR] 05-13 13:27:01.135 ca.mcgill.sis.dmas.kam1n0._deamon.service.BinaryAnalysisProcedureCompositionAnalysis [DefaultQuartzScheduler_Worker-1] BinaryAnalysisProcedureCompositionAnalysis - Failed to process the BinaryComposition job from BinaryComposition
java.lang.Exception: Failed to disasemble the given file.
    at ca.mcgill.sis.dmas.kam1n0.impl.disassembly.DisassemblyFactoryIDA.loadAsMultiPart(DisassemblyFactoryIDA.java:152) ~[kam1n0.jar:?]
    at ca.mcgill.sis.dmas.kam1n0.framework.disassembly.DisassemblyFactory.loadAsMultiPart(DisassemblyFactory.java:45) ~[kam1n0.jar:?]
    at ca.mcgill.sis.dmas.kam1n0._deamon.service.RestApiProvider.disassembleIntoMultiPart(RestApiProvider.java:176) ~[kam1n0.jar:?]
    at ca.mcgill.sis.dmas.kam1n0._deamon.service.BinaryAnalysisProcedureCompositionAnalysis.runProcedure(BinaryAnalysisProcedureCompositionAnalysis.java:45) [kam1n0.jar:?]
    at ca.mcgill.sis.dmas.kam1n0.framework.scheduling.LocalDmasJobProcedure.execute(LocalDmasJobProcedure.java:61) [kam1n0.jar:?]
    at org.quartz.core.JobRunShell.run(JobRunShell.java:202) [kam1n0.jar:?]
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) [kam1n0.jar:?]

Full log: logs.txt

Previous release (0.0.2) was producing the same error.

My setup:
IDA Pro 6.9 + idapython: C:\Tools\IDA
Kam1n0: C:\Tools\Kam1n0 (default installation path didn't help)
Repository: C:\Tools\Kam1n0\metapc\

Hope you can help me.

Documentation on adding additional architectures

Hello! This is amazing work - some really cool stuff!

As a previous issue mentioned, there are multitudes of architectures beyond the ones that Kam1n0 currently has support for. In that same issue, there was reference to a document that outlined how you could create your own processor definition.

However, it seems like much as changed since that issue was opened as the link is now dead. Do you happen to have updated documentation on how we can go about adding support for other architectures?

Thanks!

wiki draft for img upload

letter-k-icon 2 What is Kam1n0?

Assembly code analysis is a time-consuming process. An effective and efficient assembly code clone search engine can greatly reduce the effort of this process; since it can identify the cloned parts that have been previously analyzed. Kam1n0 is a scalable system that supports assembly code clone search. It allows a user to first index a (large) collection of binaries, and then search for the code clones of a given target function or a binary file.

Kam1n0 tries to solve the efficient subgraph search problem (i.e. graph isomorphism problem) for assembly functions. Given a target function (the middle one in the figure below) it can identity the cloned subgraphs among other functions in the repository (the one on the left and the one on the right as shown below). Kam1n0 supports rich comment format, and it has a IDA-Pro plug-in to use its indexing and searching capabilities via the IDA Pro.

image

In this repository we release the initial version of Kam1n0 and its plugin for IDA Pro. It can run on a single workstation/server, and provide clone search service through RESTful web services. The users can connect to the server through IDA Pro. Alternatively it can be deployed on a distributed cluster (next major release).

Table of Content

Installation

The current distribution of the Kam1n0 IDA Pro plug-in is bundled with a local Kam1n0 engine. In order to have it work properly, you need the following dependencies:

  • [Required] The latest x86 8.x JRE/JDK distribution from Oracle (x86).
  • [Required] The latest version of IDA Pro with the idapython plug-in installed. The Python plug-in and runtime should have already been installed with IDA Pro. Re-install IDA Pro if necessary.

Next, download the latest .msi installation file for Windows at our release page. Follow the instructions to install the plug-in and runtime. Please note that the plug-in has to be installed in the IDA-Pro plugins directory which is located at $IDA_PRO_PATH$/plugins. For example, on Windows, the path could be C:/Program Files (x86)/IDA 6.8/plugins. The installer will validate the path.

Where does Kam1n0 store the data?

At the end of the installation, the installer will ask you to select the path for storing local data and log files. It also creates a folder ~/Kam1n0/ to store plug-in data and errors. The local Kam1n0 engine can be found IN the installation path. You can customize its configuration file kam1n0-conf.xml.

Tutorial

This tutorial first introduces Kam1n0's basic functionalities and then walk you through a simple index and search example.

Functionalities

The Kam1n0 engine with the plug-in provide you the functionalities to index and search assembly functions.

Icon Functionality Description Hot key
search Search current function Search the function at current address Ctrl+Shift+S
searchs Select functions to search Select functions to search Ctrl+Shift+A
upload Index current function Index the function at current address Ctrl+Shift+K
uploads Select functions to index Select functions to index Ctrl+Shift+J
setting-cnn Manage connections Manage connections to different repositories NA
setting Manage storage Mange local/remote accounts and storage NA

These functionalities can be found in:

  • IDA Pro Search Toolbar:

    image

  • IDA Pro Functions Window:

    image

  • IDA Pro Search Menu:

    image

  • IDA Pro Edit Menu:

    image

  • IDA Pro View A (popup menu):

    view-a

Even though you can select functions in the popup menu of the IDA PRO Functions Window to search/index functions, using searchs and uploads at other places (e.g. toolbar) open a Selection Window which provides A more detailed configuration for multiple search. While using the plugin, we recommend you to keep the Output Window open in IDA Pro.

image
image

For example, you can apply different filters and choose which connection you want to use to search/index them.

Walk through example

Let's go through a simple index and search case using the engine and plugin.

Preparing the data

Suppose we have two binary files libpng-1.7.0b54.dll from libpng and zlib-1.2.7.dll from zlib. These two files are included in our release file Kam1n0_IDA_Pro_v0.0.2.zip. We suggest you to try them first as to be consistent with the following descriptions. You may index other binary files later as you wish. We try to index the first binary file libpng-1.7.0b54.dll and search the second one zlib-1.2.7.dll against it.

Start the engine

To begin with, we first need to start the kam1n0 storage and search engine. You can run it from apps in your Start Menu or desktop shortcut.

image

Kam1n0 is a console application. It is normal to see some warning messages at the first run, as the engine tries to find and create several elements. Please note that if you chose a system path to be the storage directory, you need to have the engine run as administrator.

Kam1n0 should open a browser with a login page as shown below. The default username and password are both admin. You can change the later after you are logged in. You can close the browser, as we will use IDA Pro.

login

Indexing

Open IDA-Pro and disassemble the libpng-1.7.0b54.dll binary file as usual. Click on the Manage Connection Button in the toolbar cnn. You are now able to review and edit the connections of the plugin. There is already a default connection for the local engine. These connections will be stored for future use.

cnnw

To index the functions, click on the Select Functions to Index Buttonat the toolbar (or in the other aforementioned location). Check the Select All Functions Option and click the Index Button (shown as Step 1, 2 and 3 in the image below). Each indexed binary is uniquely identified by its path, and each indexed function by its binary's id and its starting address.

image

Wait until the indexing process finishes as shown in the Progress Form. Detailed progress info is printed in the IDA Output Window. Press the OK Button to close the form when you see 100% shown in the form.

image

image

Search and add comments

Open IDA Pro and disassemble the target zlib-1.2.7.dll binary file as usual. Click on the Select Functions to Search Button at the toolbar image. Suppose we want to search the alder32 and compress2. Select them using ctrl+click on the list. Click on the Search Button. (Shown as the Step 1 and Step 2 in image below).

image

The search should end in seconds. You will be able to see a progress form and the Clone Graph View.

image

The Clone Graph View can be dragged and zoomed in/out with mouse scrolling. Each circle represents a function. Each color represents different binary. A link between two nodes indicates their similarity. The two blue circles are our selected target functions. By double-clicking on the alder32 node (blue node in the center), we open the Clone List Window as shown below:

image

The window lists all the connected nodes with more details about thier similarity and binary name. There are three views to inspect each result:

image

The Flow View

The Flow View explores the cloned control flow graph structure between two functions. The cloned areas are highlighted in different convex hubs. As you can see in this example, even though two functions have different entry blocks, they share several cloned subgraphs. Each is highlighted using a convex hub with different color. Currently we ignore blocks with less than 4 instructions. Both graphs can be zoom in/out and dragged. We provide a scroll (blue) for each of them.

image

The Text-Diff View

The Text-Diff View tries to fully ally two assembly functions using basic string comparison algorithm. It is useful to compare two functions with a high degree of similarity. The lines with a red background mean deletion; while the ones with a green background mean addition.

image

The Clones View

The Clones View lists different cloned subgraphs and compares their differences. The panel below two text views lists these cloned subgraphs as cloned groups. Each group consists of pairs of cloned basic blocks between two functions. These basic blocks belong to the same group since they can be connected in the control flow. By clicking on each clone pair, the above two text views will jump to the corresponding blocks and compare their differences using string alignment.

image

In the Clone View, you are able to add rich comments to each assembly code instruction of each function. Move the mouse to the line for which you want to add a comment, and click on the + button to show the Comment Form. Markdown language is supported.

image

How does the Plug-in Work

IDA 7.3 - ValueError: Invalid chooser passed

Kam1n0 v2.1 freshly installed.

Traceback (most recent call last):
  File "J:/Installs/IDA 7.3/plugins\Kam1n0\Manager.py", line 406, in activate
    self.callback(ctx)
  File "J:/Installs/IDA 7.3/plugins\Kam1n0\Manager.py", line 332, in open_cnn_manager
    form = ConnectionManagementForm(self)
  File "J:/Installs/IDA 7.3/plugins\Kam1n0\forms\ConnectionManagementForm.py", line 98, in __init__
    self.listView),
  File "J:\Installs\IDA 7.3\python\ida_kernwin.py", line 6035, in __init__
    raise ValueError("Invalid chooser passed.")
ValueError: Invalid chooser passed.

Ref: danielplohmann/apiscout#8

I tested Kam1n0 in late 2017 and couldn't get it to work, sad that now it again.. doesn't work.

Connection Failed

I have tried comment the lines related to IDA in properties, but either way I just can't connect to any host.
Is that because I run it on mac?
my jdk is '/Library/java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home'
截屏2022-03-26 下午6 55 27

run with a script

Hi,I am new to Kam1n0.Recently I am using Kam1n0 to compare the similarity of different versions of software.But now I can only compare one software of different versions.I would like to know if there is a way to run the plugin with a script to compare similarity automaticly.Thank you vary much!

Warning Massage In IDA Pro 6.8

I Am Getting This Warning...
C:/Program File (x86)/IDA 6.8/Plugins\Kam1n0\Forms\SelectionForm.py:130: SyntexWarning: name 'allFuncs' is used prior to global declaration

C:/Program File (x86)/IDA 6.8/Plugins\Kam1n0\Forms\SelectionFormIndex.py:140: SyntexWarning: name 'allFuncs' is used prior to global declaration

How To Solve It...?

NullPointerException in Login

Hello,
I am trying to get Kam1n0 installed on a Windows 10 64 bit machine with IDA 6.8. The plugin seems to install fine along with the server component. The issue I ran into is trying to login or create an account. In the Web UI I click on the Login link in the upper right, but I am not able to proceed. I checked the JS logs in the HTML page and it seems that there is NullPointerException in the server component.

Here is the message from the JS console:

{timestamp: 1528022469514, status: 500, error: "Internal Server Error",…}
error:"Internal Server Error"
exception:"java.lang.NullPointerException"
message:"No message available"
path:"/login"
status:500
timestamp:1528022469514

Here is the Java message from the Kam1n0 server console:

java.lang.NullPointerException: null
	at ca.mcgill.sis.dmas.kam1n0.AppPlatform$PrioritizeInterceptor.preHandle(AppPlatform.java:188) ~[kam1n0-server.jar:2.0.0]
	at org.springframework.web.servlet.HandlerExecutionChain.applyPreHandle(HandlerExecutionChain.java:133) ~[kam1n0-server.jar:2.0.0]
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:962) ~[kam1n0-server.jar:2.0.0]
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901) ~[kam1n0-server.jar:2.0.0]
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) ~[kam1n0-server.jar:2.0.0]
	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861) ~[kam1n0-server.jar:2.0.0]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:635) ~[kam1n0-server.jar:2.0.0]
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) ~[kam1n0-server.jar:2.0.0]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) ~[kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[kam1n0-server.jar:2.0.0]
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) ~[kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317) ~[kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127) ~[kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91) ~[kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) ~[kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114) ~[kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) ~[kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137) ~[kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) ~[kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111) ~[kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) ~[kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170) ~[kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) ~[kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63) ~[kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) ~[kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:200) ~[kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) ~[kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116) ~[kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) ~[kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:64) ~[kam1n0-server.jar:2.0.0]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) ~[kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105) ~[kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) ~[kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56) ~[kam1n0-server.jar:2.0.0]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) ~[kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214) ~[kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177) ~[kam1n0-server.jar:2.0.0]
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:347) ~[kam1n0-server.jar:2.0.0]
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:263) ~[kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[kam1n0-server.jar:2.0.0]
	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) ~[kam1n0-server.jar:2.0.0]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[kam1n0-server.jar:2.0.0]
	at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:108) ~[kam1n0-server.jar:2.0.0]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[kam1n0-server.jar:2.0.0]
	at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81) ~[kam1n0-server.jar:2.0.0]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[kam1n0-server.jar:2.0.0]
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197) ~[kam1n0-server.jar:2.0.0]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) ~[kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) [kam1n0-server.jar:2.0.0]
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803) [kam1n0-server.jar:2.0.0]
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [kam1n0-server.jar:2.0.0]
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) [kam1n0-server.jar:2.0.0]
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459) [kam1n0-server.jar:2.0.0]
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [kam1n0-server.jar:2.0.0]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.8.0_171]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.8.0_171]
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [kam1n0-server.jar:2.0.0]
	at java.lang.Thread.run(Unknown Source) [na:1.8.0_171]

More detailed output?

Is there a way to get more detailed output about the scoring in the output of AsmClone?

Or are there design documents that could help me in making modifications to the code so I could get that specific output?

Fail to open the result file

Hello. I am trying to use asm2vec-clone to do some tests. After installing everything, I created an App and used 'index' and binary composition analysis to do function matching. Then I got the result file.
When I was trying to open the result file, the webpage showed an alarm with unacceptable request info, and displayed nothing on the page. The download button on the upper-right did not work either.
In the logging file, it shows a NullPointerException when I click the button to open a result file.
I tried to remove and reinstall the kam1n0-server, but nothing changed.
My PC is a laptop with win10, the JRE is jre-8u301-windows-x64.exe. I also tried different versions of Kam1n0 server, from 2.0 to 2.2, nothing changed.
Could you give me any help? Thanks in advance.

java.lang.NullPointerException: null
	at ca.mcgill.sis.dmas.kam1n0.problem.clone.detector.rep.Asm2VecCloneDetectorIntegration.detectClonesForFuncToBeImpleByChildren(Asm2VecCloneDetectorIntegration.java:102) ~[kam1n0-server.jar:2.0.0]
	at ca.mcgill.sis.dmas.kam1n0.problem.clone.FunctionCloneDetector.detectClonesForFunc(FunctionCloneDetector.java:112) ~[kam1n0-server.jar:2.0.0]
	at ca.mcgill.sis.dmas.kam1n0.app.clone.FunctionCloneDetectorForWeb.detectClones(FunctionCloneDetectorForWeb.java:123) ~[kam1n0-server.jar:2.0.0]
	at ca.mcgill.sis.dmas.kam1n0.app.clone.FunctionCloneDetectorForWeb.lambda$detectClones$0(FunctionCloneDetectorForWeb.java:92) ~[kam1n0-server.jar:2.0.0]
	at java.util.stream.IntPipeline$4$1.accept(Unknown Source) ~[na:1.8.0_301]
	at java.util.stream.Streams$RangeIntSpliterator.forEachRemaining(Unknown Source) ~[na:1.8.0_301]
	at java.util.Spliterator$OfInt.forEachRemaining(Unknown Source) ~[na:1.8.0_301]
	at java.util.stream.AbstractPipeline.copyInto(Unknown Source) ~[na:1.8.0_301]
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) ~[na:1.8.0_301]
	at java.util.stream.ReduceOps$ReduceTask.doLeaf(Unknown Source) ~[na:1.8.0_301]
	at java.util.stream.ReduceOps$ReduceTask.doLeaf(Unknown Source) ~[na:1.8.0_301]
	at java.util.stream.AbstractTask.compute(Unknown Source) ~[na:1.8.0_301]
	at java.util.concurrent.CountedCompleter.exec(Unknown Source) ~[na:1.8.0_301]
	at java.util.concurrent.ForkJoinTask.doExec(Unknown Source) ~[na:1.8.0_301]
	at java.util.concurrent.ForkJoinPool.helpComplete(Unknown Source) ~[na:1.8.0_301]
	at java.util.concurrent.ForkJoinPool.externalHelpComplete(Unknown Source) ~[na:1.8.0_301]
	at java.util.concurrent.ForkJoinTask.externalAwaitDone(Unknown Source) ~[na:1.8.0_301]
	at java.util.concurrent.ForkJoinTask.doInvoke(Unknown Source) ~[na:1.8.0_301]
	at java.util.concurrent.ForkJoinTask.invoke(Unknown Source) ~[na:1.8.0_301]
	at java.util.stream.ReduceOps$ReduceOp.evaluateParallel(Unknown Source) ~[na:1.8.0_301]
	at java.util.stream.AbstractPipeline.evaluate(Unknown Source) ~[na:1.8.0_301]
	at java.util.stream.ReferencePipeline.collect(Unknown Source) ~[na:1.8.0_301]
	at ca.mcgill.sis.dmas.kam1n0.app.clone.FunctionCloneDetectorForWeb.detectClones(FunctionCloneDetectorForWeb.java:97) ~[kam1n0-server.jar:2.0.0]
	at ca.mcgill.sis.dmas.kam1n0.app.clone.CloneSearchResources.detectFunctionClone(CloneSearchResources.java:81) ~[kam1n0-server.jar:2.0.0]
	at ca.mcgill.sis.dmas.kam1n0.app.clone.BinaryAnalysisProcedureCompositionAnalysis.runProcedure(BinaryAnalysisProcedureCompositionAnalysis.java:127) ~[kam1n0-server.jar:2.0.0]
	at ca.mcgill.sis.dmas.kam1n0.app.scheduling.LocalDmasJobProcedure.execute(LocalDmasJobProcedure.java:104) ~[kam1n0-server.jar:2.0.0]
	at org.quartz.core.JobRunShell.run(JobRunShell.java:202) ~[kam1n0-server.jar:2.0.0]
	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) ~[kam1n0-server.jar:2.0.0]

Any plans to open source Kam1n0 server?

Hi,

do you have any plans to release the source of the Kam1n0 server? I would be interested on running it on Linux, which would require some tweaks to the code.

BTW, this is a cool project!

Regards, Jonas

An error occurred during Maven build,and I solve it

An error occurred during Maven build
something wrong happen when maven build, the error info:
spring-boot-maven-plugin not found
in kam1n0/kam1n0-apps/pom.xml, kam1n0/kam1n0-cli/pom.xml
1.

14	<spring-load-version>1.2.6.RELEASEE</spring-load-version>

should be modified to 1.2.6.RELEASE

14	<spring-load-version>1.2.6.RELEASE</spring-load-version>

Alert Message "Unsupported format"

I'm running Kam1n0 on Windows11 using the AsmToVec application. All configurations have been configured. Kam1n0 is also up and running.

In this page, I added some programs

图片
图片

But I get this error when I click on Analysis.

图片

This is a Kam1n0 log.

main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/sym1n0-clone/{appId:.+}/push_bin],methods=[POST]}" onto public final java.util.Map<java.lang.String, java.lang.Object> ca.mcgill.sis.dmas.kam1n0.app.clone.AbastractCloneSearchHandler.postBinary(long,java.lang.Object[])
2022-10-27 11:04:10.838  INFO 25556 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/sym1n0-clone/{appId:.+}/search_bin_dump],methods=[POST]}" onto public final java.util.Map<java.lang.String, java.lang.Object> ca.mcgill.sis.dmas.kam1n0.app.clone.AbastractCloneSearchHandler.searchBinaryDump(long,java.lang.String)
2022-10-27 11:04:10.838  INFO 25556 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/sym1n0-clone/{appId:.+}/BinaryComposition],methods=[POST]}" onto public java.util.Map<java.lang.String, java.lang.Object> ca.mcgill.sis.dmas.kam1n0.app.clone.AbastractCloneSearchHandler.searchBinaryRenderer(long,java.lang.String,java.lang.String,javax.servlet.http.HttpServletRequest)
2022-10-27 11:04:10.839  INFO 25556 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/sym1n0-clone/{appId:.+}/BinaryComposition],methods=[GET]}" onto public org.springframework.web.servlet.ModelAndView ca.mcgill.sis.dmas.kam1n0.app.clone.AbastractCloneSearchHandler.searchBinaryRenderer(long)
2022-10-27 11:04:10.839  INFO 25556 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/sym1n0-clone/{appId:.+}/func_diff_text_group],methods=[GET]}" onto public final org.springframework.web.servlet.ModelAndView ca.mcgill.sis.dmas.kam1n0.app.clone.AbastractCloneSearchHandler.diffFuncTextGroup(long)
2022-10-27 11:04:10.839  INFO 25556 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/sym1n0-clone/{appId:.+}/del],methods=[POST]}" onto public final java.util.Map<java.lang.String, java.lang.Object> ca.mcgill.sis.dmas.kam1n0.app.ApplicationHandler.delete(long,java.lang.String,java.lang.String)
2022-10-27 11:04:10.839  INFO 25556 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/sym1n0-clone/{appId:.+}/func_comment],methods=[GET]}" onto public final java.util.List<ca.mcgill.sis.dmas.kam1n0.app.adata.FunctionCommentWrapper> ca.mcgill.sis.dmas.kam1n0.app.ApplicationHandler.getComment(long,long)
2022-10-27 11:04:10.839  INFO 25556 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/sym1n0-clone/{appId:.+}/home],methods=[GET]}" onto public final org.springframework.web.servlet.ModelAndView ca.mcgill.sis.dmas.kam1n0.app.ApplicationHandler.getHomeModelAndView(long)
2022-10-27 11:04:10.839  INFO 25556 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/sym1n0-clone/{appId:.+}/delBin],methods=[POST]}" onto public java.util.Map<java.lang.String, java.lang.Object> ca.mcgill.sis.dmas.kam1n0.app.ApplicationHandler.delCluster(long,long,org.springframework.ui.Model)
2022-10-27 11:04:10.840  INFO 25556 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/sym1n0-clone/{appId:.+}/],methods=[GET]}" onto public final org.springframework.web.servlet.ModelAndView ca.mcgill.sis.dmas.kam1n0.app.ApplicationHandler.getAppPluginHome(long)
2022-10-27 11:04:10.840  INFO 25556 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/sym1n0-clone/{appId:.+}/func_info],methods=[GET]}" onto public final java.util.List<ca.mcgill.sis.dmas.kam1n0.app.adata.FunctionDataUnit> ca.mcgill.sis.dmas.kam1n0.app.ApplicationHandler.getFunctionInfos(long,long)
2022-10-27 11:04:10.840  INFO 25556 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/sym1n0-clone/{appId:.+}/bin_info],methods=[GET]}" onto public final java.util.List<ca.mcgill.sis.dmas.kam1n0.app.adata.BinaryDataUnit> ca.mcgill.sis.dmas.kam1n0.app.ApplicationHandler.getBinInfos(long)
2022-10-27 11:04:10.840  INFO 25556 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/sym1n0-clone/{appId:.+}/info],methods=[GET]}" onto public final ca.mcgill.sis.dmas.kam1n0.app.ApplicationInfo ca.mcgill.sis.dmas.kam1n0.app.ApplicationHandler.getApplicationInfo(long)
2022-10-27 11:04:10.840  INFO 25556 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/sym1n0-clone/{appId:.+}/editApp],methods=[GET]}" onto public org.springframework.web.servlet.ModelAndView ca.mcgill.sis.dmas.kam1n0.app.ApplicationHandler.showApplicationFormEdit(long,org.springframework.ui.Model)
2022-10-27 11:04:10.840  INFO 25556 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/sym1n0-clone/{appId:.+}/func_comment],methods=[POST]}" onto public final java.util.Map<java.lang.String, java.lang.Object> ca.mcgill.sis.dmas.kam1n0.app.ApplicationHandler.putComment(long,long,java.lang.String,java.lang.String,java.lang.String)
2022-10-27 11:04:10.840  INFO 25556 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/sym1n0-clone/{appId:.+}/func_flow_show],methods=[GET]}" onto public final org.springframework.web.servlet.ModelAndView ca.mcgill.sis.dmas.kam1n0.app.ApplicationHandler.showFunctionFlow(long)
2022-10-27 11:04:10.840  INFO 25556 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/sym1n0-clone/{appId:.+}/func_text_show],methods=[GET]}" onto public final org.springframework.web.servlet.ModelAndView ca.mcgill.sis.dmas.kam1n0.app.ApplicationHandler.showFunctionText(long)
2022-10-27 11:04:10.841  INFO 25556 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/sym1n0-clone/{appId:.+}/arch_rest],methods=[GET]}" onto public final ca.mcgill.sis.dmas.kam1n0.framework.disassembly.AsmLineNormalizationResource ca.mcgill.sis.dmas.kam1n0.app.ApplicationHandler.getArchitectureResources(ca.mcgill.sis.dmas.kam1n0.commons.defs.Architecture$ArchitectureType)
2022-10-27 11:04:10.841  INFO 25556 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/sym1n0-clone/{appId:.+}/func_flow],methods=[GET]}" onto public final ca.mcgill.sis.dmas.kam1n0.app.adata.FunctionDataUnit ca.mcgill.sis.dmas.kam1n0.app.ApplicationHandler.getFunctionFlow(long,long)
2022-10-27 11:04:10.841  INFO 25556 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/sym1n0-clone/{appId:.+}/editApp],methods=[POST]}" onto public org.springframework.web.servlet.ModelAndView ca.mcgill.sis.dmas.kam1n0.app.ApplicationHandler.submitApplicationFormEdit(long,java.util.List<java.lang.String>,java.util.List<java.lang.String>,ca.mcgill.sis.dmas.kam1n0.app.ApplicationInfo,org.springframework.validation.BindingResult,org.springframework.ui.Model)
2022-10-27 11:04:10.842  INFO 25556 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/del_file],methods=[POST]}" onto public final java.util.Map<java.lang.String, java.lang.Object> ca.mcgill.sis.dmas.kam1n0.AppController.delete(java.lang.String)
2022-10-27 11:04:10.843  INFO 25556 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/rn_file],methods=[POST]}" onto public final java.util.Map<java.lang.String, java.lang.Object> ca.mcgill.sis.dmas.kam1n0.AppController.rename(java.lang.String,java.lang.String)
2022-10-27 11:04:10.843  INFO 25556 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/JobProgress],methods=[GET]}" onto public java.util.Map<java.lang.String, java.lang.Object> ca.mcgill.sis.dmas.kam1n0.AppController.getJobProgress(java.lang.String,java.lang.String,org.springframework.validation.BindingResult)
2022-10-27 11:04:10.843  INFO 25556 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/createApp],methods=[GET]}" onto public org.springframework.web.servlet.ModelAndView ca.mcgill.sis.dmas.kam1n0.AppController.showApplicationForm(ca.mcgill.sis.dmas.kam1n0.app.ApplicationInfo,org.springframework.ui.Model)
2022-10-27 11:04:10.843  INFO 25556 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/userProgress],methods=[GET]}" onto public org.springframework.web.servlet.ModelAndView ca.mcgill.sis.dmas.kam1n0.AppController.createProgressList()
2022-10-27 11:04:10.843  INFO 25556 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/createApp],methods=[POST]}" onto public org.springframework.web.servlet.ModelAndView ca.mcgill.sis.dmas.kam1n0.AppController.submitApplicationForm(ca.mcgill.sis.dmas.kam1n0.app.ApplicationInfo,org.springframework.validation.BindingResult,org.springframework.ui.Model)
2022-10-27 11:04:10.843  INFO 25556 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/toggleApp],methods=[POST]}" onto public void ca.mcgill.sis.dmas.kam1n0.AppController.submitApplicationForm(long,boolean)
2022-10-27 11:04:10.843  INFO 25556 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/userFiles],methods=[GET]}" onto public org.springframework.web.servlet.ModelAndView ca.mcgill.sis.dmas.kam1n0.AppController.createFileList()
2022-10-27 11:04:10.843  INFO 25556 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/userHome],methods=[GET]}" onto public org.springframework.web.servlet.ModelAndView ca.mcgill.sis.dmas.kam1n0.AppController.createUserHome()
2022-10-27 11:04:10.844  INFO 25556 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/login],methods=[GET]}" onto public org.springframework.web.servlet.ModelAndView ca.mcgill.sis.dmas.kam1n0.UserController.login(org.springframework.ui.Model,java.lang.String,java.lang.String)
2022-10-27 11:04:10.844  INFO 25556 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/validate],methods=[GET]}" onto public java.lang.String ca.mcgill.sis.dmas.kam1n0.UserController.validateSession(org.springframework.ui.Model)
2022-10-27 11:04:10.844  INFO 25556 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/register],methods=[GET]}" onto public org.springframework.web.servlet.ModelAndView ca.mcgill.sis.dmas.kam1n0.UserController.registration(org.springframework.ui.Model)
2022-10-27 11:04:10.844  INFO 25556 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/register],methods=[POST]}" onto public org.springframework.web.servlet.ModelAndView ca.mcgill.sis.dmas.kam1n0.UserController.registration(ca.mcgill.sis.dmas.kam1n0.app.user.UserInfo,org.springframework.validation.BindingResult,org.springframework.ui.Model)
2022-10-27 11:04:10.846  INFO 25556 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2022-10-27 11:04:10.846  INFO 25556 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2022-10-27 11:04:10.853  INFO 25556 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Root mapping to handler of type [class org.springframework.web.servlet.mvc.ParameterizableViewController]
2022-10-27 11:04:10.858  INFO 25556 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2022-10-27 11:04:10.858  INFO 25556 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2022-10-27 11:04:10.880  INFO 25556 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2022-10-27 11:04:11.160  INFO 25556 --- [           main] oConfiguration$WelcomePageHandlerMapping : Adding welcome page: class path resource [static/index.html]
2022-10-27 11:04:11.271  INFO 25556 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2022-10-27 11:04:11.315  INFO 25556 --- [           main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 9375 (http)
2022-10-27 11:04:11.318  INFO 25556 --- [           main] ca.mcgill.sis.dmas.kam1n0.Application    : Started Application in 8.436 seconds (JVM running for 9.388)
2022-10-27 11:04:11.382  INFO 25556 --- [           main] ca.mcgill.sis.dmas.kam1n0.cli.Main       : Exiting.
2022-10-27 11:04:11.636  INFO 25556 --- [nio-9375-exec-1] o.s.web.servlet.DispatcherServlet        : FrameworkServlet 'dispatcherServlet': initialization started
2022-10-27 11:04:11.648  INFO 25556 --- [nio-9375-exec-1] o.s.web.servlet.DispatcherServlet        : FrameworkServlet 'dispatcherServlet': initialization completed in 11 ms
2022-10-27 11:04:51.342 ERROR 25556 --- [nio-9375-exec-8] .m.s.d.k.a.c.AbastractCloneSearchHandler : Failed to process submited mutipart file

java.io.IOException: java.io.FileNotFoundException: C:\Users\Administrator\AppData\Local\Temp\tomcat.1034577451786126277.9375\work\Tomcat\localhost\ROOT\D:ProgramFilesKam1n0_Serverlog\tmp\mzflrx\test_clang.exe (鏂囦欢鍚嶃�佺洰褰曞悕鎴栧嵎鏍囪娉曚笉姝g‘銆�)
	at org.apache.catalina.core.ApplicationPart.write(ApplicationPart.java:122) ~[kam1n0-server.jar:2.0.0]
	at org.springframework.web.multipart.support.StandardMultipartHttpServletRequest$StandardMultipartFile.transferTo(StandardMultipartHttpServletRequest.java:302) ~[kam1n0-server.jar:2.0.0]
	at ca.mcgill.sis.dmas.kam1n0.app.clone.AbastractCloneSearchHandler.searchBinary(AbastractCloneSearchHandler.java:244) ~[kam1n0-server.jar:2.0.0]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_351]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_351]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_351]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_351]
	at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:967) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872) [kam1n0-server.jar:2.0.0]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:661) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) [kam1n0-server.jar:2.0.0]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [kam1n0-server.jar:2.0.0]
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:200) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:64) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:347) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:263) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:108) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) [kam1n0-server.jar:2.0.0]
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803) [kam1n0-server.jar:2.0.0]
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [kam1n0-server.jar:2.0.0]
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) [kam1n0-server.jar:2.0.0]
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459) [kam1n0-server.jar:2.0.0]
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [kam1n0-server.jar:2.0.0]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.8.0_351]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.8.0_351]
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [kam1n0-server.jar:2.0.0]
	at java.lang.Thread.run(Unknown Source) [na:1.8.0_351]
Caused by: java.io.FileNotFoundException: C:\Users\Administrator\AppData\Local\Temp\tomcat.1034577451786126277.9375\work\Tomcat\localhost\ROOT\D:ProgramFilesKam1n0_Serverlog\tmp\mzflrx\test_clang.exe (鏂囦欢鍚嶃�佺洰褰曞悕鎴栧嵎鏍囪娉曚笉姝g‘銆�)
	at java.io.FileOutputStream.open0(Native Method) ~[na:1.8.0_351]
	at java.io.FileOutputStream.open(Unknown Source) ~[na:1.8.0_351]
	at java.io.FileOutputStream.<init>(Unknown Source) ~[na:1.8.0_351]
	at java.io.FileOutputStream.<init>(Unknown Source) ~[na:1.8.0_351]
	at org.apache.tomcat.util.http.fileupload.disk.DiskFileItem.write(DiskFileItem.java:394) ~[kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationPart.write(ApplicationPart.java:120) ~[kam1n0-server.jar:2.0.0]
	... 88 common frames omitted

2022-10-27 11:08:22.729 ERROR 25556 --- [nio-9375-exec-7] .m.s.d.k.a.c.AbastractCloneSearchHandler : Failed to process submited mutipart file

java.io.IOException: java.io.FileNotFoundException: C:\Users\Administrator\AppData\Local\Temp\tomcat.1034577451786126277.9375\work\Tomcat\localhost\ROOT\D:ProgramFilesKam1n0_Serverlog\tmp\mzflrx\test_clang_windows.exe (鏂囦欢鍚嶃�佺洰褰曞悕鎴栧嵎鏍囪娉曚笉姝g‘銆�)
	at org.apache.catalina.core.ApplicationPart.write(ApplicationPart.java:122) ~[kam1n0-server.jar:2.0.0]
	at org.springframework.web.multipart.support.StandardMultipartHttpServletRequest$StandardMultipartFile.transferTo(StandardMultipartHttpServletRequest.java:302) ~[kam1n0-server.jar:2.0.0]
	at ca.mcgill.sis.dmas.kam1n0.app.clone.AbastractCloneSearchHandler.searchBinary(AbastractCloneSearchHandler.java:244) ~[kam1n0-server.jar:2.0.0]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_351]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_351]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_351]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_351]
	at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:967) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872) [kam1n0-server.jar:2.0.0]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:661) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) [kam1n0-server.jar:2.0.0]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [kam1n0-server.jar:2.0.0]
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:200) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:64) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:347) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:263) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:108) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) [kam1n0-server.jar:2.0.0]
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803) [kam1n0-server.jar:2.0.0]
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [kam1n0-server.jar:2.0.0]
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) [kam1n0-server.jar:2.0.0]
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459) [kam1n0-server.jar:2.0.0]
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [kam1n0-server.jar:2.0.0]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.8.0_351]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.8.0_351]
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [kam1n0-server.jar:2.0.0]
	at java.lang.Thread.run(Unknown Source) [na:1.8.0_351]
Caused by: java.io.FileNotFoundException: C:\Users\Administrator\AppData\Local\Temp\tomcat.1034577451786126277.9375\work\Tomcat\localhost\ROOT\D:ProgramFilesKam1n0_Serverlog\tmp\mzflrx\test_clang_windows.exe (鏂囦欢鍚嶃�佺洰褰曞悕鎴栧嵎鏍囪娉曚笉姝g‘銆�)
	at java.io.FileOutputStream.open0(Native Method) ~[na:1.8.0_351]
	at java.io.FileOutputStream.open(Unknown Source) ~[na:1.8.0_351]
	at java.io.FileOutputStream.<init>(Unknown Source) ~[na:1.8.0_351]
	at java.io.FileOutputStream.<init>(Unknown Source) ~[na:1.8.0_351]
	at org.apache.tomcat.util.http.fileupload.disk.DiskFileItem.write(DiskFileItem.java:394) ~[kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationPart.write(ApplicationPart.java:120) ~[kam1n0-server.jar:2.0.0]
	... 88 common frames omitted

2022-10-27 11:11:46.141 ERROR 25556 --- [nio-9375-exec-4] .m.s.d.k.a.c.AbastractCloneSearchHandler : Failed to process submited mutipart file

java.io.IOException: java.io.FileNotFoundException: C:\Users\Administrator\AppData\Local\Temp\tomcat.1034577451786126277.9375\work\Tomcat\localhost\ROOT\D:ProgramFilesKam1n0_Serverlog\tmp\mzflrx\test_clang_windows.exe (鏂囦欢鍚嶃�佺洰褰曞悕鎴栧嵎鏍囪娉曚笉姝g‘銆�)
	at org.apache.catalina.core.ApplicationPart.write(ApplicationPart.java:122) ~[kam1n0-server.jar:2.0.0]
	at org.springframework.web.multipart.support.StandardMultipartHttpServletRequest$StandardMultipartFile.transferTo(StandardMultipartHttpServletRequest.java:302) ~[kam1n0-server.jar:2.0.0]
	at ca.mcgill.sis.dmas.kam1n0.app.clone.AbastractCloneSearchHandler.searchBinary(AbastractCloneSearchHandler.java:244) ~[kam1n0-server.jar:2.0.0]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_351]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_351]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_351]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_351]
	at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:967) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872) [kam1n0-server.jar:2.0.0]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:661) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) [kam1n0-server.jar:2.0.0]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [kam1n0-server.jar:2.0.0]
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:200) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:64) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214) [kam1n0-server.jar:2.0.0]
	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:347) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:263) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:108) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197) [kam1n0-server.jar:2.0.0]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) [kam1n0-server.jar:2.0.0]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) [kam1n0-server.jar:2.0.0]
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803) [kam1n0-server.jar:2.0.0]
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [kam1n0-server.jar:2.0.0]
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) [kam1n0-server.jar:2.0.0]
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459) [kam1n0-server.jar:2.0.0]
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [kam1n0-server.jar:2.0.0]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.8.0_351]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.8.0_351]
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [kam1n0-server.jar:2.0.0]
	at java.lang.Thread.run(Unknown Source) [na:1.8.0_351]
Caused by: java.io.FileNotFoundException: C:\Users\Administrator\AppData\Local\Temp\tomcat.1034577451786126277.9375\work\Tomcat\localhost\ROOT\D:ProgramFilesKam1n0_Serverlog\tmp\mzflrx\test_clang_windows.exe (鏂囦欢鍚嶃�佺洰褰曞悕鎴栧嵎鏍囪娉曚笉姝g‘銆�)
	at java.io.FileOutputStream.open0(Native Method) ~[na:1.8.0_351]
	at java.io.FileOutputStream.open(Unknown Source) ~[na:1.8.0_351]
	at java.io.FileOutputStream.<init>(Unknown Source) ~[na:1.8.0_351]
	at java.io.FileOutputStream.<init>(Unknown Source) ~[na:1.8.0_351]
	at org.apache.tomcat.util.http.fileupload.disk.DiskFileItem.write(DiskFileItem.java:394) ~[kam1n0-server.jar:2.0.0]
	at org.apache.catalina.core.ApplicationPart.write(ApplicationPart.java:120) ~[kam1n0-server.jar:2.0.0]
	... 88 common frames omitted

This is the configuration information for Kam1n0.

图片

I don't know what's wrong with me and I hope I can get some help. Thank you to everyone who was able to help.

questions related to DB deletion and indexing

  1. How can we delete sample DB from Binary Browser? I checked the tutorials but could not find that.

  2. Is there any method to index existing multiple idbs? I'd like to use existing idbs with renamed functions for indexing, not to use newly-generated ones by the server. In that case do I have to open each idb on IDA then index all functions manually?

Thanks,
Takahiro

large files indexing error

I tested Kam1n0 indexing for 104 unique idb/i64 files but the job stopped in 57 files (about half of files indexed?), judging from the homepage information.
I checked the log and found the following but not sure if it's related to the problem.

2018-11-28 00:41:42.538 ERROR 3756 --- [DefaultQuartzScheduler_Worker-1] c.m.s.d.k.a.c.BinaryIndexProcedureLSHMR : Failed to process the BinaryIndexProcedure job from hoge

Any thought? Thanks.

Add function flags from IDA

Hi, can you please add function flags from IDA? It can be achieved by calling GetFunctionAttr(ea, FUNCATTR_FLAGS). It will allow to categorize functions by type and filter them at comparison. Thank you!

How to compare a large number of binaries?

Hi, I am new to Kam1n0. I have two groups of binaries, and I want to compare the similarity between them. I tried to install the Kam1n0 server and IDA plugins. I found that if I want to compare two binaries, I have to do the following things:

  • Create a new app in the web application
  • Use IDA to analyze the reference binary
  • Upload analysis results to the web application
  • Upload the target binary to the web application
  • Click binary composition to analyze

The process is complicated and needs a lot of time, and I think it is nearly impossible to analyze large number of binaries. So I want to know if there are some ways to automate this process and makes it faster to compare large number of binaries. Thank you!

What is the Radare2 support status?

First off, WOW! This is a very cool project.

Second, since most people can't afford to get an IDA Pro licesnse, we rather support FOSS projects like Radare2. It was mentioned in an old issue #12 that support could be easy to implement. I'd love to see this, but perhaps it has already been done?

@steven-hh-ding

Basically Kam1n0 just calls a script to disassemble; and the whole user interface for IDA Pro plugin can run without IDA by changing Manager and IDA-utils

Relevant links has changed:

So what exactly need to be done to add this support?

@XVilka
Do you know?

Inline expansion questions

Thank you for this great tool!
I've got some questions rather than an actual issue. I'd be very thankful, though, if you could help me work this out.

  1. It seems, the selective callee expansion is performed in the method convert in FuncTokenized.java. This method, however, is, as far as I can see, only called from Asm2VecCloneDetectorPV.java (l. 132), Asm2VecCloneDetectorIntegration.java (l. 174), and Asm2VecCloneDetector.java (l. 131). In all of those three cases, the inline_threshold is set to -1, so the expression in the filter method at l. 76 in FuncTonized.java:
int in = indegrees.get(call.id);
int ou = call.calls.size();
double alpha = ou * 1.0 / (in + ou);
return alpha <= inline_threshold;

will never come true. Am I missing something or is this on purpose in order to not perform any function inlining? Which would directly lead to my second question:

  1. Even if function inlining was performed, it looks like this would be done by adding the basic blocks from the callee to the caller's basic blocks (FuncTonized.java l. 77). Because of the way the basic blocks are constructed (either in ExtractBinaryViaIDA.py or IDAUtils.py), this would cause basic blocks in the function to have the same id (as far as I can see). Besides, I don't quite understand how this wouldn't lead to a function with basic blocks which make up two CFGs. Example:
    Callee:
    {
    "id": "some_function_name",
    "blocks": [{"id": 0, ..}, .. {"id": 3, ..}],
    ...
    }
    Caller:
    {
    "id": "some_other_function_name",
    "call": ["some_function_name"],
    "blocks": [{"id": 0, ..}, .. {"id": 4, ..}],
    ...
    }
    New function with inline expansion performed:
    {
    "id": "some_other_function_name_with_inline_expansion",
    "blocks": [{"id": 0, ..}, {"id": 0, ..}, .. , {"id": 3, ..}, {"id": 3, ..}, {"id": 4, ..}],
    ...
    }
    The new function now has multiple basic blocks with the same id and there are no edges between basic blocks from the caller to the inlined basic blocks from the callee. What am I missing? Every help is greatly appriciated!

Question about architecture

Hi, your stuff looks promising. What about architecture ? there is not only x86 is the world :D Did you plan tu support MIPS, ARM ?

Using kam1n0 with IDA Demo

Hello,

I am trying to use Kam1n0 with IDA Demo: I am able to see the interface but I am not able to perform any analysis. Is there a way to fix that?
Also, are we able to test Kam1n0 with IDA Pro free?

Thanks.

index error

java.lang.Exception: Failed to disasemble the given file.
at ca.mcgill.sis.dmas.kam1n0.impl.disassembly.DisassemblyFactoryIDA.loadAsMultiPart(DisassemblyFactoryIDA.java:203) ~[kam1n0-server.jar:2.0.0]
index_error
at ca.mcgill.sis.dmas.kam1n0.framework.disassembly.DisassemblyFactory.loadAsMultiPart(DisassemblyFactory.java:63) ~[kam1n0-server.jar:2.0.0] at ca.mcgill.sis.dmas.kam1n0.app.clone.CloneSearchResources.disassembleIntoMultiPart(CloneSearchResources.java:150) ~[kam1n0-server.jar:2.0.0] at ca.mcgill.sis.dmas.kam1n0.app.clone.BinaryIndexProcedureLSHMR.lambda$runProcedure$1(BinaryIndexProcedureLSHMR.java:70) ~[kam1n0-server.jar:2.0.0] at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) ~[na:1.8.0_261] at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source) ~[na:1.8.0_261] at java.util.stream.AbstractPipeline.copyInto(Unknown Source) ~[na:1.8.0_261] at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) ~[na:1.8.0_261] at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source) ~[na:1.8.0_261] at java.util.stream.AbstractPipeline.evaluate(Unknown Source) ~[na:1.8.0_261] at java.util.stream.ReferencePipeline.collect(Unknown Source) ~[na:1.8.0_261] at ca.mcgill.sis.dmas.kam1n0.app.clone.BinaryIndexProcedureLSHMR.runProcedure(BinaryIndexProcedureLSHMR.java:100) ~[kam1n0-server.jar:2.0.0] at ca.mcgill.sis.dmas.kam1n0.app.scheduling.LocalDmasJobProcedure.execute(LocalDmasJobProcedure.java:104) ~[kam1n0-server.jar:2.0.0] at org.quartz.core.JobRunShell.run(JobRunShell.java:202) ~[kam1n0-server.jar:2.0.0] at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) ~[kam1n0-server.jar:2.0.0]

IDA Pro Plug-in for Linux

Hi There,

Great work!

I'm trying to install Kam1n0 on a Linux server machine. I was able to install the Kam1n0 server, but I can not install the "IDA Pro Plug-in" since the provided installer is for Windows. Is it possible to make it work on Linux?

p.s., we do have an IDA-Pro for Linux.

Best,
Yuede

FileNotFoundException from file.transferTo(new_file)

Hi! I'm using development mode of Kam1n0 2.x with window 7, JDK/JRE 1.8, and IntelliJ IDEA.

Under the indexing and binary composition tab, after I click Browse -> Analyze, an alert pops up:

Unsupported format org.springframework.web.multipart.support.StandardMultipartHttpServletRequest$StandardMultipartFile

However, the error shown in the console is "java.io.IOException: java.io.FileNotFoundException: C:\Users\Ying\AppData\Local\Temp\tomcat.3714171793063480935.8571\work\Tomcat\localhost\ROOT\tmp\test\libz.so.1.2.11-gcc-g-O1-m32-fno-pic.bin (The system cannot find the path specified)"

I checked the path above, tmp\test hasn't been created in path \ROOT. After I manually create path tmp\test\ using windows explorer, the error disappears. After I restart the application, the error shows again because the path "tomcat.xxxx" has been changed.

So I tried to debug. The error comes from line 113 file.transferTo(new_file) under the indexing tab, and line 177 under binary composition tab. The location of file in file.transferTo(new_file) is the path C:\Users\Ying\AppData\Local\Temp\tomcat.3714171793063480935.8571\work\Tomcat\localhost\ROOT\ shown above.

The full error info in the console is attached.
FileNotFoundException after browing binary file.txt

IDA Pro won't communicate with Kam1n0

Uploading a new file for indexing through the web interface works fine, but I can't seem to get IDA Pro to talk to the Kam1n0 server. For index and search operations, I end up with the following error:

kam1n0-error

There are no error messages in the Kam1n0 console, and I'm not sure where else to look for log messages.

Failed to disasemble the given file

Hi,
I have installed the latest Kam1n0 v2.1 release along with IDA Pro 7.4 (which is the current available version of IDA Pro)
However, when I am trying to index a simple binary file (a normal helloworld object file), it throws me the following error:
c.m.s.d.k.f.d.DisassemblyFactory : Failed to parse the assembly file. The output file parts cannot be located. c.m.s.d.k.f.d.DisassemblyFactory : Failed to parse the assembly file. java.lang.Exception: Failed to disasemble the given file.
ca.mcgill.sis.dmas.kam1n0.impl.disassembly.DisassemblyFactoryIDA.loadAsMultiPart(DisassemblyFactoryIDA.java:203)
ca.mcgill.sis.dmas.kam1n0.framework.disassembly.DisassemblyFactory.loadAsMultiPart(DisassemblyFactory.java:63)
ca.mcgill.sis.dmas.kam1n0.app.clone.CloneSearchResources.disassembleIntoMultiPart(CloneSearchResources.java:150)
This is the corresponding log file is spring.log
Kindly let me know where the issue is and how I can resolve it.
Thanks!

Indexing fails with FileNotFoundException

First of all, thanks for this project! It looks very promising.

I'm trying to run Kam1n0 with the provided libpng and zlib dll files. After manually configuring my IDA Pro path in kam1n0-conf.xml, my IDA installation is found, but indexing fails with the following error:

[ERROR] 09-28 14:14:28.228 ca.mcgill.sis.dmas.kam1n0.framework.disassembly.DisassemblyFactory [DefaultQuartzScheduler_Worker-1] DisassemblyFactory - Failed to parse the assembly file.
 java.io.FileNotFoundException: C:\ProgramData\Kam1n0-data\tmp\admin\libpng-1.7.0b54.dll.tmp (The system cannot find the file specified)
        at java.io.FileInputStream.open0(Native Method) ~[?:1.8.0_60]
        at java.io.FileInputStream.open(Unknown Source) ~[?:1.8.0_60]
        at java.io.FileInputStream.<init>(Unknown Source) ~[?:1.8.0_60]
        at com.google.common.io.Files$FileByteSource.openStream(Files.java:127) ~[Kam1n0-0.1.0.jar:?]
        at com.google.common.io.Files$FileByteSource.openStream(Files.java:117) ~[Kam1n0-0.1.0.jar:?]
        at com.google.common.io.ByteSource$AsCharSource.openStream(ByteSource.java:404) ~[Kam1n0-0.1.0.jar:?]
        at com.google.common.io.CharSource.openBufferedStream(CharSource.java:99) ~[Kam1n0-0.1.0.jar:?]
        at com.google.common.io.CharSource.readLines(CharSource.java:198) ~[Kam1n0-0.1.0.jar:?]
        at ca.mcgill.sis.dmas.io.LinesOnRAM.<init>(LinesOnRAM.java:34) ~[Kam1n0-0.1.0.jar:?]
        at ca.mcgill.sis.dmas.io.Lines.fromFileFullyCached(Lines.java:39) ~[Kam1n0-0.1.0.jar:?]
        at ca.mcgill.sis.dmas.kam1n0.impl.disassembly.DisassemblyFactoryIDA.load(DisassemblyFactoryIDA.java:126) [Kam1n0-0.1.0.jar:?]
        at ca.mcgill.sis.dmas.kam1n0.deamon.LSHMR.FunctionCloneSearchServiceProvider_LSH_MR.diassemble(FunctionCloneSearchServiceProvider_LSH_MR.java:219) [Kam1n0-0.1.0.jar:?]
        at ca.mcgill.sis.dmas.kam1n0.deamon.LSHMR.BinaryIndexProcedureLSHMR.execute(BinaryIndexProcedureLSHMR.java:53) [Kam1n0-0.1.0.jar:?]
        at org.quartz.core.JobRunShell.run(JobRunShell.java:202) [Kam1n0-0.1.0.jar:?]
        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) [Kam1n0-0.1.0.jar:?]
[ERROR] 09-28 14:14:28.245 ca.mcgill.sis.dmas.kam1n0.deamon.LSHMR.BinaryIndexProcedureLSHMR [DefaultQuartzScheduler_Worker-1] BinaryIndexProcedureLSHMR - Failed to process the IndexBinary job from admin
 java.lang.Exception: Failed to disasemble the given file.
        at ca.mcgill.sis.dmas.kam1n0.impl.disassembly.DisassemblyFactoryIDA.load(DisassemblyFactoryIDA.java:142) ~[Kam1n0-0.1.0.jar:?]
        at ca.mcgill.sis.dmas.kam1n0.deamon.LSHMR.FunctionCloneSearchServiceProvider_LSH_MR.diassemble(FunctionCloneSearchServiceProvider_LSH_MR.java:219) ~[Kam1n0-0.1.0.jar:?]
        at ca.mcgill.sis.dmas.kam1n0.deamon.LSHMR.BinaryIndexProcedureLSHMR.execute(BinaryIndexProcedureLSHMR.java:53) [Kam1n0-0.1.0.jar:?]
        at org.quartz.core.JobRunShell.run(JobRunShell.java:202) [Kam1n0-0.1.0.jar:?]
        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) [Kam1n0-0.1.0.jar:?]

A similar error occurs for the zlib dll. The tmp folder contains the following files, i.e. no .tmp files:

 Directory of C:\ProgramData\Kam1n0-data\tmp\admin

28-09-2015  14:14           195.072 libpng-1.7.0b54.dll
28-09-2015  14:14           335.872 libpng-1.7.0b54.id0
28-09-2015  14:14           761.856 libpng-1.7.0b54.id1
28-09-2015  14:14                47 libpng-1.7.0b54.id2
28-09-2015  14:14            16.384 libpng-1.7.0b54.nam
28-09-2015  14:14               501 libpng-1.7.0b54.til

Where is the edge coverage code?

Hello, I'm reading the paper Asm2Vec:Boosting Static Representation Robustness for Binary Clone Search, and feel confused about the procedure of edge coverage mentioned in Chapter 4.3.2, so I want to find the source code about the edge coverage. However, it's seems hard for me to find the location of edge coverage function, so where is the edge coverage code?

Failed to Locate IDAPRO

Hi there,
I try to submit a binary to INDEXING tab but it displays like the following error:

2020-02-03 16:48:18.933 ERROR 4652 --- [nio-8571-exec-9] c.m.s.d.k.f.d.DisassemblyFactory : Failed to retrieved IDA Path from registery

java.lang.NullPointerException: null
at ca.mcgill.sis.dmas.kam1n0.impl.disassembly.DisassemblyFactoryIDA.getIDAHome(DisassemblyFactoryIDA.java:101) [kam1n0-server.jar:2.0.0]
at ca.mcgill.sis.dmas.kam1n0.impl.disassembly.DisassemblyFactoryIDA.(DisassemblyFactoryIDA.java:92) [kam1n0-server.jar:2.0.0]
at ca.mcgill.sis.dmas.kam1n0.framework.disassembly.DisassemblyFactory.getDefaultDisassemblyFactory(DisassemblyFactory.java:77) [kam1n0-server.jar:2.0.0]
at ca.mcgill.sis.dmas.kam1n0.app.clone.CloneSearchResources.(CloneSearchResources.java:128) [kam1n0-server.jar:2.0.0]
at ca.mcgill.sis.dmas.kam1n0.app.clone.asm.AsmApplicationMeta.getResource(AsmApplicationMeta.java:57) [kam1n0-server.jar:2.0.0]
at ca.mcgill.sis.dmas.kam1n0.app.ApplicationMeta.submitJob(ApplicationMeta.java:102) [kam1n0-server.jar:2.0.0]
at ca.mcgill.sis.dmas.kam1n0.app.clone.AbastractCloneSearchHandler.postBinary(AbastractCloneSearchHandler.java:154) [kam1n0-server.jar:2.0.0]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_231]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_231]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_231]
at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_231]

Thanks!

Failed to log in

Hello,
I am having the same problem as issue #20 "NullPointerException in Login". I've tried the solutions provided in that post but still could not load the login page. I was wondering how should I set the data path correctly?

Is there a limit for number of binaries that can be indexed?

Hi,
While I was indexing binaries 1 by 1, I found that after every step the binary browser shows different names when I refresh. Also, I have indexed around 834 binaries however in the homepage it shows the application has only 59 files.
Can someone please confirm if the repository has a limit for number of binaries that can be indexed or is it done only for the display?
Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.