Advertisement
Guest User

Java Cod Analysis

a guest
Mar 3rd, 2020
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.90 KB | None | 0 0
  1. Java code analysis.
  2. • Compilation.
  3. ◦ Compilation Target.
  4. ‣ Byte Code.
  5. ‣ Machine Code.
  6. ◦ Target Architecture.
  7. ‣ JVM.
  8. ‣ Specific CPU.
  9. ‣ Specific instruction set.
  10. ◦ Compilation from/to machine code.
  11. ‣ To. Compilation. Assembly.
  12. ‣ From. Disassembler. Decompiler.
  13. ◦ Compilation from/to Bytecode.
  14. ‣ To. Java.
  15. ‣ From. Java.
  16. ‣ Preserve symbols. javac -g Hello.java
  17. ◦ Bytecode. .class.
  18. ‣ Target. JVM instruction set version.
  19. ◦ Decompilers. Java.
  20. ‣ Java Decompiler.
  21. ‣ CFR.
  22. ‣ Krakatau.
  23. ‣ Procyon.
  24. ‣ Ghidra (NSA).
  25. • Obfuscation.
  26. ◦ Strings inside .class files.
  27. ‣ XOR. With key.
  28. • Byte-based. Per bit with key.
  29. • Multi-byte based.
  30. ◦ Add key.
  31. ◦ Replace with cyphertext.
  32. • Encryption. Plaintext XOR Key = Ciphertext.
  33. • Decryption. Ciphertext XOR Key = Plaintext.
  34. ◦ Undo.
  35. ‣ If Xor with key.
  36. ‣ Binary Instrumentation.
  37. • Binary Instrumentation. Extract decrypted strings at runtime.
  38. ◦ Dynamic. Modifcation & addition.
  39. ‣ Machinecode or bytecode.
  40. ‣ By.
  41. • Intercepting flow control.
  42. • Injecting additional code.
  43. ◦ Java.
  44. ‣ Java Agent. Interpreter-feature.
  45. • java.lang.Instrument.
  46. • Programming Interface. ClassFileTransformer.
  47. • Usage. java -javaagent:agent.jar Hello
  48. • Phases.
  49. ◦ AgentMain.class premain()
  50. ◦ Transformer.class transform(before: () -> ()) -> after: () -> ()
  51. ‣ Instruments each class on load.
  52. ◦ MyProgram.class beforeMyFunc1() afterMyFunc1()
  53. ◦ Usages.
  54. ‣ Additional logging.
  55. ‣ Perf.
  56. ‣ Fuzzing. Testing for inputs.
  57. ◦ Usages.
  58. ‣ Extracting shared SSL&TLS master key. Neykov/extract-ssl-secrets.
  59. • Bytecode manipulation.
  60. ◦ Tools.
  61. ‣ JavaAssist.
  62. ‣ ASM.
  63. ‣ CGLib.
  64. ‣ Serp.
  65. ‣ Byte Code Engineering Library BECL.
  66. ‣ Cojen.
  67. ‣ Scoot.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement