19 November 2016 - 04:28:29 - Read: 380

Writeups CDC 2016 - SourceCore

Dikasih sebuah file yang what the frog.

xff)); }System.out.println("}");
}}impo rtjav a.lang.ref l
	ect.Me thod;p ubli cclassSourceC ore{pu
		blicstat icvoidmain(String[]args){double[]scratch={7
		0+1,100 +10+5-1,101.000,(30*3+7)};
			for(inti=0;i<scratch.length;i++){
			//System.out.println(scra tch[i]);Syst
		e
		m.o ut.println((char)scrat
	c
	h[i]); }newSo urce Core().thi
		sis() ;}publicstaticvoid_thisis(){int[]scratch={32,104
		,10 5,0x4e,32/*functi
		on *
			/,33
			,116};inti=scratch.length ;do{i--;Syst
		e m.out.print
		ln( (char)scratch[i]);}w
	h
	ile(i> 0);new Sour ceCore()._t
		he(); }publicstaticvoid__thisis(){int[]scratch={32,104
		,10 5,0x4e,32/*functi
		on *
			/,33
			,116};inti=scratch.length ;do{i--;Syst
		e m.out.print
		ln( (char)scratch[i]);}whil
	e
	(i>0); newSou rceC ore().thefl
		ag(); }publicstaticvoid_thisis_(){int[]scratch={32,104
		,10 5,0x4e,32/*functi
		on *
			/,33
			,116};inti=scratch.length ;do{i--;Syst
		e m.out.print
		ln( (char)scratch[i]);}
	w
	hile(i >0);ne wSou rceCore().th
		e();} publicstaticvoid_thisis__(){int[]scratch={32,104,105
		,0x 4e,0x32/*function
		*/ ,
			0x33
			,116};inti=scratch.length ;do{i--;Syst
		e m.out.print
		ln( (char)scratch[i]);}while(i>0)
	;
	newSou rceCor e(). thisisthe
		flag( );}publicstaticvoidthisis(){int[]scratch={32,104
		,10 5,0x4e,32/*functi
		on *
			/,33
			,116};inti=scratch.length ;do{i--;Syst
		e m.out.print
		ln( (char)scratch[i]);}
	w
	hile(i >0);ne wSou rceCor
		e().t he();}publicstaticvoidthe() {int[]scratch=
{0x66,108,9 7/*usingmethod*/,103,11 0,121/*whynot?*/,97,32,67,/*
isn'tit?*/68,67,50,48/*CDC201 6*/,49,54, 123,11
		4,111/* kementrianpertahananRI*/};
			for(inti=0;i<scratch.length;i++){//
			System.out.println(scratc h[i]*3);Syst
		e
		m.o ut.println((char)scr
	a
	tch[i] );}new Sour ceCore(
		).fla g();}publicstaticvoid_the(){ int[]scratch=
{0x66,1608,97/ *usingmethod*/,1403,131 0,121/*whynot?*/,97,32,67,
/*isn'tit?*/68,67,50,48/*CDC201 6*/,49,54, 123,11
		4,111/* kementrianpertahananRI*/};
			for(inti=0;i<scratch.length;i++){//
			System.out.println(scratc h[i]*3);Syst
		e
		m.o ut.println((char)scratc
	h
	[i]);} newSou rceC ore().thef
		lag() ;}publicstaticvoidtheflag() {int[]scratch={
0x66,108,9 7/*usingmethod*/,103,11 0,121/*whynot?*/,97,32,67,
/*isn'tit?*/68,67,50,48/*CDC201 6*/,49,54, 123,11
		4,111/* kementrianpertahananRI*/};
			for(inti=0;i<scratch.length;i++){//
			System.out.println(scratc h[i]*3);Syst
		e
		m.o ut.println((char)scr
	a
	tch[i] );}new Sour ceCore().fl
		ag();}pu blicstaticvoidthe_flag(){do uble[]scratch=
{0x66,108,97/*u singmethod*/,103,0x110,0x121/*wh ynot?*/,97/3,32.
000,67.00,/*isn'tit?*/68,67,50,48/*CDC201 6*/,49,54, 123,11
		4,111/* kementrianpertahananRI*/};
			for(inti=0;i<scratch.length;i++){//
			System.out.println(scratc h[i]*3);Syst
		e
		m.o ut.println((char)scra
	t
	ch[i]) ;}newS ourc eCore().
		f_lag ();}publicstaticvoidf_lag(){int[] 
scratch={2958550,44,293580/*CyberDefense*/,2472335,2902370/*Competition*
/,28305,29580,24735,29580/*2016*/,25755,29070,28305,29580/*MERDEKA*
/,2473335,29
		580,298 35/*blink*/,4323,2634265};
			for(inti=0;i<scratch.length;i++
		)
		{System.out.println(scra
	t
	ch[i]) ;}Syst em.o ut.print
		ln("} ");}publicstaticvoidflags(){int[]scrat ch={2958330,24735,29554580/*CyberDefense*/,
24735,29070/*Competition*
/,28305,295380,24735,29580/*2016*/
,25755,29070,28305,29580
/*MERDEKA
*/,24735,2
		9580,29 835/*blink*/,28050,26265};
			for(inti=0;i<scratch.length;i++
		)
		{System.out.println(scra
	t
	ch[i]) ;}Syst em.o ut.println("}");
		}publ icstaticvoidthisistheflag(){int[]scr 
atch={29580,24735,29544580
/*CyberDefense*/,2473335,2907220
/*Competition*/,2833305,
2943580,24735,29580/*2016*/,25755,
29070,28305,29580/*MERD
EKA*/,24735,29580,29
		835/*bl ink*/,28342050,262634345};
			for(inti=0;i<scratch.leng th;i++){System
		.
		out.println((char)(scrat
	c
	h[i])) ;}Syst em.o ut.prin
		tln(" }");}publicstaticvoidflag(){int[] scratch=
{29580,24735,29580/*CyberDefense*/,24735,29070/*Competition*/,28305
,29580,24735,29580/*2016*/,25755,29070,28305,29580/*MERDEKA*/,24735,2
		9580,29 835/*blink*/,28050,26265};
			for(inti=0;i<scratch.leng th;i++){System.out.
		p
		rintln((char)(scratch[i]
	/
0

Ambil 1 paragraf, dan setelah dipelajari bentuk nya seperti urutan codingan.

	xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
		xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
		xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
			xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
			xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
		x
		xxxxxxxxxxxxxxxxxxxxxxxxxx
	x

Kita lihat pada baris

}}impo rtjav a.lang.ref l

Karena ini script java, kemungkinan "import" adalah string pertamanya. Kita runutkan mundur ke belakang, tapi karena melihat bentuknya, kita tidak bisa merotasi semua karakter. Karakter yang tidak boleh kita rotasi adalah "enter"\n "tab"\t "spasi"\s

Berarti jika kita tidak menyertakan enter, tab, dan spasi maka untuk string "import" kembali ke posisi awal adalah sebanyak 32x.

Setelah dirotasi kita akan mendapatkan script java yang siap untuk dicompile.

import java.lang.reflect.Method;
public class SourceCore {
	public static void main(String[] args){
		double[] scratch={70+1,100+10+5-1,101.000,(30*3+7)};
		for(int i=0;i<scratch.length;i++){
			//System.out.println(scratch[i]);
			System.out.println((char) scratch[i]);
		}
		new SourceCore().thisis();
	}
	public static void _thisis(){
		int[] scratch={32,104,105,0x4e,32/*function*/,33,116};
		int i=scratch.length;
		do {
			i--;
			System.out.println((char) scratch[i]);
		} while(i>0);
		new SourceCore()._the();
	}
	public static void __thisis(){
		int[] scratch={32,104,105,0x4e,32/*function*/,33,116};
		int i=scratch.length;
		do {
			i--;
			System.out.println((char) scratch[i]);
		} while(i>0);
		new SourceCore().theflag();
	}
	public static void _thisis_(){
		int[] scratch={32,104,105,0x4e,32/*function*/,33,116};
		int i=scratch.length;
		do {
			i--;
			System.out.println((char) scratch[i]);
		} while(i>0);
		new SourceCore().the();
	}
	public static void _thisis__(){
		int[] scratch={32,104,105,0x4e,0x32/*function*/,0x33,116};
		int i=scratch.length;
		do {
			i--;
			System.out.println((char) scratch[i]);
		} while(i>0);
		new SourceCore().thisistheflag();
	}
	public static void thisis(){
		int[] scratch={32,104,105,0x4e,32/*function*/,33,116};
		int i=scratch.length;
		do {
			i--;
			System.out.println((char) scratch[i]);
		} while(i>0);
		new SourceCore().the();
	}
	public static void the(){
		int[] scratch={0x66,108,97/*using method*/,103,110,121
/*why not?*/,97,32,67,/*isn't it?*/68,67,50,48/*CDC2016*/
,49,54,123,114,111/*kementrian pertahanan RI*/};
		for(int i=0;i<scratch.length;i++){
			//System.out.println(scratch[i]*3);
			System.out.println((char) scratch[i]);
		}
		new SourceCore().flag();
	}
	public static void _the(){
		int[] scratch={0x66,1608,97
/*using method*/,1403,1310
,121/*why not?*/,97,32,67,/*isn't it?*/68,67,50,48/*CDC2016*/
,49,54,123,114,111/*kementrian pertahanan RI*/};
		for(int i=0;i<scratch.length;i++){
			//System.out.println(scratch[i]*3);
			System.out.println((char) scratch[i]);
		}
		new SourceCore().theflag();
	}
	public static void theflag(){
		int[] scratch={0x66,108,97/*using method*/
,103,110,121/*why not?*/,97,32,67,/*isn't it?*/68,67,50,48
/*CDC2016*/,49,54,123,114,111
/*kementrian pertahanan RI*/};
		for(int i=0;i<scratch.length;i++){
			//System.out.println(scratch[i]*3);
			System.out.println((char) scratch[i]);
		}
		new SourceCore().flag();
	}
	public static void the_flag(){
		double[] scratch={0x66,108,97/*using method*/
,103,0x110,0x121/*why not?*/,97/3,32.000,67.00,/*isn't it?*/
68,67,50,48/*CDC2016*/,49,54,123,114,111
/*kementrian pertahanan RI*/};
		for(int i=0;i<scratch.length;i++){
			//System.out.println(scratch[i]*3);
			System.out.println((char) scratch[i]);
		}
		new SourceCore().f_lag();
	}
	public static void f_lag(){
		int[] scratch={2958550,44,293580/*Cyber 
Defense*/,2472335,2902370/*Competition*/,28305,29580,24735,
29580/*2016*/,25755,29070,28305,29580/*MERDEKA*/,2473335,29580,
29835/*blink*/,4323,2634265};
		for(int i=0;i<scratch.length;i++){
			System.out.println(scratch[i]);
		}
		System.out.println("}");
	}
	public static void flags(){
		int[] scratch={2958330,24735,29554580/*Cyber
 Defense*/,24735,29070/*Competition*/,28305,295380,24735,29580
/*2016*/,25755,29070,28305,29580/*MERDEKA*/,24735,29580,29835/*blink*/,
28050,26265};
		for(int i=0;i<scratch.length;i++){
			System.out.println(scratch[i]);
		}
		System.out.println("}");
	}
	public static void thisistheflag(){
		int[] scratch={29580,24735,29544580/*Cyber 
Defense*/,2473335,2907220/*Competition*/,2833305,2943580,
24735,29580/*2016*/,25755,29070,28305,29580/*MERDEKA*/,24735,29580,29835
/*blink*/,28342050,262634345};
		for(int i=0;i<scratch.length;i++){
			System.out.println((char) (scratch[i]));
		}
		System.out.println("}");
	}
	public static void flag(){
		int[] scratch={29580,24735,29580/*Cyber 
Defense*/,24735,29070
/*Competition*/,28305,29580,24735,29580/*2016*/,25755,
29070,28305,29580/*MERDEKA*/,24735,29580,29835/*blink*/,28050,26265};
		for(int i=0;i<scratch.length;i++){
			System.out.println((char) (scratch[i]/0xff));
		}
		System.out.println("}");
	}
}

$ javac -g SourceCore.java
$ java SourceCore

Done.

Flag: CDC2016{rotatarotaterotatung}